# why an accelerometer can't measure yaw?

Status
Not open for further replies.

#### wajahat

accelerometer pitch yaw

Hi All,
i want to know is it possible to measure all three angles roll pitch and yaw using accelerometer along all three axis?if not why?And also what help gyro provides in this regard?
Any literature in this regard would be helpful.

regards
wajahat

Hello!

Why?
Think about what the accelerometer is. If it doesn't move, yes, you can detect
angles accurately. Now let's suppose your accel is in a plane, and the plane
is currently turning right or left. Then what will look vertical to your accel is
in fact not vertical.

Dora

wajahat said:
Hi All,
i want to know is it possible to measure all three angles roll pitch and yaw using accelerometer along all three axis?if not why?And also what help gyro provides in this regard?
Any literature in this regard would be helpful.

regards
wajahat

Hi wajahat,

...so you can't measure yaw using accelerometers and even roll and pitch (preferably not simultaneously) can only be measured accurately up to about 40-60º in stillness or perfectly uniform movement.
You can help increase the angular range (especially when rolling and pitching simultaneously) using a 3-axis accelerometer and some 3D math transformations, while accounting for what is called as gimbal lock (depending on the math you use).

You can use gyros to help remove artifacts in the measurement (due to sudden accelerations that are not of gravitational nature), but such a system gets complex very quickly and you can only use gyros' output integrated for very short periods of time since they tend to drift and that introduces big errors.

An alternative to measuring yaw is using a magnetic sensor used in connection with the accelerometers, but even this is tricky since the Earth's magnetic vector is at a angle (magnetic inclination) with Earth’s surface that varies from 0º (equator) to ±90º (magnetic poles), so that rolling and/or pitching will influence the reading of the magnetic sensor (that only measures one axis), without even changing the heading.

Fixing this involves using a 3-axis magnetic sensor together with the 3-axis accelerometer sensor and some 3D transformations, but it will give fairly accurate measurements of roll, pitch and heading (yaw).

I hope this gives you some ideas of things to do, depending on the system complexity you require. Unfortunately there's no one-stop place to get all the needed information and I can't either go into more details since I actually helped build (wrote firmware for) a commercial gadget like this, for marine environment, that's giving nice accuracy even on moving boats.

Arthur

How one can transform body coordinate (Roll Pitch Yaw) system to ENU (east North UP) coordinate system.
I am using HTC mobile sensor accelerometre and orientation sensors.
I want to transform Acceleration values from mobile Coordinate system to ENU system, and also after transformation how should i verify it whether the transformation is ok.
Right now I am using
Ir=[sin(Y)*cos(P);cos(Y)*cos(P);sin(P)]
Ip=[cos(R)*cos(Y)+sin(R)*sin(Y)*sin(P);-cos(R)*sin(Y)+sin(R)*cos(Y)*sin(P);-sin(R)*cos(P)]
Iy=[-sin(R)*cos(Y)+cos(R)*sin(Y)*sin(P);sin(R)*sin(Y)+cos(R)*cos(Y)*sin(P);-cos(R)*cos(P)]
R=[Ir Ip Iy];
Ar=R*Ab
where Ab is the acceleration in body coordinate system and Ar is in ENu system. I want to verify whether is it right ? and if right How i can verify the results. ?
regards

ravi

Status
Not open for further replies.