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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2026 Vallés Puig, Ramon
//! # Observatory catalog
//!
//! ## Scientific scope
//!
//! Ground-based astronomical observations are referenced to a *site*: a
//! geodetic position on the WGS84 ellipsoid plus a typical local
//! atmospheric state (pressure, temperature, relative humidity). These
//! quantities feed every site-dependent computation in the crate — airmass,
//! refraction, atmospheric extinction, night-sky brightness, parallactic
//! correction — so canonical, citation-backed constants for the major
//! observatories live here in one place.
//!
//! Positions are stored as ellipsoidal **(longitude, latitude, ellipsoidal
//! height above WGS84)** triples, *not* as spherical positions. A
//! geodetic latitude is the angle between the local vertical and the
//! equatorial plane on the WGS84 reference ellipsoid; it does not coincide
//! with a geocentric latitude, and the ellipsoidal height is **not** a
//! radial distance. Converting to ECEF therefore requires the
//! ellipsoid-aware Bowring formula (see
//! [`affn::ellipsoidal::Position::to_cartesian`]) rather than a naïve
//! spherical-to-Cartesian unrolling.
//!
//! ## Technical scope
//!
//! This module provides:
//!
//! - [`Observatory`] — site record carrying name, [`Geodetic<ECEF>`](crate::coordinates::centers::Geodetic)
//! position, [`Hectopascals`] reference pressure, optional [`Kelvins`]
//! reference temperature, and an optional dimensionless reference
//! relative humidity in `[0.0, 1.0]`.
//! - Named constants: [`ROQUE_DE_LOS_MUCHACHOS`], [`EL_PARANAL`],
//! [`MAUNA_KEA`], [`LA_SILLA_OBSERVATORY`].
//!
//! Reference relative humidity is intentionally a bare `f64` (no
//! `RelativeHumidity` newtype exists yet); it is documented as a
//! dimensionless fraction in `[0.0, 1.0]` (so 14.5 % RH is `0.145`, never
//! `14.5`).
//!
//! Atmospheric profiles built from these site constants live in the
//! `atmosphere` module (behind the `atmosphere` feature).
//!
//! ## Usage
//!
//! ```rust
//! use siderust::observatories::ROQUE_DE_LOS_MUCHACHOS;
//! use siderust::qtty::Meter;
//!
//! let ecef = ROQUE_DE_LOS_MUCHACHOS.geodetic().to_cartesian::<Meter>();
//! let p_hpa = ROQUE_DE_LOS_MUCHACHOS.reference_pressure.value();
//! ```
//!
//! ## References
//!
//! - National Imagery and Mapping Agency (2000). *Department of Defense
//! World Geodetic System 1984: Its Definition and Relationships with
//! Local Geodetic Systems*. NIMA Technical Report TR8350.2, 3rd ed.
//! - Bowring, B. R. (1976). "Transformation from spatial to geographical
//! coordinates". *Survey Review* **23**(181), 323–327.
//! - Patat, F., Moehler, S., O'Brien, K., et al. (2011). "Optical
//! atmospheric extinction over Cerro Paranal". *Astronomy &
//! Astrophysics* **527**, A91. doi:10.1051/0004-6361/201015537.
//! - Instituto de Astrofísica de Canarias. *Site characterization of the
//! Observatorio del Roque de los Muchachos*. <https://www.iac.es/en/observatorios-de-canarias>.
use crateGeodetic;
use crateECEF;
use crate;
/// A well-known astronomical observatory with location and reference atmosphere.
/// Roque de los Muchachos Observatory (La Palma, Canary Islands, Spain).
///
/// - Longitude: −17.8925°
/// - Latitude: +28.7543°
/// - Altitude: 2396 m (WGS84 ellipsoidal height)
/// - Reference pressure: 744 hPa (source: `NSB_Utils.py:59`, `la_palma_pres = 744 hPa`)
/// - Reference temperature: `None` — no authoritative cited value wired in yet.
/// The upstream NSB code does not carry a per-site temperature constant; an
/// ORM site-characterization citation (IAC) should be added in a follow-up.
/// - Reference relative humidity: `None` — same rationale as temperature.
///
/// For an atmosphere profile calibrated to this site, see
/// `AtmosphereProfile::ROQUE_DE_LOS_MUCHACHOS` (requires the `atmosphere` feature).
pub const ROQUE_DE_LOS_MUCHACHOS: Observatory = Observatory ;
/// El Paranal Observatory (Atacama Desert, Chile).
///
/// - Longitude: −70.4043°
/// - Latitude: −24.6272°
/// - Altitude: 2635 m (WGS84 ellipsoidal height)
/// - Reference pressure: 744 hPa (source: `NSB_Utils.py:59`, `cerro_paranal_pres = 744 hPa`)
/// - Reference temperature: `None` — no authoritative cited value wired in yet.
/// The upstream NSB code does not carry a per-site temperature constant; an
/// ESO Paranal site-characterization citation (e.g. Patat et al. 2011) should
/// be added in a follow-up.
/// - Reference relative humidity: `None` — same rationale as temperature.
pub const EL_PARANAL: Observatory = Observatory ;
/// Mauna Kea Observatory (Hawaiʻi, USA)
///
/// - Longitude: −155.4681°
/// - Latitude: +19.8207°
/// - Altitude: 4207 m (WGS84 ellipsoidal height)
///
/// For an atmosphere profile calibrated to this site, see
/// `AtmosphereProfile::MAUNA_KEA` (requires the `atmosphere` feature).
pub const MAUNA_KEA: = new_raw;
/// La Silla Observatory (ESO, Chile)
///
/// - Longitude: −70.7346°
/// - Latitude: −29.2584°
/// - Altitude: 2400 m (WGS84 ellipsoidal height)
///
/// For an atmosphere profile calibrated to this site, see
/// `AtmosphereProfile::LA_SILLA` (requires the `atmosphere` feature).
pub const LA_SILLA_OBSERVATORY: = new_raw;