nyx_space/
lib.rs

1/*
2    Nyx, blazing fast astrodynamics
3    Copyright (C) 2018-onwards Christopher Rabotin <christopher.rabotin@gmail.com>
4
5    This program is free software: you can redistribute it and/or modify
6    it under the terms of the GNU Affero General Public License as published
7    by the Free Software Foundation, either version 3 of the License, or
8    (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU Affero General Public License for more details.
14
15    You should have received a copy of the GNU Affero General Public License
16    along with this program.  If not, see <https://www.gnu.org/licenses/>.
17*/
18
19/*! # nyx-space
20
21[Nyx](https://en.wikipedia.org/wiki/Nyx): Blazing fast high-fidelity astrodynamics for Monte Carlo analyzes of constellations, interplanetary missions, and deep space flight navigation.
22
23Refer to [nyxspace.com](https://nyxspace.com) for a user guide, a show case, the MathSpec, and the validation data.
24*/
25
26// Allow confusable identifiers, as the code tries to use the literature's notation where possible.
27#![allow(confusable_idents)]
28
29#[macro_use]
30extern crate log;
31
32/// Provides all the propagators / integrators available in `nyx`.
33pub mod propagators;
34
35/// Provides several dynamics used for orbital mechanics and attitude dynamics, which can be elegantly combined.
36pub mod dynamics;
37
38/// Provides the solar system planets, and state and ephemerides management.
39pub mod cosmic;
40
41/// Utility functions shared by different modules, and which may be useful to engineers.
42pub mod utils;
43
44pub mod errors;
45/// Nyx will (almost) never panic and functions which may fail will return an error.
46pub use self::errors::NyxError;
47
48/// All the input/output needs for this library, including loading of SPICE kernels, and gravity potential files.
49pub mod io;
50
51/// All the orbital determination and spacecraft navigation tools and functions.
52pub mod od;
53
54/// All of the mission design and mission analysis tools and functions
55pub mod md;
56
57/// Simple tools (e.g. Lambert solver)
58pub mod tools;
59
60/// Monte Carlo module
61pub mod mc;
62
63/// Polynomial and fitting module
64pub mod polyfit;
65
66/// Re-export of hifitime
67pub mod time {
68    pub use hifitime::prelude::*;
69}
70
71/// Re-export nalgebra
72pub mod linalg {
73    pub use nalgebra::base::*;
74}
75
76/// Re-export some useful things
77pub use self::cosmic::{Orbit, Spacecraft, State, TimeTagged};
78
79/// The GMAT Earth gravitation parameter, used only for testing.
80#[cfg(test)]
81pub(crate) const GMAT_EARTH_GM: f64 = 398_600.441_5;