Files
mavlink-devguide/en/services/battery.md
T
Hamish Willee b6c49b2cd1 Test migration to vitepress (#551)
* Add package/.vitepress folders - more work to be done

* Fix up config and add site/favicons

* Update styles for wide tables

* Rename English files from README.md to index.md

* Add root home page

* Update .gitignore for vitepress

* Delete unused: travis, book, redirects

* Fix up all Notes

* Warnings and notes - convert to github format

* Add running workflow

* Add yarn lock file

* Fix up links README.md to index.md

* Add lock files
2024-11-27 16:59:53 +11:00

4.6 KiB

Battery Protocol

MAVLink provides a number of messages for providing battery information:

The messages should be sent individually for each battery in the system (the messages have an instance id field that is used to identify the corresponding battery). It is up to the GCS to provide an appropriate mechanism that allows the user to assess the aggregate battery status on systems that have multiple batteries.

Note

There is no standardized mechanism to report the "aggregate" battery state on a multi-battery system. A GCS is expected to provide enough information from the individual battery reports to allow a user to make a reasonable assessment of vehicle battery status.

Message/Enum Summary

Message Description
BATTERY_STATUS Battery message used for frequent status update - e.g. of current capacity, voltages, faults, etc.
BATTERY_INFO (WIP) Battery message used for invariant or infrequently changing data - e.g. battery name, battery full/empty capacity and voltages etc.
Enum Description
MAV_BATTERY_FAULT Fault/health indications.
MAV_BATTERY_MODE Battery mode.

Battery Components

Batteries that are connected to a flight controller via a non-MAVLink bus are treated as part of the flight controller component. Specifically, the battery messages are emitted with the autopilot system and component ids, and the MAV_TYPE for the type of vehicle.

Batteries that are distinct components on the MAVLink network must:

Note

Ground stations (and other components) that are interested in battery messages should differentiate batteries based on BATTERY_STATUS.id/BATTERY_INFO.id.

A Note on SYS_STATUS

SYS_STATUS contains three battery information fields: voltage_battery, current_battery, battery_remaining.

On a single-battery system these usually provide the same information as the BATTERY_STATUS message.

On multi-battery systems the values are not standardised, and depend on the flight stack and/or flight stack configuration. For example, a system may report the same information as the first BATTERY_STATUS, allow the user to configure which battery is reported (i.e. with a parameter), report the battery with the lowest remaining capacity.

Note

GCS should not rely on the value of SYS_STATUS. However it cannot be removed because it is used for battery reporting on many legacy systems (e.g. On-screen displays).