CssiSpaceWeather
Defined in: cssi.rs:297
Available on crate feature
alloconly.
pub struct CssiSpaceWeatherSpace weather provider backed by CSSI historical data.
Looks up the correct daily record for a given epoch using binary search, then computes the NRLMSISE-00 7-element ap history array from the 3-hourly ap values across day boundaries.
Methods
Section titled “Methods”fetch()
Section titled “fetch()”fn fetch(max_age: [Option<Duration>](https://doc.rust-lang.org/std/option/enum.Option.html)) -> [Result<Self, [Box<dyn std::error::Error>](https://doc.rust-lang.org/std/boxed/struct.Box.html)>](https://doc.rust-lang.org/std/result/enum.Result.html)
Fetch space weather data from CelesTrak with local caching.
Downloads SW-Last5Years.txt and caches it at
~/.cache/orts/SW-Last5Years.txt.
If the cache file exists and is newer than max_age, it is reused.
Pass None for the default max age of 24 hours.
fetch_default()
Section titled “fetch_default()”fn fetch_default() -> [Result<Self, [Box<dyn std::error::Error>](https://doc.rust-lang.org/std/boxed/struct.Box.html)>](https://doc.rust-lang.org/std/result/enum.Result.html)
Fetch with default settings (24-hour cache).
fn new(data: CssiData) -> Self
Create a provider from parsed CSSI data.
from_file()
Section titled “from_file()”fn from_file(path: &std::path::Path) -> [Result<Self, [Box<dyn std::error::Error>](https://doc.rust-lang.org/std/boxed/struct.Box.html)>](https://doc.rust-lang.org/std/result/enum.Result.html)
Create a provider by parsing a CSSI file from a path.
with_out_of_range()
Section titled “with_out_of_range()”fn with_out_of_range(self, behavior: OutOfRangeBehavior) -> Self
Set out-of-range behavior (builder pattern).
data()
Section titled “data()”fn data(&self) -> &CssiData
Access the underlying data.
into_data()
Section titled “into_data()”fn into_data(self) -> CssiData
Consume the provider and return the inner data.
If other references to the data exist (via Clone), returns a clone.