mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-22 19:53:18 +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:
@@ -844,11 +844,7 @@ void BlockLocalPositionEstimator::predict()
|
||||
|
||||
if (integrate && _sub_att.get().R_valid) {
|
||||
Matrix3f R_att(_sub_att.get().R);
|
||||
Vector3f a;
|
||||
float accel_dt = _sub_sensor.get().accelerometer_integral_dt / 1.e6f;
|
||||
a(0) = _sub_sensor.get().accelerometer_integral_m_s[0] / accel_dt;
|
||||
a(1) = _sub_sensor.get().accelerometer_integral_m_s[1] / accel_dt;
|
||||
a(2) = _sub_sensor.get().accelerometer_integral_m_s[2] / accel_dt;
|
||||
Vector3f a(_sub_sensor.get().accelerometer_m_s2);
|
||||
_u = R_att * a;
|
||||
_u(U_az) += 9.81f; // add g
|
||||
|
||||
|
||||
Reference in New Issue
Block a user