Hello all,(adsbygoogle = window.adsbygoogle || []).push({});

I have a PNI TCM2 electronic compass module, which has a 3-axis magnetometer and a 2-axis tiltmeter (manual: http://www.mil.ufl.edu/projects/gnuman/spec_sheets/tcm2_man.pdf" [Broken]), and provides heading with tilt compensation.

The module also provides "pitch" and "roll" measurements. What I can't figure out is exactly what it is reporting as pitch and roll. The manual gives the following information (section 3.11 of the manual):

"The TCM2 uses a fluid-filled tilt sensor to measure the orientation of the compass with

respect to gravity. Since the compass also measures the complete magnetic field, the

TCM2 can correct for the tilt of the compass to provide an accurate heading.

You can use the tilt data output by the TCM2 to calculate the orientation of the TCM2 with

respect to the level Earth coordinate frame. Define a vector G that is perpendicular to the

compass board (and therefore is parallel to the z-axis of the compass.) The coordinates

of G = (X, Y, Z) in the level Earth frame will be

Z = (SQRT(1 + tan(P)^{2}+ tan(R)^{2}))^{-1 }

X = Z tan(P)

Y = Z tan(R)

where P and R are the pitch and roll reported by the TCM2.

I don't understand where these equations come from - are they simplified equations? And anyway, how do you determine the orientation/attitude of the compass module.. and which is the (X,Y,Z) system (presumably X and Y axes form a horizontal plane as its the level earth system, but is x the horizontal projection of X? Are P and R ("pitch" and "roll" values given by the compass module) the angles of the module's x and y axes w.r.t the horizontal plane (the x and y axes being the local axes of the compass that coincide with X and Y when the compass is horizontal) ? But wouldn't the tilt sensor measure, for example, the angle between the x axis and the horizontal line contained in the xz plane (which is not the same as the angle between the x axis and the horizontal plane)?

If anyone has any idea on what P and R are please help, I've never used a compass before so maybe I'm missing something evident.

Thank you!

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Interpreting magnetic compass pitch and roll

**Physics Forums | Science Articles, Homework Help, Discussion**