Sofars
sofars is a pure Rust implementation of the International Astronomical Union's (IAU) official Standards of Fundamental Astronomy (SOFA). It provides a comprehensive, efficient, and industry-standard set of astronomical calculation tools for high-precision time scale transformations, coordinate system conversions, and fundamental astronomical modeling.
Key Features
- Standard Compliance: Strictly follows IAU 2000/2006 models, ensuring numerical consistency with the original SOFA C library.
- Pure Rust: No C compiler required. Enjoy Rust's memory safety, concurrency, and performance.
- Comprehensive Coverage:
- Time Scales (
ts): Precise transformations between UTC, TAI, TT, TDB, TCG, TCB, and more. - Precession, Nutation & Polar Motion (
pnp): Full implementation of IAU precession and nutation series. - Fundamental Astrometry (
astro): Core algorithms for apparent star positions, refraction, etc. - Coordinate Systems (
coords): Conversions between geocentric, heliocentric, and spherical systems. - Vector & Matrix Operations (
vm): 3D vector and rotation matrix utilities optimized for astronomy. - Calendars (
cal): Transformations between Julian Dates and Gregorian calendar dates.
- Time Scales (
Installation
Add the following to your Cargo.toml:
[]
= "0.5.0"
Quick Start
The following example shows how to calculate the Earth Rotation Angle (ERA) for a given Julian Date:
use DJ00;
use era00;
Documentation
For detailed API documentation and function lists, please visit docs.rs/sofars.
License & SOFA Terms of Use
This project is licensed under the MIT License.
Important Note: Since the core algorithms are derived from the IAU SOFA source code, any use of this project must also comply with the SOFA license terms.
- Any published work or commercial product that includes results obtained using
sofarsshould acknowledge the use of algorithms provided by the IAU SOFA Board. - Please refer to the
LICENSEfile for full details.