Browse Source

return hagl valid false if update was rejected

master
ChristophTobler 8 years ago
parent
commit
d2945abd85
  1. 3
      EKF/terrain_estimator.cpp

3
EKF/terrain_estimator.cpp

@ -145,6 +145,7 @@ void Ekf::fuseHagl()
} }
} else { } else {
_innov_check_fail_status.flags.reject_hagl = true;
return; return;
} }
} }
@ -155,7 +156,7 @@ bool Ekf::get_terrain_vert_pos(float *ret)
{ {
memcpy(ret, &_terrain_vpos, sizeof(float)); 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; return true;
} else { } else {

Loading…
Cancel
Save