Skip to content

Commit ea9b21f

Browse files
committed
Added 3 new battery messages to support both smart batteries and power monitors.
1 parent 94ea1e9 commit ea9b21f

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# Battery data to be sent continuously
3+
#
4+
5+
float16 temperature_cells # [C] : Pack mounted thermistor (preferably installed between cells), NAN: field not provided
6+
float16 temperature_pcb # [C] : Battery PCB temperature (likely output FET(s) or current sense resistor), NAN: field not provided
7+
float16 temperature_other # [C] : Application dependent, NAN: field not provided
8+
float32 current # [A] : Positive: defined as a discharge current. Negative: defined as a charging current, NAN: field not provided
9+
float32 voltage # [V] : Battery voltage
10+
float16 state_of_charge # [%] : The estimated state of charge, in percent remaining (0 - 100).
11+
uint8 slot_id # : The physical location of the battery on the aircraft. 0: field not provided
12+
float32 capacity_consumed # [Ah] : This is either the consumption since power-on or since the battery was full, depending on the value of STATUS_FLAG_CAPACITY_RELATIVE_TO_FULL, NAN: field not provided
13+
uint32 status_flags # : Fault, health, readiness, and other status indications
14+
15+
uint32 STATUS_FLAG_READY_TO_USE = 1
16+
uint32 STATUS_FLAG_CHARGING = 2
17+
uint32 STATUS_FLAG_CELL_BALANCING = 4
18+
uint32 STATUS_FLAG_FAULT_CELL_IMBALANCE = 8
19+
uint32 STATUS_FLAG_AUTO_DISCHARGING = 16
20+
uint32 STATUS_FLAG_REQUIRES_SERVICE = 32
21+
uint32 STATUS_FLAG_BAD_BATTERY = 64
22+
uint32 STATUS_FLAG_PROTECTIONS_ENABLED = 128
23+
uint32 STATUS_FLAG_FAULT_PROTECTION_SYSTEM = 256
24+
uint32 STATUS_FLAG_FAULT_OVER_VOLT = 512
25+
uint32 STATUS_FLAG_FAULT_UNDER_VOLT = 1024
26+
uint32 STATUS_FLAG_FAULT_OVER_TEMP = 2048
27+
uint32 STATUS_FLAG_FAULT_UNDER_TEMP = 4096
28+
uint32 STATUS_FLAG_FAULT_OVER_CURRENT = 8192
29+
uint32 STATUS_FLAG_FAULT_SHORT_CIRCUIT = 16384
30+
uint32 STATUS_FLAG_FAULT_INCOMPATIBLE_VOLTAGE = 32768
31+
uint32 STATUS_FLAG_FAULT_INCOMPATIBLE_FIRMWARE = 65536
32+
uint32 STATUS_FLAG_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 131072
33+
uint32 STATUS_FLAG_CAPACITY_RELATIVE_TO_FULL = 262144
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Battery data to be sent statically upon request or periodically at a low rate
3+
# Recommend that this message is sent at a maximum of 1Hz and nominally 0.2 Hz (IE: once every 5 seconds.)
4+
5+
uint8[<=50] name # : Formatted as manufacturer_product, 0 terminated
6+
uint8[<=32] serial_number # : Serial number in ASCII characters, 0 terminated
7+
uint8[<=9] manufacture_date # : Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated
8+
float32 design_capacity # [Ah] : Fully charged design capacity. 0: field not provided.
9+
uint8 cells_in_series # : Number of battery cells in series. 0: field not provided.
10+
float16 nominal_voltage # [V] : Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided.
11+
float16 discharge_minimum_voltage # [V] : Minimum per-cell voltage when discharging. 0: field not provided.
12+
float16 charging_minimum_voltage # [V] : Minimum per-cell voltage when charging. 0: field not provided.
13+
float16 charging_maximum_voltage # [V] : Maximum per-cell voltage when charged. 0: field not provided.
14+
float32 charging_maximum_current # [A] : Maximum pack continuous charge current. 0: field not provided.
15+
float32 discharge_maximum_current # [A] : Maximum pack continuous discharge current. 0: field not provided.
16+
float32 discharge_maximum_burst_current # [A] : Maximum pack discharge burst current for 30 seconds. 0: field not provided
17+
float32 full_charge_capacity # [Ah] : Predicted battery capacity when fully charged (accounting for battery degradation), NAN: field not provided
18+
uint16 cycle_count # : Lifetime count of the number of charge/discharge cycles (https://en.wikipedia.org/wiki/Charge_cycle). UINT16_MAX: field not provided.
19+
uint8 state_of_health # [%] : State of Health (SOH) estimate, in percent (0 - 100). UINT8_MAX: field not provided.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# Battery cell voltages
3+
# Rate: set by parameter on smart battery (default off)
4+
#
5+
6+
float16[<=24] voltages # [Volt]
7+
uint16 index # Index of the first cell in the array, index 0 is cells at array indices 0 - 23, index 24 is cells at array indices 24 - 47, etc.
8+

0 commit comments

Comments
 (0)