Pitch & Yaw (Accelerometer & Magnetometer)

Hello guys,

I've been reading Euler angles and more google stuff however i'm having a hard time finding some relative easy explanation on how to achieve Pitch and Yaw from a accelerometer and magnetometer (FXOS8700CQ sensor in this breakout board I2C 3-axis linear accelerometer and 3-axis magnetometer).

I'm already able to get Ax,Ay,Az and Mx,My,Mz raw values with arduino and from what i'm seeing i need to compute this into some sort of acceleration value and with magnetometer being able to get the North i have everything i need to get this angles.

So my question is, could you guys bring some light upon this with simple and intuitive explanation or good articles i could read from?

Thank you,
loonatic

https://www.dfrobot.com/wiki/index.php/How_to_Use_a_Three-Axis_Accelerometer_for_Tilt_Sensing

Those links didnt help me much , mostly because they lack explanation (the first one at least) about the equations and only uses accelerometer, discarding magnetometer and yaw calculations (to be more precise) sorry :frowning:

If you want the full details of tilt calculations, see this application note.

There are many similar application notes describing how to obtain the yaw angle from the magnetometer, but it MUST be calibrated first.

But is tilt the same as pitch ? not understanding the tilt thingy :confused:

basically from accelerometer i get pitch and yaw from a calibrated magnetometer right?

thank you and sorry for all this confusing questions and stuff :stuck_out_tongue:

pitch and roll or tilt are explained and diagrammed in link #1 in reply #1.

It is not possible to make it any clearer.

And what about Yaw any possible help? in my project, i would use South magnetic instead of North because of the sun, however i'm getting more and more confused how to properly calc Yaw.

The sun has nothing to do with yaw.

The yaw angle is usually calculated from true North increasing to the East, using the horizontal components of the Earth's magnetic field and your local magnetic declination correction.

What i mean by using the South is because the project is about solar panels and here, it would be handy to have a South centered solar panel moving 90º to east and west. I will read in-depth that second link you posted to see if i can get to Yaw calculations.

Thank you o/