Pr a orbital#1700
Conversation
|
There are several variables, not constants, depending on DateTime. Perhaps an equation or a library function is more appropriate. |
|
You're right that some of these T₀ entries are functions of time rather than true constants — they evaluate the most-recent perihelion/perigee passage relative to the current date, so they do read DateTime. The general capability doesn't depend on that, though: PeriSel (and the planetary IFTE) take the epoch as an argument, so any date can be queried directly — e.g. 2463241.5 PeriSel → 2463244.8307 (2032-01-13) with no clock change. PeriSel now ships as a library function (.48s), as you suggested. |
|
Updated:
On your earlier point that several |
|
@Wiljea @evgaster I am OK with the idea of putting quasi-constants or "evolving constants" into the constants.cc file. It would be a bit weird to move them to the library at this point since there is no astronomy section there. Technically, library items and constants use the exact same underlying mechanism. |
Add `Porb` (mean orbital period, stored in seconds) for the nine planets, inserted right after each `Prot` (rotation period) so the two periods sit together. Absolute and relative uncertainties are 0: the value seeds the upcoming `T0` perihelion computation (IFTE), where the uncertainty field plays no role. This makes the orbital period a first-class constant and disambiguates it from the rotation period `Prot`, which were previously easy to conflate. Documentation (doc/calc-help/constants.md) travels with the code: - one `### Porb<body>` entry per planet, placed next to `### T0<body>`; - Materials 22 (Meeus) extended to cite Chapter 38 (planetary perihelion); - Materials 23 added: NASA Planetary Fact Sheet (giant-planet periods). Sources: inner planets (Mercury-Mars) from Meeus ch.38 cross-checked against JPL Horizons [M22][23]; giant planets (Jupiter-Pluto) from the NASA Planetary Fact Sheet [M23]. Note: the stored value is a mean orbital period; perihelion passages strictly recur at the slightly different anomalistic period. The residual is absorbed in the minute-level tolerance of `T0` and is documented in constants.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace each planet's static `T0` date with an expression that returns the most recent perihelion passage at or before the current date. The expression advances from a per-body reference passage (Tp) by whole orbital periods (`Porb<body>`, added in the previous commit), computes in Julian Day Number to avoid unit/type traps, and wraps the result in `JDN->` so the constant still presents as a date. This turns T0 from a value that goes stale into one that tracks "now": recalling `T0` always yields the body's latest perihelion rather than a fixed date. The orbital period is read as `UVAL(CONVERT(CPorb<body>;1_d))` (magnitude in days) and the current instant as `JDN(DateTime)`. (UVAL is used rather than an inline `->Num`, which is not safe as an algebraic function inside a stored constant.) Conventions: - "most recent perihelion at or before now" for all bodies, EXCEPT Neptune. - Neptune is a deliberate exception: its true last perihelion (~1876) is uninformative, so Tp is the NEXT perihelion (2042-09-04); the floor-IFTE returns it unchanged, giving the useful upcoming date. - Uranus/Pluto can return a passage decades in the past (long periods); this is expected and documented. Sources: Tp for Mercury-Uranus from Meeus ch.38 [M22]; Neptune and Pluto from documented dates / JPL DE440 [M21]. Documentation (constants.md) updated to match. Verified on the simulator: T0 of Mercury evaluates to 2026-05-17 (most recent perihelion before today) and Neptune to 2042-09-03/04 (the intended exception). Reservation (see constants.md): `Porb` is a mean orbital period while perihelion passages strictly recur at the anomalistic period; the residual stays within the minute-level tolerance of T0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nties Porb♃/♄/⛢: replace the sidereal NASA value with the anomalistic perigee-to-perigee interval computed from Meeus ch.38 (Materials 22) — the period that actually governs the IFTE-stepped T₀ recurrence (374360783 / 928565359 / 2658520424 s). ♆/♇ stay sidereal (Materials 23). Documentation updated for the three refined Porb. T₀ (all nine planets): set the measured absolute uncertainty |actual - IFTE| over 1950-2100 (☿0.0080 ♀0.11 ♁0.83 ♂0.16 ♃8.9 ♄17 ⛢40 ♆10 ♇5 days) in place of the placeholder 0. These date-valued constants recall normally; only their value±uncertainty (date+duration) range form errors, pending a separate 'date ± duration range' fix. Verified: db48x -Tcstlib, 392 tests, 0 failures. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5c52436 to
15e3636
Compare
constants: Planetary orbital periods (Porb) and live perihelion T₀ (IFTE)
A1. Add Porb (orbital period, _s) for the 9 PLANETS, after each Prot.
Absolute uncertainty 0. Same commit: matching constants.md (refs M38/PFS).
A2. Replace each planet T0 with the IFTE seeded by Tp, output _date via
JDN→ (operator confirmed). One parameterized formula, not nine; reads
ⒸPorb. Same commit: matching constants.md (refs M38/EPH) + the Neptune
convention note. Depends on A1 (clean form reads Porb).