mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 16:40:34 +08:00
Vehicle_odometry: protect angular_velocity field against aliasing
Accumulate delta-angles between each publication to get the correct angular velocity between two attitudes
This commit is contained in:
committed by
Mathieu Bresciani
parent
09d734955d
commit
e487d59521
@@ -1676,9 +1676,7 @@ void EKF2::PublishOdometry(const hrt_abstime ×tamp, const imuSample &imu_sa
|
||||
_ekf.getVelocity().copyTo(odom.velocity);
|
||||
|
||||
// angular_velocity
|
||||
const Vector3f rates{imu_sample.delta_ang / imu_sample.delta_ang_dt};
|
||||
const Vector3f angular_velocity = rates - _ekf.getGyroBias();
|
||||
angular_velocity.copyTo(odom.angular_velocity);
|
||||
_ekf.getAngularVelocityAndResetAccumulator().copyTo(odom.angular_velocity);
|
||||
|
||||
// velocity covariances
|
||||
_ekf.getVelocityVariance().copyTo(odom.velocity_variance);
|
||||
|
||||
Reference in New Issue
Block a user