I've been through everything I can think of, done an erase, tried calibration (where do you enter the numbers it gives ?). Tried arming the motors and spinning around then leaving for 4 mins but no matter what I do the compass still reads 30 degs off.
I even put in wrong declination figures to get north accurate but then south was way out and on rotating back north had moved !!
Help ! I can't fly like this.
The calibration is automatic, once it's in the air. You shouldn't expect it to be spot on until it's been flown for a few minutes.
We don't actually use the GPS to help determine the offsets of the mag (although we have talked about using GPS for helping determine if the mag value is unreliable).
At a high level, the way the null offsets code works is that as you rotate the quad it compares the change in the vector returned from the compass (remember it's a 3d compass) to what it would have expected based on the move of the copter and then slowly nudges the offsets so that the vector would be closer to what it expects. After a while it gets nudged to an accurate offset.
I wonder if maybe your work area has a lot of metal objects? Is it better outside? Also of course it's good to make sure you don't have any metal screws (or anything metal if possible) near the mag.
There's not much metal around but there is a carbon plate over the compass and the GPS + Telem sits on top of that.
I've not flown it since the update so I guess that would be the first thing to do and see how that goes, presumably more flying time = more accuracy.
Just one thought, when I travel around the country to different events and re-set my declination what effect will that have? Do I need to do the calibration flights again ? Since its an octocopter and a real pain to see which way is front I'm planning on using simple mode and gps often and at various declinations.
i still have the same problem it worked perfect until i moved the motors in by 6" so all i can think is the magnetometer is being affected by the motor magnets?
That's very possible. We've been discussing a lot on the dev list about this problem because Marco has had some yaw issues that we've also diagnosed to be caused by motor interference. Apparently different batteries (just different manufacturers) can also have a very large impact on the magnetic field.
just for some imformation if i lift my apm 6" higher the mag is bang on move it back down mag swings out 45 degrees,
by the way thanks to all you guys on the great development work the whole reason i bought the ardupilot is because it is open source and a lot of clever people out there, the only option for now is to buy the seperate mag and place on a mast, i removed the lipos from the frame made no difference, any other tests i can do to help you guys pin this problem down let me know.
well, at least you've narrowed down definitively the source of the problem.
There's been some discussion on the dev list about:
1. trying to twist the wires to the motors to reduce the magnetism that the wires create (i.e. it may be the wires to the motor rather than the motors themselves)
2. "mu metal" (whatever that is!)
3. get people to buy two mags and then combine the output to cancel out the interference.
4. ..and tests to allow people to see how much increasing their throttle affects their mag heading. You can sort of see this already by first taking the props off your quad, then opening the ap mission planner's flight data screen and clicking on the status tab at the bottom left, then checking out the mx, my and mz values as you crank up the throttle. Ideally they shouldn't change much but if you have a lot of magnetic interference from the motors you'll probably see they change quite a lot.
Realistically I think this is a frame issue..i.e. it is best solved in a simple physical way - keep the mag away from interference and use parts that don't cause a lot of interference! .. of cousre we don't know which brands of motors and lipos are bad magnetic polluters but it might become clear after a while with enough people being aware of the problem and contributing their feedback.
did you get anywhere with your problem as i have exactly the same problem tried everythng it is still
45 degrees out looks like i will have to remove the mag and mount on a mast :( by the way i asked the same question about after calibrating the mag where you input the figure it gives you it seems as though no one knows?
Read my threads this has happened to me as well and i have tried everything
I'll be testing some more tomorrow, its been a busy week at work so no daylight left when I get home.
I'll run 4 or 5 test flights tomorrow and see how the mag responds. I'll post back when done.
Tested today with four 7 minute flights - but no difference on the mag at all - if anything its worse now.
I guess I'm looking for interference but after the last flight I stuck a magnetic compass on the frame, it read true although I was holding it, no motors spinning, so this may only be an indication that the problem is electronic.