mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-07 16:33:58 -04:00
Plane: Pass external HAGL to TECS
This commit is contained in:
parent
b59b2138b8
commit
d6d4f996f7
@ -789,7 +789,16 @@ float Plane::tecs_hgt_afe(void)
|
||||
coming.
|
||||
*/
|
||||
float hgt_afe;
|
||||
|
||||
if (flight_stage == AP_FixedWing::FlightStage::LAND) {
|
||||
|
||||
#if AP_MAVLINK_MAV_CMD_SET_HAGL_ENABLED
|
||||
// if external HAGL is active use that
|
||||
if (get_external_HAGL(hgt_afe)) {
|
||||
return hgt_afe;
|
||||
}
|
||||
#endif
|
||||
|
||||
hgt_afe = height_above_target();
|
||||
#if AP_RANGEFINDER_ENABLED
|
||||
hgt_afe -= rangefinder_correction();
|
||||
|
Loading…
Reference in New Issue
Block a user