Navigator: use NAV_FW_ALTL_RAD only for FW landings, not VTOL landings

Also containst a mini refactor by removing the unnecessary function
get_default_altitude_acceptance_radius().

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2022-09-22 16:52:51 +02:00
parent c6c7733587
commit 0df878bc18
3 changed files with 11 additions and 24 deletions
+1 -1
View File
@@ -283,7 +283,7 @@ MissionBlock::is_mission_item_reached_or_completed()
// check if within loiter radius around wp, if yes then set altitude sp to mission item
if (dist >= 0.0f && dist_xy <= (_navigator->get_acceptance_radius() + fabsf(_mission_item.loiter_radius))
&& dist_z <= _navigator->get_default_altitude_acceptance_radius()) {
&& dist_z <= _navigator->get_altitude_acceptance_radius()) {
curr_sp->alt = mission_item_altitude_amsl;
curr_sp->type = position_setpoint_s::SETPOINT_TYPE_LOITER;