mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 02:33:33 +08:00
split into get_terrain_valid and get_terrain_vert_pos
This commit is contained in:
@@ -150,12 +150,9 @@ void Ekf::fuseHagl()
|
||||
}
|
||||
}
|
||||
|
||||
// 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)
|
||||
// return true if the terrain estimate is valid
|
||||
bool Ekf::get_terrain_valid()
|
||||
{
|
||||
memcpy(ret, &_terrain_vpos, sizeof(float));
|
||||
|
||||
if (_terrain_initialised && _range_data_continuous && !_innov_check_fail_status.flags.reject_hagl) {
|
||||
return true;
|
||||
|
||||
@@ -164,6 +161,12 @@ bool Ekf::get_terrain_vert_pos(float *ret)
|
||||
}
|
||||
}
|
||||
|
||||
// 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));
|
||||
|
||||
Reference in New Issue
Block a user