I have followed the instructions on http://code.google.com/p/arducopter/wiki/AC2_Magnetos for adding the Magnometer directly to the APM board in the components down pins forward orientation. I have the APM board mounted according to http://code.google.com/p/arducopter/wiki/AC2_Frame_Assembly where the RC pins are towards the back of ArduCopter and which places the Magnometer on the "front". I have an X configuration with the APM pointed between the 2 legs.
I noticed in the Mission Planner that the HUD shows the ArduCopter pointing S when it's really pointing north. Moving the ArduCopter shows the heading changing the correct amount but always off by 180 degrees. I guess what I am doing is looking to confirm that I actually have assembled things correctly. For reference I am using https://store.diydrones.com/ProductDetails.asp?ProductCode=BR-HMC5843-01.
I would appreciate any suggestions on what I may have done incorrectly.
Did you run an offsetts calibration? it helped us.
1; switch to CLI
4 now turn your copter over every axis up side down until the numbers do not change anymore. make sure you have your copter a few times in any attitude possible upside down allso.
5. hit enter
now check again.
I have been running from SVN anyway since I needed to change INPUT_VOLTAGE for the battery monitor, so it wasn't too much to make these changes.
When I tried the following, the heading started around 60 degrees and only changed +-30 when rotating the copter full around.
So I commented out the MAG_PROTOCOL, but left the orientation, and that seems to work correctly. Hand rotating the copter produces the expected results and North is North!
Just to be complete, the change that worked for me was to define only:
I bought my HMC5843 on 5/5.
Thanks again for the help. I have been reading the forums here for awhile and it's great to see so many people
willing to help. I hope that I will be able to start contributing back someday soon.
hmm, you might not have done anything wrong.
You've got the new magnetometer and the orientation of the chip is different compared to the old one but I suspect that the code that's being downloaded by the APM Mission Planner assumes you have the old mag.
You are loading the code with the mission planner right? You don't have the ability to download the code directly from SVN and modify your APM_Config.h file right? If you did you could add a couple of lines like: