Expand description
Access NASA JPL Horizons system from Rust. This crate is written in asynchronous
code, therefore you probably want to use it in conjunction with tokio
.
§Example
#[tokio::main]
async fn main() {
println!("Major bodies in the Solar System.");
for body in rhorizons::major_bodies().await {
println!("{} ({})", body.name, body.id);
}
}
You can check more examples in the source repository.
§Useful links
Structs§
- Ephemeris
Orbital Elements Item - Orbital Elements of a body. Units are km, s and degrees
- Ephemeris
Vector Item - Position (in km) and velocity (in km/s) of a body.
- Major
Body - Planet, natural satellite, spacecraft, Sun, barycenter, or other objects having pre-computed trajectories.
Functions§
- ephemeris_
orbital_ elements - Get orbital element ephemeris (e.g. eccentricity, semi-major axis, …) of a major body relative to the Sun’s center
- ephemeris_
vector - Get vector ephemeris (position and velocity) of a major body. Coordinates are relative to the Sun’s center.
- major_
bodies - Get names and identifiers of all major bodies in the Solar System.