Can We Read Yaw Axis Without Compass?

Hi, i want to read yaw axis for my project. So far, i do this by using compass (3 Axis magnetometer). But, it has a problem when i tilt it. I have tried many tilt compensation compass algorithm but still didn't solve the problem.

My Question is can we read yaw axis without compass? For example, use accelerometer or gyro?
Is there another method to read yaw axis?

thank you..

You can measure the change with a gyrometer but if you need an absolute value the magnetometer is the way to go.

What problem do you have if you tilt it? What output do you expect? If you have a 3 axis magnetometer, you can calculate the facing direction even if the device is tilted. Post the code you used so far.

This is my code:

What problem do you have if you tilt it? What output do you expect? If you have a 3 axis magnetometer, you can calculate the facing direction even if the device is tilted

I want to make 3 axis gimbal, and the problem is on the yaw axis. SO far, i can calculate the heading degree, but when i tilt it, the value is change. I have tried tilt compensation compass algorithm from many reference, but still not works well. Are we must calibrate the magnetometer Max and Min value for each axis first? For Example like this:

#define M_X_MIN -421
#define M_Y_MIN -639
#define M_Z_MIN -238
#define M_X_MAX 424
#define M_Y_MAX 295
#define M_Z_MAX 472

Which sensor module are you using? The way the different values are transformed depends on the placement of the components on the PCB, so this fact is relevant.

What values do you get and what would have been the expected values?

pylon:
Which sensor module are you using? The way the different values are transformed depends on the placement of the components on the PCB, so this fact is relevant.

What values do you get and what would have been the expected values?

i use this Board:

the value that i expected is when i tilt the board, the compass heading degree is not change, i have use tilt compensation algorithm for magnetometer, but still not works, the heading degree still change when i tilt the board..

the value that i expected is when i tilt the board, the compass heading degree is not change, i have use tilt compensation algorithm for magnetometer, but still not works, the heading degree still change when i tilt the board..

How much does it change if you tilt it? a few degrees or more than 90 degrees? Can you give example output of such a session?

The components used are not placed all in the middle of the board so one must expect some drifting if your calculations are used.