- For waypointMission, you can call finishedAction() to set the aircraft's behavior after finishing a waypointMission.
- For waypointV2Mission, you can call setFinishedAction() to set the aircraft's behavior after finishing a waypointMission.
Both of them are exactly the same. You can choose GO_HOME, AUTO_LAND, NO_ACTION etc. You can use FlightControllerState to monitor the flight status. For example, you can use isFlying() to know if the aircraft is still flying. You can use getTakeoffLocationAltitude(0 to know the take-off altitude and compare its altitude to the current aircraft's altitude. You can use getUltrasonicHeightInMeters() to know the the distance above ground. It is only valid when isUltrasonicBeingUsed() returns true, and this figure accuracy is 0.1m and only valid when the aircraft is about 5m above the ground.