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:
@@ -43,7 +43,9 @@ export function bodyReadouts(body: BodyDetailViewModel): BodyReadouts {
|
|||||||
measured.push({ label: 'Eccentricity', value: body.orbit.eccentricity.toFixed(3) });
|
measured.push({ label: 'Eccentricity', value: body.orbit.eccentricity.toFixed(3) });
|
||||||
}
|
}
|
||||||
if (body.orbit.inclinationDeg !== undefined) {
|
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 —
|
// 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.
|
// 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);
|
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', () => {
|
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.');
|
expect(bodyReadouts(buildBodyViewModel('luna', catalogues)!).provenance).toContain('Orbit: JPL SSD satellite mean elements, epoch 2000 Jan 1.');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user