ekf2: GNSS yaw only reset test ratio for new samples

- otherwise external test ratio monitoring could trigger a false positive
This commit is contained in:
Daniel Agar 2023-03-14 10:45:56 -04:00
parent e375e02974
commit 19a2b4ec31

View File

@ -48,10 +48,11 @@
void Ekf::updateGpsYaw(const gpsSample &gps_sample)
{
auto &gnss_yaw = _aid_src_gnss_yaw;
resetEstimatorAidStatus(gnss_yaw);
if (PX4_ISFINITE(gps_sample.yaw)) {
auto &gnss_yaw = _aid_src_gnss_yaw;
resetEstimatorAidStatus(gnss_yaw);
// initially populate for estimator_aid_src_gnss_yaw logging
// calculate the observed yaw angle of antenna array, converting a from body to antenna yaw measurement