Struct sp3::SP3

source ·
pub struct SP3 {
Show 17 fields pub version: Version, pub data_type: DataType, pub coord_system: String, pub orbit_type: OrbitType, pub agency: String, pub constellation: Constellation, pub time_system: TimeScale, pub week_counter: (u32, f64), pub mjd_start: (u32, f64), pub epoch: Vec<Epoch>, pub epoch_interval: Duration, pub sv: Vec<Sv>, pub position: BTreeMap<Epoch, BTreeMap<Sv, (f64, f64, f64)>>, pub clock: BTreeMap<Epoch, BTreeMap<Sv, f64>>, pub velocities: BTreeMap<Epoch, BTreeMap<Sv, (f64, f64, f64)>>, pub clock_rate: BTreeMap<Epoch, BTreeMap<Sv, f64>>, pub comments: Vec<String>,
}

Fields§

§version: Version

File revision

§data_type: DataType

Data Type used in this file. If DataType == Velocity, you know that velocities record will be provided. Otherwise, that is not garanteed and kind of rare.

§coord_system: String

Coordinates system used in this file.

§orbit_type: OrbitType

Type of Orbit contained in this file.

§agency: String

Agency providing this data

§constellation: Constellation

Type of constellations encountered in this file. For example “GPS” means only GPS vehicles are present.

§time_system: TimeScale

File original time system, either UTC or time source from which we converted to UTC.

§week_counter: (u32, f64)

Initial week counter, in time_system

§mjd_start: (u32, f64)

Initial MJD, in time_system

§epoch: Vec<Epoch>

Epochs where at least one position or one clock data is provided. Epochs are expressed UTC time, either directly if provided as such, or internally converted.

§epoch_interval: Duration

Returns sampling interval, ie., time between successive Epochs.

§sv: Vec<Sv>

Satellite Vehicles

§position: BTreeMap<Epoch, BTreeMap<Sv, (f64, f64, f64)>>

Positions expressed in km, with 1mm precision, per Epoch and Sv.

§clock: BTreeMap<Epoch, BTreeMap<Sv, f64>>

Clock estimates in microseconds, with 1E-12 precision per Epoch and Sv.

§velocities: BTreeMap<Epoch, BTreeMap<Sv, (f64, f64, f64)>>

Velocities (Position derivative estimates) in 10^-1 m/s with 0.1 um/s precision.

§clock_rate: BTreeMap<Epoch, BTreeMap<Sv, f64>>

Rate of change of clock correction in 0.1 ns/s with 0.1 fs/s precision.

§comments: Vec<String>

File header comments, stored as is.

Implementations§

source§

impl SP3

source

pub fn from_file(path: &str) -> Result<Self, Errors>

Parses given SP3 file, with possible seamless .gz decompression, if compiled with the “flate2” feature.

source

pub fn epoch(&self) -> impl Iterator<Item = Epoch> + '_

Returns a unique Epoch iterator where either Position or Clock data is provided.

source

pub fn nb_epochs(&self) -> usize

Returns total number of epoch

source

pub fn first_epoch(&self) -> Option<Epoch>

Returns first epoch

source

pub fn last_epoch(&self) -> Option<Epoch>

Returns last epoch

source

pub fn sv(&self) -> impl Iterator<Item = Sv> + '_

Returns a unique Sv iterator

source

pub fn sv_position( &self ) -> impl Iterator<Item = (Epoch, Sv, (f64, f64, f64))> + '_

Returns an Iterator over Sv position estimates, in km with 1mm precision.

source

pub fn sv_velocities( &self ) -> impl Iterator<Item = (Epoch, Sv, (f64, f64, f64))> + '_

Returns an Iterator over Sv velocities estimates, in 10^-1 m/s with 0.1 um/s precision.

source

pub fn sv_clock(&self) -> impl Iterator<Item = (Epoch, Sv, f64)> + '_

Returns an Iterator over Clock error estimates, in microseconds with 1E-12 precision.

source

pub fn sv_clock_change(&self) -> impl Iterator<Item = (Epoch, Sv, f64)> + '_

Returns an Iterator over Clock rate of change estimates, in 0.1 ns/s with 0.1 fs/s precision.

source

pub fn comments(&self) -> impl Iterator<Item = &String> + '_

Returns an Iterator over [Comments] contained in this file

source

pub fn sv_position_interpolate( &self, sv: Sv, t: Epoch, order: usize ) -> Option<(f64, f64, f64)>

Interpolate SV position, expressed in kilometers ECEF at desired Epoch t. For typical SP3 files with 15’ epoch interval, an interpolation order of at least 11 is recommended to preserve data precision. For an evenly spaced SP3 file, operation is feasible on Epochs contained in the interval ](N +1)/2 * τ; T - (N +1)/2 * τ], where N is the interpolation order, τ the epoch interval and T the last Epoch in this file. See [Bibliography::Japhet2021].

Trait Implementations§

source§

impl Clone for SP3

source§

fn clone(&self) -> SP3

Returns a copy 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 SP3

source§

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

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

impl Default for SP3

source§

fn default() -> SP3

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

impl<'de> Deserialize<'de> for SP3

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 Merge for SP3

source§

fn merge(&self, rhs: &Self) -> Result<Self, MergeError>

Merge two SP3 files together: this introduces need Epoch and new data into self. We tolerate different sample rate, in this case self.epoch_interval becomes the lowest sample rate (pessimistic). File version is adjusted to newest revision.
source§

fn merge_mut(&mut self, rhs: &Self) -> Result<(), MergeError>

source§

impl Serialize for SP3

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

Auto Trait Implementations§

§

impl RefUnwindSafe for SP3

§

impl Send for SP3

§

impl Sync for SP3

§

impl Unpin for SP3

§

impl UnwindSafe for SP3

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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 Twhere T: for<'de> Deserialize<'de>,