summaryrefslogtreecommitdiff
path: root/RocketViewApsNode.mdwn
blob: 0b407d071a2e3bb04695fc866088781dd3aa20b0 (plain)
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
# <a name="APS Node Display in rocketview"></a> APS 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).

A dash (-) in a data means that data is unknown because no CAN message with that data in it has been received yet. Thus, on startup, rocketview will have dashes in all the data until the messages start flowing in.

<table border=1>
  <tr>
    <td><pre>
APS Node ([-|Sleep|Awake|Safe|Armed])

Umbilical: [-|Connected|Removed]
Shore Pwr: [-|On|Off]
Rkt Rdy:   [-|On|Off]

Battery:   [-|xx.x]V [-|x.xx]A [-|x.xxx]AHr
Charging:  [-|On|Off]

S1 (FC):   [-|On|Off]
S2 (CAN):  [-|On|Off]
S3 (ATV):  [-|On|Off]
S4 (WIFI): [-|On|Off]
</pre></td>
  </tr>
</table>

The APS mode is set by `APS_REPORT_MODE = 2B01 = 158 0 1 [mode]` where `mode` is:

- 0x12 = `Sleep`
- 0x23 = `Awake`
- 0x34 = `Safe`
- 0x88 = `Armed`

`Umbilical` (whether the umbilical cord is plugged in or not) is set by `UMB_REPORT_CONNECTOR = 3301 = 198 0 1 [umb]` where `umb` is:

- 0 = `Removed`
- 1 = `Connected`

`Shore Pwr` (whether the external "shore" power is on) is set by `UMB_REPORT_SHOW_POWER = 3321 = 199 0 1 [pwr]` where `pwr` is:

- 0 = `Off`
- 1 = `On`

`Rkt Rdy` (whether the rocket is asserting the Rocket Ready signal on the umbilical cord) is set by `UMB_REPORT_ROCKETREADY = 3341 = 19A 0 1 [rr]` where `rr` is:

- 0 = `Off`
- 1 = `On`

`Charging` (whether the Li Ion battery is being charged or not) is set by `PWR_REPORT_CHARGER = 3B61 = 1DB 0 1 [chrg]` where `chrg` is:

- 0 = `Off`
- 1 = `On`

Battery volts, current and state of charge are set by:

- `APS_DATA_VOLTS = 3B02 = 1D8 0 2 [H] [L]` where the volts are V = 5/1024/.14815 \* counts
- `APS_DATA_AMPS = 3B22 = 1D9 0 4 [D] [D] [D] [D]` where the amps are A = 768.05 / counts
- `APS_DATA_CHARGE = 3B44 = 1DA 0 2 [H] [L]` where the amphours are in counts where 1 count = 3.0722 C = 853.4 x 10^-6 Ah)

S1 - S4 (state of the power switches) are set by `APS_REPORT_SWITCH_1` through `APS_REPORT_SWITCH_4` where byte 0 is:

- 0 = `Off`
- 1 = `On`