return hagl valid false if update was rejected

This commit is contained in:
ChristophTobler
2017-07-13 14:17:48 +02:00
parent d69cc3d7c8
commit d2945abd85
+2 -1
View File
@@ -145,6 +145,7 @@ void Ekf::fuseHagl()
}
} else {
_innov_check_fail_status.flags.reject_hagl = true;
return;
}
}
@@ -155,7 +156,7 @@ bool Ekf::get_terrain_vert_pos(float *ret)
{
memcpy(ret, &_terrain_vpos, sizeof(float));
if (_terrain_initialised && _range_data_continuous) {
if (_terrain_initialised && _range_data_continuous && !_innov_check_fail_status.flags.reject_hagl) {
return true;
} else {