Skip to content

Commit

Permalink
Update the legacy sensor code to use SensorEventListener instead of t…
Browse files Browse the repository at this point in the history
…he (#451)

* Update the legacy sensor code to use SensorEventListener instead of the
deprecated SensorListener. This also allows for some sanitization of the
code since we no longer have to deal with various coordinate systems
being backwards.

* Update the docs some more.
  • Loading branch information
jaydeetay authored Dec 30, 2021
1 parent 4b46400 commit c366e2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion designdocs/sensors.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ Since these vectors are all normalised we can invert them by taking the transpos
`M = [N_c | U_c | E_c] * [N_p | U_p | E_p]_T`

So the only thing remaining is to figure out `P_p` and `Q_p` which are usually going to be

[0, 0, -1] and [0, 1, 0] respectively.

'Usually' because in certain circumstances you might want them to be different. For example if you
set `P_p` to be [0, 1, 0] and `Q_p` to be [0, 0, 1] you now will have the screen showing what the
long edge of the phone is pointing at. This can be useful if using Sky Map with a telescope -
you can strap it to the telescope tube.


## Magnetic correction

All of the above assumes that the phones sensors give you true North, which they don't.
Expand Down

0 comments on commit c366e2c

Please sign in to comment.