diff --git a/dsdl/uavcan/equipment/power/710.PowerStatus.uavcan b/dsdl/uavcan/equipment/power/710.PowerStatus.uavcan deleted file mode 100644 index 3dca4fc172..0000000000 --- a/dsdl/uavcan/equipment/power/710.PowerStatus.uavcan +++ /dev/null @@ -1,7 +0,0 @@ -# -# Info for all battery packs of the primary power supply. -# - -bool external_power_connected - -BatteryStatus[<=16] batteries diff --git a/dsdl/uavcan/equipment/power/710.PrimaryPowerSupplyStatus.uavcan b/dsdl/uavcan/equipment/power/710.PrimaryPowerSupplyStatus.uavcan new file mode 100644 index 0000000000..8b91ec9e1b --- /dev/null +++ b/dsdl/uavcan/equipment/power/710.PrimaryPowerSupplyStatus.uavcan @@ -0,0 +1,14 @@ +# +# Primary power supply status. +# Typical publishing rate should be around 1~2 Hz. +# + +# How many hours left to full discharge at average load over the last 10 seconds +float16 hours_to_empty_at_10sec_avg_power # [Hours] +float16 hours_to_empty_at_10sec_avg_power_variance # [Hours^2] + +uint7 remaining_energy_pct # [Percent] Required +uint7 remaining_energy_pct_stdev # [Percent] Error standard deviation. Use best guess if unknown + +# True if the publishing node senses that an external power source can be used, e.g. to charge batteries +bool external_power_available diff --git a/dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan b/dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan index 82f6d877f7..482f5997be 100644 --- a/dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan +++ b/dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan @@ -2,13 +2,13 @@ # Generic electrical circuit info. # -uint8 circuit_id +uint16 circuit_id + +float16 voltage +float16 current uint8 ERROR_MASK_OVERVOLTAGE = 1 uint8 ERROR_MASK_UNDERVOLTAGE = 2 uint8 ERROR_MASK_OVERCURRENT = 4 uint8 ERROR_MASK_UNDERCURRENT = 8 uint8 error_mask - -float16 voltage -float16 current diff --git a/dsdl/uavcan/equipment/power/712.BatteryInfo.uavcan b/dsdl/uavcan/equipment/power/712.BatteryInfo.uavcan new file mode 100644 index 0000000000..408f48ff90 --- /dev/null +++ b/dsdl/uavcan/equipment/power/712.BatteryInfo.uavcan @@ -0,0 +1,63 @@ +# +# Single battery info. +# Typical publishing rate should be around 0.2~1 Hz. +# Please refer to the Smart Battery data specification for some elaboration. +# + +# +# Primary parameters. +# Some fields can be set to NAN if their values are unknown. +# Full charge capacity is expected to slowly reduce as the battery is aging. Normally its estimate is updated after +# every charging cycle. +# +float16 temperature # [Kelvin] +float16 voltage # [Volt] +float16 current # [Ampere] +float16 average_power_10sec # [Watt] Average power consumption over the last 10 seconds +float16 remaining_capacity_wh # [Watt hours] Will be increasing during charging +float16 full_charge_capacity_wh # [Watt hours] Predicted battery capacity when it is fully charged. Falls with aging +float16 hours_to_full_charge # [Hours] Charging is expected to complete in this time; zero if not charging + +# +# Status mask. +# Notes: +# - CHARGING must be always set as long as the battery is connected to a charger, even if the charging is complete. +# - CHARGED must be cleared immediately when the charger is disconnected. +# +uint11 STATUS_MASK_IN_USE = 1 # The battery is currently used as a power supply +uint11 STATUS_MASK_CHARGING = 2 # Charger is active +uint11 STATUS_MASK_CHARGED = 4 # Charging complete, but the charger is still active +uint11 STATUS_MASK_TEMP_HOT = 8 # Battery temperature is above normal +uint11 STATUS_MASK_TEMP_COLD = 16 # Battery temperature is below normal +uint11 STATUS_MASK_OVERLOAD = 32 # Safe operating area violation +uint11 STATUS_MASK_BAD_BATTERY = 64 # This battery should not be used anymore (e.g. low SOH) +uint11 STATUS_MASK_NEED_SERVICE = 128 # This battery requires maintenance (e.g. balancing, full recharge) +uint11 STATUS_MASK_BMS_ERROR = 256 # Battery management system/controller error, smart battery interface error +uint11 STATUS_MASK_VENDOR_A = 512 # Vendor-specific flag +uint11 STATUS_MASK_VENDOR_B = 1024 # Vendor-specific flag +uint11 status_mask + +# +# State of Health (SOH) estimate, in percent. +# http://en.wikipedia.org/wiki/State_of_health +# +uint7 STATE_OF_HEALTH_UNKNOWN = 127 # Use this constant if SOH cannot be estimated +uint7 state_of_health_pct # Health of the battery, in percent, optional + +# +# Relative State of Charge (SOC) estimate, in percent. +# http://en.wikipedia.org/wiki/State_of_charge +# +uint7 state_of_charge_pct # Percent of the full charge [0, 100]. This field is required +uint7 state_of_charge_pct_stdev # SOC error standard deviation; use best guess if unknown + +# +# Battery identification. +# Instance ID must be unique within the same battery model name. +# Model name is a human-readable string that normally should include the vendor name, model name, and chemistry +# type of this battery. This field should be assumed case-insensitive. Example: "Zubax Smart Battery v1.1 LiPo". +# +uint32 instance_id # Set to zero if not applicable +uint6 id # Identifies the battery within this vehicle, e.g. 0 - primary battery +uint2 group_id # Not used, set zero +uint8[<32] model_name # Battery model name diff --git a/dsdl/uavcan/equipment/power/BatteryStatus.uavcan b/dsdl/uavcan/equipment/power/BatteryStatus.uavcan deleted file mode 100644 index bd107fae82..0000000000 --- a/dsdl/uavcan/equipment/power/BatteryStatus.uavcan +++ /dev/null @@ -1,24 +0,0 @@ -# -# Nested type. -# Energy and capacity are expressed in watt hours (Joules are infeasible because of range limitations). -# Unknown values should be represented as NAN. -# Typical publishing rate should be around 1 Hz. -# - -uint8 STATUS_MASK_IN_USE = 1 -uint8 STATUS_MASK_CHARGING = 2 -uint8 STATUS_MASK_CHARGED = 4 # Charging complete -uint8 STATUS_MASK_TEMP_HOT = 8 # Temperature above normal -uint8 STATUS_MASK_TEMP_COLD = 16 # Temperature below normal -uint8 STATUS_MASK_OVERLOAD = 32 -uint8 STATUS_MASK_ERROR = 64 # E.g. invalid voltage, sensor malfunction, etc. -uint8 status_mask - -float16 temperature # Celsius, optional -float16 voltage # Required -float16 current # Required -float16 average_power_10sec # Average power consumption over the last 10 seconds, required -float16 consumed_wh # Required -float16 capacity_wh # NAN if unknown - -uint7 remaining_charge_pct # Percent of the full charge [0, 100], required