Skip to main content

GpsEphemeris

Struct GpsEphemeris 

Source
pub struct GpsEphemeris {
Show 30 fields pub satellite_id: u8, pub week_number: u16, pub sv_accuracy: u8, pub code_on_l2: u8, pub idot: i32, pub iode: u8, pub t_oc: u16, pub a_f2: i16, pub a_f1: i32, pub a_f0: i32, pub iodc: u16, pub c_rs: i32, pub delta_n: i32, pub m0: i64, pub c_uc: i32, pub eccentricity: u64, pub c_us: i32, pub sqrt_a: u64, pub t_oe: u16, pub c_ic: i32, pub omega0: i64, pub c_is: i32, pub i0: i64, pub c_rc: i32, pub omega: i64, pub omega_dot: i32, pub t_gd: i16, pub sv_health: u8, pub l2_p_data_flag: bool, pub fit_interval: bool,
}
Expand description

A decoded GPS broadcast ephemeris (message 1019).

Angular quantities are in semicircles (scale noted per field), harmonic correction terms in radians, distances in meters, and clock terms in seconds, each recovered by multiplying the raw integer by its scale factor.

Fields§

§satellite_id: u8

GPS satellite PRN (DF009).

§week_number: u16

GPS week number (DF076, 10 bits).

§sv_accuracy: u8

SV accuracy / URA index (DF077, 4 bits).

§code_on_l2: u8

Code on L2 (DF078, 2 bits).

§idot: i32

Rate of inclination angle IDOT (DF079, int14, scale 2^-43 semicircles/s).

§iode: u8

Issue of data, ephemeris (DF071, 8 bits).

§t_oc: u16

Clock data reference time t_oc (DF081, uint16, scale 2^4 s).

§a_f2: i16

Clock drift rate a_f2 (DF082, int8, scale 2^-55 s/s^2).

§a_f1: i32

Clock drift a_f1 (DF083, int16, scale 2^-43 s/s).

§a_f0: i32

Clock bias a_f0 (DF084, int22, scale 2^-31 s).

§iodc: u16

Issue of data, clock (DF085, 10 bits).

§c_rs: i32

Orbit-radius sine correction C_rs (DF086, int16, scale 2^-5 m).

§delta_n: i32

Mean-motion difference dn (DF087, int16, scale 2^-43 semicircles/s).

§m0: i64

Mean anomaly at reference time M_0 (DF088, int32, scale 2^-31 semicircles).

§c_uc: i32

Latitude-argument cosine correction C_uc (DF089, int16, scale 2^-29 rad).

§eccentricity: u64

Eccentricity e (DF090, uint32, scale 2^-33).

§c_us: i32

Latitude-argument sine correction C_us (DF091, int16, scale 2^-29 rad).

§sqrt_a: u64

Square root of the semi-major axis sqrt(A) (DF092, uint32, scale 2^-19).

§t_oe: u16

Ephemeris reference time t_oe (DF093, uint16, scale 2^4 s).

§c_ic: i32

Inclination cosine correction C_ic (DF094, int16, scale 2^-29 rad).

§omega0: i64

Longitude of ascending node Omega_0 (DF095, int32, scale 2^-31 semicircles).

§c_is: i32

Inclination sine correction C_is (DF096, int16, scale 2^-29 rad).

§i0: i64

Inclination at reference time i_0 (DF097, int32, scale 2^-31 semicircles).

§c_rc: i32

Orbit-radius cosine correction C_rc (DF098, int16, scale 2^-5 m).

§omega: i64

Argument of perigee omega (DF099, int32, scale 2^-31 semicircles).

§omega_dot: i32

Rate of right ascension Omega-dot (DF100, int24, scale 2^-43 semicircles/s).

§t_gd: i16

Group delay differential t_GD (DF101, int8, scale 2^-31 s).

§sv_health: u8

SV health (DF102, 6 bits).

§l2_p_data_flag: bool

L2 P-data flag (DF103).

§fit_interval: bool

Fit-interval flag (DF137).

Implementations§

Source§

impl GpsEphemeris

Source

pub fn satellite(&self) -> Result<GnssSatelliteId>

The satellite identifier for this ephemeris.

Source

pub fn decode(body: &[u8]) -> Result<Self>

Decode a message 1019 body (without the transport frame).

Source

pub fn encode(&self) -> Vec<u8>

Encode this GPS ephemeris body (without the transport frame).

Trait Implementations§

Source§

impl Clone for GpsEphemeris

Source§

fn clone(&self) -> GpsEphemeris

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for GpsEphemeris

Source§

impl Debug for GpsEphemeris

Source§

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

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

impl Eq for GpsEphemeris

Source§

impl PartialEq for GpsEphemeris

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 StructuralPartialEq for GpsEphemeris

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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.