Skip to content

Pr c completeness#1702

Open
Wiljea wants to merge 5 commits into
c3d:devfrom
Wiljea:pr-c-completeness
Open

Pr c completeness#1702
Wiljea wants to merge 5 commits into
c3d:devfrom
Wiljea:pr-c-completeness

Conversation

@Wiljea

@Wiljea Wiljea commented Jun 1, 2026

Copy link
Copy Markdown

constants: Completeness — masses, ωrot, WGS-84/GPS, calendar years

C1. Add computed masses M_id = GM_id/G for the 9 planets + Moon (after each
GM_id; copy of the M☉ pattern; relative uncertainty = ⓇG). Sun already has
M☉. Same commit: matching constants.md.
C2. Add ωrot_id = 2π/Prot_id for the 9 planets + Moon + Sun (after each Prot_id;
unit r/s). ♀ ⛢ ♇ are retrograde → minus sign on the VALUE only (the
uncertainty uses the positive magnitude). Same commit: matching constants.md.
C3. At the end of Astronomy/Earth: the WGS-84/GPS reference block (a♁GPS, f♁GPS,
ω♁GPS, GM♁GPS, e12♁GPS, e22♁GPS — DEFINED/exact, uncertainty 0; the two
eccentricities are computed from f♁GPS) and the three years (Ytrop♁, YJul♁,
YGreg♁). INSERTION POINT: immediately after the last existing constant of
the Astronomy/Earth section (after e♁, the orbital eccentricity), before
the next section header (Astronomy/Moon). Same commit: constants.md text
distinguishing them from Porb♁ (years) and from the ORBITAL eccentricity e♁
(the GPS ei2 are ellipsoid eccentricities, a different quantity) — see the
year note below.

constants.md YEAR note (for C3): Porb♁ = anomalistic year (perihelion-to-
perihelion, 365.2657 d; the one T0 uses). Ytrop♁ = tropical/seasonal year
(365.24219 d). YJul♁ = Julian year (365.25 d, exact; defines the light-year).
YGreg♁ = Gregorian mean year (365.2425 d, exact). The sidereal year (365.25636 d)
exists but is not stored.

@Wiljea

Wiljea commented Jun 3, 2026

Copy link
Copy Markdown
Author

Commit de suivi 0c75a51 — arrondi des constantes calculées d'Astronomy

J'ai ajouté un commit qui aligne l'arrondi de deux constantes calculées sur le patron utilisé pour Ⓒε₀ (incertitude absolue arrondie à 2 chiffres significatifs, valeur centrale arrondie à la même position décimale) :

ωrot (×11) — l'incertitude absolue était calculée via UBASE(...), qui convertit les r/s en tours/s (facteur ×2π) et produisait une incertitude erronée et bruitée. Corrigé en arrondissant directement en r/s (sans UBASE), avec une amplitude positive même pour les rotations rétrogrades. Ex. : Ⓢωrot♁ = 8.8×10⁻¹⁴ r/s (2 c.s.).
f♁ / f♃ — la formule d'arrondi dégénérait (XPON(UVAL(0)) = −1) quand l'incertitude relative des entrées est nulle, faisant tomber la valeur à 0 (et f♃ à 0.06). Comme Req/Rp sont des valeurs nominales exactes (IAU 2015, sans incertitude), f est exact par convention : j'arrondis donc à un nombre fixe de chiffres significatifs. Résultat : f♁ = 0.0033396, f♃ = 0.064874, incertitude 0.
Tests (selon le processus prévu) : db48x -Tcstlib → 0 échec ; db48x -Tall → seuls les échecs flaky préexistants, identiques à la branche dev (clavier/types/éditeur en mode headless), aucun nouvel échec.

Wiljea and others added 5 commits June 15, 2026 13:32
Add the mass `M` for the nine planets and the Moon, inserted after each `GM`,
mirroring the existing solar mass `M`. Each mass is computed as `GM/G`; since the
gravitational constant `G` dominates the uncertainty, the relative uncertainty is
carried as `RG`, so every mass self-corrects whenever `G` is updated.

Documentation (constants.md) travels with the code: one `### M<body>` entry per
body, citing the body's `GM` source and the gravitational constant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the sidereal rotation angular velocity `wrot` for the nine planets, the Moon
and the Sun, inserted after each `Prot`, mirroring the existing computed-constant
pattern. Each is `2*pi/Prot`, expressed in radians per second (`r/s`), with the
relative uncertainty carried from `Prot`.

Retrograde rotators (Venus, Uranus, Pluto) carry a minus sign on the value only;
the uncertainty uses the positive magnitude so it stays positive.

Documentation (constants.md) travels with the code: one `### wrot<body>` entry
per body, noting the retrograde sign where applicable and citing the same source
as the corresponding rotation period.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Append to the Astronomy/Earth section:
 - the WGS-84 / GPS defining constants of the reference ellipsoid used by GPS
   (equatorial radius, flattening, nominal angular velocity, gravitational
   parameter including the atmosphere) plus the first and second eccentricities
   squared computed from the flattening. All exact by definition (uncertainty 0).
 - the three years: tropical (seasonal), Julian (exact, defines the light-year)
   and Gregorian mean (exact).

Documentation (constants.md) travels with the code and explicitly distinguishes:
 - the WGS-84 ellipsoid eccentricities from the orbital eccentricity e;
 - the nominal WGS-84 angular velocity / GM from the sidereal wrot and IAU GM;
 - Porb (anomalistic year, used by T0) from the tropical/Julian/Gregorian years.

References: a new named reference [WGS-84] (NGA standard) is added rather than a
numbered one, to avoid colliding with numbered references introduced on other
in-flight branches; the years cite the existing time-scales reference [24].

Note: the second-eccentricity constant name uses an ASCII apostrophe (e'GPS); to
be confirmed against a build that the constant name parser accepts it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Building the simulator surfaced two issues in the previous two commits:

- wrot evaluated to "Inconsistent units": 2*pi/Prot is dimensionless per second
  (1/s), which does not convert to r/s because the radian is a distinct unit in
  DB48x. Multiply by 1_r, parenthesised as (2*pi*1_r)/Prot so the radian is not
  absorbed into a compound "r/..." unit, yielding r/s. Affects all 11 wrot
  entries (planets, Moon, Sun); retrograde bodies keep the leading minus.

- The WGS-84 eccentricity constants could not be referenced: the superscript in
  the names parses as the square operator (and an apostrophe as an algebraic
  quote). Rename to e12GPS (first eccentricity squared) and e22GPS (second), and
  update the internal reference. The superscript used as a postfix operator on a
  value (e.g. f^2) is unchanged.

Verified on the simulator: M (5.972e24 kg), wrot (Earth +7.292e-5 r/s, Venus
negative = retrograde), e12 (0.0066944) and e22 (0.0067395), the rest of the
WGS-84 block and the calendar years all evaluate correctly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…h/jupiter)

Two rounding defects in computed Astronomy constants, both verified on the
simulator (-Tcstlib "built-in constants parsing" = 0 failures):

- wrot (all 11 bodies): the absolute uncertainty was rounded *after* UBASE,
  which expresses r/s in the angular base unit turn/s (x 1/2pi); converting the
  rounded value back to r/s multiplied by 2pi and destroyed the 2-significant-
  figure rounding. Round directly in r/s instead, keeping the positive
  magnitude (so retrograde bodies still get a positive uncertainty).
  Now e.g. wrot-earth absolute uncertainty = 8.8e-14 r/s (2 s.f.).

- f-earth and f-jupiter (oblateness): computed from EXACT (IAU nominal) radii,
  so their relative uncertainty is 0; the uncertainty-driven rounding then
  degenerated (XPON(UVAL(0)) = -1 => round to 0 significant figures), collapsing
  f-earth to 0 and f-jupiter to 0.06. As the inputs are exact, round to a fixed
  5 significant figures (the precision of the radii): f-earth = 0.0033396,
  f-jupiter = 0.064874.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Wiljea Wiljea force-pushed the pr-c-completeness branch from 9d4d9de to 3bbd48d Compare June 15, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant