mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-07 05:21:35 +08:00
Navigator: remove deprecated calculate_takeoff_altitude()
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -1367,23 +1367,6 @@ Mission::set_align_mission_item(struct mission_item_s *mission_item, struct miss
|
|||||||
mission_item->force_heading = true;
|
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
|
void
|
||||||
Mission::heading_sp_update()
|
Mission::heading_sp_update()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -153,11 +153,6 @@ private:
|
|||||||
*/
|
*/
|
||||||
void set_align_mission_item(struct mission_item_s *mission_item, struct mission_item_s *mission_item_next);
|
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.
|
* Updates the heading of the vehicle. Rotary wings only.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user