Hi
Thanks to Jason and DIY drones / ardupilot community for creating all this for us!
I have been fooling around with latest arducopter 2 beta 1. So far everything has gone very smoothly
Quick question. where do we define how our magnetometer is mounted? also How do we perform the mag offset using this code? or are these determined automatically in the code?
Thanks
Al
Tags:
Permalink Reply by Clément on May 8, 2011 at 12:33pm Hi,
The mag offsets are determined automatically in the code.
However, you still have to modify a #define in the code to tell how your mag is mounted.The default position is the one described in the wiki so if yours is like that, you can use the firmware provided by the APM Mission Planner with no modification.
Otherwise, if your mag is mounted differently, you will have to download the code, modify APM_Config.h as explained in the wiki, and build your own firmware.
Permalink Reply by Al Ros on May 8, 2011 at 2:12pm Thanks Clement
My mag is soldered to the oilpan with a header - so I presume I don't have to define the mag orientation. The mag is reading heading correctly, but all the offsets remain zero.Yaw hold with compass on is sloppy and poor. With compass off it is much better. I have turnid yaw PIDS up but does not help much unless i need to go to real high values?
its like with the offset correction with each small roll or pitch the compass must be jumping around ?
thanks
Permalink Reply by Russell B. Sutton on May 8, 2011 at 2:41pm Check ur Declination. Mine is 14. 5'' which = an offset of 6 deg
so my declination should = 6. WRONG
Declination really = -6 CORRECT
Now it seems to work better
Permalink Reply by Russell B. Sutton on May 8, 2011 at 6:18pm my issue was with piratesNG code and thats how i fixed it. wierd to me. AC2 Is good to go I checked it with many declination configs.
Permalink Reply by Tom in ON on May 8, 2011 at 4:35pm Not sure if this would apply to yours, but others mentioned in different post that your computer and in general you house may be affecting you magnometer. I noticed that the Iphone's compass I used was about 40 degrees off from the APM's magno reading until I walked away from the computer towards the balcony. Here it stabilized, but the two still weren't even close. Next time, I will try outside with APM/magno away from the computer and any potential interference.
If the difference is only a few degrees, try to look up the declination for your location.
Permalink Reply by Al Ros on May 8, 2011 at 4:56pm Folks
My issue is not that the compass is reading the heading incorrectly. My local declination is 15.167 and when input as such during setup, the mag reading is right on with north. My problem is that with Mag enabled, my yaw hold is very poor. it drifts back and forth, and I constatnly have to be on rudder to correct. with Mag off, the yaw holds very much like a heading hold heli.
I don't think declination being off comes into this since I am not currently testing loiter or RTH - nbut regardless my declination is correct. Russell I an am not sure where one would enter the offset and how you calculated it. I entered the declination as per the insturctions during the set up routine
Also I don't see where the offsets are being saved by the code. with the Ardupirates version I was using there was a routine to read offsets while one rotates the copter around in all orientations etc. My offsets are reading 0,0,0
Thanks
Al
Permalink Reply by Russell B. Sutton on May 8, 2011 at 6:29pm Yeah I checked Declination is good with AC2, Man I wish I had a Tx so I could fly my quad to help out more. I had this same problem with PiratesNG code.
Permalink Reply by Al Ros on May 8, 2011 at 6:54pm Thanks
in CLI mode when you type compass are your x,y,z offset 0,0,0 or have they been set to something else?
thanks for your help
Al
Permalink Reply by Andrew Bailey on May 8, 2011 at 3:31pm
Permalink Reply by Vincent Mees on May 9, 2011 at 6:20am I think not.
Does someone have the link to the reference between DIY and sparkfun mag?
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.179 members
1280 members
16 members
182 members
86 members
© 2013 Created by Chris Anderson.
Powered by
