Repository navigation
2026-11-22
Engine (caelus)
-
FK5 frame fix applies only to VSOP87D, not Horizons
earthPack(#20).
sunApparent/sun_apparentand mixed-tierplanetApparent/planet_apparent
now applyfk5Correction(Meeus eq. 32.3,-0.09033"equinox shift) only
when Earth or a planet comes from VSOP87D, skipping it when Earth uses a
Horizons DE441earthPackorearthEraPacksslab (already in ICRF / ecliptic
J2000). BrowserembeddedData(noearthPack) is unchanged; onloadNodeData
and Python"full"tiers, Sun accuracy against Horizons improves across every
band (0.246"to0.227"over 1900-2099,0.420"to0.346"over
1850-2150) and mean longitude difference vs. Swiss Ephemeris over 1900-2099
drops from0.0975"to0.0249". Affected Sun-dependent golden fixtures and
MCP goldens are regenerated. -
Physical observation, verification, time search, and geolocation.
sceneGeometry,verifyObservation,chronolocate, andgeolocate
(packages/caelus/src/observe.ts, ported frompython/astroengine/observe.py)
compute solar and lunar horizontal coordinates with barometric refraction,
flat and sloped-ground 3D shadow geometry and sweep rates, optional
camera-relative glare risk, lens-independent zenith-frame lunar bright-limb
orientation, naked-eye planet visibility, local diurnal transitions, and
compactchronosenseheaders.verifyObservationsupports both
unconstrained ground-truth queries and constrained verification with
uncertainty widening, near-zenith and full/new Moon indeterminate handling,
and counterfactual forensics for clock/timezone offsets (including half-hour
zones), hemisphere flips, and seasonal date shifts.chronolocateprunes
impossible days analytically and bisects matching windows to sub-second
edges;geolocateuses a closed-form spherical navigation fix on flat solar
observations and a global antimeridian-wrapping spherical grid otherwise.
observe-golden.test.tspins 28 cases (1,927 checks) against the Python
reference with a worst difference of6.71e-7, andobserve.test.tschecks
a 120-scenario authentic/spoof benchmark (precision1.000, recall1.000,
0false-impossible verdicts on authentic scenes,40/40counterfactual
recoveries, sub-millisecond forward latency). -
Binary packs. The planet, Earth, and Moon Chebyshev packs ship in a
binary form, CPK1 (docs/binary-packs.md), in place of JSON. Each
coefficient is stored as an integer multiple of a power-of-two quantum set
below the pack's fit residual. The seventeen packs go from 137 MB to 27 MB,
and the npm tarball from about 55 MB packed and 130 MB unpacked to 28 MB
and 37 MB.loadNodeDataprefers a.cpkover its.json, and
decodePackreads one in a browser. -
Uranus, Neptune, and Pluto reach 3000 BCE. Each has a classical era
pack (JPL Horizons, DE441) adjoining its modern pack at
1000 CE, fitted to 8.2e-7 AU, the modern packs' own level, and 0.13 MB as
binary. A chart cast withloadNodeDatafor a date before 1000 CE now
carries them;chart.unavailablelists only Chiron and the asteroids,
which Horizons serves from about 1600. At 76 CE the new Uranus and Neptune
agree with the embedded VSOP87 series, an independent source, to 0.01°. -
What the quantization moves. The rounding adds at most 1.0% of a
planet pack's own fit residual and 0.07% of a Moon pack's. Against 0.25 on
the golden grid the planets move by at most 0.0007″, the Moon by 0.002″,
and the true node by 0.14″. Those shifts are enough to change a canonical
digest computed from the Node data tier on the fine grids. The browser's embedded tier does
not use these packs and is unchanged. -
The precise Moon for 1000 to 3000 now ships. The full Moon tier was
16 MB of JSON and stayed in the repository; at 3.9 MB it is in the
tarball, soloadNodeDatagives npm users the precise Moon across the
whole headline range, where they previously fell back to the analytic
series outside 1920 to 2080. -
First and last visibility.
heliacal(engine, target, jdStart, lat, lon)
finds the day a planet, a catalog star, or the Moon is first or last seen
from one place: the heliacal rising and setting, the evening and morning
apparitions of Mercury and Venus, and the new and old lunar crescent. The
default method is a physical model implemented from Schaefer's published
equations (sky brightness from twilight, moonlight, and the night sky;
extinction by Rayleigh scattering, ozone, and aerosol; the eye's threshold
against the background). The Moon uses Yallop's q test.method: "arcus"
applies the classical rule with a stated arcus visionis and adds the
acronychal rising and cosmical setting. This reverses a non-goal recorded
indocs/gap-analysis.md. -
The atmosphere is an input and the answer is a window. Extinction is
one stated number, default 0.25 magnitudes per air mass, echoed in every
result. Each event is computed at that value and at 0.05 less and more, and
the result carriesearliestandlatestbeside the nominal instant.
visibilityreports the limiting magnitude and margin for one body at one
instant, andlunarCrescentscores one evening or morning. -
Compared with Swiss Ephemeris.
python/validate_heliacal.pyruns 374
events at five sites and four epochs from 600 BCE to 2020 against
swe_heliacal_utat the same extinction. Stars: 183 of 198 within a day,
all within three. Venus: 40 of 40 within a day. Mercury: 36 of 38 within a
day. The Moon: 39 of 40 on the same evening. Mars, Jupiter, and Saturn: 55
of 58 within three days, the largest difference six. In 372 of the 374 the
other answer lies inside theearliesttolatestwindow. For Sirius at
Memphis in 139 CE the model gives 19 July, Julian calendar, against the 20
or 21 July read from Censorinus. -
Minted bodies.
python/mint_body.pymakes a pack for any numbered
asteroid on request: it fits the body to JPL Horizons, writes the pack in
the binary form, and measures the published bytes against Horizons at 300
instants the fit never sampled. The result is published with a
certificate that states the span, the orbit solution, the measured error,
and the pack's SHA-256.loadMintedBodyandregisterMintedBodycheck a
pack against its certificate before decoding it and register the body on
an engine, whereengineCapabilitiesreports it with the source
"minted". 433 Eros for 1990 to 2030 is a 10.5 KB pack with an error of
12.6 km, at most 0.10 arcseconds seen from the Earth. A workflow,
mint-body.yml, runs the mint when dispatched and publishes to aminted
branch; it has not been run on GitHub yet. -
A first or last visibility as a sky-dating constraint.
dateSkytakes
{ visibility: { target, kind, lat, lonEast }, within }beside its
position constraints. The constraint holds on the local days from the
event's earliest date to its latest, and it is taken after every position,
so the events are searched only inside the windows the positions leave.
"Venus first seen in the evening with Jupiter in Leo" at Babylon has four
dates between 651 and 601 BCE, found in half a second.
heliacalKindsForlists the events a target has, andheliacaltakes a
spanthat stops its search a given number of days past the start. -
Fixed:
heliocentricandphenobefore 1000 CE.heliocentricread a
planet's modern pack only, so it threw for any date the classical slab
serves, andphenothrew with it. Both now use the slab that covers the
instant. -
Fixed: positions in the first hours after a slab boundary. An apparent
place is built from the body's position a light-time earlier. Just after
1000 CE that earlier instant lies in the classical slab, and the engine
asked the modern pack for it and threw. Each instant is now served by the
slab that covers it. The gap was 6 minutes wide for Mars and over 4 hours
for Neptune. -
Chart stability.
chartStability(engine, jdUt, opts)takes a window of
time around a chart's stated instant and reports which of its facts hold
across the window: the sign on each angle, the sect, and each body's sign,
house, direction, and aspects. Each fact carries its value at the stated
instant, the share of the window in which it holds, and the instants at
which it changes, bisected to about a second. With no window given, the
half-width is the one-sigma uncertainty of ΔT at the epoch. For a birth
known to fifteen minutes either way, 60 of 61 facts are stable in the
worked example; for the same date with no time, 42 of 64 are. The
TypeScript port matches the reference fact for fact in
stability-golden.test.ts(8 cases). -
Position uncertainty.
positionUncertainty(engine, body, jdUt)returns
the two limits on a body's longitude and keeps them apart: the accuracy
table's bound on the model, which isnulloutside the span it was
measured over, and the one-sigma effect of the ΔT uncertainty, which is the
body's speed times the clock error. For the Moon in 1500 the bound is 3″
and the clock term 7.5″; in 1000 BCE the clock term is 711″ for the Moon
and 1.8″ for Saturn. -
Sky dating.
dateSky(engine, constraints, jdStart, jdEnd)goes from a
description of a sky to the dates it occurred. A constraint puts a body in
a sign, within an orb of a longitude, or in afrom/toarc, or puts the
elongation between two bodies in an arc (a waning Moon is the Moon minus
the Sun between 180° and 360°). The function returns every window in the
range in which all constraints hold, and afunnellisting how many
windows and days survived each constraint. It scans the slowest body across
the whole range and each faster body only inside the surviving windows. A
seven-body description searched across 5,980 years takes 1.2 s in Node.
padwidens arcs for a source whose sign boundaries are not the engine's,
andzodiacselects a sidereal zodiac. -
keepStages. With this option each funnel stage also carriesspans,
the windows left after that constraint, so a caller can draw where each
constraint cut (keep_stagesin the reference). -
Checked four ways.
python/test_datesky.pycomparesdate_skywith
when()on short ranges, which is an independent search at one fine step;
builds arcs that a body touches only around a retrograde station, which a
fixed-step scan misses in two of six cases; recovers random instants from
their seven signs; and dates two historical horoscopes. From the signs
usually quoted for it, the horoscope of Hadrian resolves to four windows in
5,980 years, one of them 24 to 26 January 76 CE, the date Neugebauer and
Van Hoesen give. The TypeScript port reproduces the Python windows exactly
indatesky-golden.test.ts(16 cases). -
Julian calendar.
julianDaytakes a seventh argument,"julian", and
the newcalendarDate(jd, calendar)converts a Julian Day back to a date.
Historical dates before 15 October 1582 can now be entered and read in the
calendar they were recorded in. -
ΔT before 1948 follows the Morrison, Stephenson, Hohenkerk and Zawilski
spline.deltaTused the Espenak–Meeus polynomials back to 1800 and a
single parabola,-20 + 32u², for every earlier year. The two branches
disagreed by 32.4 s at 1800, and at 1000 CE the parabola sat 481 s from the
published reconstruction, which is 4.4′ of lunar longitude for an instant
given in UT.deltaTnow evaluates Table S15 (v. 2020) of the authors' 2021
addendum (doi:10.1098/rspa.2020.0776)
from −720 to 1948. The Espenak–Meeus polynomial covers 1948 to 1955, and
the IERS observations after 1955 are unchanged. The join sits at 1948
because the two sources agree there to 3 ms; through the 1800s they differ
by 1 to 5 s, so an earlier join would have kept a step. -
Before −720 the engine uses the same authors' long-term parabola,
-320 + 32.5 ((Y − 1825) / 100)². That parabola is 358 s above the spline
at the first knot, so a cubic Hermite bridge from −1520 to −720 carries
value and slope between them. The bridge is this engine's construction and
is not part of the published table. -
What moves. Positions computed from TT do not change. An instant given
in UT before 1948 now maps to a different TT, so UT-tagged charts shift by
the Moon's rate of 0.55″ per second of ΔT:Years Largest ΔT change Moon 1948 and later 0 s 0″ 1900 to 1948 1.1 s 0.6″ 1800 to 1900 4.7 s 2.6″ 1000 to 1800 481 s (at 1000) 4.4′ 3000 BCE 1018 s 9.3′ Canonical digests of UT-tagged charts before 1948 change with the
positions. The canonical format version stays at 1. The ΔT change itself
leaves charts from 1948 on untouched; the binary packs below move Node-tier
positions by under 0.001″ for the planets. -
Validation.
validate_swiss.pyandvalidate_horizons.pyconvert UT to
TT with the engine's ownjd_ttbefore they compare, so both sides of each
comparison share one ΔT and the published accuracy figures, which are TT
comparisons, are unaffected. The newpython/test_delta_t.pychecks ΔT
itself: each spline row must meet the next within the table's rounding
(worst case 0.001 s),deltaTmust return the published value at every
knot, and the model must be continuous where its branches meet. It runs in
the Python CI job and needs no network. The golden suite gains 19 ΔT rows
between 3000 BCE and 1954. -
deltaTSigmare-derived. The uncertainty table followed Morrison &
Stephenson (2004). Before 1700 each knot is now the larger of the standard
error published with the 2016 values and the amount by which the 2020
revision moved ΔT at that epoch. At 1000 CE sigma goes from 55 s to 180 s,
because the revision moved the value by 180 s where the 2016 table states
15. In antiquity it falls (260 s to 129 s at year 0). Before −1000 it was
flat at 640 s; it is now 1440 s there and 3600 s at 3000 BCE, which is 15°
on the angles. Chart warnings and the canonicalepochSigmablock carry the
new values, so digests of charts before 1700 change.
Site
- Sky Dating instrument at
/instruments/sky-dating. The form takes a
sign for each of the seven classical bodies, a lunar phase, a pad, a zodiac,
and a span of years, and the page draws the search as stacked tracks, one
per constraint, with the matching windows in a table and the call that
produced them beside it. It runs in the browser on the embedded tier, which
finds the same windows as the full packs for both historical presets with
edges within 12 minutes. The logic iscaelus-widgets/sky-datingand the
component iscaelus-widgets/sky-dating-widget. - Workbench, scoped.
app/workbench.csscarries the Workbench grammar
chosen inapps/web/DESIGN.mdunder a.wbroot class, and the instrument
page is the first to use it. The rest of the site keeps its current look
until the site-wide restyle.
MCP (caelus-mcp)
verify_observation,chronolocate, andgeolocateexpose physical
observation verification, ground-truth scene geometry andchronosense,
multi-day time search (up to 370 days), and analytical or spherical-grid
geolocation, bringing the server to 41 tools. All three tools live in
caelus-mcp/corewith no Node dependency, are registered on the hosted
/api/mcpendpoint, are pinned against the in-process engine in
verify_tools, and add six frozen payloads togolden-mcp.jsonplus six
eval fixtures ineval/prompts.jsonl.heliacalexposes first and last visibility, which brings the server
to 38 tools. It takes a target, a place, and a start year, and returns
every event the target has in date order, each with its calendar date, its
earliest and latest date, and the conditions at the moment of best
visibility.verify_toolspins it to the engine, and four frozen payloads
hold the format.date_skytakes a visibility constraint, with the fields of the
heliacaltool andwithin_days.verify_toolspins its windows to the
engine's, and one more frozen payload holds the format.chart_stabilityexposes chart stability, which brings the server to
37 tools. It takes a stated time, an uncertainty in minutes (at most 720),
and an optional place, and it returns the stable facts as a list and each
unstable fact with the times it changes.verify_toolspins it to the
engine, and two frozen payloads hold the format.date_skyexposes sky dating, which brings the server to 36 tools. It
takes the constraints and a span of astronomical years, and it returns each
window with its calendar date (Julian before 15 October 1582), an era label
such as410 BCE, and the search funnel. It refuses a span outside the
validated range of the bodies named and states the years the server's data
covers.verify_toolspins it to the engine, and two frozen payloads hold
the format.