How do you calculate magnetic heading using raw accelerometer and magnetometer data?
-
Pushsnowboarding has recorded sensor data for snow boarders and I am trying to work out how to resolve the accelerometer and magnetometer data into a 2 dimensional heading. You can find more information about Pushsnowboarding here: http://www.pushsnowboarding.com/ And see what I am trying to do with the data here: http://lab.zoho.co.uk/2011/03/05/nokia-push-snowboarding-interactive-data-visualisation/ I hope to ultimately do a 3D display of the boards position heading but for the moment will settle for a 2D heading. Have looked around and just seem to find more questions than answers. Sample data here: <!-- In this log, the first reading is from the phone's accelerometer (acc_data). It holds the tstamp and the three readings (x,y,z) together with a bonus Euclidean norm (r). A nice property of this Euclidean norm is that whenever the phone is on free fall, this value goes down. Currently this value is being sampled @10Hz but this might change in the future to something around 20Hz if necessary. You can check which axis is which here: http://doc.qt.nokia.com/qt-mobility-snapshot/qaccelerometerreading.html#qaccelerometerreading-units --> <acc_data tstamp="1295006856.779" x="1.23591" y="5.40709" z="6.33402" r="8.41925"/> <!-- This next reading comes from the phone's internal magnetometer (compass, mag_data). Axis follow the same philosophy as the accelerometer ones. r is the Euclidean norm as well. Cool thing about this one is that if any the sensor gets affected by any major electromagnetic interference (holding a magnet close to the sensor), this value shall change. Sampled @10Hz--> <mag_data tstamp="1295006856.780" x="0.00528" y="-0.02638" z="-0.06566" r="0.07095"/> I am not a rocket scientist so hopefully a formula that can be replicated in JavaScript, PHP or Actionscript would be extremely helpful. Cheers in advance.
-
Answer:
Review the data in Freescale's application notes at: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MAG3110 There's a good description of the necessary data transforms.
John Haddy at Quora Visit the source
Related Q & A:
- How do cellphones calculate heart rate?Best solution by Quora
- Is Using Gmail to Store Application Data a Violation of their Terms of Service?Best solution by Quora
- How do I calculate a xyz-position of a GPS-position relative to an other GPS-position?Best solution by Geographic Information Systems
- How do I create an HTML table, in jQuery, with JSON data?Best solution by Stack Overflow
- How to calculate magnetic field strength?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.