mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 04:53:33 +08:00
sensor_combined: replace accel & gyro integral with value, use float for dt
Reason: the value is easier to read & handle (for example plotting). In most places the value is needed, not the integral. Note that this breaks the replay format for sdlog2 replay
This commit is contained in:
@@ -273,7 +273,7 @@ enum detect_orientation_return detect_orientation(orb_advert_t *mavlink_log_pub,
|
||||
|
||||
for (unsigned i = 0; i < ndim; i++) {
|
||||
|
||||
float di = sensor.accelerometer_integral_m_s[i] / (sensor.accelerometer_integral_dt / 1.e6f);
|
||||
float di = sensor.accelerometer_m_s2[i];
|
||||
|
||||
float d = di - accel_ema[i];
|
||||
accel_ema[i] += d * w;
|
||||
|
||||
Reference in New Issue
Block a user