GPS Yaw: fall back to other yaw aiding source in case of bad data

If the user selects GPS yaw fusion but that there is no GPS yaw data in
the GPS message or if the fusion is rejected for some time, the GPS yaw
data is declared faulty and the fusion is stopped to allow an other
source of yaw aiding to start.
This commit is contained in:
bresch
2020-06-22 15:57:53 +02:00
committed by Mathieu Bresciani
parent fe2a9d3018
commit 51cd63d626
5 changed files with 57 additions and 1 deletions
+14
View File
@@ -170,6 +170,20 @@ void EkfWrapper::disableExternalVisionAlignment()
_ekf_params->fusion_mode &= ~MASK_ROTATE_EV;
}
bool EkfWrapper::isIntendingMagHeadingFusion() const
{
filter_control_status_u control_status;
_ekf->get_control_mode(&control_status.value);
return control_status.flags.mag_hdg;
}
bool EkfWrapper::isIntendingMag3DFusion() const
{
filter_control_status_u control_status;
_ekf->get_control_mode(&control_status.value);
return control_status.flags.mag_3D;
}
bool EkfWrapper::isWindVelocityEstimated() const
{
filter_control_status_u control_status;