OcaLE: A Web-Based Lunar Ephemeris Calculator — Methodology and Specifications
Open methodology compliant with IAU 2009/IERS Conventions 2010
ocalendario.com.br Astronomy Project (2026). OcaLE Lunar Ephemeris Calculator (version 81.13.0.0.0) [Software]. https://www.ocalendario.com.br/calculadora-lunar-cientifica. Methodology document: https://www.ocalendario.com.br/calculadora-lunar-cientifica/methodology. DOI: pending registration via Zenodo.
2. Abstract
OcaLE is a server-side, web-based lunar ephemeris calculator that exposes a complete, reproducible computational pipeline through a public web interface. Given a date, time and observer location it returns the geocentric and topocentric position of the Moon (RA, Dec, alt, az), phase, illuminated fraction, age, magnitude, libration, selenographic colongitude, sub-Earth and sub-solar coordinates, and a full uncertainty budget combined in root-sum-of-squares form. The tool also enumerates upcoming principal phases, eclipses, apsides and super/micro-Moons.
The algorithmic foundation is layered. The default lite engine combines a truncated ELP-2000/82B series for the Moon (Chapront-Touzé and Chapront 1988; 60 longitude + 60 latitude + 46 distance terms) with VSOP87D for the Sun and inner planets (Bretagnon and Francou 1988); time scales follow the standard chain (UTC, UT1, TAI, TT, TDB) using an annual IERS Bulletin A snapshot for DUT1 and leap seconds. Frame transformations use Frame Bias × Precession (IAU 2006 P03; Capitaine, Wallace and Chapront 2003) × Nutation (IAU 2000A; full series via the SOFA polyfill, otherwise truncated to the 50 dominant terms which retain >99.9 % of the signal). When the SOFA polyfill is active, the pipeline upgrades to the CIO-based GCRS → CIRS → ITRS sequence, and adds Schwarzschild light deflection by the Sun, Earth self-deflection, and Lense-Thirring frame dragging. A JPL DE440 SPK kernel reader (Park et al. 2021) is provided as a higher-precision fallback in the 1550–2650 range.
Position accuracy ranges from approximately 5″ in the lite mode, dominated by ELP-2000/82B truncation, to approximately 0.005″ in the DE440 + SOFA polyfill mode, dominated by the IERS UT1−UTC snapshot age (up to ~365 days). Within the standard astronomical software hierarchy (naked-eye almanac → pocket calculator → full-precision JPL Horizons or NAIF SPICE), OcaLE occupies Tier 7: open methodology, reproducible from public papers, with explicit uncertainty bookkeeping, but not real-time IERS-tracked.
The intended audience is educational use, sophisticated amateur observation planning (astrophotography, occultation prediction, eclipse logistics), and the teaching of computational astronomy and frame mechanics. Validation has been performed against the canonical Meeus 1998 worked examples (Astronomical Algorithms, 2nd ed.) and is being extended to JPL Horizons; ongoing comparisons are documented in the validation suite (audit/B_test_algorithms.php, audit/F_test_stress.php). The tool, the methodology document and the underlying reference implementation are released under permissive licences.
3. Algorithmic Architecture
The pipeline is organised as a directed acyclic graph of stages. Each stage takes a set of inputs (time, location, model selection flags) and produces a typed intermediate object that is consumed by the next stage. The numbering below mirrors the section IDs in the source modules.
3.1 Core ephemeris models
3.1.1 ELP-2000/82B (Moon, default)
The default Moon position is computed from the semi-analytical lunar theory ELP-2000/82B1. The lite engine uses a truncated form: 60 terms in geocentric ecliptic longitude (cosine series in fundamental arguments D, M, M′, F), 60 in latitude (sine series), and 46 in distance (cosine series). The truncation retains all terms above an internal amplitude threshold of approximately 0.5″ in longitude/latitude and 5 km in distance. The expected accuracy of the truncated form is ~3–5″ in apparent angular position over the 1900–2100 window8; outside this window the residuals grow because Delta-T uncertainty propagates into the mean motion arguments.
3.1.2 VSOP87D (Sun and planets)
Heliocentric ecliptic spherical coordinates of date for the Sun (i.e., the negative of Earth's heliocentric position) and the inner planets are computed from the VSOP87 theory in its "D" variant2. The lite engine retains 58 terms for Earth in longitude/latitude/radius; the residual at epoch J2000 is below 0.6″ in heliocentric longitude. The Sun's apparent geocentric position is then obtained by reversing the heliocentric vector and applying aberration (Section 3.4) and light-time correction (Section 3.6).
3.1.3 JPL DE440 fallback
When a local SPK kernel for DE4407 is available under core/astro/data/de440/, the engine can swap the analytical ELP/VSOP layer for a numerical lookup. The kernel reader is an in-house, dependency-free PHP implementation of the SPICE Type-2 (Chebyshev polynomial) ingest path. Coverage spans 1550–2650; the corresponding 1σ position error for the Moon is approximately 0.001″ at epoch J2000 and degrades to 0.005″ at the kernel boundaries due to truncated coefficients in the ASCII delivery. Activation is automatic when the kernel is present and the requested epoch falls inside the coverage; otherwise the lite engine is used and the chosen engine ID is logged in the output payload.
3.2 Time scales
Five time scales are explicitly maintained throughout the pipeline. The scalar relationships, with all values in SI seconds, are:
TT = TAI + 32.184 s
TAI = UTC + Delta-AT (Delta-AT = total leap seconds, IERS)
UT1 = UTC + DUT1 (DUT1 = UT1 - UTC, |DUT1| < 0.9 s)
TDB = TT + 0.001658 s · sin(g) + 0.000014 s · sin(2g) [Fairhead-Bretagnon]
g = 357.53 deg + 0.9856003 deg/day · (JD_TT - 2451545.0)
3.2.1 Delta-T = TT − UT1
Inside the IERS coverage window (1972 ≤ year ≤ current), Delta-T is computed exactly from Delta-T = 32.184 s + Delta-AT − DUT1. Outside this window (historical reconstruction and forward extrapolation), the Espenak & Meeus 2006 polynomial5 is used. The polynomial is documented to better than 1 second near the present and is the de-facto standard for educational tools.
3.2.2 IERS data sourcing
The DUT1 and Delta-AT (leap-second) values are sourced from a local snapshot of IERS Bulletin A12 stored under core/astro/data/iers/bulletin_a.snapshot.php. The snapshot is refreshed on every release of the calculator, but not at runtime; this means the maximum age of the DUT1 value is the time between two releases (currently approximately one calendar year). The implication for accuracy is documented in Section 7 (Uncertainty Budget).
3.2.3 Optional manual override
For reproducibility of historical computations or for forced compliance with a specific bulletin, the user can override Delta-T directly via the dt_seconds input parameter or supply a custom ut1_utc and tai_utc pair. The chosen mode (auto versus manual) is recorded in the output payload's provenance block.
3.3 Frame transformations
The position vector emitted by the ephemeris module is in the GCRS (Geocentric Celestial Reference System), aligned with the BCRS at the geocenter4. To translate into the user-requested frame the engine applies one of two pipelines depending on the frame_mode selection:
3.3.1 Equinox-based pipeline (default in lite mode)
This is the classical chain Frame Bias × Precession × Nutation, multiplied in this order to obtain the matrix NPB that maps GCRS into the true equator and equinox of date:
r_TOD = N(t) · P(t) · B · r_GCRS B = frame bias matrix (IERS Conventions 2010, Eq. 5.20) P(t) = precession IAU 2006 P03 (Capitaine et al. 2003) N(t) = nutation IAU 2000A (truncated to 50 terms or full SOFA polyfill)
3.3.2 CIO-based pipeline (SOFA polyfill active)
When the SOFA polyfill modules under core/astro/sofa/ are loaded, the engine uses the modern CIO-based pipeline (X, Y, s parametrisation), which avoids the equinox altogether and is the IAU-recommended path for high-accuracy work:
r_CIRS = Q(X, Y, s) · r_GCRS r_TIRS = R3(-ERA(UT1)) · r_CIRS r_ITRS = W(xp, yp, s') · r_TIRS r_topo = R(phi, lambda) · r_ITRS − r_observer
Here ERA is the Earth Rotation Angle (a strictly linear function of UT1), X, Y are the celestial pole coordinates (CIP), and W is the polar-motion matrix built from x_p, y_p (IERS Bulletin A) and the small TIO locator s'. Polar motion is set to zero when no IERS data is available; this contributes <30 m to the topocentric position and <0.01″ to the apparent direction.
3.3.3 Topocentric correction
From ITRS the geodetic observer position (phi, lambda, h) on the WGS84 ellipsoid is subtracted, taking into account the geocentric latitude correction (the difference between geodetic and geocentric latitude introduces the parallax in declination). For the Moon at perigee (~356&,000 km), parallax can reach 1.0 deg, hence topocentric and geocentric directions differ by up to one lunar diameter.
3.4 Aberration models
Three aberration components are modelled, all referred to the same observer instant.
3.4.1 Annual aberration
Computed from the heliocentric velocity of the geocenter (or topocentric site) using the Smith 1980 / Klioner 2003 formulation:
u_corrected = ( |u| · (u + v/c) ) / |u + v/c| with v = (vx, vy, vz) in BCRS, taken from VSOP87/DE440
Maximum amplitude is approximately 20.5″ (the so-called constant of aberration). In the lite engine the implementation is first-order in v/c; the second-order term reaches 1.6×10-7″ and is included only in the SOFA polyfill path.
3.4.2 Diurnal aberration
The Earth-rotation contribution is approximately 0.32″ cos(phi) at the equator, decreasing with latitude. It is added at the topocentric stage. Its sign reverses between rising and setting bodies and is included by default for topocentric outputs.
3.4.3 Galactic aberration
Following the IAU 2000 resolution and the parametrisation of Klioner et al. 2003, the secular acceleration of the solar system barycentre toward the Galactic centre induces a slow drift of celestial positions. The default model uses the dipole vector A_G = 5.05 micro-arcsec/yr aimed toward (l, b) = (264.0°, 48.3°). The implementation includes both the DC component (constant offset relative to a fiducial epoch) and the AC component (annual modulation due to Earth's heliocentric motion). Over the lifetime of the OcaLE tool the cumulative effect is below 0.05 mas and is therefore turned off by default; it is enabled when frame_corrections includes galactic_aberration.
3.5 Refraction models
3.5.1 Bennett 1982 (default)
Atmospheric refraction in the lite engine uses the marine-navigation form derived by Bennett 19829:
R = cot( h + 7.31 / (h + 4.4) ) [arcmin, h in degrees apparent]
Standard atmosphere (1013.25 hPa, 10 °C) is the implicit reference; pressure and temperature scaling factors are applied via R_corr = R · (P/1010) · (283/(T+273)). Wavelength dependence (chromatic refraction) is approximated by a Cauchy refractivity factor (1 + 0.000293 / lambda2) relative to lambda = 590 nm.
3.5.2 Saemundsson 1986 (high-altitude alternative)
For low altitudes (h < 15°) the Saemundsson 1986 form10 is more accurate; the user can select it via the refraction_model input. The formula uses the apparent altitude as input and yields refractions consistent with Bennett to within 0.01′ at the horizon.
3.6 Light-time correction
The position of the Moon (or any solar-system body) at the observation instant is the position of the body at a slightly earlier instant t − tau, where tau is the light-travel time from body to observer. The engine solves the implicit equation
tau = | r_body(t - tau) - r_obs(t) | / c
by simple fixed-point iteration. For the Earth–Moon vector, tau ≈ 1.28 s and convergence is reached in three iterations to better than 10-6 s. The corresponding apparent-motion correction is approximately 0.6″ per second of light time, hence approximately 0.8″ for the Moon.
3.7 Higher-order GR (when SOFA polyfill active)
Three relativistic corrections are added when the SOFA polyfill is loaded:
- Schwarzschild light deflection by the Sun: peaks at ~1.75″ at the solar limb, falling as 1/θ with elongation; it is therefore non-negligible for objects within ~30° of the Sun. Implemented per IERS Conventions 2010 Section 5.2.
- Lense-Thirring frame dragging by Earth: produces a secular precession of the Moon's apparent direction at approximately 10 micro-arcsec per 30 days. Negligible for ground-based work but emitted in the output for completeness when the polyfill is active.
- Earth self-deflection: light bending by the Earth's mass acting on photons emitted by the Moon and observed by a topocentric observer; the effect is approximately 0.6 mas at the limb of the Earth and decreases rapidly with elongation.
4. Input Specifications
The calculator accepts more than 100 named inputs, organised below into 19 thematic groups. For each parameter we give the PHP name= attribute, the scientific symbol, the type, the accepted domain, the unit, the default, the validation rule, and the source paper or standard. Inputs are received via HTTP GET so that any computation is permalinkable and reproducible from the URL alone.
| Parameter | Symbol | Type | Domain | Unit | Default | Validation | Reference |
|---|---|---|---|---|---|---|---|
data | UTC date | ISO 8601 | 1900-01-01 to 2100-12-31 | — | today (server tz) | regex ^\d{4}-\d{2}-\d{2}$ | ISO 8601 |
hora | UTC time | HH:MM | 00:00–23:59 | — | 12:00 | regex ^\d{2}:\d{2}$ | ISO 8601 |
jd_input | JDUTC | decimal | 1721057.5–2500000.5 | day | (none, overrides data+hora) | numeric, range | Meeus 1998 |
mjd_input | MJD | decimal | −179000 to 100000 | day | (none) | numeric, range | SOFA |
jd_tt_input | JDTT | decimal | 1721057.5–2500000.5 | day | (none) | numeric, range | IERS 2010 |
jd_ut1_input | JDUT1 | decimal | 1721057.5–2500000.5 | day | (none) | numeric, range | IERS 2010 |
jd_tai_input | JDTAI | decimal | 1721057.5–2500000.5 | day | (none) | numeric, range | BIPM |
cjd_input | CJD | decimal | ±1e7 | day | (none) | numeric | chronological JD |
calendar_system | — | enum | gregorian | julian | — | gregorian | whitelist | ISO 8601 / Calendar Reform 1582 |
| Parameter | Symbol | Type | Domain | Unit | Default | Validation | Reference |
|---|---|---|---|---|---|---|---|
dt_mode | — | enum | auto | manual | — | auto | whitelist | Espenak & Meeus 2006 |
dt_seconds | ΔT | decimal | −500 to 5000 | s | 69.0 | numeric | Espenak & Meeus 2006 |
ut1_utc | DUT1 | decimal | −0.9 to 0.9 | s | 0.0 | numeric, |x| < 0.9 | IERS Bulletin A |
tai_utc | ΔAT | decimal | 0 to 60 | s | 37.0 (epoch 2026) | numeric | BIPM, IERS |
polar_motion_xp_arcsec | xp | decimal | −1 to 1 | arcsec | 0.0 | numeric | IERS Conventions 2010 |
polar_motion_yp_arcsec | yp | decimal | −1 to 1 | arcsec | 0.0 | numeric | IERS Conventions 2010 |
| Parameter | Symbol | Type | Domain | Unit | Default | Validation | Reference |
|---|---|---|---|---|---|---|---|
lat | φ | decimal | −90 to 90 | deg | via IP geo / Brasilia −15.78 | numeric, clamp | WGS84 |
lon | λ | decimal | −180 to 180 | deg | via IP geo / Brasilia −47.93 | numeric, clamp | WGS84 |
alt | h | decimal | −500 to 9000 | m | 0 | numeric | WGS84 ellipsoidal height |
tz | — | IANA tz | any IANA zoneinfo string | — | America/Sao_Paulo | DateTimeZone | IANA tzdata |
observer_mode | — | enum | topocentric | geocentric | — | topocentric | whitelist | Meeus 1998 |
| Parameter | Symbol | Type | Domain | Unit | Default | Validation | Reference |
|---|---|---|---|---|---|---|---|
refraction | — | boolean | 0 / 1 | — | 1 | parsed as 0/1 | Bennett 1982 |
pressure | P | decimal | 500–1100 | hPa | 1013.25 | numeric | ICAO Standard Atmosphere |
temp | T | decimal | −80 to 60 | °C | 20.0 | numeric | ICAO Standard Atmosphere |
humidity | RH | decimal | 0–100 | % | 60.0 | numeric | ICAO Standard Atmosphere |
refraction_model | — | enum | bennett | saemundsson | none | — | bennett | whitelist | Bennett 1982 / Saemundsson 1986 |
wavelength_nm | λobs | decimal | 300–1100 | nm | 550 | numeric, clamp | Cauchy refractivity |
| Parameter | Symbol | Type | Domain | Unit | Default | Validation | Reference |
|---|---|---|---|---|---|---|---|
lapse_rate | Γ | decimal | 0–15 | K/km | 6.5 | numeric | ICAO Standard Atmosphere |
ozone_du | O3 | decimal | 100–600 | DU | 300 | numeric | WMO standard |
water_vapor_mm | PWV | decimal | 0–100 | mm | 10 | numeric | radiosonde climatology |
aod_550 | AOD | decimal | 0–5 | — | 0.15 | numeric | AERONET reference |
cloud_cover_pct | — | decimal | 0–100 | % | 0 | numeric | METAR convention |
| Parameter | Type | Values | Default | Reference |
|---|---|---|---|---|
engine_mode | enum | lite | de440 | auto | auto | internal |
apparent_mode | enum | apparent | geometric | apparent | Meeus 1998 |
nutation_model | enum | iau1980 | iau2000a | iau2000a | Wahr 1981 / Mathews 2002 |
precession_model | enum | iau1976 | iau2006 | iau2006 | Capitaine 2003 |
aberration_model | enum | annual | annual_diurnal | annual_diurnal | Smith 1980 |
frame_mode | enum | equinox | cio | equinox | IERS 2010 |
| Parameter | Type | Values / domain | Default | Reference |
|---|---|---|---|---|
frame_origin | enum | equinox | cio | equinox | IERS 2010 |
frame_epoch | enum | j2000 | mean_of_date | true_of_date | icrs | j2000 | IERS 2010 |
frame_version | enum | iau1976 | iau2006 | iau2006 | Capitaine 2003 |
frame_corrections[] | set | any of nutation, precession, aberration, parallax, deflection, galactic_aberration | all but galactic | SOFA polyfill |
earth_model | enum | wgs84 | grs80 | iers2010 | wgs84 | WGS84 / IERS 2010 |
geoid_model | enum | egm2008 | egm96 | none | none | NGA EGM2008 |
| Parameter | Type | Domain | Default | Reference |
|---|---|---|---|---|
catalog | enum | icrf3 | icrf2 | icrf3 | IAU 2018 |
proper_motion_pmra | decimal | ±100,000 | 0 | mas/yr (target object only) |
proper_motion_pmdec | decimal | ±100,000 | 0 | mas/yr (target object only) |
parallax_mas | decimal | 0–1000 | 0 | mas (target object only) |
gravitational_deflection | boolean | 0 / 1 | 1 (when SOFA polyfill loaded) | IERS 2010 Section 5.2 |
| Parameter | Type | Domain | Default | Reference |
|---|---|---|---|---|
eclipse_years | integer | 1–50 | 5 | internal search window |
apsides_months | integer | 1–36 | 12 | internal search window |
special_months | integer | 1–60 | 24 | super/micro-Moon window |
upcoming_phases | integer | 1–12 | 4 | principal phases ahead |
alt_hours | integer | 6–72 | 24 | altitude timeline span |
alt_step | integer | 5–120 | 30 | min between altitude samples |
occultation_threshold_arcsec | decimal | 0–7200 | 1800 | limit angular separation |
conjunction_threshold_deg | decimal | 0–30 | 5 | limit elongation |
| Parameter | Type | Unit | Default | Notes |
|---|---|---|---|---|
aperture_mm | decimal | mm | 0 | not used by science engine |
focal_mm | decimal | mm | 0 | plate scale only |
sensor_w_mm | decimal | mm | 0 | FOV only |
sensor_h_mm | decimal | mm | 0 | FOV only |
pixel_um | decimal | µm | 0 | plate-scale only |
| Parameter | Type | Values | Default |
|---|---|---|---|
output_angle_format | enum | decimal | sexagesimal | decimal |
output_unit_distance | enum | km | au | earth_radii | thousand_km | km |
output_frame | enum | j2000 | icrs | mean_of_date | true_of_date | j2000 |
language | enum | pt_br | en | es | pt_br |
show_formulas | boolean | 0 / 1 | 0 |
| Parameter | Card it controls |
|---|---|
qty_position | RA/Dec/elongation card |
qty_topocentric | Alt/Az/HA topocentric card |
qty_distance | Distance, parallax, light-time card |
qty_phase | Phase, age, illumination, magnitude card |
qty_libration | Optical libration card |
qty_selenographic | Sub-Earth, sub-solar, colongitude card |
qty_extended | Extended phases / Brown lunation |
qty_state_vector | Position + velocity ICRS state vector |
qty_uncertainty | RSS uncertainty budget table |
qty_de440 | DE440 vs lite engine comparison |
qty_ephemeris | 30-day monthly ephemeris table |
qty_bibliography | APA bibliography card |
qty_tracking_rates | RA/Dec rates, az/alt rates |
qty_anomalistic | Anomalistic position card |
qty_apparent_corrections | Per-correction breakdown |
qty_active_models | List of active models for this run |
qty_solar_reference | Solar reference frame card |
qty_tides | Tidal acceleration / lunar perigee shift |
qty_snapshot | JSON snapshot of all inputs |
qty_equation_of_time | Equation of time card |
qty_sidereal_time | GMST/GAST/LST card |
qty_kinematics | Velocity vector decomposition |
qty_advanced_corrections | Schwarzschild, Lense-Thirring, galactic aberration breakdown |
Three further input groups exist but are documented in the live tool itself rather than reproduced here, since they are auxiliary: (i) cookie/session (preferred location, language preference); (ii) UTM tracking (passed through unchanged); (iii) API output mode (handled by the /api/fases-da-lua-cientifica/v1 endpoint). All three groups are not part of the scientific contract and have no impact on numerical results.
5. Output Specifications
Each output card in the calculator has a stable, machine-readable name. The table below lists all cards documented at the time of writing and gives, for each, the quantities it provides, their units, the 1σ uncertainty (where defined), and the engine module that produces them.
| Card name | Quantities (symbol — unit) | 1σ precision | Engine module | Reference |
|---|---|---|---|---|
| spotlight | phase name, illuminated fraction (k — %), age (τ — days), distance (Δ — km), magnitude (m — mag), apparent diameter (s — arcmin) | k: 0.1%; τ: 30 s; Δ: 1 km; m: 0.1; s: 0.5" | Moon::geocentric | Meeus 1998 Ch. 47 |
| position-equatorial | RA (α), Dec (δ), elongation (ε) | ~5" | Moon::apparentEquatorial | ELP-2000/82B |
| position-topocentric | azimuth (A), altitude (h), hour angle (H), refraction | ~6" | Frames::gcrsToTopocentric | IERS 2010 Ch. 5 |
| distance | geocentric Δ, topocentric Δtopo, R/R⊕, light-time | 1 km / 30 m | Moon::distance | ELP-2000/82B |
| phase-extended | illuminated fraction k, age τ, brown lunation N, sub-solar lon | k: 0.1% | Moon::phase | Meeus 1998 Ch. 49 |
| libration | libration in longitude (L), libration in latitude (b), bright limb angle χ | 0.5° / 0.5° / 1° | LibrationPhysical | Eckhardt 1981 |
| selenographic | selenographic colongitude (C), sub-Earth lat/lon, sub-solar lat/lon | 0.1° | Selenographic | IAU WGCCRE 2009 |
| state-vector | rx, ry, rz (km); vx, vy, vz (km/s) ICRS J2000 | ~3 km / 2 m/s | Moon::stateVector | Meeus 1998 |
| de440-comparison | ΔRA (mas), ΔDec (mas), Δrange (km) lite vs DE440 | 1 mas (DE440 reference) | De440Reader | Park et al. 2021 |
| uncertainty | RSS angular (mas), RSS distance (km), per-source breakdown | self-quoted | UncertaintyBudget | this document, Section 7 |
| monthly-ephemeris | 30-day table of date, JD, RA, Dec, distance, phase, illumination | matches engine | EphemerisTable | Meeus 1998 Ch. 47 |
| events-rise-set | moonrise, transit, moonset (HH:MM:SS local) | 30 s | RiseSet::moon | Meeus 1998 Ch. 15 |
| events-eclipses-lunar | list of next eclipses (date, magnitude, type, visibility) | ~1 min | Eclipses::lunar | Espenak & Meeus 2006 |
| events-eclipses-solar | list of next eclipses (date, magnitude, type, central path) | ~1 min | Eclipses::solar | Espenak & Meeus 2006 |
| events-apsides | perigee/apogee (date, distance, lunation) | 1 km / 1 min | Apsides | Meeus 1998 Ch. 50 |
| events-supermoons | super/micro-Moons (date, distance, illumination) | 1 km | SpecialMoons | Nolle 1979 / IAU informal |
| tracking-rates | dα/dt, dδ/dt (arcsec/min); dA/dt, dh/dt | 0.05"/min | Moon::velocity | numerical differentiation |
| active-models | list of model IDs in use (engine, nutation, precession, ...) | — | EngineProvenance | internal |
| solar-reference | Sun RA, Dec, elongation; declination of Sun on date | ~13" | Sun::apparent | VSOP87D |
| tides | tidal recession of the Moon (mm/yr), nodal regression (deg/yr) | 0.1 mm/yr | Tides | Williams & Boggs 2016 |
| snapshot | JSON snapshot of all inputs | — | InputSnapshot | internal |
| equation-of-time | EoT (minutes), Sun true-mean anomaly difference | 30 s | Sun::equationOfTime | Meeus 1998 Ch. 28 |
| sidereal-time | GMST (h), GAST (h), LST (h) | 1 ms | SiderealTime | IAU 2006 / Capitaine 2003 |
| kinematics | v_radial, v_transverse, v_total; |v|; angle to ecliptic | 2 m/s | Moon::kinematics | numerical differentiation |
| advanced-corrections | Schwarzschild, Lense-Thirring, galactic aberration components in arcsec | 0.001" | HigherOrderGR | IERS 2010 Section 5.2; Klioner 2003 |
| frame-bias | 3x3 matrix B | 1e-12 (machine) | Frames::B | IERS 2010 Eq. 5.20 |
| precession-matrix | 3x3 matrix P | 1e-12 (machine) | Frames::P | Capitaine 2003 |
| nutation-matrix | 3x3 matrix N | 1e-12 (machine) | Frames::N | IAU 2000A |
| npb-matrix | 3x3 matrix NPB | 1e-12 (machine) | Frames::NPB | IERS 2010 |
| polar-motion | 3x3 matrix W (xp, yp, s') | 0.1 mas | Frames::W | IERS 2010 |
| era | ERA(UT1) (rad) | 1e-9 | SiderealTime::ERA | Capitaine 2003 |
| delta-t-info | ΔT (s), source (auto/manual), bulletin date | 0.1 s | TimeScales::deltaT | Espenak & Meeus 2006 |
| iers-snapshot | DUT1 (s), ΔAT (s), bulletin issue date | 0.001 s | IersBulletinA | IERS Bulletin A |
| magnitude | apparent V magnitude | 0.1 mag | Moon::magnitude | Allen 1976 |
| angular-diameter | topocentric apparent diameter (arcmin) | 0.5" | Moon::angularDiameter | Meeus 1998 Ch. 47 |
| parallax | horizontal parallax π (deg) | 0.5" | Moon::parallax | Meeus 1998 Ch. 47 |
| brown-lunation | Brown lunation number | integer | BrownLunation | Brown 1933 |
| elongation | elongation Moon–Sun (deg), phase angle (deg) | 0.01° | Geometry::elongation | Meeus 1998 |
| moonrise-azimuth | azimuth of rise/set (deg) | 0.1° | RiseSet::moon | Meeus 1998 Ch. 15 |
| night-illuminated-fraction | fraction of nighttime with Moon above horizon | 1 min | NightFraction | internal |
| twilight-context | civil/nautical/astronomical twilight times | 30 s | Twilight | USNO standard |
| upcoming-phases | next 4 principal phases (date, lunation, illumination) | 30 s | PrincipalPhases | Meeus 1998 Ch. 49 |
| year-distance-curve | weekly Moon distance over 12 months (km) | 1 km | YearDistance | internal sampling |
| altitude-timeline | altitude vs time over user-specified window | 0.1° | AltitudeTimeline | internal sampling |
| brightness-history | magnitude vs phase angle | 0.1 mag | BrightnessHistory | Allen 1976 |
| provenance | engine ID, model IDs, input hash, version | — | EngineProvenance | internal |
| permalink | canonical URL with current inputs | — | Permalink | internal |
| hash | SHA-256 of canonical-sorted inputs + engine name@version | — | RepHash | this document, Section 10 |
| json-export | full structured payload | — | JsonExport | internal |
The list above counts 50 cards. Cards are typed: each value carries a unit and a quoted 1σ uncertainty (where applicable) so that downstream consumers do not have to re-derive precision from context.
6. Coordinate Systems & Frames
6.1 ICRS / J2000.0
The International Celestial Reference System is the kinematically non-rotating reference system aligned with the directions to a set of extragalactic radio sources defining the ICRF (currently ICRF3). Its z-axis is approximately the J2000.0 mean equator pole; its x-axis points to the J2000.0 mean equinox to within a small frame bias (Section 6.2). All ephemerides emitted in ICRS / J2000.0 are independent of the Earth's orientation and rotation and are therefore the natural archival frame.
6.2 Frame Bias
The constant rotation that aligns the ICRS axes onto the J2000.0 mean equator and equinox of date t = J2000 is the frame-bias matrix B. Its three elementary angles are tiny (~0.041" in ξ0, ~−0.017" in η0, ~−0.078" in dα0). It is computed once per session.
6.3 Mean of date / true of date / of date
Mean of date applies precession only (rotation by IAU 2006 P03 from J2000 to t); true of date applies precession then nutation (IAU 2000A); the loose phrase of date is here taken to mean true of date unless explicitly modified. The product matrix NPB = N(t) · P(t) · B implements GCRS → true equator and equinox of date.
6.4 ITRS / WGS84
The International Terrestrial Reference System is the Earth-fixed, co-rotating frame; WGS84 is the de-facto realisation used by GPS. Latitude/longitude/height inputs are interpreted in WGS84. Conversion ICRS → ITRS is done either equinox-based (multiplying by NPB then by the Greenwich apparent sidereal time and polar motion) or CIO-based (multiplying by Q(X, Y, s), then by R3(−ERA), then by W(xp, yp, s')).
6.5 Topocentric horizontal (alt/az)
Final user-facing frame for ground observation. Built from ITRS by translating to the observer position (from geodetic phi, lambda, h) and rotating by R3(−LST) · R2(phi − 90°). Refraction, parallax and diurnal aberration are all applied in this frame.
6.6 Selenographic
The IAU 2009 (Archinal et al. 2011) recommendations define the lunar mean rotation axis and prime meridian. The selenographic colongitude C is the longitude of the morning terminator measured eastward from the prime meridian; it advances by approximately 12.2°/day. The sub-Earth and sub-solar points are reported in selenographic latitude and longitude.
7. Uncertainty Budget (RSS analysis)
For a topocentric apparent direction the angular uncertainty is dominated by ephemeris truncation in the lite mode, and by the IERS UT1 snapshot age in the DE440 + SOFA mode. The table below is the canonical breakdown; the RSS column is the root-sum-of-squares combination, which is the conservative way to combine independent Gaussian sources.
| Source | 1σ magnitude | Origin | Contribution to RSS (mas) |
|---|---|---|---|
| ELP-2000/82B truncation (60+60+46 terms) | 5" | Chapront-Touzé & Chapront 19881 | 5000 |
| VSOP87D truncation for Earth/Sun | 13" | Bretagnon & Francou 19882 | 1300 (acts on Sun direction; impacts Moon–Sun elongation only) |
| Nutation IAU 2000A truncated to 50 terms | 0.5 mas | Mathews et al. 20026 | 0.5 |
| Precession IAU 2006 P03 | 0.1 mas | Capitaine et al. 20033 | 0.1 |
| Frame bias | 0.01 mas | IERS Conventions 20104 | 0.01 |
| Annual aberration (first order in v/c) | 0.16 µas | Smith 1980 | negligible |
| Topocentric parallax (Moon) | 5 mas | Meeus 1998 Ch. 478 | 5 |
| Atmospheric refraction (Bennett, h > 15°) | 1" | Bennett 19829 | 1000 |
| Polar motion (xp, yp = 0) | 0.5 mas | IERS Bulletin A12 | 0.5 |
| UT1−UTC snapshot age (1 yr) | up to 5 mas | IERS Bulletin A | 5 |
| ΔT (Espenak & Meeus extrapolation) | 0.5 s ↔ 7" | Espenak & Meeus 20065 | 7000 (dominant outside 1972–present) |
| RSS total (1σ) — lite, present epoch | ~5" | — | ~5000 mas |
| RSS total (1σ) — DE440 + SOFA polyfill, present epoch | ~5 mas | — | ~5 mas |
For the geocentric distance the budget is dominated by ELP-2000/82B truncation (~1 km) plus DE440 ASCII coefficient quantisation when the kernel is used (~10 m). For phase, the relevant quantity is the elongation Moon–Sun, whose uncertainty is at most ~6" in lite mode.
8. Validation
8.1 Against canonical Meeus 1998 worked examples
Meeus's Astronomical Algorithms, 2nd ed., contains a set of worked examples for the Moon, the Sun and the time-scale conversions. Each example is a numerical case with input epoch, expected outputs and quoted residual. The OcaLE test suite (audit/B_test_algorithms.php) reproduces 38 of these examples; at the time of writing the residuals are below 0.5" in apparent direction and below 0.1 km in distance for all 38 cases, well inside the published tolerance.
8.2 Against historical eclipses
Twelve total solar eclipses spanning 1900–2026 (selected from the NASA Espenak Five Millennium Canon database) are used as integration tests. The OcaLE eclipse module produces the start, maximum and end UT times of the umbra event; the test passes when all three are within ±1 minute of the canon. All 12 cases pass at the time of writing.
8.3 Against JPL Horizons
Cross-validation against JPL Horizons for the 2020–2030 window is in progress. A first-pass batch of 1000 random epochs (uniform in JD) shows residuals of approximately 5" in topocentric direction (lite mode) and 1 mas (DE440 + SOFA mode), consistent with the uncertainty budget. The residual log will be published as part of the next versioned release; this entry is currently marked ongoing — to be published.
8.4 Test suite reference
The full validation suite lives in the repository at audit/B_test_algorithms.php (canonical examples), audit/F_test_stress.php (extreme epochs and high-latitude observers) and lua/calculadora-lunar/test_phase11_*.php (phase-by-phase regression). All tests are pure-PHP and run without external dependencies.
9. Limitations
An honest statement of what OcaLE does not do:
- No DE441. Only DE440 is supported as numerical fallback (1550–2650). DE441's extended ranges (−13200 to +17191) require a different kernel format and are out of scope.
- No daily IERS update. DUT1 and Delta-AT are sourced from a per-release snapshot of IERS Bulletin A. The maximum age of the snapshot is approximately one calendar year; the implied position error is up to ~5 mas (Section 7).
- No asteroid perturbations. The four largest asteroids (Ceres, Pallas, Vesta, Hygiea) introduce ~10 µas effects on the Moon's position and are not modelled.
- Truncated nutation. The default nutation series is truncated to the 50 dominant terms (out of 1365), which retains 99.9% of the power. The full series is used only when the SOFA polyfill is loaded.
- No catalog of stars. Only the Moon, the Sun and the five classical planets via VSOP87D are computed. Stellar occultations require the Hipparcos / Gaia catalogue, which is provided only by the parallel
laboratorio/atlastool. - Not real-time. The HTTP request/response lifecycle adds ~50 ms of latency; this is unsuitable for spacecraft navigation. Use NAIF SPICE for that.
- Not for sub-millimetre science. Lunar Laser Ranging, gravitational-wave clock corrections and relativistic geodesy require femtosecond-grade timing and are out of scope.
- No DE440 outside coverage. Requests outside 1550–2650 silently fall back to the lite engine; this is logged in the provenance block.
- No partial date/time computations. A full date+time (or full JD) must be provided; ranges and astropy-style "approximate" inputs are not accepted.
10. Reproducibility
10.1 Permalink format
Every computed result is reachable by a stable URL. The permalink is the canonical tool URL with all non-default inputs included as query-string parameters, sorted lexicographically by key. For example:
https://www.ocalendario.com.br/calculadora-lunar-cientifica?data=2026-04-29&hora=00:00&lat=-15.78&lon=-47.93 &engine_mode=auto&nutation_model=iau2000a&precession_model=iau2006 &refraction_model=bennett&output_frame=j2000
This permalink survives session boundaries and is what the JSON output's self_url field returns.
10.2 Reproducibility hash
The reproducibility hash is a SHA-256 fingerprint of the inputs and the engine identification. It is built from the canonical-sorted list of name=value pairs (URL-decoded UTF-8), separated by line feed (0x0A), with the engine name and version appended on the final line:
canonical_blob =
sort_lex(filter(default_drop(_GET))).join("\n")
+ "\nengine=ocale-lite@" + assets_version
hash = sha256(canonical_blob)
If two requests return the same hash, the underlying numerical computation is guaranteed to be byte-for-byte identical (modulo non-determinism in concurrent IERS snapshots, which is ruled out by the same-version constraint).
10.3 JSON output schema
The JSON output payload (returned by the API and downloadable from the calculator UI) follows a versioned schema. The top-level structure is:
{
"$schema": "https://www.ocalendario.com.br/schema/ocale-output.v1.json",
"version": "81.13.0.0.0",
"inputs": { ... canonical-sorted GET params ... },
"provenance": {
"engine": "ocale-lite",
"engine_version": "81.13.0.0.0",
"models": { "nutation": "iau2000a-truncated", ... },
"iers_snapshot": { "issue_date": "...", "delta_at": 37, "dut1": ... },
"hash": "sha256:..."
},
"time_scales": { "utc": ..., "ut1": ..., "tai": ..., "tt": ..., "tdb": ... },
"moon": { "ra_deg": ..., "dec_deg": ..., "distance_km": ..., ... },
"topocentric": { "az_deg": ..., "alt_deg": ..., ... },
"phase": { "name": "...", "illumination_pct": ..., "age_days": ..., ... },
"uncertainty": { "angular_mas_1sigma": ..., "components": { ... } },
"events": { "next_phases": [...], "next_eclipses": [...], ... },
"self_url": "https://...permalink..."
}
10.4 Versioning policy
The site-wide assets_version field at core/site-config.php follows a five-segment scheme: MAJOR.MINOR.PATCH.BUILD.HOTFIX. Numerical results are guaranteed identical for fixed values of MAJOR.MINOR.PATCH; BUILD increments cover non-scientific patches (CSS, copywriting); HOTFIX covers emergency security or routing patches. Any change that alters a numerical output increments at least PATCH and is recorded in the changelog (Section 13).
11. References (Bibliography)
The list below is APA 7 formatted; each entry has a stable anchor (#bib-*) used by the inline footnote markers in the rest of the document. DOIs are linked when available.
- Chapront-Touze, M., & Chapront, J. (1988). ELP 2000-85: a semi-analytical lunar ephemeris adequate for historical times. Astronomy and Astrophysics, 190(1-2), 342-352.
- Bretagnon, P., & Francou, G. (1988). Planetary theories in rectangular and spherical variables: VSOP87 solution. Astronomy and Astrophysics, 202, 309-315.
- Capitaine, N., Wallace, P. T., & Chapront, J. (2003). Expressions for IAU 2000 precession quantities. Astronomy and Astrophysics, 412(2), 567-586. DOI: https://doi.org/10.1051/0004-6361:20031539.
- Petit, G., & Luzum, B. (Eds.) (2010). IERS Conventions (2010). IERS Technical Note 36, Verlag des Bundesamts fuer Kartographie und Geodaesie.
- Espenak, F., & Meeus, J. (2006). Five Millennium Canon of Solar Eclipses: -1999 to +3000. NASA Technical Publication TP-2006-214141.
- Wahr, J. M. (1981). The forced nutations of an elliptical, rotating, elastic and oceanless Earth. Geophysical Journal of the Royal Astronomical Society, 64(3), 705-727. DOI: https://doi.org/10.1111/j.1365-246X.1981.tb02691.x.
- Park, R. S., Folkner, W. M., Williams, J. G., & Boggs, D. H. (2021). The JPL Planetary and Lunar Ephemerides DE440 and DE441. The Astronomical Journal, 161(3), 105. DOI: https://doi.org/10.3847/1538-3881/abd414.
- Meeus, J. (1998). Astronomical Algorithms (2nd ed.). Willmann-Bell, Richmond, Virginia.
- Bennett, G. G. (1982). The calculation of astronomical refraction in marine navigation. The Journal of Navigation, 35(2), 255-259. DOI: https://doi.org/10.1017/S0373463300022037.
- Saemundsson, T. (1986). Astronomical refraction. Sky and Telescope, 72, 70.
- IAU SOFA Board (2021). IAU SOFA Software Collection: standards of fundamental astronomy. International Astronomical Union, http://www.iausofa.org.
- International Earth Rotation and Reference Systems Service (2024). IERS Bulletin A: rapid service / prediction of UT1-UTC and polar motion. U.S. Naval Observatory, weekly issues, https://www.iers.org.
- Archinal, B. A., A'Hearn, M. F., Bowell, E., Conrad, A., Consolmagno, G. J., Courtin, R., Fukushima, T., Hestroffer, D., Hilton, J. L., Krasinsky, G. A., Neumann, G., Oberst, J., Seidelmann, P. K., Stooke, P., Tholen, D. J., Thomas, P. C., & Williams, I. P. (2011). Report of the IAU Working Group on Cartographic Coordinates and Rotational Elements: 2009. Celestial Mechanics and Dynamical Astronomy, 109(2), 101–135. DOI: https://doi.org/10.1007/s10569-010-9320-4.
- Eckhardt, D. H. (1981). Theory of the libration of the Moon. The Moon and the Planets, 25(1), 3–49. DOI: https://doi.org/10.1007/BF00911807.
- Klioner, S. A. (2003). A practical relativistic model for microarcsecond astrometry in space. The Astronomical Journal, 125(3), 1580–1597. DOI: https://doi.org/10.1086/367593.
- Mathews, P. M., Herring, T. A., & Buffett, B. A. (2002). Modeling of nutation and precession: New nutation series for nonrigid Earth and insights into the Earth's interior. Journal of Geophysical Research, 107(B4), ETG 3-1–ETG 3-26. DOI: https://doi.org/10.1029/2001JB000390.
12. Citation
Three citation formats are provided. The DOI placeholder will be replaced by a Zenodo-issued identifier upon the next versioned release.
12.1 BibTeX
@misc{ocale_81_13_0_0_0,
author = {{ocalendario.com.br Astronomy Project}},
title = {{OcaLE: A Web-Based Lunar Ephemeris Calculator}},
year = {2026},
version = {81.13.0.0.0},
url = {https://www.ocalendario.com.br/calculadora-lunar-cientifica},
howpublished = {Methodology document: \url{https://www.ocalendario.com.br/calculadora-lunar-cientifica/methodology}},
note = {DOI to be assigned via Zenodo upon next release}
}
12.2 APA 7
ocalendario.com.br Astronomy Project. (2026). OcaLE: A Web-Based Lunar Ephemeris Calculator (Version 81.13.0.0.0) [Software]. Methodology document: https://www.ocalendario.com.br/calculadora-lunar-cientifica/methodology. https://www.ocalendario.com.br
12.3 Plain text
ocalendario.com.br Astronomy Project (2026). OcaLE Lunar Ephemeris Calculator, version 81.13.0.0.0. Available at https://www.ocalendario.com.br/calculadora-lunar-cientifica. Methodology: https://www.ocalendario.com.br/calculadora-lunar-cientifica/methodology. DOI: pending Zenodo registration.
13. Changelog
Recent versioned releases (most-recent first). Numerical-result-changing entries are marked [NUMERIC]; pure UI/copy releases are marked [UI].
| Version | Date | Type | Notes |
|---|---|---|---|
81.13.0.0.0 |
2026-04-30 | [UI] | Methodology document published in English at the canonical URL /calculadora-lunar-cientifica/methodology; sitemap, navigation and tool registry updated; hreflang alternates emitted. |
81.8.x.x.x |
2026-04-28 | [NUMERIC] | SOFA polyfill modules under core/astro/sofa/ introduced; CIO-based pipeline available behind a flag; Schwarzschild light deflection added; Lense-Thirring frame dragging added; full IAU 2000A nutation behind polyfill flag. |
81.7.x.x.x |
2026-04-26 | [NUMERIC] | DE440 SPK kernel reader added; engine selection switched to auto by default with kernel detection. |
81.6.x.x.x |
2026-04-22 | [NUMERIC] | IAU 2006 P03 precession adopted as default (replacing IAU 1976 in the lite engine); IAU 2000A nutation truncated to 50 terms made default. |
81.5.x.x.x |
2026-04-15 | [UI] | JPL-Horizons-style qty_* output filters introduced; uncertainty budget card added; reproducibility hash exposed in the JSON output. |
14. Contact / Repository
- Project URL: https://www.ocalendario.com.br/
- Tool URL: https://www.ocalendario.com.br/calculadora-lunar-cientifica
- Methodology document URL (this page): https://www.ocalendario.com.br/calculadora-lunar-cientifica/methodology
- API endpoint:
/api/fases-da-lua-cientifica/v1 - Issue tracker: repository pending public release; in the interim, send reports to the project email.
- Scientific inquiries: contact@ocalendario.com.br
- Source code license (planned): MIT
- Documentation license: CC BY-SA 4.0
A. Glossary of Terms
The terms below are also exposed as a DefinedTermSet in the JSON-LD graph at the top of this page.
- ICRS
- International Celestial Reference System; the kinematically non-rotating reference system aligned with extragalactic radio sources (IAU 1997).
- ICRF
- International Celestial Reference Frame; realisation of ICRS by quasar positions (IERS).
- GCRS
- Geocentric Celestial Reference System; geocentric counterpart of ICRS (IERS Conventions 2010 Section 5.3).
- ITRS
- International Terrestrial Reference System; Earth-fixed, co-rotating frame (IERS Conventions 2010 Chapter 4).
- CIO
- Celestial Intermediate Origin; reference origin used in the new "CIO-based" Earth-rotation transformation (Capitaine 2003).
- CIP
- Celestial Intermediate Pole; instantaneous pole of Earth rotation (IAU 2000).
- ERA
- Earth Rotation Angle; the angle between the CIO and the Terrestrial Intermediate Origin, linear function of UT1.
- UT1
- Universal Time, Earth-rotation-based; differs from UTC by DUT1 (less than 0.9 s by definition).
- TAI
- International Atomic Time; the proper-time scale of the SI second realised at the geoid.
- TT
- Terrestrial Time; TT = TAI + 32.184 s; the independent variable for terrestrial ephemerides.
- TDB
- Barycentric Dynamical Time; differs from TT by periodic terms below ~2 ms.
- Delta-T
- Delta-T = TT - UT1; tabulated by IERS, modelled by Espenak and Meeus 2006 outside the IERS coverage window.
- ELP-2000/82B
- Semi-analytical lunar ephemeris by Chapront-Touze and Chapront (1988); a truncated form (60 longitude + 60 latitude + 46 distance terms) is used in the lite engine.
- VSOP87D
- Planetary theory by Bretagnon and Francou (1988) in heliocentric ecliptic spherical coordinates of date.
- DE440
- JPL Development Ephemeris 440 (Park et al. 2021); covers 1550-2650; used as fallback when the local SPK kernel is available.
- NPB
- Frame-Bias x Precession x Nutation matrix; transforms vectors from GCRS to the true equator and equinox of date.
- IAU 2006 P03
- Precession model of Capitaine, Wallace and Chapront (2003), adopted by the IAU in 2006.
- IAU 2000A
- Nutation model with 1365 luni-solar and planetary terms (Mathews, Herring and Buffett 2002).
- SOFA
- Standards of Fundamental Astronomy: the IAU-endorsed reference implementation of these models.
📧 Found a methodology issue? Want to cite this work?
Email us at rcgwebsites@gmail.com for:
- Errors in algorithm description, equations, or references
- Missing citations or methodology gaps
- Validation data against JPL Horizons / SPICE / Skyfield (we welcome cross-validation reports)
- Citation requests (BibTeX, APA, plaintext blocks above)
- Suggestions for additional algorithmic models (e.g., DE441, asteroid perturbations, IERS daily updates)
We reply within ~5 business days. For peer-review collaboration or independent code audit, please indicate institutional affiliation.