From daf668e6873827a092d5705af661d96bc8f637a5 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 6 Mar 2017 20:42:01 +0100 Subject: [PATCH] Fixed wing land detector: Fix RTL logic with a temporary altitude limit workaround --- src/modules/land_detector/FixedwingLandDetector.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/land_detector/FixedwingLandDetector.cpp b/src/modules/land_detector/FixedwingLandDetector.cpp index d0cd2ed490..f29e22c23c 100644 --- a/src/modules/land_detector/FixedwingLandDetector.cpp +++ b/src/modules/land_detector/FixedwingLandDetector.cpp @@ -94,8 +94,10 @@ void FixedwingLandDetector::_update_params() float FixedwingLandDetector::_get_max_altitude() { - //ToDo - return 0.0f; + // TODO + // This means no altitude limit as the limit + // is always current position plus 1000 meters + return -_controlState.z_pos + 1000; } bool FixedwingLandDetector::_get_freefall_state()