Aim for the yellow?! - Mission Planner compass calibration

926 views
Skip to first unread message

BayAreaCrasher

unread,
Oct 14, 2014, 2:46:13 PM10/14/14
to drones-...@googlegroups.com
Hi all,

So I just updated to the latest Mission Planner and was trying to do a compass calibration on 3.2-rc12.  Went into the trusty compass calibration page and started the Live Calibration.  

Went a little like this (I'm a semi-well-informed user):
  • Two things on the screen started spinning.  They have colored axes that represent something.  Why do they spin?
  • Dots appear randomly on the spinning things. What do the dots represent?
  • I'm getting a bit dizzy now.
  • Samples are being collected, up to 500 or so now...more data needed is what I'm told.  
  • When is sufficient data collected?
  • Something on the screen says "Aim for the yellow".  I tried but my spatial capabilities were matched and I had no idea how to aim for the yellow while spinning around and watching the screen at the same time.  Still dizzy but better.
  • I finally clicked done after 1000+ samples and it saved some offsets.  They look OK (under 250).
Is there somewhere in the wiki or elsewhere some details as to what a non-expert user needs to do in this screen?  Half the time I revert to APM Planner because there it's just a timed based exercise for 60 seconds.  Get slightly less dizzy. 

One little thing that I think would be incredible would be some audio feedback from the Pixhawk when sufficient data has been obtained.  

Thanks,
Pablo

BayAreaCrasher

unread,
Oct 14, 2014, 2:49:15 PM10/14/14
to drones-...@googlegroups.com
BTW, not criticizing here.  Just trying to learn once and for all what the calibration process should be and what steps to follow.  So that I minimize the dizziness.

Graham Abell

unread,
Oct 14, 2014, 3:06:18 PM10/14/14
to drones-...@googlegroups.com
supposedly this but mine didn't work like that, like you I had 2 axis displaying. I didn't get any dots and there was no indication of whether I was pointing the correct direction. I basically followed the movements in the video and completely overdid it and got lots of samples. 

Arthur Benemann

unread,
Oct 14, 2014, 4:43:52 PM10/14/14
to drones-...@googlegroups.com
@Pablo: we are working on a mag. calibration screen for DroidPlanner which should speed up the process.



--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Arthur Benemann

Pablo Lema

unread,
Oct 14, 2014, 6:09:08 PM10/14/14
to drones-...@googlegroups.com
yeah Jason told me about that.  it's awesome!

--
You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/QBtCNjTl7_o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.

Mark Jacobsen

unread,
Oct 14, 2014, 8:35:03 PM10/14/14
to drones-...@googlegroups.com
I'm with Pablo. I have never been able to understand compass calibration. I've tried dozens of times, read all the documentation I could find, watched videos... and I've only been able to get a successful calibration one time. My experience has been much like Pablo's. As a non-expert I will freely admit the likelihood of user error, but I also think the current system isn't exactly friendly for beginners! I have no idea what the calibration screen actually wants of me, and just keep going until I get dizzy or tired and give up.

After every effort, I've eventually just said, "What the hell" and flown as-is. But I have no idea what is going on under the hood, which is hardly a safe or satisfactory way to fly. 

Mark


On Tuesday, October 14, 2014 11:46:13 AM UTC-7, BayAreaCrasher wrote:

Michael Oborne

unread,
Oct 14, 2014, 8:50:02 PM10/14/14
to drones-...@googlegroups.com

Ill try answer all your questions.

 

Why do they spin? Because if it didn’t you cant see if you had points on the backside of the sphere. At one stage it had the current captured point always at the front, this however creates jumping and was not usefull.

What do the dots represent? They are the vector of the raw mag data, ie the position on the sphere from the mag x,y,z’s, each axis is given a different colour

When is sufficient data collected? When you have collected data that are within 1/3rd of the radius of the yellow target dots, the dots vanish when you have acquired that point.

 

Michael

--

Jonathan Challinger

unread,
Oct 14, 2014, 10:43:57 PM10/14/14
to drones-...@googlegroups.com

We need a Pixhawk model or something to put in the middle. That would make it way more clear.

Jonathan Challinger

unread,
Oct 14, 2014, 10:47:16 PM10/14/14
to drones-...@googlegroups.com

Arthur, I am all for faster calibration, but we are going to need more points than that to get soft iron, scaling and non-orthagonality calibrated. Also, are there sufficient checks to ensure that the user can't do a bad calibration?

David Pawlak

unread,
Oct 15, 2014, 8:23:51 AM10/15/14
to drones-...@googlegroups.com
@Michael,

The yellow dots disappear when the point has been acquired?

The ideal then is to go until there are no more yellow dots?

Robert Lefebvre

unread,
Oct 15, 2014, 10:35:27 AM10/15/14
to drones-discuss

+1 Is there a way to put a little aircraft icon in there? I was confused by this for a while until I realized usually what I was missing was data with the craft upside-down.

Samuel Grob

unread,
Oct 15, 2014, 12:12:03 PM10/15/14
to drones-...@googlegroups.com
I have now done all of the RCs for 3.2 and by no this whole calibration thing sort of gets at me.
Everytime I endured it I was painfully aware that the NAZA calibration routine
- is initiated from the TX (big plus)
- can therefore be done in the field (big plus)
- takes a mere two turns in the Y axis (HUGE plus)
- take about 10 seconds to do  (HUGE plus)

Is their routine lousy (despite the result being excellent) or are we overdoing it here a little ?

Jason Short

unread,
Oct 15, 2014, 12:28:23 PM10/15/14
to drones-...@googlegroups.com
Arthur's calibration routine is amazing. He's doing the fit with each sample and calculating a number representing the convergence. I assume because he's doing the fit every time the input gets progressively better and it converges faster. The output includes offsets and scaling as well.

We tried doing a calibration, then setting the pixhawk on the table which has a steel bar re enforcement. It detects that right away and reports the calibration fails. 

There is no need for a confusing visual representation and the algorithm exits when you're within a certain measure of success. The end user simply rotates the craft in all directions until the fit returns successful. This is a huge win for usability and a big step towards putting the algorithm into the flight code. (DJI guys were asking why we don't do it on the vehicle.)

We compared the cal results with current techniques and they are statistically the same. 

Jason

Robert Lefebvre

unread,
Oct 15, 2014, 1:20:31 PM10/15/14
to drones-discuss
I wonder if it is lousy, as exemplified by their incidence rate of flyaways?

--

Pablo Lema

unread,
Oct 15, 2014, 1:59:26 PM10/15/14
to drones-...@googlegroups.com
this.

this is a big blocker in usability IMHO.  new users barely even know what a compass is and why it needs to be calibrated.  

--
You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/QBtCNjTl7_o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.

Kristian Klausen

unread,
Oct 15, 2014, 3:04:07 PM10/15/14
to drones-...@googlegroups.com
Hi,

I just wanted to add my thoughts on this. For me, coming from a control engineering perspective, I think the calibration visualization is pretty clever. It gives a clear indication that certain areas are not covered. I usually do the 360 on all axis first, and then fill the holes using the spinning globes. Granted, I don't have any experience as to how other flight controllers have implemented this.

But, I agree that it would be easier to see where those holes are if the vehicle orientation was depicted in the center. The problem is of course that getting a correct orientation depends on the mag, which is what we are calibrating in the first place.

Regards,
Kristian

Chris Anderson

unread,
Oct 15, 2014, 3:23:46 PM10/15/14
to drones-discuss
I agree that we should enable a calibration that can be initiated from the TX (along with mobile) and is driven by LEDs and sound. It's the first thing that companies adopting our platform, such as Walkera, add to the code and it seems to work well.  

We have a multicolor LED as well as a buzzer, so we should be able to guide users pretty well with colors and sounds. No need to "count flashes"

-Chris



--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Chris Anderson
CEO, 3D Robotics

Craig Elder

unread,
Oct 15, 2014, 3:49:01 PM10/15/14
to drones-discuss
I think it needs to be pointed out we are watching the evolution of the calibration process.

The original compass calibration didn't check to see if the vehicle was actually rotated through all of the axes and often produced poor results.  Because there was no feedback it was impossible to know if you had a good calibration or not and this lead to lots of strange rituals about the best way to perform a compass calibration.

The calibration routine now requires that the vehicle actually be rotated though all axes.  This display tries to give you feedback about the directions that the vehicle has been rotated through as it is gathering points.   If you just move the vehicle through the same motions that have been previously described in other instructions and other videos then the calibration routine still takes about 1 minute to complete. 

The method that Arthur is working on is the next evolution of calibration and it does converge faster.   There are two things that we can learn from what he is doing that could be applied to the routine used in Mission Planner.  One is that the rate of the compass messages is increased and all of the other serial streams are turned off while the compass is being calibrated.  The second is that the calibration calculation is running continuously and stops once the solution has converged.  Both of these improvements could be made to the current calibration methodology.  

It should be noted that an issue we have with the visualization is it quite difficult to describe to users what direction to turn their vehicle because the orientations of the axes are completely different depending on what part of the world you live in.  If somebody can come up with a better way to instruct users on how to use the calibration we would all be grateful.



On Wed, Oct 15, 2014 at 12:04 PM, Kristian Klausen <kkn...@gmail.com> wrote:

Jason Short

unread,
Oct 15, 2014, 4:12:05 PM10/15/14
to drones-...@googlegroups.com
How about a catchy dance number? All the devs in a Bollywood production with their copters? 

Pablo Lema

unread,
Oct 15, 2014, 4:15:46 PM10/15/14
to drones-...@googlegroups.com
Your idea Jason, so now you must execute on it.   I expect a video soon.  

--
You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/QBtCNjTl7_o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.

Mark Jacobsen

unread,
Oct 15, 2014, 11:48:31 PM10/15/14
to drones-...@googlegroups.com
To add to my earlier comments, and to Pablo's point about this being an obstacle to new users... I wholeheartedly agree! As I've been arguing elsewhere, the community should always be looking for ways to improve the user experience and engineer out the possibility of human error. Compass calibration is a perfect example of an area that would benefit from that kind of attention. Fortunately, some very simple fixes could make this far more friendly to beginners. If you'll permit me, Michael, I think you could do wonders here with some simple label changes.

For me, what's confusing is not necessarily the 3-axis plot but the textual descriptions accompanying it. Take a look at this screenshot:

This is a screen for engineers, not for users. Cleaning this up and putting it into plain-language would radically improve the process. For starters, it looks like there are four lines of text mashed together above the picture: got 3 samples // more data needed // 180 360 // aim for yellow. That confused me for ages. And while I suppose the numbers on the right are supposed to be helpful, I find them confusing and threatening to beginners (they make the process look unnecessarily complex). There is also no description of what the user is actually DOING, or how to know if the calibration is progressing, or how to know when the calibration is finished. If you browse the forums, you'll find numerous posts where people get tired and give up after 2000+ data points because they assume the calibration isn't working. That may not be the case, but the user doesn't know that.

How about putting a nice, plain-English block of text a the top of the screen describing what the user will be asked to do, and telling them how they will know when the test is complete. 

Then get rid of those 4 lines of mashed-together jargon, and put something in plain English like "Step 1/X: rotate your aircraft until the red dot lands in the yellow-green region." As the user advances from color to color, they will have the satisfaction of seeing the step increment and knowing the calibration is progressing. When enough data is gathered, change the message to "Your compass calibration is complete. Please click DONE." Voila, you've eliminated most of the confusion. People will still probably struggle with getting the orientation right at each step (I still do), but they'll get it eventually.

With a very small time investment cleaning up labels, you could improve one of the most difficult and problematic aspects of the user experience.

Mark

David Pawlak

unread,
Oct 16, 2014, 6:50:03 AM10/16/14
to drones-...@googlegroups.com
Agreed Mark, understanding the MP calibration screen would be great, and as you say, perhaps some simple changes could facilitate that greatly.

But still I much prefer Arthur's approach: move it around all axis until it beeps. 

The average users are not the engineers, the firmware is the expert. Let it do it's job.

Another step towards " improving the user experience and engineering out the possibility of human error".

Mark Jacobsen

unread,
Oct 16, 2014, 8:31:36 AM10/16/14
to drones-...@googlegroups.com
David,

Just to clarify, I do think it would be desirable to fundamentally redesign this process. I am just offering up an easy solution that can be implement today, and hold things over until more substantial changes can be implemented.

Mark

Sent from my iPhone
--
You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/QBtCNjTl7_o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.

Scott Simpson

unread,
Oct 16, 2014, 9:22:05 AM10/16/14
to drones-...@googlegroups.com
Clearing a solid sphere might be easier since you would be able to see where you haven't been.  

I'm all for initiating this from the radio though.  I have one APM without telemetry and my neighbours think I'm wacko when I'm fumbling with a USB tethered quadcopter in the middle of my yard.  :)

Jonathan Challinger

unread,
Oct 16, 2014, 11:04:55 AM10/16/14
to drones-...@googlegroups.com
The ideal solution is an EKF or similar that uses the following measurements:
- Current & throttle
- Magnetometer
- Gyro

and learns the following states continuously:
- 3 offsets
- 3 diagonal matrix components
- 3 off-diagonal matrix components
- 3 compass EMI factors

The initial compass calibration could then involve rotating the copter until the EKF has reasonable values for offsets and matrix, at which point it beeps to tell you you're done. Flying the copter would continue to fine-tune everything and learn the EMI factors.

In the meantime, it should be easy to add a little model to the 3d graphs and change the text to not be quite so awful...

On Thu, Oct 16, 2014 at 6:22 AM, Scott Simpson <ssim...@watsys.com> wrote:
Clearing a solid sphere might be easier since you would be able to see where you haven't been.  

I'm all for initiating this from the radio though.  I have one APM without telemetry and my neighbours think I'm wacko when I'm fumbling with a USB tethered quadcopter in the middle of my yard.  :)

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.

Emile Castelnuovo

unread,
Oct 16, 2014, 11:46:37 AM10/16/14
to drones-...@googlegroups.com
+1!
And that would explain how competitors deal with only two rotations? (and possibly flyaways... )


Emile
330.gif

Jonathan Challinger

unread,
Oct 16, 2014, 11:49:15 AM10/16/14
to drones-...@googlegroups.com
Two rotations could get you barely enough for offsets or it could get you nearly nothing if you choose the wrong axes to rotate about.
330.gif

Pablo Lema

unread,
Oct 16, 2014, 11:56:18 AM10/16/14
to drones-...@googlegroups.com
We've all been there Scott. You just have to embrace it and tell them it's advanced stuff they won't understand.  Embrace the calibration dance, it's a rite of passage. 

On Thu, Oct 16, 2014 at 6:22 AM, Scott Simpson <ssim...@watsys.com> wrote:
Clearing a solid sphere might be easier since you would be able to see where you haven't been.  

I'm all for initiating this from the radio though.  I have one APM without telemetry and my neighbours think I'm wacko when I'm fumbling with a USB tethered quadcopter in the middle of my yard.  :)

--
You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/QBtCNjTl7_o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.

David Pawlak

unread,
Oct 16, 2014, 12:28:40 PM10/16/14
to drones-...@googlegroups.com
Well, we just won't let it beep unless it has enough. :)

Arthur Benemann

unread,
Oct 16, 2014, 1:11:31 PM10/16/14
to drones-...@googlegroups.com
Well here is a video of it working, with the desktop version of DroidPlanner

Here is a description of what we are doing on DroidPlanner, it's a WIP but I think we should have the Android UI ready next week (the android JVM gave us some problems lately).
  • Plot the data in two 2D plots. I think it's a little bit easier than the 3D scatterplot
  • Collect data as fast as possible
  • Fitting the data to an ellipsoid, using a nice library written by KEOpenSource  (with some minor mods)
  • Doing the estimation for every new datapoint, so we can follow the estimation "accuracy". When there is a minimal amount of points, and the fit is good enough finish the calibration.
To get a good mag calibration you want to have the data spread across the sphere surface. You also want to make sure the mag is always exposed to the same external magnetic vector, so ideally it should rotate around the mag. sensor. One nice thing about the algorithm above is that if you deviate too much from a good data-set it'll not converge to a solution, the process then fail and you should start from scratch.

It would be possible to port this to the Autopilot, but two things need to be done:
  • Convert the java code to C++, including all the used org.apache.commons.math3 linear algebra code.
  • Implement the algorithm in a recursive least-squares fashion, so it doesn't take a huge performance hit when running on our CPU.

If anyone wants to help with the development of this on Droidplanner, all you need is mavproxy and eclipse on a linux machine. If you need some help to setup the environment just contact me.

--
Arthur Benemann

Craig Elder

unread,
Oct 16, 2014, 7:29:07 PM10/16/14
to drones-discuss
So what do people think, are 4 circles going to be more clear than 2 spheres?

--

Jonathan Challinger

unread,
Oct 16, 2014, 7:44:23 PM10/16/14
to drones-...@googlegroups.com
I think the clearest thing is going to be a 3d view with an actual aircraft model. We can then direct the user how to tilt it using an arced arrow.

It looks like it is doing scale factors already, which is great! Can we get it doing the 3 off-diagonals as well? Right now it looks like the axes of the ellipsoid are always aligned with the body axes.


Tom Coyle

unread,
Oct 18, 2014, 9:04:19 AM10/18/14
to drones-...@googlegroups.com
Hi All,

I am beginning to see a small number of members on DIY Drones complain that they cannot get their compasses calibrated now.

Regards,
Tom C DIY Drones Admin


On Tuesday, October 14, 2014 2:46:13 PM UTC-4, BayAreaCrasher wrote:

Brandon Basso

unread,
Oct 27, 2014, 4:59:36 PM10/27/14
to drones-...@googlegroups.com
Sorry if this was mentioned earlier in this same thread, but I used the MP compass calibration tool to calibrate a plane and noticed some unexpected behavior:

1. Of the two plots, the one on the left stopped recording at some point, it just had one white dot
2. Not entirely clear that the two plots represent the two compasses - maybe label or just show one?
3. My first set of offsets (from the internal compass? -- needs a label) had crazy high offsets in the tens of thousands--odd--maybe should just return fail and not display at all

Usability-wise, I wonder if it would be possible to give people written or audible instructions, just like the 3D accelerometer calibration, rather than drawing a complex plot that is hard to follow.

-Brandon



Inline image 2
 


Brandon Basso, PhD :: Senior Research and Development Engineer :: 3D Robotics :: Berkeley, CA

--

David Seaman

unread,
Oct 29, 2014, 6:40:41 PM10/29/14
to drones-...@googlegroups.com
Wow, this one point is really important to visualize, I have always calibrated around the center of mass, ie held at the tips and spin, but if the mag is on a mast it takes a bit more coordination to maintain that in the center of spin. If you toss a visualization on the calibration that mast should be on the icon as well as the "center" to use. Even if it is not real time a small animation would help at the beginning to guide a user as to what is expected.

On Thursday, 16 October 2014 13:11:31 UTC-4, Arthur Benemann wrote:
...

Xerr Avon

unread,
Oct 31, 2014, 12:04:27 AM10/31/14
to drones-...@googlegroups.com
Hi,

I love the current mag calibration, there is no time limit and I like being able to see where all I have pointed the copter.  I go for a full globe. Its not like we have to do this very often..

thanks

John


On Tuesday, October 14, 2014 7:50:02 PM UTC-5, Michael Oborne wrote:

Ill try answer all your questions.

 

Why do they spin? Because if it didn’t you cant see if you had points on the backside of the sphere. At one stage it had the current captured point always at the front, this however creates jumping and was not usefull.

What do the dots represent? They are the vector of the raw mag data, ie the position on the sphere from the mag x,y,z’s, each axis is given a different colour

When is sufficient data collected? When you have collected data that are within 1/3rd of the radius of the yellow target dots, the dots vanish when you have acquired that point.

 

Michael

 

From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of BayAreaCrasher
Sent: Wednesday, 15 October 2014 2:46 AM
To: drones-...@googlegroups.com
Subject: [drones-discuss] Aim for the yellow?! - Mission Planner compass calibration

 

Hi all,

 

So I just updated to the latest Mission Planner and was trying to do a compass calibration on 3.2-rc12.  Went into the trusty compass calibration page and started the Live Calibration.  

 

Went a little like this (I'm a semi-well-informed user):

  • Two things on the screen started spinning.  They have colored axes that represent something.  Why do they spin?
  • Dots appear randomly on the spinning things. What do the dots represent?
  • I'm getting a bit dizzy now.
  • Samples are being collected, up to 500 or so now...more data needed is what I'm told.  
  • When is sufficient data collected?
  • Something on the screen says "Aim for the yellow".  I tried but my spatial capabilities were matched and I had no idea how to aim for the yellow while spinning around and watching the screen at the same time.  Still dizzy but better.
  • I finally clicked done after 1000+ samples and it saved some offsets.  They look OK (under 250).

Is there somewhere in the wiki or elsewhere some details as to what a non-expert user needs to do in this screen?  Half the time I revert to APM Planner because there it's just a timed based exercise for 60 seconds.  Get slightly less dizzy. 

 

One little thing that I think would be incredible would be some audio feedback from the Pixhawk when sufficient data has been obtained.  

 

Thanks,

Pablo

Christoffer Johnson

unread,
Nov 1, 2014, 9:19:51 AM11/1/14
to drones-...@googlegroups.com
I agree, its good to have this advanced type of calibration with no time frame. We can have it as an alternative "advanced" option and one simpler in the vehicle itself.
For now I suggest a vehicle in the middle and better instructions.

Its a good way to see if your internal and external compass is in the right direction as well, looking at the vehicle in the middle.
I know I had problems figuring out the right direction on a external non 3DR HMC5893 compass which led to a crash.

WifiGuru

unread,
Nov 5, 2014, 1:18:03 PM11/5/14
to drones-...@googlegroups.com
Hey all, here's a video on how i do my calibration. I always recommend doing the accelerometer calibration first, so it knows which way's which ;P

But this is a foolproof / easy way to get a good heading.



On Tuesday, October 14, 2014 2:46:13 PM UTC-4, BayAreaCrasher wrote:

Jonathan Challinger

unread,
Nov 5, 2014, 3:18:10 PM11/5/14
to drones-...@googlegroups.com
That is essentially what I recommend to people, but without the chair. You can just rotate the thing in your hands. You only need one revolution per axis. No need to do accel cal first, but you need to do it eventually so whatever...

This kind of procedure is probably what is going to be necessary to fit an ellipsoid to the data and get scale factors, soft-iron effects, and non-orthagonality corrected for.

--

Craig Elder

unread,
Nov 5, 2014, 8:37:30 PM11/5/14
to drones-discuss
Please test the beta version of Mission Planner.   It has some changes in it to increase the rate of the compass messages and turn off the other messages, plus it runs the calibration calculation continuously, and automatically accepts the offsets once the solution converges.  It ensures that it gathers data from  all sides top- bottom, left right etc and when the error converges below 0.2 the solution is automatically accepted.  It is very quick.


Reply all
Reply to author
Forward
0 new messages