I have an HMC5843 hooked up to my arduino mega and I'm having some trouble getting the data correct.
Basically I found this document that helped explain what to do with the values from the hmc library.http://www51.honeywell.com/aero/common/documents/myaerospacecatalog-documents/Defense_Brochures-documents/Magnetic__Literature_Application_notes-documents/AN203_Compass_Heading_Using_Magnetometers.pdf
I took the values and put them through the equations provided and the microcontroller is spitting out some strange data.
I have to post the code later but (its very simple) and the output but for now words will have to suffice.
Basically the micro controller spits out correct headings in degrees but only between say -45 to 45 degrees the rest of the angles come out as fixed values like 270.00, 180.00, 360.00 ect.. No matter how far I turn the sensor the values stay the same fixed number until I turn it back within that -45 to 45 degree range then they get to be precise. Also if I watch the raw data it does not change either until I'm within that range.
This is strange.....is the sensor suppose to do this??? Or is it those equations that are wrong.
Post any links of info on how to take the raw data and turn it into a compass heading that would help too.