pub struct Position {
pub latitude: f32,
pub longitude: f32,
pub bearing: Option<f32>,
pub odometer: Option<f64>,
pub speed: Option<f32>,
}
Expand description
A position.
Fields§
§latitude: f32
Degrees North, in the WGS-84 coordinate system.
longitude: f32
Degrees East, in the WGS-84 coordinate system.
bearing: Option<f32>
Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East. This can be the compass bearing, or the direction towards the next stop or intermediate location. This should not be direction deduced from the sequence of previous positions, which can be computed from previous data.
odometer: Option<f64>
Odometer value, in meters.
speed: Option<f32>
Momentary speed measured by the vehicle, in meters per second.
Implementations§
Trait Implementations§
source§impl Message for Position
impl Message for Position
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
. Read more