github.com/bluenviron/gomavlib/v2@v2.2.1-0.20240308101627-2c07e3da629c/pkg/dialects/development/message_battery_status_v2.go (about) 1 //autogenerated:yes 2 //nolint:revive,misspell,govet,lll 3 package development 4 5 // Battery dynamic information. 6 // This should be streamed (nominally at 1Hz). 7 // Static/invariant battery information is sent in SMART_BATTERY_INFO. 8 // Note that smart batteries should set the MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL bit to indicate that supplied capacity values are relative to a battery that is known to be full. 9 // Power monitors would not set this bit, indicating that capacity_consumed is relative to drone power-on, and that other values are estimated based on the assumption that the battery was full on power-on. 10 type MessageBatteryStatusV2 struct { 11 // Battery ID 12 Id uint8 13 // Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided. 14 Temperature int16 15 // Battery voltage (total). NaN: field not provided. 16 Voltage float32 17 // Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided. 18 Current float32 19 // Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL. 20 CapacityConsumed float32 21 // Remaining charge (until empty). UINT32_MAX: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered. 22 CapacityRemaining float32 23 // Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided. 24 PercentRemaining uint8 25 // Fault, health, readiness, and other status indications. 26 StatusFlags MAV_BATTERY_STATUS_FLAGS `mavenum:"uint32"` 27 } 28 29 // GetID implements the message.Message interface. 30 func (*MessageBatteryStatusV2) GetID() uint32 { 31 return 369 32 }