Print Earth's inclination as 0.00 degrees, not -0.00

Standish's Table 2a fits the Earth-Moon barycentre's inclination as -0.00054346 degrees, and the
card printed toFixed(2) of it: "Inclination -0.00°", where the branch's base read 0.00. A negative
inclination is the same orbit as its size with the node turned half round, so the card prints the
size. The elements the map propagates are left as Standish gives them. The live Earth page now
reads "INCLINATION 0.00°".

Control: printing the fitted sign again fails "prints the size of an inclination fitted below
zero".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-29 19:11:56 +02:00
co-authored by Claude Opus 5.5
parent 395b613f82
commit 86d97b903e
2 changed files with 9 additions and 1 deletions
@@ -43,7 +43,9 @@ export function bodyReadouts(body: BodyDetailViewModel): BodyReadouts {
measured.push({ label: 'Eccentricity', value: body.orbit.eccentricity.toFixed(3) });
}
if (body.orbit.inclinationDeg !== undefined) {
measured.push({ label: 'Inclination', value: `${body.orbit.inclinationDeg.toFixed(2)}°` });
// Its size: Standish fits Earth's as -0.00054 degrees, which is the same orbit as +0.00054 with
// the node half a turn round, and printed as it stands read "-0.00°".
measured.push({ label: 'Inclination', value: `${Math.abs(body.orbit.inclinationDeg).toFixed(2)}°` });
}
// The period sits under whichever heading its provenance calls for. Same number, same field —
// a published period is an observation and a computed one is not.
@@ -68,6 +68,12 @@ describe('buildBodyViewModel', () => {
expect(model?.orbitalPeriodDays).toBeCloseTo(27.32166, 5);
});
it('prints the size of an inclination fitted below zero, as the same orbit with its node turned half round', () => {
const tilted: BodyRecord = { ...earth, orbit: orbit({ inclinationDeg: -0.00054346 }) };
const model = buildBodyViewModel('earth', { ...catalogues, bodies: [tilted] })!;
expect(bodyReadouts(model).measured.find((row) => row.label === 'Inclination')?.value).toBe('0.00°');
});
it('says where the orbit comes from, in the card’s provenance', () => {
expect(bodyReadouts(buildBodyViewModel('luna', catalogues)!).provenance).toContain('Orbit: JPL SSD satellite mean elements, epoch 2000 Jan 1.');
});