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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
//! # Astro Math
//!
//! Astronomy library for Rust implementing algorithms from Jean Meeus and ERFA.
//! Built for telescope control, observation planning, and celestial mechanics.
//!
//! ## Core Capabilities
//!
//! This library provides everything needed for astronomical calculations:
//!
//! ### Time Systems
//! - [`time`] — Julian Date conversions, J2000 epoch calculations
//! - [`time_scales`] — UTC ↔ TT conversions with proper leap second handling
//! - [`sidereal`] — Greenwich Mean Sidereal Time (GMST), Local Mean/Apparent Sidereal Time
//!
//! ### Observer Location
//! - [`location`] — Earth coordinates with flexible parsing (27+ formats)
//! - Support for decimal degrees, DMS, HMS, aviation formats, Unicode symbols
//!
//! ### Coordinate Transformations
//! - [`transforms`] — RA/Dec ↔ Alt/Az conversions with spherical trigonometry
//! - [`galactic`] — Equatorial ↔ Galactic coordinate system conversions
//! - [`projection`] — Gnomonic/TAN projection for astrometry and plate solving
//!
//! ### Precision Corrections
//! - [`precession`] — Convert coordinates between epochs (J2000 ↔ current date)
//! - [`nutation`] — Earth's axis wobble corrections (±18.6" longitude, ±9.2" obliquity)
//! - [`aberration`] — Annual stellar aberration corrections (±20.5 arcseconds)
//! - [`proper_motion`] — Linear and rigorous 3D space motion calculations
//! - [`parallax`] — Diurnal and annual parallax corrections
//!
//! ### Solar System Objects
//! - [`moon`] — Lunar position, phase, illumination, distance calculations
//! - [`sun`] — Solar position and rise/set calculations
//! - [`rise_set`] — Rise, set, and meridian transit times for any object
//!
//! ### Atmospheric Effects
//! - [`refraction`] — Multiple atmospheric refraction models (Bennett, Saemundsson, radio)
//! - [`airmass`] — Various airmass formulas for extinction calculations
//!
//! ### High Performance
//! - Parallel batch processing with Rayon for coordinate transformations
//! - ERFA (Essential Routines for Fundamental Astronomy) integration
//! - Input validation and clear error messages
//!
//! ## Architecture Overview
//!
//! The library is structured around these core concepts:
//!
//! ```text
//! ┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
//! │ Observer │ │ Celestial │ │ Corrections │
//! │ Location │───▶│ Coordinates │───▶│ & Effects │
//! │ │ │ │ │ │
//! └─────────────────┘ └──────────────────┘ └─────────────────┘
//! ```
//!
//! ### 1. Observer Location ([`Location`])
//! Earth-based observer coordinates with flexible coordinate parsing supporting
//! 27+ formats (decimal degrees, DMS, HMS, aviation, Unicode symbols).
//! Handles local sidereal time calculations and coordinate validation.
//!
//! ### 2. Time Systems ([`time`], [`time_scales`], [`sidereal`])
//! - Julian Date conversions and J2000 epoch calculations
//! - UTC ↔ TT conversions with proper leap second handling
//! - Greenwich Mean Sidereal Time (GMST) and Local Sidereal Time (LST)
//!
//! ### 3. Coordinate Systems ([`transforms`], [`galactic`], [`projection`])
//! - RA/Dec ↔ Alt/Az transformations using spherical trigonometry
//! - Equatorial ↔ Galactic coordinate system conversions
//! - Gnomonic/TAN projection for astrometry and plate solving
//!
//! ### 4. Astrometric Corrections
//! - [`precession`] — Convert coordinates between epochs (J2000 ↔ current date)
//! - [`nutation`] — Earth's axis wobble (±18.6" longitude, ±9.2" obliquity)
//! - [`aberration`] — Annual stellar aberration (±20.5 arcseconds)
//! - [`proper_motion`] — Linear and rigorous 3D space motion calculations
//! - [`parallax`] — Diurnal and annual parallax corrections
//! - [`refraction`] — Atmospheric refraction (Bennett, Saemundsson, radio models)
//!
//! ### 5. Solar System Objects ([`sun`], [`moon`], [`rise_set`])
//! - Solar and lunar position calculations
//! - Rise, set, and meridian transit times for any celestial object
//! - Moon phase, illumination, and distance calculations
//!
//! ## Accuracy & Standards
//!
//! This library implements algorithms from:
//! - **Jean Meeus**: *Astronomical Algorithms* (2nd edition)
//! - **IAU SOFA**: Standards of Fundamental Astronomy
//! - **ERFA**: Essential Routines for Fundamental Astronomy
//! - **USNO**: US Naval Observatory references
//!
//! ## Quick Example: Compute LST and Alt/Az for Vega
//!
//! ```
//! use chrono::{Utc, TimeZone};
//! use astro_math::{julian_date, Location, ra_dec_to_alt_az};
//!
//! let dt = Utc.with_ymd_and_hms(2024, 8, 4, 6, 0, 0).unwrap();
//! let loc = Location {
//! latitude_deg: 31.9583,
//! longitude_deg: -111.6,
//! altitude_m: 2120.0,
//! };
//!
//! let jd = julian_date(dt);
//! let lst = loc.local_sidereal_time(dt);
//! let (alt, az) = ra_dec_to_alt_az(279.23473479, 38.78368896, dt, &loc).unwrap();
//!
//! println!("JD: {:.5}", jd);
//! println!("LST: {:.5} h", lst);
//! println!("Vega Alt: {:.3}°, Az: {:.3}°", alt, az);
//! ```
//!
//! This computes the Julian Date, sidereal time, and sky position of Vega
//! from Kitt Peak at 06:00 UTC on August 4, 2024.
//!
//! You can verify this output against Astropy using:
//!
//! ```python
//! from astropy.coordinates import SkyCoord, EarthLocation, AltAz
//! from astropy.time import Time
//! import astropy.units as u
//!
//! time = Time("2024-08-04T06:00:00", location=EarthLocation(lat=31.9583*u.deg, lon=-111.6*u.deg, height=2120*u.m))
//! coord = SkyCoord(ra=279.23473479*u.deg, dec=38.78368896*u.deg)
//! altaz = coord.transform_to(AltAz(obstime=time, location=time.location))
//! print(altaz.alt.deg, altaz.az.deg)
//! ```
pub use *;
pub use *;
pub use ;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;