cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation Xh and Yh in eCompass

torrepa
Associate
Posted on July 17, 2016 at 14:04

Hello everyone,

I can not understand

how they

obtained

the equation 2 p. 7 the following document:

Can anyone explain me

?

Thank you and greetings.

#ecomapass-tilt-lsm303dlh #ecompass #tilt #lsm303dlh
2 REPLIES 2
Martin B
ST Employee
Posted on July 22, 2016 at 16:58

Hello,

To understand how Equation 2 (page 7) has been obtained see: LSM303DLH pitch/roll/heading calculation (Appendix A, page 19). There is Equation 12 (page 22), where first equation:

Mx2 = Mx1 cos �?� + Mz1 sin �?�

is equivalent to:

XH = XM cos Pitch + ZM sin Pitch

of Equation 2 (page 7) and second equation:

My2 = Mx1 sin γ sin �?� + My1 cos γ - Mz1 sin γ cos �?�

is equivalent to:

YH = XM sin Roll sin Pitch + YM cos Roll - ZM sin Roll cos Pitch

of Equation 2 (page 7).

To understand more please see also more recent documents on this topic:

http://www.st.com/resource/en/design_tip/dm00269987.pdf

torrepa
Associate
Posted on July 28, 2016 at 09:44

Thanks for the reply.

You have implemented the e-compass ??

I am a student and I wanted to ask if you can provide me an email contact to ask more questions about implementing e-compass.