I've just released ArduPlane 2.73 as a bug fix release for several important bugs in 2.72

The main reasons for this release are:

  • fixed a noise and scaling problem with airspeed sensors
  • fixed a potential flyaway problem with the L1 navigation controller
  • improved handling of poor GPS velocity for attitude correction

This release does not contain the new attitude controllers that I previously said would be in 2.73. Paul and I decided that it would be better to hold those over to the next release, and get this release out with just the above critical bug fixes.

The airspeed problem stemmed from a changed introduced in 2.72 to make ArduPlane automatically scale analog inputs with board voltage. That change was good for voltage and current sensing, but it added a lot of noise to airspeed sensing as the 3DR airspeed sensor is ratiometric (the sensor output scales with the supply voltage). The fix was to add support for ratiometric analog inputs. This release also fixes a bug in the airspeed ratio handling. To confirm the fix I have been driving around in my car with an APM2 and PX4 logging airspeed and GPS speed - that test confirmed the airspeed sensing is now accurate.

The flyaway bug in L1 was caused by an unusual situation where the previous waypoint was equal to the next waypoint, which can happen when a mission is interrupted and restarted. The L1 controller would then level the wings and fly straight ahead until the operator intervened. The bug fix was to make the L1 controller detect this situation and track directly to the next waypoint. I don't think many users would have seen this bug, but it definitely could happen and warranted a bug fix release.

The GPS handling bug was related to the MTK GPS, which can be very slow to report loss of GPS lock, which could lead to very poor attitude from DCM and even a crash if the plane tries to turn while the GPS is reporting incorrect velocity information. The fix was to watch the satellite count, and stop using the GPS velocity for accelerometer correction when it had less than 6 satellites. This is selectable with the new AHRS_GPS_MINSATS option.

Other changes

While this release doesn't have the new attitude controllers I decided to leave in some other smaller changes that have been made since the 2.72 release that I consider to be low risk, including:

  • fix the PX4 barometer driver to run at full rate
  • fixed handling of a saturated compass on PX4
  • added COMPASS_ORIENT option to support external compasses
  • fixed the compass in HIL simulation
  • added GCS messages to flash logs
  • allow 3D accel calibration over MAVLink
  • Added new ELEVON_OUTPUT option
  • removed MANUAL_LEVEL option (manual level is now always on)
  • improved pitch handling when inverted

Of these, perhaps the most useful is the ELEVON_OUTPUT option. That makes it possible to setup your transmitter with normal aileron/elevator and get the APM to do a software elevon mixer on output. That gives better control in FBWA mode than the previous elevon options.

I recommend that all users of 2.72 upgrade to 2.73. Happy flying!

Cheers, Tridge




Views: 27834

Reply to This

Replies to This Discussion

Yes, with the openaero2 (KK2 Board) it is possible to switch between rate and attitude (attitude is called self leveling). With the openaero SW (KK board hast no acc sensors) it is only possible to use rate stabilisation. I was using only the rate stabilisation when flying with openaero and it was all I need (except for RTL) Attitude stabilisation feels very weird and is only usable for flying straight IMO.

Are you planing to implement this feature? :)

Hey, sorry for the late reply - 4th of July weekend...

The APM system is being powered by Lipo batteries through a Castle Creations BEC that outputs 5V.

Hello, Tridge!Please check parameters you recommend for Skywalker. You suggest

  • RLL2SRV_P: 1.8
  • PTCH2SRV_P: 1.5

(are greater than 1.0)

Regards, Sergey

Hey Andrew, 

I have some settings for the Hobby King Phantom Wing and the FPV Skyhunter. I can send those over to you if you'd like to post them as well.The Phantom wing I have dialed in well enough to do sky writing.

The same problem.FBW-B not works.I can't switch on FBW-B in spite of that airpeed sensor enabled in MP.I have only FBW-A.Before, it was release 2.68 and FBW-B worked.

Hi Kaci,

After looking at your logs in a bit more detail, I think we can identify the culprit(s) behind your poor flight performance. There's quite a bit going on, so i'll break it into a few categories:


Did you go through all of the standard setup?  Some of it is setup for the first flight, but some items need to be returned to if you make a major hardware change.  Did you calibrate RC recently?  That's a pretty important one--your plane won't fly in manual without it.  Did you test the CG and fly in manual afterwards?  This is a super important step for 2 reasons: 1) It is really the only way to verify they you have your CG in the right ballpark and 2) your plane will never fly well in any of the auto modes, stabilize up to full auto, if it doesn't fly in manual.  I'm sure people have published tons on the correct CG spot for an X8.  Additionally, it is good practice to mechanically trim the aircraft before trimming out any offsets electronically in the maiden manual flight.

It also looks like you're flying 12Ah of battery (BATT_CAPACITY = 12000) is that right?  It's not outrageous, but it seems quite big.  And the bigger the battery, the more you have to pay attention to its placement relative to the CG.

As far as the airspeed sensor goes, I don't think that it's the primary cause of your problems, but it may be getting some bad readings.  Make sure you have it mounted in the free stream ie. undisturbed airflow out in front of the aircraft.  The further in front of the leading edge, the better.


There were a few parameters in your param file that raised an eyebrow.  It looks like you maybe copied someone's param file and started from there.  This is common practice, but can create problems. While many parameters are transferable between X8's, and fixed-wing aircraft in general, some parameters are aircraft/setup/location specific, like magnetic declination, and even gains if the original param file is from a different version of ardupilot.

One example of from your params is AHRS_RP_P=0.4, but the current default value is 0.3.  Not a huge deal, but it would be a good idea to use the current defaults and start tuning from there.

Other parameters...

  • ARSP2PTCH_I = 3x the default, which could result in poor altitude holding and tracking.
  • BATT_CAPACITY = 12000 ... a 12Ah battery sounds a bit large.
  • Speed: ARSPD_FBW_MAX=30 ARSPD_FBW_MIN=14 TRIM_ARSPD_CM =1600.  So this means that you are targeting 16 m/s in auto modes, with a min of 14 m/s and a max of 30 m/s.  They all seem pretty high to me, and the plane may be having a hard time keeping up with the min. i'd try 10/14/20 and tune from there.  X8s can definitely fly much faster though.
  • INS_MPU6K_FILTER=20 is wrong, it should be 0.  This is again probably a holdover from an old parameter set.
  • WP_LOITER_RAD=45 is pretty tight, I think something like 70 would be better to start with.  Put the plane into loiter (after manual and stabilize) to verify that it has a good loiter ie. tracks a constant radius turn well.
  • NAVL1_PERIOD=15 is pretty high for a heavy X8, meaning the plane will be too aggressive in tracking...try 20.
  • Airspeed sensor:  Check out the plot below.  It shows the difference between your airspeed and groundspeed.  It looks like your airspeed sensor is a bit miscalibrated, your ARSPD_RATIO=1.99 but probably should be something more like 2.6.  You can change this parameter and plot the airspeed and groundspeed in the tuning interface in the mission planner to check.

In-flight GPS issues

While it looks like setup and tuning will help you out a bit, I think the biggest problem is your GPS.  The plot I put in the other post showed that your compass and GPS disagreed by up to 180 deg at some points.  Here's another view of the same problem...

The blue line is you GPS heading, the red line is you mag heading, and the green line is where you plane is actually trying to head, as you can see, there are places where this is really bad: near 11:41:27 you plane is pointed at 20 deg, the GPS says it's pointed at something like 65 deg, and it's actually trying to go to -80 deg!  And it's not just a heading issue.  Because you GPS is used to correct all of the other sensors, a bad GPS creates problems in attitude estimation as well.  Check this one out:

This plot shows an estimate of your actual pitch (red) and what your plane thinks it's doing (green).  Somewhere in the middle your plane thinks it's level but is actually pitched up at 35 deg!

So here are some takeaways.

  1. Make sure your setup is good before flying, particularly your CG, sensor placements, and RC control.  Validate this with a manual flight.  A nicely trimmed X8 should fly like it's in stabilize when it's in manual, ie. very stable.
  2. Start from scratch with the default Ardupilot 2.73 params and change the ones specific to your plane from there.  You may want to check out the new elevon mixing scheme in 2.73 as well, which you are currently not using.
  3. Get a new external uBlox GPS! Or move your current one around so it has a better view of the sky.  Your plane should fly with your current GPS, but your performance will unfortunately be gated by it, so you many want to consider the uBlox.

Let me know if you have any questions!




Thank you for your detailed response!

I did recalibrate the RC after updating the firmware so that should be good. We check the CG before every flight so that is good as well. The plane flies very well in manual so I think the problem is somewhere else. The pitot tube is mounted sticking out of the nose of the aircraft so that is good but i will take a look at the calibration!

I did combine a couple other people's X8 param files so you were correct there. I looked through every value and tried to keep the parameters specific to this system the same but some of the parameters don't have descriptions so I got a little lost on those. I will implement your suggestions and go from there!

I should be getting a APM 2.6 in the mail in the next couple of days so hopefully the GPS/compass upgrade from the 2.0 will help with the GPS issues!

Thanks again for your help!



Sounds like you're doing all the right stuff with regard to setup, I agree that it's probably not your problem.  Hopefully the parameter changes I suggested, along with a new APM, will have your X8 up and running well!  Maybe someone else out there flying an X8 on 2.73 has good (non aircraft/location/environment-specific) parameters you can try out.  The developers changed a few important default parameters with 2.73, so I think those would be good to check out. I'll also give another plug for the new ELEVON_OUTPUT mixing scheme.  I run it on my X5 and Phantom flying wings and it works great.



I have reported this, as a bug, here: Link

Hi Andrew,

Would it be possible to add a current based compass compensation functionality like in ArduCopter 3.0's compassmot?


I have moved the APM in Skysurfer as much as I can but I still see some interference and it looks like compassmot like functionality would be really useful.



Hi, Tridge!You are right! I changed my GPS MTK3329 то uBlox and reduced AHRS_RP_P and AHRS_YAW_P to 0.3. That's all and it's ok now!

Perfect fly in FBW-A (roll to limit - no sink). RTL is fine! Airplane does ideal circle above the home point and there is no altitude lose at all.

Log attached.

Thank you very much for your help!


Well, i still fly APM 1.4 and the original Mtek GPS

No problem at all here.

It is true that i normaly have 8 to 13 sats.

If it goes below 9 than i start to search for interference.

Like before my hd camera have made my GPS totally lost. :)

Glad it works better for you Sergey! ;)


Reply to Discussion


© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service