File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/modules/ekf2/EKF/aid_sources/gnss Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -378,13 +378,14 @@ void Ekf::controlGnssYawEstimator(estimator_aid_source3d_s &aid_src_vel)
378378{
379379 // update yaw estimator velocity (basic sanity check on GNSS velocity data)
380380 const float vel_var = aid_src_vel.observation_variance [0 ];
381+ const float vel_accuracy = sqrtf (vel_var);
381382 const Vector2f vel_xy (aid_src_vel.observation );
382383
383384 if ((vel_var > 0 .f )
384- && (vel_var < _params.ekf2_req_sacc )
385+ && (vel_accuracy < _params.ekf2_req_sacc )
385386 && vel_xy.isAllFinite ()) {
386387
387- _yawEstimator.fuseVelocity (vel_xy, vel_var , _control_status.flags .in_air );
388+ _yawEstimator.fuseVelocity (vel_xy, vel_accuracy , _control_status.flags .in_air );
388389
389390 // Try to align yaw using estimate if available
390391 if (((_params.ekf2_gps_ctrl & static_cast <int32_t >(GnssCtrl::VEL))
You can’t perform that action at this time.
0 commit comments