Lines Matching +full:a +full:- +full:z

2 * is the definition of +/- values practical or counterintuitive?
5 * should we have HOWTO engineer a correct matrix for a new device (without comparing to a different…
12 The mounting matrix is a device tree property used to orient any device
13 that produce three-dimensional data in relation to the world where it is
17 reference into the device frame of reference using a translation matrix as
20 The typical usecase is that where a component has an internal representation
21 of the (x,y,z) triplets, such as different registers to read these coordinates,
22 and thus implying that the component should be mounted in a certain orientation
25 For example a device with some kind of screen, where the user is supposed to
28 reference to (x,y,z) orientation, with (x,y) corresponding to these axes on the
29 screen and (z) being depth, the axis perpendicular to the screen.
31 For a screen you probably want (x) coordinates to go from negative on the left
33 and (z) depth to be negative under the screen and positive in front of it,
36 A sensor can be mounted in any angle along the axes relative to the frame of
37 reference. This means that the sensor may be flipped upside-down, left-right,
47 Device-to-world examples for some three-dimensional sensor types:
49 - Accelerometers have their world frame of reference toward the center of
50 gravity, usually to the core of the planet. A reading of the (x,y,z) values
51 from the sensor will give a projection of the gravity vector through the
54 reference can thus be determined. and users would likely expect a value of
55 9.81 m/s^2 upwards along the (z) axis, i.e. out of the screen when the device
57 as the gravity vector is projected 1:1 onto the sensors (z)-axis.
64 ^ z: +g ^ z: > 0
67 +--------+ +--------+
69 +--------+ +--------+
77 If the device is tilted to the left, you get a positive x value. If you point
78 its top towards surface, you get a negative y axis.
80 (---------)
81 ! ! y: -g
85 ! ! x: +g <- z: +g -> x: -g
90 (---------)
93 - Magnetometers (compasses) have their world frame of reference relative to the
94 geomagnetic field. The system orientation vis-a-vis the world is defined with
97 perpendicular to the North axis and positive towards the East and (z) is
103 (---------)
113 (---------)
125 display is readable by a person standing upright on the earth surface, this
126 defines a positive y value.
129 - Gyroscopes detects the movement relative the device itself. The angular
131 device on a flat surface and spin it around the z axis (such as rotating a
132 device with a screen lying flat on a table), you should get a negative value
133 along the (z) axis if rotated clockwise, and a positive value if rotated
134 counter-clockwise according to the right-hand rule.
137 (---------) y > 0
138 ! ! v---\
141 ! ! <--\
142 ! ! ! z > 0
143 ! 1 2 3 ! --/
147 (---------)
150 So unless the sensor is ideally mounted, we need a means to indicate the
154 To achieve this, use the device tree property "mount-matrix" for the sensor.
156 This supplies a 3x3 rotation matrix in the strict linear algebraic sense,
157 to orient the senor axes relative to a desired point of reference. This means
159 multiplied by this matrix to give the proper vectors values in three-dimensional
173 x' = mxx * x + myx * y + mzx * z
174 y' = mxy * x + myy * y + mzy * z
175 z' = mxz * x + myz * y + mzz * z
185 mount-matrix = "1", "0", "0",
190 compensate by performing a -30 degrees rotation around the X axis:
192 mount-matrix = "1", "0", "0",
194 "0", "-0.5", "0.866";
196 The sensor is flipped 180 degrees (Pi radians) around the Z axis, i.e. mounted
197 upside-down:
199 mount-matrix = "0.998", "0.054", "0",
200 "-0.054", "0.998", "0",
203 ???: this does not match "180 degrees" - factors indicate ca. 3 degrees compensation