From 71f8f47f622bfd8df448a09aeda4acc14f6f6484 Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Wed, 5 Jul 2023 17:28:21 +0200 Subject: [PATCH] Navigator: remove deprecated calculate_takeoff_altitude() Signed-off-by: Silvan Fuhrer --- src/modules/navigator/mission.cpp | 17 ----------------- src/modules/navigator/mission.h | 5 ----- 2 files changed, 22 deletions(-) diff --git a/src/modules/navigator/mission.cpp b/src/modules/navigator/mission.cpp index 75c4ce2d41..d5f1db688b 100644 --- a/src/modules/navigator/mission.cpp +++ b/src/modules/navigator/mission.cpp @@ -1367,23 +1367,6 @@ Mission::set_align_mission_item(struct mission_item_s *mission_item, struct miss mission_item->force_heading = true; } -float -Mission::calculate_takeoff_altitude(struct mission_item_s *mission_item) -{ - /* calculate takeoff altitude */ - float takeoff_alt = get_absolute_altitude_for_item(*mission_item); - - /* takeoff to at least MIS_TAKEOFF_ALT above home/ground, even if first waypoint is lower */ - if (_navigator->get_land_detected()->landed) { - takeoff_alt = fmaxf(takeoff_alt, _navigator->get_global_position()->alt + _navigator->get_takeoff_min_alt()); - - } else { - takeoff_alt = fmaxf(takeoff_alt, _navigator->get_home_position()->alt + _navigator->get_takeoff_min_alt()); - } - - return takeoff_alt; -} - void Mission::heading_sp_update() { diff --git a/src/modules/navigator/mission.h b/src/modules/navigator/mission.h index 49154c73ef..c6a4dd9668 100644 --- a/src/modules/navigator/mission.h +++ b/src/modules/navigator/mission.h @@ -153,11 +153,6 @@ private: */ void set_align_mission_item(struct mission_item_s *mission_item, struct mission_item_s *mission_item_next); - /** - * Calculate takeoff height for mission item considering ground clearance - */ - float calculate_takeoff_altitude(struct mission_item_s *mission_item); - /** * Updates the heading of the vehicle. Rotary wings only. */