1pub const ORBIT_PERIOD: f64 = 29.53058770576;
3
4pub const ORBIT_OFFSET: f64 = 2451550.26;
6
7pub const DISTANCE_PERIOD: f64 = 27.55454988;
9
10pub const DISTANCE_OFFSET: f64 = 2451562.2;
12
13pub const LUNATION_BASE: f64 = 2423436.6115277777;
15
16pub const EARTH_RADIUS_KM: f64 = 6371.0084;
18
19
20#[derive(Debug, Clone, Copy)]
22pub struct Phase {
23 pub name: &'static str,
25 pub emoji: &'static str,
27 pub start: f64,
29 pub end: f64,
31}
32pub const PHASES: [Phase; 8] = [
33 Phase { emoji: "🌑", name: "New Moon", start: 0.0, end: 0.02 },
34 Phase { emoji: "🌒", name: "Waxing Crescent", start: 0.02, end: 0.22 },
35 Phase { emoji: "🌓", name: "First Quarter", start: 0.22, end: 0.27 },
36 Phase { emoji: "🌔", name: "Waxing Gibbous", start: 0.27, end: 0.47 },
37 Phase { emoji: "🌕", name: "Full Moon", start: 0.47, end: 0.52 },
38 Phase { emoji: "🌖", name: "Waning Gibbous", start: 0.52, end: 0.72 },
39 Phase { emoji: "🌗", name: "Last Quarter", start: 0.72, end: 0.77 },
40 Phase { emoji: "🌘", name: "Waning Crescent", start: 0.77, end: 1.0 },
41];
42
43#[derive(Debug, Clone, Copy)]
46pub struct Moon {
47 pub julian_date: f64,
49 pub phase: f64,
51 pub age: f64,
53 pub illumination: f64,
55 pub distance: f64,
57 pub lunation: u16,
59}
60