Drifting away during takeoff in a mission

Hello again,

I am working on a autonomous quadcopter project that uses the mission interface and mavlink. When starting a mission I do the following programatically.

  1. 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
    ----4) Land
  2. Switch to AUTO
  3. ARM
  4. Set rc 3 to 1200 (Trigger AUTO)
  5. Set rc 3 to 1000 (So it disarms after land)
  6. Set rc 3 to 0 (Give controls back to the operators RC so he/she can interrupt the mission)
  7. Wait till the quadcopter has landed / finished its mission
  8. 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 [1] 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.


What do you have MIS_RESTART set to?


MIS_RESTART is set to 0 (Resume Mission).
Setting it to 1 (Restart Mission) does not change the weird takeoff behaviour.

Note that in mavproxy; when i set the quadcopter to auto; it always says “waypoint 1” so it looks the takeoff waypoint is always selecten when the mission starts.

Another Note:
The first mission after a restart work perfectly. So it looks like it has something to do with some values not being reset from a previous mission.

Is it possible that ArcuCopter somehow remembers its heading/pitch/roll from the previous mission and that this is not reset during the land/takeoff waypoint?