I am working on a autonomous quadcopter project that uses the mission interface and mavlink. When starting a mission I do the following programatically.
- Send 4 waypoints
----1) Take off to 3 meters
----2) Rotate to destination (not needed but has a nice effect)
----3) Navigate to destination and wait there for 2 seconds
- Switch to AUTO
- Set rc 3 to 1200 (Trigger AUTO)
- Set rc 3 to 1000 (So it disarms after land)
- Set rc 3 to 0 (Give controls back to the operators RC so he/she can interrupt the mission)
- Wait till the quadcopter has landed / finished its mission
- Repeat with another destination
I test my software with SITL. In the simulation it does some weird things during TAKE OFF.
When the takeoff waypoint is executed it seems to drift away in the direction of which it has arrived in a previous mission. This is also visible in the APM Planner interface in the attached screenshot.
In the screenshot you can see that during the previous flight the quadcopter came from a south-west direction. In the current mission in waypoint  the quadcopter is supposed to fly straight up but insteed drifts away to the position indicated with the arrow. In that position the quadcopter decides that it has finished takeoff and goes on with its mission in the expected way. This happens with ArduCopter 3.1.5 and ArduCopter 3.2-RC5.
Is this a bug in the ArduCopter software, do I do something wrong, is it something SITL related or is it something else? I would like to get the quadcopter the fly straight up during its take off.