I've just released ArduPlane 2.68

This key features of this release are changed in the MPU6000 filtering, and several bug fixes (including HIL fixes).

The changes are:

  • allow for remote reboot on APM1
  • fixed secondary aileron and manual servos in failsafe mode (so if the APM software dies, you still have secondary aileron control in manual)
  • added new THR_PASS_STAB option. This is for fuel planes, so you have direct throttle pass through when in stabilisation modes (STABILIZE and FBWA). This is useful if you have a throttle cut switch that drops the throttle below RC3_MIN
  • fixed THR_SLEWRATE option, which had previously not been functioning correctly. Also improved docs for this option.
  • internal changes to new AP_InertialSensor code from Randy
  • fixed HIL support for both attitude and sensors HIL.
  • fixed dataflash logging in HIL mode
  • added new INS_MPU6K_FILTER option, defaulting to 20Hz. This controls the filtering frequency of the gyros and accels and should help reduce the effects of vibration on attitude estimation. It made a huge difference on my HotDog, which has the most vibration I've ever seen in a plane.
  • fixed the build of a lot of the library example sketches
  • fixed reset of I and D terms in PID library, ensuring it doesn't cause problems during auto takeoff

The MPU6000 filtering changes are perhaps the most significant. We previously samples the MPU6000 at 200Hz and set an internal filter of 98Hz. The ArduPlane code then averaged over 4 samples to get a 50Hz update to DCM. Here is a graph of the accelerometer readings on my HotDog with the old code:

this is rather extreme, as I've setup my HotDog with the APM2 directly touching the fuselage close to the nitro engine. I wanted it to vibrate a lot to test the filtering, and it sure does! A value of 1000 on that graph is 1g, so we're seeing vibrational noise of about 6g in this plane.

I now fly my HotDog with INS_MPU6K_FILTER set to 10, which applies a 10Hz filter inside the MPU6000. We also run the MPU6000 at a sample rate of 50Hz, which means no averaging needed in the APM code. Here is a graph of the accelerometer readings now:

quite a difference! The deviations are now real (from me flying loops and rolls) and not just dominated by noise.

It actually flew OK with the previous code, as the DCM code is quite noise robust these days, but I do prefer making DCM work less hard, and it will help it to reduce aliasing and recover from attitude errors faster.

You can see graphs of other filter settings and also of the gyros for the same plane here. I think the default of 20Hz will be the best for most planes, but if you have a lot of vibration you can try 10Hz, like I now use for the HotDog.

Happy flying!

Cheers, Tridge

Views: 10295

Reply to This

Replies to This Discussion

Is it possible (or wise) to introduce a 'turn radius limit' into ArduPlane? (note: not bank angle.)

I find that my plane's turn radius sometimes is far too tight especially when the wind is blowing and the plane turns across and into the wind, which then causes a severe deviation to try get everything back on track. If I reduce the bank angle then sometimes it obviously doesn't bank hard enough when it needs it.


I have been working on a new nav control method that controls turn radius and a few other things that will make your plane track with robotic precision. It will be ready very soon. Right now I am working on an improved loiter mode and once that's done I will submit my work to the dev team.

Yes friend, ardupilot has shown a great tool for autopilot! check out the videos with Condor Skywalker + APM 2.5:





That's excellent Greg, looking forward to it as the current method seems to have a few minor shortcomings

DJamal, thanks for respon

have you try the waypoin?

how about PID setting? are you using stock PID?

yes.. and perfect!.. i send the PID's later for u...

ok djamal.

im waiting my skywalker and amp2.5 now..:D

Maybe of the current topic, but it is still 2.68 and what I have experienced this weekend.


Maybe someone can look at it for me, please

Am not having great success with tuning the APM at the moment. Just loaded 2.68 and had a flight but the previous ‘issues’ seemed worse and I twice aborted auto mode.


I would really appreciate some answers to help ‘zero in’ the APM as it can be a long time between flights to try new changes.


If a moderator wants to move this somewhere else please do.




Plane flies great in stabilize, like it’s on rails.


In FBW-B I spent many flights messing with PIDs to try to stop the throttle going up and down between max and idle every 5 secs. When I finally got it calmed down I realised that it was the speed target that was changing (between the min and max values I had set) and the plane was only chasing the speed. I have now set the min and max 2m/s apart (and put the gains back)

WHAT is making the FBW-B speed target jump around?

Now it flies ok in FBW-B both pitch and roll and speed stays between the min and max values (wiki description misleading e.g. airspeed corresponding to min throttle. What does that mean, stall?)



Just cant get nice tracking. Have changed almost everything. It just weaves along the track using max roll. If the next waypoint has a lower altitude it dives for it keeping power on for way too long. Some of its manoeuvres are hart stopping. Would love a full explanation of the power/pitch (and pitch/power) forward gains. Nav-pitch AS PID? Help!


MP PFD attitude used up be steady on ground but now jumps about if AHRS_GPS_GAIN is set to 1. Is that the new filtering?


Why is there a ‘trim throttle%’ and ‘trim spd’? which one is the APM using in each mode?


Im getting a bit disheartened as would like to ‘move on’ and actually start taking some film. The plane is my own design so there are no files that are close, it would seem. I have compared my parameter list to skywalker etc and it’s not too different. It does fly very nicely in manual, check the video.




Believe it! do not be discouraged! I went through this in the past!

I realize that you do not have experience with the PIDS APM, ok! no problem!

Make screeshot their PID's, and post it here so I can look like your configuration is thus i can to help you

And tell me the size of the wing, and the size of the ailerons and elevator

And I'm sure after their PID's are set correct, your bird will fly like a rock!

Good Look!

Last I checked rocks don't fly very well! LOL

Reply to Discussion


© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service