PaulStoffregen/MahonyAHRS

random roll initial angle

Opened this issue · 0 comments

Hi paul
Sorry to bother you. I run this program successfully but I find there's some problems with the roll initial angle.
the coordinate system of the accelerometer and gyroscope is north(x)-west(y)-up(z)[left part of the pic]. But when the euler angle been solved and I moved the IMU to find out the coordinate system, it seems like north(x)-east(y)-down(z)[right part of the pic].
1
so I times a rotation matrix to change the coordinate system to n-w-u, it works. but I place the imu horizontally, the roll changes randomly bewteem the number around 0 or around 180. I mean, this time I run the program roll is around 0, but next time when I run the program again, roll becomes around 180. so I want to figure out why this happens, Thank you!