Struct FUEL_STATUS_DATA

Source
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,
}
Available on crate feature 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

Source

pub const ENCODED_LEN: usize = 26usize

Source

pub const DEFAULT: Self

Trait Implementations§

Source§

impl Clone for FUEL_STATUS_DATA

Source§

fn clone(&self) -> FUEL_STATUS_DATA

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FUEL_STATUS_DATA

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FUEL_STATUS_DATA

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for FUEL_STATUS_DATA

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl MessageData for FUEL_STATUS_DATA

Source§

const ID: u32 = 371u32

Source§

const NAME: &'static str = "FUEL_STATUS"

Source§

const EXTRA_CRC: u8 = 10u8

Source§

const ENCODED_LEN: usize = 26usize

Source§

type Message = MavMessage

Source§

fn deser(_version: MavlinkVersion, __input: &[u8]) -> Result<Self, ParserError>

Source§

fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize

Source§

impl PartialEq for FUEL_STATUS_DATA

Source§

fn eq(&self, other: &FUEL_STATUS_DATA) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for FUEL_STATUS_DATA

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for FUEL_STATUS_DATA

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,