Skip to content

Commit 72cb3b7

Browse files
author
henrykotze
committed
make use of local position height for takeoff in gps denied environment
- When taking off in an gps denied environment, there would be no global position. Thus we make use of the local position estimate to check whether we have met the position setpoint. - As a side effect: This enables the ModeCompleted Message to be sent to an onboard computer for the ModeExecutor to know it can continue
1 parent e58035c commit 72cb3b7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/modules/navigator/mission_block.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ MissionBlock::is_mission_item_reached_or_completed()
199199
_waypoint_position_reached = true;
200200
}
201201

202+
/* in gps denied environment we make use of the local position estimate*/
203+
if(_navigator->get_local_position()->z <
204+
(-1.0f * takeoff_alt + altitude_acceptance_radius)) {
205+
_waypoint_position_reached = true;
206+
}
207+
202208
} else if (_mission_item.nav_cmd == NAV_CMD_TAKEOFF
203209
&& _navigator->get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING) {
204210
/* fixed-wing takeoff is reached once the vehicle has exceeded the takeoff altitude */

0 commit comments

Comments
 (0)