1- right from the start the aircraft tries to achieve the reference heading, which is the heading it had when the battery is connected and turned on. If the aircraft is later moved to a takeoff spot and the heading is changed it will try to rotate to the original heading as it is taking off which can make some motors spin too fast and cause a flip.
One solution to this would be to add a command to the takeoff block in the flightplan so that the heading is reset. I could not find which command can do this.
Switching the mode to auto2/NAV from any other mode will reset nav_heading to the current heading.
So you can moved the aircraft around just fine after powerup, as long as you don't move it anymore once you entered NAV mode.
I guess nobody was missing a convenience/flight plan function for that reason, but it makes sense to have one (added in master).
You can always also use the set primitive to set a variable to a specific value (as always, use this primitive with caution): <set var="nav_heading" value="stateGetNedToBodyEulers_i()->psi"/>
2- if the throttle is set to 0 in the RC for some time after entering the takeoff block, it is possible that due to GPS fluctuations the CLIMB point will no longer be located directly above the current position of the aircraft. From the start the aircraft tries to move horizontally to come back to the CLIMB point. This causes it to try to take off with some pitch and roll which can cause a flip.
- Unless you are still tuning vertical gains or try this for the first time, you should give full throttle authority (max throttle on RC) after switching to nav and before entering takeoff anyway...
- If during testing you don't mind that the climb waypoint moves with your aircraft until you reach the takeoff height and switch to standby, you can move the call to NavSetWaypointHere(WP_CLIMB) to the pre_call of the block. This will set the waypoint each time the block is executed and not just once as the first stage, also meaning you can drift off with wind. Hence IMHO not what you should normally use as your "standard" takeoff procedure.