IMU driver REP-103 and REP-145
Hi, I'm working on a robot localization project. I'm using an IMU (gyro+accel) a magnetometer (HMC5883) and a GPS. I've read REP103 and REP145 in order to publish IMU's data. I'm a little confused about magnetometer. My mag is mounted with X axis forward, Y left and Z up. In this orientation I get follow measurements (southern hemisphere):
Pointing North: X = + Max, Y = 0, Z = positive
Pointing Est: X = 0, Y = +Max, Z = positive
Pointing South: X = - Max, Y = 0, Z = positive
Pointing Est: X = 0, Y = -Max, Z = positive
So, it's reporting in ENU coordinate frame, right?
Then REP103 says: "By the right hand rule, the yaw component of orientation increases as the child frame rotates counter-clockwise, and for geographic poses, yaw is zero when pointing east."
So, it seems that atan2(mag_y, mag_x) is the way to do this:
Pointing east -> atan2(+, 0) = 0 pointing north -> atan2(0, +) = 90
So, going counter clockwise (East to North) the yaw angle increase.
Is my analysis right? because I'm not getting right output from RL....
Thank