pub struct SvId {
pub sat_id: u8,
pub constellation: u8,
}
Expand description
Space vehicle identifier
A (Constellation ID, satellite ID) tuple that uniquely identifies a space vehicle.
Fields§
§sat_id: u8
Constellation-specific satellite id. For GLO can either be (100+FCN) where FCN is in [-7,+6] or the Slot ID in [1,28].
constellation: u8
Constellation ID to which the SV belongs
Implementations§
source§impl SvId
impl SvId
sourcepub fn constellation(&self) -> Result<Constellation, u8>
pub fn constellation(&self) -> Result<Constellation, u8>
Gets the Constellation stored in the constellation
bitfield.
Returns Ok
if the bitrange contains a known Constellation
variant.
Otherwise the value of the bitrange is returned as an Err(u8)
. This may be because of a malformed message,
or because new variants of Constellation
were added.
sourcepub fn set_constellation(&mut self, constellation: Constellation)
pub fn set_constellation(&mut self, constellation: Constellation)
Set the bitrange corresponding to the Constellation of the constellation
bitfield.
Trait Implementations§
source§impl<'de> Deserialize<'de> for SvId
impl<'de> Deserialize<'de> for SvId
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for SvId
impl PartialEq for SvId
impl StructuralPartialEq for SvId
Auto Trait Implementations§
impl Freeze for SvId
impl RefUnwindSafe for SvId
impl Send for SvId
impl Sync for SvId
impl Unpin for SvId
impl UnwindSafe for SvId
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more