mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-11 23:43:35 +08:00
sensors: use sensor_gyro timestamp_sample for sensor_combined timestamp
The timestamp actually used by ekf2 is the sensor_combined timestamp, so we should be setting it with the actual data sample timestamp, rather than the aggregated sensors topic publication metadata. Later the sensor_combined message will be replaced with vehicle_imu that carries a separate publication timestamp and raw sample timestamp.
This commit is contained in:
@@ -596,7 +596,7 @@ void VotedSensorsUpdate::gyroPoll(struct sensor_combined_s &raw)
|
||||
_last_sensor_data[uorb_index].gyro_rad[1] = gyro_rate(1);
|
||||
_last_sensor_data[uorb_index].gyro_rad[2] = gyro_rate(2);
|
||||
|
||||
_last_sensor_data[uorb_index].timestamp = gyro_report.timestamp;
|
||||
_last_sensor_data[uorb_index].timestamp = gyro_report.timestamp_sample;
|
||||
_gyro.voter.put(uorb_index, gyro_report.timestamp, _last_sensor_data[uorb_index].gyro_rad,
|
||||
gyro_report.error_count, _gyro.priority[uorb_index]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user