1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! HORIZONS API client for NASA JPL's solar system ephemeris service.
//!
//! This module provides access to the [HORIZONS](https://ssd.jpl.nasa.gov/horizons/)
//! on-line solar system data and ephemeris computation service. It can compute
//! positions, velocities, and observational quantities for over 1.5 million
//! solar system objects including planets, moons, asteroids, comets, and spacecraft.
//!
//! No API key or authentication is required.
//!
//! # Quick Start
//!
//! ```no_run
//! use starfield::horizons::{HorizonsClient, EphemerisRequest, Command, Center, TimeSpec};
//! use starfield::horizons::parser;
//!
//! let client = HorizonsClient::new().unwrap();
//!
//! // Get Mars state vectors relative to the Solar System Barycenter
//! let request = EphemerisRequest::vectors(
//! Command::MajorBody(499),
//! Center::SolarSystemBarycenter,
//! TimeSpec::Range {
//! start: "2024-01-01".into(),
//! stop: "2024-01-02".into(),
//! step: "1 d".into(),
//! },
//! );
//!
//! let response = client.query(&request).unwrap();
//! let block = parser::extract_ephemeris_block(response.result.as_ref().unwrap()).unwrap();
//! let rows = parser::parse_vector_rows(block).unwrap();
//!
//! for row in &rows {
//! println!("JD {}: ({}, {}, {}) AU", row.jd_tdb, row.x, row.y, row.z);
//! }
//! ```
pub use crate;
pub use ;