ANISE is a rewrite of the core functionalities of the NAIF SPICE toolkit with enhanced performance, and ease of use, while leveraging Rust's safety and speed.
Please fill out our user survey
In the realm of space exploration, navigation, and astrophysics, precise and efficient computation of spacecraft position, orientation, and time is critical. ANISE, standing for "Attitude, Navigation, Instrument, Spacecraft, Ephemeris," offers a Rust-native approach to these challenges. This toolkit provides a suite of functionalities including but not limited to:
ANISE stands validated against the traditional SPICE toolkit, ensuring accuracy and reliability, with translations achieving machine precision (2e-16) and rotations presenting minimal error (less than two arcseconds in the pointing of the rotation axis and less than one arcsecond in the angle about this rotation axis).
Almanac
for immediate use.ANISE is developed in Rust, leveraging Rust's robust features such as memory safety, efficient concurrency handling, a superb test framework, and excellent error management. These capabilities ensure that all ANISE features are highly reliable and secure from the outset. Being native to Rust, these features are available first within the Rust ecosystem, offering cutting-edge functionality to Rust developers. They are then integrated into other interfaces. If there is a feature in Rust that has yet to be ported into the language of your choice, please open a Github issue.
Refer to the Rust README for further details. The Rust API documentation is available on https://docs.rs/anise/latest/anise/.
Although ANISE is primarily developed in Rust, it offers first-class support for Python, recognizing that many users will interact with ANISE through its Python interface. This integration ensures that Python users can leverage most of ANISE's capabilities without compromise. If you encounter any limitations or missing features in the Python support, we encourage you to open a GitHub issue to help us improve the interface.
For Python-specific tutorials and resources, please refer to the Python README, which includes Jupyter notebook tutorials tailored for Python users.
ANISE provides a graphical interface to inspect SPK, BPC, and PCA (Planetary Constant ANISE) files. Allows you to check the start/end times of the segments (shown in whichever time scale you want, including UNIX UTC seconds).
Refer to the GUI README for details.
ANISE is validated by running the same queries in ANISE and in SPICE (single threaded) in the Validation step linked above. This workflow validates 101,000 BSP queries in the DE440.BSP file, and 7305 queries each frame in the PCK08 file (every day for 20 years), along with thousands of rotations from Earth high precision BPC file.
Note: The PCK data comes from the IAU Reports, which publishes angle, angle rate, and angle acceleration data, expressed in centuries past the J2000 reference epoch. ANISE uses Hifitime for time conversions. Hifitime's reliance solely on integers for all time computations eliminates the risk of rounding errors. In contrast, SPICE utilizes floating-point values, which introduces rounding errors in calculations like centuries past J2000. Consequently, you might observe a discrepancy of up to 1 millidegree in rotation angles between SPICE and ANISE. However, this difference is a testament to ANISE's superior precision.
For convenience, Nyx Space provides a few important SPICE files on a public bucket:
pca
) kernel, built from the JPL gravitational data gm_de431.tpc and JPL's plantary constants file pck00008.tpcpca
) kernel, built from the JPL gravitational data gm_de431.tpc and JPL's plantary constants file pck00011.tpcepa
) kernel, built from the JPL Moon Frame Kernel moon_080317.txt
You may load any of these using the load()
shortcut that will determine the file type upon loading, e.g. let almanac = Almanac::new("pck08.pca").unwrap();
or in Python almanac = Almanac("pck08.pca")
. To automatically download remote assets, from the Nyx Cloud or elsewhere, use the MetaAlmanac: almanac = MetaAlmanac("ci_config.dhall").process()
in Python.
Contributions to ANISE are welcome! Whether it's in the form of feature requests, bug reports, code contributions, or documentation improvements, every bit of help is greatly appreciated.
ANISE is distributed under the Mozilla Public License 2.0 (MPL-2.0), offering a balanced approach to open-source by allowing the use of source code within both open and proprietary software. MPL-2.0 requires that modifications to the covered code be released under the same license, thus ensuring improvements remain open-source. However, it allows the combining of the covered software with proprietary parts, providing flexibility for both academic and commercial integrations.
For more details, please see the full text of the license or read a summary by Github.
ANISE is heavily inspired by the NAIF SPICE toolkit and its excellent documentation.
For any inquiries, feedback, or discussions, please open an issue here or contact the maintainer at christopher.rabotin@gmail.com.