pub struct FUEL_STATUS_DATA {
pub maximum_fuel: f32,
pub consumed_fuel: f32,
pub remaining_fuel: f32,
pub flow_rate: f32,
pub temperature: f32,
pub fuel_type: MavFuelType,
pub id: u8,
pub percent_remaining: u8,
}
storm32
only.Expand description
id: 371
Fuel status. This message provides “generic” fuel level information for in a GCS and for triggering failsafes in an autopilot. The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE. The reported consumed_fuel
and remaining_fuel
must only be supplied if measured: they must not be inferred from the maximum_fuel
and the other value. A recipient can assume that if these fields are supplied they are accurate. If not provided, the recipient can infer remaining_fuel
from maximum_fuel
and consumed_fuel
on the assumption that the fuel was initially at its maximum (this is what battery monitors assume). Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot). This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2. If both messages are sent for the same fuel system, the ids and corresponding information must match. This should be streamed (nominally at 0.1 Hz).
Fields§
§maximum_fuel: f32
Capacity when full. Must be provided.
consumed_fuel: f32
Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided.
remaining_fuel: f32
Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided.
flow_rate: f32
Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided.
temperature: f32
Fuel temperature. NaN: field not provided.
fuel_type: MavFuelType
Fuel type. Defines units for fuel capacity and consumption fields above.
id: u8
Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2.
percent_remaining: u8
Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided.
Implementations§
Source§impl FUEL_STATUS_DATA
impl FUEL_STATUS_DATA
pub const ENCODED_LEN: usize = 26usize
pub const DEFAULT: Self
Trait Implementations§
Source§impl Clone for FUEL_STATUS_DATA
impl Clone for FUEL_STATUS_DATA
Source§fn clone(&self) -> FUEL_STATUS_DATA
fn clone(&self) -> FUEL_STATUS_DATA
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more