Add astrological houses to natal chart and daily transits
Every planet position now carries its whole-sign house (1-12); transits report the natal house each transiting planet currently occupies rather than a fresh "houses for right now" chart, matching how transits are normally read. Surfaced in both text and HTML output, fully translated.
This commit is contained in:
@@ -52,6 +52,14 @@ static void test_natal_sun_sign(void) {
|
||||
astro_compute_natal_chart(&birth, &chart);
|
||||
|
||||
assert(chart.bodies[PLANET_SUN].sign == SIGN_GEMINI);
|
||||
|
||||
/* Whole-sign house invariant: body.house (1-12) must name the house
|
||||
* whose sign (chart.houses[house-1]) is that same body's sign. */
|
||||
for (int b = 0; b < NUM_BODIES; b++) {
|
||||
assert(chart.bodies[b].house >= 1 && chart.bodies[b].house <= 12);
|
||||
assert(chart.houses[chart.bodies[b].house - 1] == chart.bodies[b].sign);
|
||||
}
|
||||
|
||||
printf("PASS test_natal_sun_sign\n");
|
||||
}
|
||||
|
||||
@@ -74,6 +82,12 @@ static void test_reading_generate_smoke(void) {
|
||||
for (int b = 0; b < NUM_BODIES; b++) {
|
||||
assert(r1.natal.bodies[b].ecliptic_longitude == r2.natal.bodies[b].ecliptic_longitude);
|
||||
assert(r1.transits.bodies[b].ecliptic_longitude == r2.transits.bodies[b].ecliptic_longitude);
|
||||
|
||||
/* Transiting planets' houses are read against the natal chart's
|
||||
* houses, not a fresh chart for "now" - same invariant as the natal
|
||||
* bodies, but checked against r1.natal.houses. */
|
||||
assert(r1.transits.bodies[b].house >= 1 && r1.transits.bodies[b].house <= 12);
|
||||
assert(r1.natal.houses[r1.transits.bodies[b].house - 1] == r1.transits.bodies[b].sign);
|
||||
}
|
||||
assert(r1.transits.aspect_count == r2.transits.aspect_count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user