Skip to main content

astroceleste_engine/catalog/
mod.rs

1//! Reference tables: fixed stars, lunar mansions, derived-house meanings, degree qualities.
2
3use serde::Serialize;
4
5#[allow(clippy::all)]
6#[rustfmt::skip]
7mod degree_qualities;
8#[allow(clippy::all)]
9#[rustfmt::skip]
10mod derived_meanings;
11#[allow(clippy::all)]
12#[rustfmt::skip]
13mod fixed_stars;
14#[allow(clippy::all)]
15#[rustfmt::skip]
16mod mansions;
17
18pub use degree_qualities::DEGREE_QUALITIES;
19pub use derived_meanings::{DERIVED_HOUSE_MEANINGS, ROOT_HOUSE_THEMES};
20pub use fixed_stars::FIXED_STARS;
21pub use mansions::LUNAR_MANSIONS;
22
23/// A star with its tropical ecliptic position at J2000.0.
24#[derive(Debug, Clone, Copy, PartialEq)]
25pub struct FixedStar {
26    pub name: &'static str,
27    pub symbol: &'static str,
28    pub j2000_lon: f64,
29    pub j2000_lat: f64,
30    pub magnitude: f64,
31}
32
33/// One of the 28 lunar mansions (manazil al-qamar).
34#[derive(Debug, Clone, Copy, PartialEq, Serialize)]
35pub struct LunarMansion {
36    /// Mansion number (1-28).
37    pub number: u8,
38    /// Arabic name.
39    pub arabic_name: &'static str,
40    /// English name.
41    pub name: &'static str,
42    /// Sign or signs the mansion spans, e.g. "Aries - Taurus".
43    pub sign: &'static str,
44    /// Start, ecliptic longitude in degrees.
45    pub degree_start: f64,
46    /// End, ecliptic longitude in degrees.
47    pub degree_end: f64,
48}
49
50/// What a derived house signifies, in English and Italian.
51#[derive(Debug, Clone, Copy, PartialEq, Serialize)]
52pub struct Meaning {
53    pub en: &'static str,
54    pub it: &'static str,
55}
56
57/// A run of degrees sharing one quality, from the end of the previous run (or the start of
58/// the sign) up to and including `end`.
59#[derive(Debug, Clone, Copy, PartialEq, Serialize)]
60pub struct DegreeRun {
61    /// "masculine" or "feminine"; or "light", "dark", "smoky" or "void".
62    pub quality: &'static str,
63    /// Last ordinal degree (1-30) of the run.
64    pub end: u8,
65}
66
67/// Lilly's qualities of the degrees of one sign. Degrees are ordinal: degree `n` spans
68/// `n-1`°00' to `n-1`°59' of the sign.
69#[derive(Debug, Clone, Copy, PartialEq, Serialize)]
70pub struct SignDegrees {
71    /// Zodiac sign name, e.g. "Aries".
72    pub sign: &'static str,
73    /// Masculine and feminine runs, ending at 30.
74    pub gender: &'static [DegreeRun],
75    /// Light, dark, smoky and void runs, ending at 30.
76    pub light: &'static [DegreeRun],
77    /// Deep or pitted degrees.
78    pub pitted: &'static [u8],
79    /// Lame or deficient (azimene) degrees.
80    pub azimene: &'static [u8],
81    /// Degrees increasing fortune.
82    pub fortune: &'static [u8],
83}