Skip to content

Commit c4aef10

Browse files
committed
README.md add notes re access to quaternion data.
1 parent 45eea8e commit c4aef10

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,17 @@ being to compensate for offsets caused by static local magnetic fields.
178178

179179
### 2.1.2 Bound variables
180180

181-
Three bound variables provide access to the angles in degrees:
181+
Three bound variables provide access to the Euler angles in degrees:
182182

183183
1. `heading`
184184
2. `pitch`
185185
3. `roll`
186186

187+
Quaternion data may be accesed via the `q` bound variable:
188+
189+
1. `q` Contains `[w, x, y, z]` representing the normalised (unit) quaternion
190+
`w + xi + yj + zk`. Quaternion data is dimensionless.
191+
187192
A bound variable `beta` controls algorithm performance. The default value may
188193
be altered after instantiation. See [section 5.2](./README.md#52-beta).
189194

@@ -197,7 +202,7 @@ North. A positive value adds to heading.
197202

198203
This uses the `uasyncio` library and is intended for applications based on
199204
asynchronous programming. Updates are performed by a continuously running
200-
coroutine. The `heading`, `pitch` and `roll` values are bound variables
205+
coroutine. The `heading`, `pitch`, `roll` and `q` values are bound variables
201206
which may be accessed at any time with effectively zero latency. The test
202207
program `fusionlcd.py` illustrates its use showing realtime data on a text
203208
LCD display, `fusiontest_as.py` prints it at the REPL.
@@ -276,7 +281,12 @@ degrees.
276281
2. `pitch`
277282
3. `roll`
278283

279-
A bound variable `beta` controls algorithm performance. The default value may
284+
Quaternion data may be accesed via the `q` bound variable:
285+
286+
1. `q` Contains `[w, x, y, z]` representing the normalised (unit) quaternion
287+
`w + xi + yj + zk`. Quaternion data is dimensionless.
288+
289+
A bound variable `beta` controls algorithm performance. The default value may
280290
be altered after instantiation. See [section 5.2](./README.md#52-beta).
281291

282292
A class variable `declination`, defaulting to 0, enables the heading to be

0 commit comments

Comments
 (0)