HorizonsTable
このコンテンツはまだ日本語訳がありません。
Defined in: horizons.rs:47
pub struct HorizonsTableA parsed Horizons vector table with Hermite interpolation support.
Methods
Section titled “Methods”parse_csv()
Section titled “parse_csv()”fn parse_csv(text: &str) -> [Result<Self, HorizonsError>](https://doc.rust-lang.org/std/result/enum.Result.html)
Parse a Horizons CSV vector-table string.
The input must contain $$SOE / $$EOE markers bracketing CSV rows
of the form JDTDB, Calendar, X, Y, Z, VX, VY, VZ.
from_file()
Section titled “from_file()”fn from_file(path: impl [AsRef<std::path::Path>](https://doc.rust-lang.org/std/convert/trait.AsRef.html)) -> [Result<Self, HorizonsError>](https://doc.rust-lang.org/std/result/enum.Result.html)
Load a Horizons CSV table from a file on disk.
samples()
Section titled “samples()”fn samples(&self) -> &[HorizonsSample]
All samples, in ascending epoch order.
fn len(&self) -> usize
Number of samples in the table.
is_empty()
Section titled “is_empty()”fn is_empty(&self) -> bool
Returns true if the table has no samples (parser guarantees this
cannot be constructed from parse_csv — reserved for defensive use).
date_range()
Section titled “date_range()”fn date_range(&self) -> [Option<(Epoch, Epoch)>](https://doc.rust-lang.org/std/option/enum.Option.html)
First and last epochs in the table, if any.
interpolate()
Section titled “interpolate()”fn interpolate(&self, epoch: &Epoch) -> [Option<HorizonsSample>](https://doc.rust-lang.org/std/option/enum.Option.html)
Interpolate state at epoch using cubic Hermite interpolation with
position and velocity at the bracketing samples.
Returns None if epoch is outside the table’s range.