Target altitude dangerously low when switching to Auto

Hi all. I’ve been experiencing some odd behavior (un-commanded descents) when switching to auto mode shortly after takeoff on my Pixhawk running APM 3.0.1. Please see the attach tlog for an example


  1. Load a mission with a number of waypoints at 130m altitude or higher
  2. Takeoff in FBWA and climb out (See tlog at 19:15:30)
  3. Enter Auto Mode (See tlog at 19:15:45) [attachment=0]Target Alt Issue.png[/attachment]

When entering auto mode the target altitude is set to 0 despite waypoint 1 having an altitude of 130m. The target altitude very slowly climbs up from 0m to the target altitude but during this time the aircraft is in a steep dive and nearly crashes.

This does not seem like the correct behavior. When switching from FBWA to Auto with a waypoint altitude significantly higher then the current altitude I would not expect the aircraft to descend. Can anyone help me understand why this is occuring and if I am doing something wrong?

Tlog: [attachment=1]2014-05-12 19-12-18.tlog[/attachment]
Dataflash log:

Hi Dellar,
You’ve found a bug! I’ve reproduced the bug in SITL and pushed a fix to master. The fix will be in the upcoming 3.0.3 release.
The bug is in the glide slop calculation when first entering AUTO mode. It only affects entering AUTO when the first waypoint altitude is below the current altitude. The glide slope calculation incorrectly uses the home altitude as the start of the glide slope.
Thank you very much for reporting this. I expect to make a new bug fix release (3.0.3) in the next day.
Cheers, Tridge

Thanks for following up Tridge.

Good to know I wasn’t doing something silly. Appreciate the fast response and release of the update.

Unfortunately my Pixhawk has a problem with USB and I can’t update FW. The 3DR export ban is stopping me being able to RMA but that’s a whole different issue.

Thanks again

It may be worth trying a few different cables, or different USB ports on your computer. Most USB fw upload issues can be solved that way (not always, but very frequently).
Cheers, Tridge

Does the PC assign a COM port to the Pixhawk? If so, can you try QUpgrade to upgrade the firmware. This works for me more reliable then the upgrade over Missionplaner.


Was this fix put into the 3.0.3 release for Pixhawk? I don’t know how to read the log to see if my target altitude changed but every time I put my Pixhawk into Auto mode it dives for the ground…

I’ve attached my log file if someone can tell me whats happenning? I first tried 100 meters for altitude but it started to dive… On this log, I tried 200 meters, flew in FBWA till is was above 100 meters and switched to auto, but then it started to dive… I let it go for a bit to see if anything corrected itself but nothing and had to take it out of auto and land.