Reference
Ninety-two public classes, enums and interfaces live under Astronomy\, in src/ with no
subfolders. Four tables below, one per kind, because that is how the package itself separates
them: classes that compute something when a static method on them is called, value objects that
a computation hands back, enums that name a closed set of things, and interfaces that exist so an
application can plug in what only it knows (which HTTP client to use, which place-lookup
provider). Every row names the chapter that covers it in full.
A handful of the value objects below also carry their own static factory methods, Houses::calculate(),
RiseSet::ofTheDay(), Horizon::horizonDip() among them: the class that a computation returns is
also the door you call to get one. That is a pattern in this engine and not an inconsistency, so
those rows are listed once, under value objects, with the call that produces them named in the
description.
Calculation classes
Forty-eight. A static method, an instant, and a result, usually a value object from the next table.
| Class | What it does | Chapter |
|---|---|---|
Declinations |
Aspects measured in the OTHER coordinate: parallels and contraparallels of declination. | Positions |
Ephemeris |
Where each body is seen from the Earth, or from the Sun, the barycentre, a place on the ground or another planet, at a given instant. | Positions |
EphemerisPositions |
Reads a position table and interpolates between its points. What places Pluto, Chiron and the four classical asteroids, none of which has an analytical theory. | Positions |
FictitiousBodies |
The nineteen bodies that do not exist and still have a position, propagated from a published set of orbital elements rather than observed. | Positions |
LunarPoints |
The lunar nodes and Lilith: mean, true and interpolated, with Priapus opposite. | Positions |
Moon |
The Moon, by ELP 2000-82B. | Positions |
Precession |
Rotates coordinates between the J2000 ecliptic and the ecliptic of date. | Positions |
Vsop87 |
Evaluates the VSOP87 series: the eight planets and the Earth. | Positions |
EquationOfTime |
How far the real Sun runs from the clock Sun. | Time and calendars |
Time |
Delta T, leap seconds, UTC, UT1, TT, sidereal time, the calendars. The only class in the engine that depends on no other one. | Time and calendars |
Constellations |
The eighty-eight constellations, by the abbreviation the IAU gives them, and which one a position falls in. | Fixed stars |
Stars |
The fixed stars: where they fall on a date and what they touch in a chart. | Fixed stars |
CentralPath |
The path of the Moon's shadow over the Earth during a solar eclipse: the line, the width of the band and how long totality lasts along it. | Eclipses and occultations |
Eclipses |
Solar and lunar eclipses: when, of what kind, and what is seen from a given place. | Eclipses and occultations |
Occultations |
Occultations of planets and stars by the Moon. | Eclipses and occultations |
Saros |
The saros series number of an eclipse, by van den Bergh's numbering convention. | Eclipses and occultations |
ArcusVisionis |
How much darkness it takes to see a body again after conjunction with the Sun: the classical visibility criterion, from Schoch's 1924 table. | Rise and set |
HeliacalPhenomena |
The day an object becomes visible again after having been hidden by the Sun, and the day it stops being seen. | Rise and set |
MeanElements |
The MEAN elements of the eight planets, from Simon et al. (1994): the averaged table behind the mean node and the mean perihelion. | Orbits |
NodesAndApsides |
The whole orbit of a body around the Sun: where it crosses the ecliptic, where its perihelion and aphelion fall, its three anomalies and its three periods. | Orbits |
Magnitudes |
The visual brightness of a body, from a model fitted against JPL Horizons. | Phenomena |
MoonPhase |
The Moon's phase at an instant, and the two lunations that surround it. | Phenomena |
Phenomena |
Computes a Phenomenon for a body at an instant: phase, illuminated fraction, elongation, apparent diameter and magnitude, in one call. |
Phenomena |
Phenomenon |
What can be seen of a body from here, returned together: phase angle, illuminated fraction, elongation, apparent diameter, magnitude. | Phenomena |
Crossings |
When a body reaches a longitude. An ingress, a lunation, a solar return and an exact transit are the same question with a different body and a different target. | Crossings and retrogrades |
Retrogrades |
When a planet stops and turns around. A station is where the speed in longitude, which the ephemeris already carries signed, changes sign. | Crossings and retrogrades |
Downloadables |
How the data of the downloadable bodies is laid out on disk, and where each file is. | Downloadable bodies |
DownloadedPositions |
The files of the downloadable bodies: how they are written, how they are read and how they are interpolated. | Downloadable bodies |
Downloader |
Downloads the data of an asteroid, a satellite or a comet from the JPL and leaves it in its file. | Downloadable bodies |
Horizons |
What the engine asks JPL Horizons for when it downloads data: a body's positions every so often, chunked so a request never comes back silently truncated. | Downloadable bodies |
MissingData |
Thrown when a downloadable body's file is not on disk. Carries the body and the file, so the caller decides whether to fetch it, queue it or refuse. | Downloadable bodies |
Chebyshev |
Fits a series to a set of points and evaluates it. What the correction tables are built and read with. | The data |
CorrectionTable |
The correction of the analytical series towards the JPL ephemerides. What is stored is the difference, never the position. | The data |
DataFolder |
Where the engine's data lives, and how an application points it somewhere else. | The data |
DeltaTTable |
Downloads the observed delta T values and the leap second table and writes deltat.php. |
The data |
Elp2000Series |
Turns ELP 2000-82B, the theory of the Moon's motion, into the PHP tables Moon evaluates. |
The data |
MagnitudeFit |
Fits each body's brightness against the magnitude JPL Horizons publishes, and writes magnitudes.php. |
The data |
MassTable |
Downloads the solar system masses from the DE440 header and writes them as a PHP table. | The data |
MeanElementsTable |
Turns the table of mean planetary elements of Simon et al. (1994), as ERFA publishes it, into a PHP table. | The data |
MoonCorrectionTable |
Tabulates what the Moon's own series is missing in order to be the JPL's. | The data |
NativeHttpClient |
The default HTTP client, with no dependencies: cURL if the extension is there, PHP's own streams if not. | The data |
NutationSeries |
Turns the IAU 2000B nutation series, as ERFA publishes it, into a PHP table. | The data |
PlanetCorrectionTable |
Tabulates what VSOP87 is missing in order to be DE440, planet by planet. | The data |
PositionTables |
Tabulates a body's positions by asking JPL Horizons for them. What backs the seven bodies with no analytical theory. | The data |
SatelliteList |
Writes the cases of the Satellite enum from the JPL Horizons major bodies list. |
The data |
StarCatalog |
Builds the fixed star catalogue: which stars there are, from SIMBAD, and where each one is, from Hipparcos-2. | The data |
Vsop87Series |
Turns the original VSOP87 series into the PHP tables Vsop87 evaluates. |
The data |
HorizonsCheck |
Checks the engine's own positions against JPL Horizons, live. The proof behind every number in precision. | Precision |
Value objects
Twenty-six. What a calculation hands back: readonly properties and a handful of methods that
read them, format them, or derive something cheap from what is already there (a descending node
from an ascending one, an antivertex from a vertex).
| Class | What it holds | Chapter |
|---|---|---|
FoundParallel |
Two bodies at the same height above the celestial equator: a parallel or a contraparallel. | Positions |
Position |
Where a body is: longitude, latitude, distance and speed, all signed, with latitude speed and distance speed alongside when they cost nothing extra to keep. | Positions |
UtInstant |
An instant that comes out of a computation, in the two shapes it is needed in: a julian day to keep computing with, and a clock reading already in a time zone. | Time and calendars |
HouseSpeeds |
How fast the twelve cusps and the eight angles of a chart are moving, in degrees per day. | Houses |
Houses |
The twelve houses and the angles of the chart, from Houses::calculate() or Houses::fromArmc(); built geometrically for each of the twenty-three systems, not from a copied formula. |
Houses |
Star |
A fixed star just as the catalogue holds it: its designation, its J2000 position and its proper motion, before asking for any date. | Fixed stars |
StarPosition |
Where a fixed star is at a given instant, in the two systems that get read: ecliptic longitude for the conjunction, declination for the parallel. | Fixed stars |
LocalCircumstances |
What is seen from one place when the Moon passes in front of the Sun: the four contacts, the magnitude, whether each contact is above the horizon. | Eclipses and occultations |
LunarCircumstances |
A lunar eclipse seen from one place: which phases catch the Moon above the horizon. | Eclipses and occultations |
LunarEclipse |
A lunar eclipse: its type, its instants and its magnitudes, umbral and penumbral. | Eclipses and occultations |
Occultation |
The Moon passing in front of a planet or a star, seen from the Earth as a whole. | Eclipses and occultations |
PathPoint |
A point of the band of a solar eclipse: where the shadow is, how wide the band is there and how long totality lasts, or null at the two ends where the shadow runs off the globe. | Eclipses and occultations |
SolarEclipse |
A solar eclipse seen from the Earth as a whole: what it is, when, and where it passes. | Eclipses and occultations |
Equatorial |
A direction in the sky referred to the equator: right ascension and declination, in degrees. | Rise and set |
HeliacalDetails |
Everything measured about an object at one instant to decide whether it can be seen: its altitude, the Sun's depression, the arc between them. | Rise and set |
HeliacalPhenomenon |
A heliacal phenomenon that has been found: the day an object becomes visible again or stops being seen, and by how much it clears the criterion. | Rise and set |
Horizon |
The sky seen from one place: the observer, their horizon and what stands above it. Where horizonDip() and the refraction methods live. |
Rise and set |
Horizontal |
Where a body is seen from one particular place: altitude above the horizon and azimuth. | Rise and set |
Place |
A place where someone could have been born: a name, coordinates and a time zone. | Rise and set |
RiseSet |
Rise, set and meridian passes of a body on one day and at one place, from RiseSet::ofTheDay() or RiseSet::next(), in Universal Time and in local clock time at once. |
Rise and set |
ExtremeDistances |
The closest and the farthest two bodies can ever get from each other, found between their two ellipses and not by adding two aphelia. | Orbits |
MeanOrbit |
The MEAN orbit of a planet: the averaged ellipse behind its mean node and its mean perihelion, from a table rather than from a state vector. | Orbits |
OsculatingOrbit |
The instantaneous orbit of a body around the Sun: its four marked points, its shape and its three periods, from its position and velocity at one instant. | Orbits |
CustomAyanamsa |
An ayanamsa defined by whoever uses it: at the instant t0 it was worth a0, and everything else follows from that one pair. | The sidereal zodiac |
Asteroid |
Any of the asteroids the JPL has, by its number or by its designation. | Downloadable bodies |
Comet |
One of the comets the JPL has, by its designation: 1P, 73P-B, C/1995 O1. |
Downloadable bodies |
Enums
Fourteen. A closed list, so that asking for something that is not there fails when it is read and not when it is drawn.
| Enum | Cases | What it names | Chapter |
|---|---|---|---|
Body |
42 | The bodies the engine knows how to place, listed in full below. | Positions |
PositionType |
5 | Which light corrections a position carries: apparent, astrometric, geometric, without aberration or without deflection. | Positions |
ReferenceEcliptic |
3 | Which ecliptic a longitude is measured on and from which equinox: true of date, mean of date, or J2000. | Positions |
Sign |
12 | The twelve signs. | Positions |
HouseSystem |
23 | The house systems, listed in full below. | Houses |
EclipseType |
5 | The eclipse types, solar and lunar, in a single list because three of the names are shared between the two: partial, annular, total, hybrid, penumbral. | Eclipses and occultations |
HeliacalEvent |
4 | The four heliacal phenomena: when a body becomes visible again and when it stops being seen, morning and evening. | Rise and set |
Limb |
3 | Which point of the disc decides a rise or a set: the upper edge, the centre, or the lower edge. | Rise and set |
Pass |
4 | The four passes of a body across the sky of a place over the course of a day: rise, set, upper culmination, lower culmination. | Rise and set |
Twilight |
3 | The three twilights, defined by how far the centre of the Sun is below the horizon: civil, nautical, astronomical. | Rise and set |
Ayanamsa |
43 | The sidereal zodiac, of two kinds: anchored to an epoch ("at t0 it was worth a0") or anchored to a star ("this star sits at 0° of that sign"). | The sidereal zodiac |
Nakshatra |
27 | The sidereal zodiac cut into lunar mansions of 13° 20′. | The sidereal zodiac |
DownloadableGroup |
3 | The three groups of bodies the engine does not ship with: asteroids, satellites, comets. | Downloadable bodies |
Satellite |
458 | The satellites of the planets that have an ephemeris in JPL Horizons, from Mars to Pluto. | Downloadable bodies |
The 42 cases of Body
Read from src/Body.php, in the order they are declared, which is the order the file itself
groups them in.
| Group | Cases |
|---|---|
| Classical (10) | Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto |
| Chiron and the four major asteroids (5) | Chiron, Ceres, Pallas, Juno, Vesta |
| Pholus (1) | Pholus |
| Lunar nodes and Lilith, mean and true (4) | MeanNode, TrueNode, MeanLilith, TrueLilith |
| Interpolated Lilith and Priapus (2) | InterpolatedLilith, Priapus |
| The Hamburg school (8) | Cupido, Hades, Zeus, Kronos, Apollon, Admetos, Vulkanus, Poseidon |
| Other hypothetical bodies (4) | Transpluto, Vulcan, Selena, Proserpina |
| Predicted positions that came out wrong (4) | NeptuneLeverrier, NeptuneAdams, PlutoLowell, PlutoPickering |
| Pseudoscience and discarded hypotheses (3) | Nibiru, Harrington, Waldemath |
| The Earth (1) | Earth |
Everything past Pluto that is not a body the JPL has ever catalogued is off by default and named as what it is in every place that shows it: nineteen cases across the last five rows carry a propagated ellipse and no observation behind it.
The 23 cases of HouseSystem
Read from src/HouseSystem.php, in the order they are declared.
Placidus, Koch, Regiomontanus, Campanus, Porphyry, Alcabitius, Topocentric, Equal,
WholeSign, Vehlow, Morinus, Meridian, Azimuthal, Krusinski, Sripati, Carter,
Apc, PullenSD, PullenSR, EqualMidheaven, EqualAries, SavardA, Sunshine.
Thirty-six more divisions, the Gauquelin sectors, are not a twenty-fourth case: they are not
twelve houses, they are thirty-six, so they live as $houses->gauquelinSectors() instead of in
this enum.
Interfaces
Four. What an application implements, because the engine either should not decide it (which HTTP client, which place-lookup provider) or cannot (a translation).
| Interface | What it is for | Chapter |
|---|---|---|
DownloadableBody |
What Asteroid, Comet and Satellite have in common: what to ask JPL Horizons for and which file the answer lives in, asked in one place so the class that downloads and the class that reads cannot disagree. |
Downloadable bodies |
Geocoder |
Look up a place by its name. An interface and not a class because the provider behind it is a licensing choice, not a technical one, and the engine takes a Place directly rather than picking a provider for you. |
Rise and set |
HttpClient |
The only thing the engine needs from the network: a GET that returns text. What every maintenance command downloads through, with NativeHttpClient as the default that needs nothing installed. |
The data |
Translatable |
A stable key() and an English name(), implemented by every enum meant to be read by a person. What a translation file is indexed by, instead of a value that moves when a case is renamed. |
Positions |
built and maintained by Edu Lazaro · MIT license