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
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2026 Vallés Puig, Ramon
//! # Lunar Azimuth
//!
//! ## Scientific scope
//!
//! Moon‑specific azimuth scalar function. Returns the topocentric
//! apparent azimuth of the Moon (North‑clockwise convention, range
//! `[0, 2π)`) for a geodetic observer at the given instant. The Moon
//! position is derived from `Moon::get_horizontal`, which applies
//! topocentric parallax (~1° at horizon), precession, and the full
//! ecliptic → equatorial → horizontal transform chain. No atmospheric
//! refraction is applied.
//!
//! ## Technical scope
//!
//! Single crate‑internal helper [`moon_azimuth_rad`] used by the unified
//! azimuth calculus API via the
//! [`AzimuthProvider`](crate::calculus::azimuth::AzimuthProvider) trait.
//!
//! ## References
//! - Meeus, J. (1998). *Astronomical Algorithms*, 2nd ed., Willmann‑Bell.
use crateMoon;
use crateGeodetic;
use crateECEF;
use crate*;
use crate;
/// Computes the Moon's topocentric azimuth in **radians** (North-clockwise,
/// range `[0, 2π)`) at a given Modified Julian Date and observer site.
///
/// Accounts for topocentric parallax (~1° at horizon), precession, and the
/// full ecliptic → equatorial → horizontal transform chain.
///
/// # Arguments
///
/// * `mjd`, instant on the TT axis
/// * `site`, geodetic observer location
///
/// # Returns
///
/// `Radians` in `[0, 2π)`, North‑clockwise (no refraction).
pub