mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
AP_HAL_SITL: calls to terrain:height_amsl provide extrapolate and corrected params
This commit is contained in:
parent
1c4b2be16a
commit
3d646a26e2
@ -487,7 +487,7 @@ float SITL_State::height_agl(void)
|
|||||||
location.lat = _sitl->state.latitude*1.0e7;
|
location.lat = _sitl->state.latitude*1.0e7;
|
||||||
location.lng = _sitl->state.longitude*1.0e7;
|
location.lng = _sitl->state.longitude*1.0e7;
|
||||||
|
|
||||||
if (_terrain->height_amsl(location, terrain_height_amsl)) {
|
if (_terrain->height_amsl(location, terrain_height_amsl, false)) {
|
||||||
return _sitl->state.altitude - terrain_height_amsl;
|
return _sitl->state.altitude - terrain_height_amsl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user