@@ -83,6 +83,23 @@ for (epoch, sv, (x_km_ecef, y_km_ecef, z_km_ecef)) in sp3.satellites_position_km
8383for (epoch , sv , clock ) in sp3 . satellites_clock_offset_sec_iter () {
8484
8585}
86+
87+ // Dump to file
88+ sp3 . to_file (" /tmp/test.txt" )
89+ . unwrap ();
90+
91+ let attributes = sp3 . prod_attributes
92+ . expect (" exists for files that follow standards conventions!" );
93+
94+ // "ESA0OPSRAP_20232390000_01D_15M_ORB.SP3.gz
95+ assert_eq! (attributes . agency, " ESA" );
96+ assert_eq! (attributes . batch_id, 0 );
97+ assert_eq! (attributes . availability, Availability :: Rapid );
98+ assert_eq! (attributes . release_date. year, 2023 );
99+ assert_eq! (attributes . release_date. doy, 239 );
100+ assert_eq! (attributes . release_period, ReleasePeriod :: Daily );
101+ assert_eq! (attributes . sampling_period, sp3 . header. sampling_period);
102+ assert! (attributes . gzip_compressed);
86103```
87104
88105## Lib features
@@ -108,14 +125,10 @@ The `Nyx-Space/ANISE` feature is the heaviest library option.
108125
109126## Satellite attitude interpolation
110127
111- Satellite (SV) attitude interpolation is a major topic in SP3 processing.
112- Because quite often, you will have to match data provided by SP3 (high precision) other
113- datasets, oftentimes expressed in different timescales and most often sampled at higher rate.
114-
115- Indeed, SP3 is published by laboratories with a typical fit rate of 15'.
116-
117- To answer the requirement of SP3 processing inside a broader geodetic processing pipeline,
118- this library proposes a few sets of method
128+ Satellite (SV) attitude interpolation is a major topic in SP3 processing.
129+ Typically, SP3 data has to be matched (in time) with other data which requires interpolation.
130+ In order to preserve the quality of the SP3 fit, it is recommended to use a high order Lagrangian
131+ interpolation. This library provides SP3 interpolation as is, because it does not involve external libraries:
119132
120133- ` [SP3.satellite_position_interp()] ` will design the interpolation kernel
121134to which you can apply your custom interpolation function
@@ -130,10 +143,8 @@ method with a order of 11, which is typically used to preserve SP3 precision
130143method with a order of 17, which is way more than enough and should be used in processing
131144pipelines where processing speed and resource consumption is not an issue.
132145
133- Note that SP3 provides attitude with 10⁻³m precision.
134-
135- The (timewise) interpolation kernel is only feasible for odd interpolation order (at the moment),
136- for simplicity. The extracted kernel is therefore:
146+ :warning : our interpolation method does not support even interpolation orders.
147+ The extracted kernel is therefore:
137148
138149- ` tmin = (N +1)/2 * τ `
139150- ` tmax = T(n-1) - (N +1)/2 * τ `
@@ -210,6 +221,34 @@ let sp3 = sp3_a.merge(&sp3_b);
210221assert! (sp3 . is_ok ());
211222```
212223
224+ ## QC: Timescale Transposition
225+
226+ Use the ` Timeshift ` trait to transpose the SP3 into other timescales. Coarse
227+ and precise transpositions are both supported. The precise transposition method
228+ requires a correction database.
229+
230+ ``` rust
231+ use sp3 :: prelude :: * ;
232+ use std :: path :: PathBuf ;
233+
234+ let path = PathBuf :: new ()
235+ . join (env! (" CARGO_MANIFEST_DIR" ))
236+ . join (" data/SP3" )
237+ . join (" C" )
238+ . join (" ESA0OPSRAP_20232390000_01D_15M_ORB.SP3.gz" );
239+
240+ // Typical GPST SP3
241+ let gpst_sp3 = SP3 :: from_gzip_file (& path )
242+ . unwrap ();
243+
244+ // // Transpose to GST
245+ // let gst_sp3 = gpst_sp3.timeshift(TimeScale::GST);
246+
247+ // Dump as GST file
248+ // gst_sp3.to_file("/tmp/gst.txt")
249+ // .unwrap();
250+ ```
251+
213252## License
214253
215254This library is part of the [ RTK-rs framework] ( https://github.com/rtk-rs ) which
0 commit comments