forked from DavidEGrayson/minimu9-ahrs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
minimu9-ahrs.1
146 lines (134 loc) · 5.01 KB
/
minimu9-ahrs.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
.TH MINIMU9-AHRS 1
.SH NAME
minimu9-ahrs - Reads data from the Pololu MinIMU-9 (all versions) over I²C.
.SH SYNOPSIS
.B minimu9-ahrs [\fIOPTIONS\fP]
.SH DESCRIPTION
minimu9-ahrs is a program for reading data from the Pololu MinIMU-9
(all versions) over I²C.
It can output the raw sensor data from the magnetometer, accelerometer,
and gyro or it can use that raw data to compute the orientation of the IMU.
The program auto-detects what version of MinIMU-9 is connected.
.SS OPTIONS
.TP
\fB-h, --help\fP
produce help message
.TP
\fB-v, --version\fP
print version number
.TP
\fB--mode \fIMODE\fR
Specify what algorithm to use.
.nf
\fBnormal\fP (default): Fuse compass and gyro.
\fBgyro-only\fP: Use only gyro (drifts).
\fBcompass-only\fP: Use only compass (noisy).
\fBraw\fP: Just print raw values from sensors.
.fi
.TP
\fB--output \fIFORMAT\fR
Specify how to output the orientation.
Has no effect if \fB--mode raw\fP is specified.
.nf
\fBmatrix\fP (default): Direction Cosine Matrix.
\fBquaternion\fP: Quaternion.
\fBeuler\fP: Euler angles (yaw, pitch roll).
.TP
\fB-b, --i2c-bus\fP
I²C-bus the IMU is connected to (default: /dev/i2c-0)
.SS COORDINATE SYSTEMS
There are two coordinate systems in use.
.P
The \fBground coordinate system\fP uses the following axes, in this order:
\fBNorth\fP, \fBEast\fP, and \fBDown\fP.
.P
The \fBbody coordinate system\fP represents the orientation of the IMU, and
uses the following axes, as labeled on the IMU:
\fBX\fP, \fBY\fP, and \fBZ\fP.
.SS RAW OUTPUT FORMAT
If \fB--mode raw\fP is specified, the format of the output will be
nine integers:
.IP
\fBMX MY MZ AX AY AZ GX GY GZ\fP
.P
where \fBMX MY MZ\fP if the raw reading from the magnetometer,
\fBAX AY AZ\fP is the raw reading from the accelerometer, and
\fBGX GY GZ\fP is the raw reading from the magnetometer.
.SS ORIENTATION OUTPUT FORMATS
Unless \fB--mode raw\fP is specified, the output format will be of the form:
.IP
\fIORIENTATION\fB AX AY AZ BX BY BZ\fR
.P
where the format of \fIORIENTATION\fP is determined by the
\fB--output\fP argument,
\fBAX AY AZ\fP is the scaled acceleration vector in units of 1 g, and
\fBBX BY BZ\fP is the scaled magnetic field vector, whose magnitude should
normally be close to 1.
.SS ORIENTATION AS A MATRIX
The default output format is \fB--output matrix\fP.
In this mode, a 3x3 transformation matrix
(also known as the direction cosine matrix) is sent to the standard output.
The matrix is sent in row-major order; the first three numbers on the line
are row 0, etc.
.P
The matrix is defined as the matrix that transforms column vectors from
the \fBbody coordinate system\fP to the \fBground coordinate system\fP.
Accordingly, its nine elements can be specified as dot products of the
unit vectors representing the two coordinate systems:
.IP
.nf
north·x north·y north·z
east·x east·y east·z
down·x down·y down·z
.fi
.SS ORIENTATION AS A QUATERNION
If \fB--output quaternion\fP is specified, the orientation is formatted
as a unit quaternion (four numbers). It is a left quaternion that
transforms vectors from the \fBbody coordinate system\fP to the
\fBground coordinate system\fP.
.SS ORIENTATION AS EULER ANGLES
If \fB--output euler\fP is specified, the orintation is formatted as three
Euler angles in the following order: pitch, yaw, and roll.
These are the standard angles used to represent the orientation of an airplane.
The angles are output in degrees.
.P
The Euler angles represent the amount of rotation needed in three
distinct steps to turn the ground coordinate system into the body
coordinate system.
.P
Imagine you start with a coordinate system that is equal to ground
coordinate system: north, east, down.
.P
Now rotate the coordinate system about its third axis
(still pointing down) by a certain angle that we will call the \fByaw\fP.
When viewed from above, the yaw rotation goes in the clockwise direction.
.P
Now rotate the coordinate system about its second axis by a certain
angle that we will call the \fBpitch\fP. 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.
.P
Now rotate the coordinate system about is first axis by a certain
angle that we will call the \fBroll\fP.
.P
The coordinate system you now have is equal to the
\fBbody coordinate system\fP (x, y, z).
.SH FILES
.TP
~/.minimu9-ahrs-cal
Calibration file for the magnetomer, needed unless \fB--mode raw\fP is specified.
This file should be a one-line file with 6 integers separated by spaces:
minimum x, maximum x, minimum y, maximum y, minimum z, maximum z.
These numbers specify the linear mapping from the raw ellipsoid to
the unit sphere. For example, if "minimum x" is -414, it means that a
magnetometer reading of -414 on the X axis will get mapped to -1.0 when
the readings are scaled. Run \fBminimu9-ahrs-calibrate\fP to generate this
file.
.SH AUTHOR
.nf
David Grayson <[email protected]>
http://www.github.com/DavidEGrayson/
.fi
.SH SEE ALSO
minimu9-ahrs-calibrate(1), minimu9-ahrs-calibrator(1)