sensor_combined.msg: use uint32 for integral_dt

There is no reason to make this 64 bit. The same should be done in
the sensor raw messages, together with further cleanup.
This commit is contained in:
Beat Küng
2016-06-25 14:19:32 +02:00
committed by Lorenz Meier
parent 30301187f0
commit c66f26245c
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -7,11 +7,11 @@
# gyro timstamp is equal to the timestamp of the message
float32[3] gyro_integral_rad # delta angle in the NED body frame in rad in the integration time frame
uint64 gyro_integral_dt # delta time for gyro integral in us
uint32 gyro_integral_dt # delta time for gyro integral in us
uint64 accelerometer_timestamp # Accelerometer timestamp
float32[3] accelerometer_integral_m_s # velocity in NED body frame, in m/s^2
uint64 accelerometer_integral_dt # delta time for accel integral in us
uint32 accelerometer_integral_dt # delta time for accel integral in us
uint64 magnetometer_timestamp # Magnetometer timestamp
float32[3] magnetometer_ga # Magnetic field in NED body frame, in Gauss
+1 -1
View File
@@ -378,7 +378,7 @@ void Ekf2Replay::setEstimatorInput(uint8_t *data, uint8_t type)
parseMessage(data, dest_ptr, type);
_sensors.timestamp = replay_part1.time_ref;
_sensors.gyro_integral_dt = replay_part1.gyro_integral_dt;
_sensors.accelerometer_integral_dt = replay_part1.accelerometer_integral_dt;
_sensors.accelerometer_integral_dt = (uint32_t)replay_part1.accelerometer_integral_dt;
_sensors.magnetometer_timestamp = replay_part1.magnetometer_timestamp;
_sensors.baro_timestamp = replay_part1.baro_timestamp;
_sensors.gyro_integral_rad[0] = replay_part1.gyro_integral_x_rad;
+4 -4
View File
@@ -1076,7 +1076,7 @@ Sensors::accel_poll(struct sensor_combined_s &raw)
_last_sensor_data[i].accelerometer_integral_m_s[1] = vect_int(1);
_last_sensor_data[i].accelerometer_integral_m_s[2] = vect_int(2);
_last_sensor_data[i].accelerometer_integral_dt = accel_report.integral_dt;
_last_sensor_data[i].accelerometer_integral_dt = (uint32_t)accel_report.integral_dt;
float dt = accel_report.integral_dt / 1.e6f;
sensor_value = vect_int / dt;
@@ -1093,7 +1093,7 @@ Sensors::accel_poll(struct sensor_combined_s &raw)
}
_last_sensor_data[i].accelerometer_integral_dt =
accel_report.timestamp - _last_sensor_data[i].accelerometer_timestamp;
(uint32_t)(accel_report.timestamp - _last_sensor_data[i].accelerometer_timestamp);
float dt = _last_sensor_data[i].accelerometer_integral_dt / 1.e6f;
_last_sensor_data[i].accelerometer_integral_m_s[0] = vect_val(0) * dt;
_last_sensor_data[i].accelerometer_integral_m_s[1] = vect_val(1) * dt;
@@ -1149,7 +1149,7 @@ Sensors::gyro_poll(struct sensor_combined_s &raw)
_last_sensor_data[i].gyro_integral_rad[1] = vect_int(1);
_last_sensor_data[i].gyro_integral_rad[2] = vect_int(2);
_last_sensor_data[i].gyro_integral_dt = gyro_report.integral_dt;
_last_sensor_data[i].gyro_integral_dt = (uint32_t)gyro_report.integral_dt;
float dt = gyro_report.integral_dt / 1.e6f;
sensor_value = vect_int / dt;
@@ -1166,7 +1166,7 @@ Sensors::gyro_poll(struct sensor_combined_s &raw)
}
_last_sensor_data[i].gyro_integral_dt =
gyro_report.timestamp - _last_sensor_data[i].timestamp;
(uint32_t)(gyro_report.timestamp - _last_sensor_data[i].timestamp);
float dt = _last_sensor_data[i].gyro_integral_dt / 1.e6f;
_last_sensor_data[i].gyro_integral_rad[0] = vect_val(0) * dt;
_last_sensor_data[i].gyro_integral_rad[1] = vect_val(1) * dt;