-
Notifications
You must be signed in to change notification settings - Fork 32
takeoff(), adds_mission(), land()
takeoff()
and land()
start and end the vehicle's flight, generateWaypoints()
generate the waypoints for the mission, and adds_mission()
puts waypoints in the current mission.
takeoff()
ensures that before flying, that a few things get checked.
- Pre-arm checks - waits until autopilot is ready
- Motors arm properly - waits until arming process is complete
- Take off - uses Dronekit's
vehicle.simple_takeoff
function to take off to target altitude
adds_mission()
adds several commands to the current mission.
First, it adds a takeoff command, so when the vehicle mode is in auto, it takes off through the command list. Note: if the vehicle mode is in guided, it uses the actual takeoff function.
Next, it takes the array of generated waypoints (from generateWaypoints()
) and adds each one as a command. It then adds a dummy waypoint so that the mission will know it has reached its destination.
Once all of those are added, commands are uploaded to the vehicle.
land()
is one simple call to Dronekit's vehicle.mode
- it sets it to VehicleMode("RTL")
, then closes the vehicle object using vehicle.close()
. Setting the vehicle mode to RTL automatically lands it in the original GPS coordinates of the vehicle.
- Project Overview
- Dependency List
- GCS JSON Message Formatting
- Dronekit mission_basic.py
- Continuous Integration with Travis
- Engineering Requirements
- Test Hierarchy
- Style Guide
- Glossary