paiprashanth / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

Compass goes crazy - apparently my fixed wind aircraft is flying sideways and in reverse. #537

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
please see attached tlog.
I realize this should be a user error. 
-I have not found any information regarding compass calibration, other than 
entering declination - entered 7,13 degree.
-There no power wires, metal or transmitter anywhere near magnetometer.

-the wind during the flight is north-to-south and not very strong.

Original issue reported on code.google.com by andre.kj...@gmail.com on 3 Mar 2012 at 2:44

GoogleCodeExporter commented 8 years ago
Andre,

     This is almost certainly compass offsets.  You can see the compass offsets in the mission planner's flight data screen on the bottom left pane, in the status tab (scroll to the left a bit and look for mag_ofs_x y and z.  It depends upon the compass and the metal on your frame but values of up to 100 on at least one axis are fairly common.  Your are all zero which is normal if you've just updated your firmware.  Please try waving your plane around a bit and see if you can get the values to climb and hopefully settle on something more reasonable.  you can also check your compass heading while on the ground and you should see the values are better.  By the way, the more you change the rotation of the plane, the more quickly the offsets update...we've found recently that a normal plane flight may not cause the plane to move around enough for the offsets to update regularly...of course most plane users don't use a mag anyway i think...
     I'm not sure about arduplane but arducopter saves the offsets after it's been flying at least 4 minutes.

-Randy

Original comment by rmackay...@gmail.com on 5 Mar 2012 at 12:10

GoogleCodeExporter commented 8 years ago
Thanks for trying to help.
I did rotate the plane before takeoff, then held it sideways, and rotated it in 
two more directions.  - sometimes I forget that , but I think you can even see 
it in the attached .tlog

The planes body is only some aluminum (in wings) - and EPP - no materials that 
should influence the magnetometer.
I might have erased and reconfigured the plane before this flight, that's why 
you may see 0, if so , it should be very temporarily. and maybe not the cause 
to my problems.

I've had problems with decent compass behavior very long time now.  It's the 
reason I put the APM into a plane, as flying a multirotor with it proved to be 
a disaster.

Original comment by andre.kj...@gmail.com on 5 Mar 2012 at 12:20

GoogleCodeExporter commented 8 years ago
my mag_of values seems to be 5,1,-4 even long into the flight.
What could possibly stop them from being updated correctly ?
If there something I could to to verify that they are being updated ?

Original comment by andre.kj...@gmail.com on 5 Mar 2012 at 12:27

GoogleCodeExporter commented 8 years ago
andre, i will be adding a compass calibration to the planner in the next day or 
so. which should work for you.

there wil lbe 2 options.
the spin the apm around, or the give it a tlog and it will find the best 
offsets using a least square adjustment.

Original comment by Meee...@gmail.com on 8 Mar 2012 at 1:28

GoogleCodeExporter commented 8 years ago
Meee., - nice, - very nice.  that will be great.

Original comment by andre.kj...@gmail.com on 8 Mar 2012 at 8:38