DavidEGrayson / minimu9-ahrs

Program for reading data from the Pololu MinIMU-9 over I²C. Works on the Raspberry Pi and other embedded ARM Linux boards.
Other
167 stars 68 forks source link

minimu9-ahrs.1/COORDINATE SYSTEMS: missing note about circular direction #16

Open nxdefiant opened 9 years ago

nxdefiant commented 9 years ago

I noticed that the first angle is inverted when using "gyro-only". Is that on purpose? Seems natural since clockwise is the natural direction of the compass while counter clock is L3G. Still confusing... Could you maybe drop a note in the "COORDINATE SYSTEMS"?

DavidEGrayson commented 9 years ago

I am not sure what the problem is. It sounds like you are using the --output euler and --gyro-only options, and the first angle (pitch) not is inverted from what you would expect.

The "ORIENTATION AS EULER ANGLES" section of the man page explains what all the angles are, by walking you through a transformation from the ground coordinate system to the body (circuit board) coordinate system. The second rotation uses the pitch angle:

Now rotate the coordinate system about its second axis by a certain angle that we will call the pitch. A positive pitch makes the first axis of the coordinate system go up. A pitch of 90.0 would make the first axis point straight up, while a pitch of -90.0 would make the first axis point straight down.

The two ideas of positive pitch and negative pitch don't have a clear mapping to the two phrases "clockwise" and "counter clockwise", so I am not sure what the issue is.

The computation that comes up with the Euler angles is independent of the computation of the orientation itself, so definitely the definition of pitch should be the same no matter which sensors you are using to calculate the orientation.

nxdefiant commented 9 years ago

It is simple that I would like to see the rotation direction documented as e.g. clockwise/counterclockwise for the different options.

DavidEGrayson commented 9 years ago

Sorry, I don't get it. The first angle is pitch. On a plane, pitch describes how far your plane is from pointing at the horizon. Are you sure you are trying to talk about pitch? Maybe you actually want to talk about yaw, which is the second angle. Or perhaps the man page is wrong, and yaw is actually the first angle?

nxdefiant commented 9 years ago

Right, there seems to be a problem, too. I'm using minimu9-ahrs on an AltIMU-10 v3, the first value is yaw for me, as described under "--output FORMAT"