Astrology Engine

Turn time into sky orientation

A planetary longitude alone cannot tell us which direction is above an observer’s horizon. Earth turns beneath the sky, and observers at different longitudes face different directions at the same instant. We will turn the engine’s day offsets into a sky orientation, then move that orientation from Greenwich to the observer.

Before this lesson

Read “Add the chart conventions” and recall the approximate ut and tt fields from “Put time and distance on a scale.” Here ut is derived from UTC; it is not measured Earth-rotation time UT1. All small examples are invented arithmetic inputs, not a reference chart.

Read the preceding lesson.

What you will learn

Calculate the wrapped rotation angle, combine the engine’s orientation corrections with correct units, and apply east-positive observer longitude.

Dotted-underlined terms open a definition beside the text. Select one to read more, then close it to continue.

Each step has its own check. Pass every step to complete the lesson. Your answers and checked steps are saved in this browser, so you can continue after leaving or reloading.

1. Count turns of Earth

Think of a clock hand that can make many full turns. To describe where it points now, we keep the fraction of its total turns and discard the completed circles. At engine day offset u = 0, the rotation expression starts at 0.779057273264 turns. Multiplication by 360 gives 280.46061837504°.

The engine separates the everyday one-turn-per-day part from the extra rotation. At u = 0.25 days, the everyday part is a quarter turn, while the extra part contributes 0.00273781191135448 × 0.25 turns. Adding the reference fraction gives 1.0297417262418386 turns; discarding one full turn and multiplying by 360 gives 10.7070214470619°.

f = rem(u, 1); θ = 360 × rem(0.779057273264 + 0.00273781191135448u + f, 1)

The symbol rem here means the nonnegative remainder: rem(−0.25, 1) is 0.75. The values u and f are numerical day offsets. The f term carries an implicit factor of one turn per day, so f = 0.25 days contributes 0.25 turns. The coefficient 0.00273781191135448 supplies the extra turns per day. θ, the Earth rotation angle, is in degrees. Keeping the one-day fraction separate also avoids carrying a large integer number of ordinary daily turns into the final wrapping operation.

How the modern expression was documented

SOFA, the International Astronomical Union’s Standards Of Fundamental Astronomy collection, attributes its rotation expression to Capitaine, Guinot and McCarthy (2000), and points to the IERS Conventions (2003). Its standard input is UT1. The engine uses the same coefficients with its UTC-derived ut field; matching coefficients does not remove that time-model difference.

See the teaching TypeScript
const rem = (x: number, modulus: number): number => { const r = x % modulus; return r < 0 ? r + modulus : r; };
const earthRotationDegrees = (ut: number): number =>
  360 * rem(0.7790572732640 + 0.00273781191135448 * ut + rem(ut, 1), 1);

Finite, correctly labeled inputs are assumed. This demonstrates the arithmetic; it does not fetch data or replace the engine.

Connect this step to the source

src/astro/frames.rs

era

Paths refer to the astrology-engine repository. Examples use invented inputs; a successful exercise is not an astronomical-accuracy test.

Sources for this section

Apply this step

Answer every part, then check. You can retry as often as you like.

Enter a number in degrees; absolute tolerance ±0.000001. Accepted tolerance: ±0.000001 degrees. Omit units and commas.

Enter a number in degrees; absolute tolerance ±0.000001. Accepted tolerance: ±0.000001 degrees. Omit units and commas.

Enter a number in days; absolute tolerance ±0. Accepted tolerance: ±0 days. Omit units and commas.

4. Which time value actually enters the engine rotation expression?

2. Orient the equinox from Greenwich

A turning Earth supplies one orientation, but chart coordinates also refer to an equinox: the crossing of the equator and ecliptic used as longitude zero. That reference changes with the moving planes from the earlier lessons. Sidereal time expresses the equinox’s orientation relative to a meridian, a north–south reference through the observer.

The engine adds a slowly changing polynomial and a small wobble correction to θ. The polynomial uses T = tt / 36525, centuries from the reference epoch in the engine’s approximate tt model. Its result P is in arcseconds of angle, not seconds on a clock. The wobble helper e_tilt supplies ee, the equation of equinoxes, in seconds of sidereal time. One such second represents 15 arcseconds, so multiplying ee by 15 makes the units agree.

P(T) = 0.014506 + 4612.156534T + 1.3915817T² − 0.00000044T³ − 0.000029956T⁴ − 0.0000000368T⁵

st = P(T) + 15ee, in arcseconds; G = wrap(θ + st/3600), in degrees

Greenwich apparent sidereal hours = G/15; gast_degrees = hours × 15

For a deliberately isolated arithmetic example, supply θ = 280°, T = 0 and ee = 0.2 seconds of sidereal time. Then P = 0.014506 arcseconds and 15ee = 3 arcseconds. Their sum is 3.014506 arcseconds, or 0.0008373627778°. The result G is 280.0008373627778°, equivalent to 18.6667224908519 sidereal hours. These inputs exercise unit conversion; they are not a self-consistent engine epoch.

A full circle takes 24 sidereal hours, so 360/24 = 15° per hour. These hours label an orientation; they are not a UTC wall-clock reading. “Greenwich” identifies the starting meridian. “Apparent” means the reference includes the wobble of the equinox; “mean” omits that correction. Sidereal time here is also distinct from choosing a sidereal zodiac, which would change the longitude zero used for chart positions.

From the reference polynomial to this runtime

SOFA’s gmst06 documents this mean-sidereal polynomial as consistent with IAU 2006 precession and cites Capitaine, Wallace and Chapront (2005). Our engine adds its own e_tilt result: ee = dpsi × cos(mean obliquity) / 15. That helper uses five nutation terms. We teach this implemented combination without claiming it is a complete SOFA apparent-sidereal-time routine.

See the teaching TypeScript
const wrap = (x: number): number => { const r = x % 360; return r < 0 ? r + 360 : r; };
const greenwichDegrees = (theta: number, ttDays: number, eeSeconds: number): number => {
  const t = ttDays / 36525;
  const p = 0.014506 + (((((-0.0000000368 * t - 0.000029956) * t - 0.00000044) * t + 1.3915817) * t + 4612.156534) * t);
  return wrap(theta + (p + 15 * eeSeconds) / 3600);
};

Finite, correctly labeled inputs are assumed. This demonstrates the arithmetic; it does not fetch data or replace the engine.

Connect this step to the source

src/astro/frames.rs

sidereal_time; gast_degrees

Paths refer to the astrology-engine repository. Examples use invented inputs; a successful exercise is not an astronomical-accuracy test.

Sources for this section

Apply this step

Answer every part, then check. You can retry as often as you like.

Enter a number in arcseconds; absolute tolerance ±0. Accepted tolerance: ±0 arcseconds. Omit units and commas.

Enter a number in sidereal hours; absolute tolerance ±0. Accepted tolerance: ±0 sidereal hours. Omit units and commas.

Enter a number in degrees; absolute tolerance ±0.000001. Accepted tolerance: ±0.000001 degrees. Omit units and commas.

4. Does converting this orientation to sidereal hours select a sidereal zodiac?

3. Move the orientation to the observer

Two observers at different longitudes face different parts of the sky at the same instant. Starting at Greenwich, moving 20° east advances the meridian direction by 20°. If G is 350°, adding 20° gives 370°, which wraps to 10°. Moving west instead contributes a negative longitude.

α = wrap(G + L), where L is east-positive geographic longitude in degrees

The engine calls α the The meridian direction on the equator This is the equatorial angle of the local meridian, rather than the ecliptic longitude returned as the Midheaven. The letters abbreviate Right Ascension of the Midheaven. United States Naval Observatory: observer longitude and local hour angle. Right ascension is an angle along the equator from the equinox. Here it tells us which equatorial direction lies on the local meridian; the next lesson converts that orientation into an ecliptic midheaven longitude. RAMC and midheaven longitude generally differ because those two circles are tilted relative to one another.

For a second invented example, G = 15° and L = −30° give α = wrap(−15°) = 345°. Latitude does not enter this addition. It will affect the horizon angle in the next lesson. Keeping longitude and latitude separate prevents an easy mistake: both describe location, but they enter different parts of the geometry.

A reference meridian and a local one

The Naval Observatory defines local sidereal time by adding east longitude, expressed in matching angular or hour units, to the Greenwich value. This engine’s helper performs that addition entirely in degrees. The expression is a coordinate convention; no separate inventor of the local helper is asserted.

See the teaching TypeScript
const localMeridianDegrees = (greenwichDegrees: number, eastLongitude: number): number => {
  const r = (greenwichDegrees + eastLongitude) % 360;
  return r < 0 ? r + 360 : r;
};

Finite, correctly labeled inputs are assumed. This demonstrates the arithmetic; it does not fetch data or replace the engine.

Connect this step to the source

src/astro/houses.rs

right_ascension_of_midheaven

Paths refer to the astrology-engine repository. Examples use invented inputs; a successful exercise is not an astronomical-accuracy test.

Sources for this section

Apply this step

Answer every part, then check. You can retry as often as you like.

Enter a number in degrees; absolute tolerance ±0. Accepted tolerance: ±0 degrees. Omit units and commas.

Enter a number in degrees; absolute tolerance ±0. Accepted tolerance: ±0 degrees. Omit units and commas.

3. Which location component enters right_ascension_of_midheaven?

Your lesson checks

0 of 3 steps passed.

Use the feedback beside each check to retry any unfinished step.