2.7 Mission problems

I have had good luck with 2.6 - here is a typical mission



I then loaded 2.7, did and erase, and left all params at default (attached both param files - not any huge differences). I flew in stable, ah, and loiter and it seemed good - very stable, loiter seemed actively holding it within a couple meters.  I thought it would be good to try my last mission, so I loaded it and was vvery surprised as it flew very erratically, wildly searching  for waypoints-





I finally aborted before the end, it was flying in a very scary way. I do not know what happened - maybe the slight pid default changes did this, but it seemed to be more than pid tuning.  Before I took off I did some alt hold and it was good. After I tried some loiter and got bad circling.

I am curious what happened - hopfully Dan's visualizer program might help.



Good 2.6 log.log

Bad 2.7 log.log

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • I had similar weird results on APM2 with 2.7.1:


    My speed set to 2.1 m/s, and PIDs reduced as per advice here: NAV_LAT_D,0

    What else should I try?

  • Hi John,

    I have similar problem and try investigating it. Found this line in Log.pde

        DataFlash.WriteInt(0);    // 7 (this used to be compass.heading)

    So by some reason 2.7 won't log Mag Heading anymore. Wondering why.

    But the reason for erratic behaviour is somewhere else. Did you have luck finding reasons?

  • John,

      I too may be having the same issue as you - I just put a brand new APM2 up in the air with an external ublox on a 3DR hexa frame w/880 motors, and (much to my amazement) it hovered flawlessly at 2-3 feet off the ground, not needing any throttle adjustments in stable mode, which has never happened before - likely a combo of getting away from APM1, and the new code..

    I reference the above, because it shows that obviously I'm having good luck with all the sensors (I have sonar and optical as well, all work) and yet when it was up, it would randomly drift in yaw, 50/50 or so cw and ccw - not a fast spin, maybe 10-15 seconds for a full rotation if I didn't correct and put it back in its' place. MP logged the tlog mag info properly - so it looks like it's purely a logging problem with the firmware on the copter..

    Misc info:

    New APM2.0 w/ublox LEA 6 GPS (amazingly better)

    All extra sensors except for airspeed

    3DR hexa frame

    880kv motors - 11/4.7 props

    Edit: I do believe it's time for a bug report - I'm submitting one now..

  • Developer


    Had a moment to review your logs. I think you need to lower your Nav_Rate_P value. I can see the quad ramp up speed too quickly and then drop back too low. This tells me your rate_p is too high for the latency in your GPS. Don't mind the jaggedness in the GPS so much. Your high acceleration is the main problem. 

    There is another param called tilt_comp that is set to 54. It may also be a little high for you, but I would prefer you lowered Nav_Rate_P first and let me know how it goes.

    Also, your magnetometer may have been reset during the update and you could have lost your offset. Once you fly around a bit you'll get them back.


    Here is one leg of your run compared to 2.6, 2.7, and the simulator for 2.7. You can see the Lon speed oscillate in 2.6 and much more in 2.7. A patch was applied in 2.7 to give the copter more authority in the air and stop relying on the Nav_Rate_I term to overcome air resistance. This patch has given you too much authority, and you can now turn down Nav_Rate_P. 


  • Developer

    Try to disable the Autodeclination, then reduce NAV_P to 1.8, NAV_I to 0.08 and the speed 3m/sec.
    With 2.7 the speed was increased (now is real), so you always have to drop a few parameters to obtain the same (or better) performance of 2.6.

  • I can't see magnetic heading values in your 2.7 log. Did you have compass connected, calibrated and working?


  • Did you save your PID values from your old version?  Might be interesting to try those, see if it's tuning.


  • Oops - here are param files


    param 2.6 good 7-23-12.param

    param 2.7 BAD 7-23-12.param

  • Developer

    Try lowering your waypoint speed to something like 2.5 or 3 m/s (actual internal units are in cm/s).


This reply was deleted.


DIY Robocars via Twitter
RT @SmallpixelCar: Today at @RAMS_RC_Club for @diyrobocars. Used @emlid RTK GPS and @adafruit @BoschGlobal IMU. Lap time 28s https://t.co/R…
5 hours ago
DIY Robocars via Twitter
May 15
DIY Robocars via Twitter
May 14
DIY Robocars via Twitter
May 13
DIY Robocars via Twitter
RT @f1tenth: Say hi to our newest #F1TENTH creation for @ieee_ras_icra next week in Philly. It’s going to be huge! 😎 🔥 @AutowareFdn @PennEn…
May 13
DIY Robocars via Twitter
May 11
DIY Robocars via Twitter
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Noticed my car zigzagged in last run. It turned out to be the grass stuck in the wheel and made the odometry less accura…
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Test my car. RTK GPS worked great. Thanks @emlid for their support. https://t.co/EkQ6qmjmWR
May 8
DIY Drones via Twitter
RT @chr1sa: @kane That's @diydrones circa 2009. Still have a box of those Canon cameras that we used to strap into planes, just like this.…
May 3
DIY Robocars via Twitter
RT @chr1sa: Our next @diyrobocars race is going to be outside at a real RC racetrack in Fremont on May 28. Fully autonomous racing, head-to…
Apr 30
DIY Robocars via Twitter
RT @f1tenth: Our Spring 2022 F1TENTH course @PennEngineers is coming to an end with a head-to-head race as a big finale. So proud of our st…
Apr 26
DIY Robocars via Twitter
RT @DanielChiaJH: I wrote a thing! Throughout the development of my @diyrobocars car I've been using @foxglovedev Studio to visualize and d…
Apr 23
DIY Robocars via Twitter
RT @SmallpixelCar: My new car for high speed. Low body, everything ( @NVIDIAEmbedded Jetson Xavier NX, @emlid RTK GPS, IMC) under the deck…
Apr 23
DIY Robocars via Twitter
Apr 21
DIY Robocars via Twitter
RT @f1tenth: F1TENTH Race training setup @PennEngineers for our upcoming ICRA2022 @ieee_ras_icra competition. @OpenRoboticsOrg @IndyAChalle…
Apr 21