Revert "Split get_terrain_vert_pos() into valid and get_vpos"

This commit is contained in:
Paul Riseborough
2017-07-19 17:33:48 +10:00
committed by GitHub
parent a59cf894d2
commit c887b02f21
5 changed files with 18 additions and 24 deletions
+5 -8
View File
@@ -150,9 +150,12 @@ void Ekf::fuseHagl()
}
}
// return true if the terrain estimate is valid
bool Ekf::get_terrain_valid()
// return true if the estimate is fresh
// return the estimated vertical position of the terrain relative to the NED origin
bool Ekf::get_terrain_vert_pos(float *ret)
{
memcpy(ret, &_terrain_vpos, sizeof(float));
if (_terrain_initialised && _range_data_continuous && !_innov_check_fail_status.flags.reject_hagl) {
return true;
@@ -161,12 +164,6 @@ bool Ekf::get_terrain_valid()
}
}
// get the estimated vertical position of the terrain relative to the NED origin
void Ekf::get_terrain_vert_pos(float *ret)
{
memcpy(ret, &_terrain_vpos, sizeof(float));
}
void Ekf::get_hagl_innov(float *hagl_innov)
{
memcpy(hagl_innov, &_hagl_innov, sizeof(_hagl_innov));