PSAS/ RocketViewGpsNode

# GPS Node Display in rocketview

Note: Message IDs are described in the form `DEFINED_MESSAGE_NAME = [16bit ID] = [11bit ID] [RTR] [length] [byte0] ... [byte7]`, where the 16bit ID is the 16 bit "packed value" of the ID (11 bits CAN ID + 1 bit RTR + 4 bits length).

If the data is unknown - for example, because no message has been received yet - then display a dash (-).

 ```GPS Node ([-|Safe|Armed]) Lat: [-|xx deg xx.xxx']N Lon: [-|xxx deg xx.xxx']W Alt: [-|[xx,xxx]m (xx,xxxft)] Sats: [-/-|0/0] Locked: [-|Yes|No] Solution: [-|OK|Propated|Alt. used|PM] Validity: [-|OK|Alt. used|Num sats|EHPE|EVPE] ```

`sequencer`, running on the flight computer, takes the RAW binary GPS messages from the CAN bus and parses them into shorter messages for rocketview to display.

The GPS mode is set by `GPS_REPORT_MODE = 4B10 = 258 0 1 [mode]` where `mode` is:

• 0x34 = `Safe`
• 0x88 = `Armed`

`Solution` (the GPS solution type, or quality) is set by `FC_GPS_NAVSOL` byte 0 and byte 1 (which combine to make a 16 bit integer):

• if bit 0 = 1 then display `Propogated`
• if bit 1 = 1 then display `Alt. used`
• if bit 3 = 1 then display `PM`
• if bits 0, 1 and 3 are all 0 (we don't care about the other bits) then display `OK`

`Validity` (the validity of the solution) is set by `FC_GPS_NAVSOL` byte 2 and byte 3 (which combine to make a 16 bit integer):

• if bit 0 = 1 then display `Alt. used`
• if bit 2 = 1 then display `<4 sats`
• if bit 3 = 1 then display `EHPE`
• if bit 4 = 1 then display `EVPE`
• if bits 0,2,3 and 4 are all 0 (we don't care about the other bits) then display `OK`

`Locked` (a summary of the type and validity of the solution) is set by:

• If Solution is `OK` and validity is `OK` then display `Yes` else `No`

Is `FC_GPS_TIME` is used to display the time for the rocket in rocketview?

`Lat` is set by `FC_GPS_LATLON` (first 32 bits)

`Lon` is set by `FC_GPS_LATLON` (second 32 bits)

`Alt` is set by `FC_GPS_HEIGHT` (32 bits).

`Sats` (the number of satellites used over how many should be visible) is set by `FC_GPS_SATS_VIS byte 0 / FC_GPS_SATS_USED byte 0`