Fix what the review of this branch found, starting with the pick rule it only claimed
The off-screen rule for clicks was described in 3f0abf8 and in the pull request, but only its
comment was committed: pickAt still let the slop reach past the frame. The mutant that was said
to catch it matched nothing, and an unrelated flaky test failed instead. The frame test is now in
pickAt, before the slop, and its test fails without it (star at NDC 1.01, click at 0.995).
Venus, Uranus and Pluto turned forwards: Horizons states a retrograde spin twice, by a negative
rate and by an obliquity over 90 degrees, and both were applied. The period's sign is now used
only when no obliquity is known. Measured on the live markers, spin axis against orbit normal is
cos(obliquity) for each: Venus -0.999, Uranus -0.135, Pluto -0.494, Earth 0.917.
Moons listed as rates rather than "Synchronous" drifted about 5 degrees an orbit and Titan did not
turn: every moon is now locked at its Kepler period. Pluto's obliquity comes from IAU WGCCRE 2015,
Horizons gives none.
Also:
- the star's light is white at pi, not a warm 2.2 that left the photographs dim;
- procedural textures are 128x64, not 512x256 that froze the main thread ~60 ms a body;
- Io, Pluto, Titan and Deimos lose their "maps", which were disc photographs with black sky;
- an exoplanet with only a mass gets a radius from it (M^0.55, capped at Jupiter), not Earth's;
- the clock knows when it has left the present even once back at real time, so the date and
"Back to now" stay up.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,11 @@ interface BodySpec {
|
||||
horizonsCommand: string;
|
||||
center: string;
|
||||
parentBodyId?: string;
|
||||
/**
|
||||
* Obliquity to orbit, in degrees, where the Horizons page states none. Pluto's is from the IAU
|
||||
* WGCCRE 2015 pole (RA 132.99, Dec -6.16), 119.6 degrees: past 90, so it turns retrograde.
|
||||
*/
|
||||
obliquityDeg?: number;
|
||||
}
|
||||
|
||||
// Sun-centered planets/dwarf, then their major moons (planetocentric elements).
|
||||
@@ -28,7 +33,7 @@ const BODY_SPECS: BodySpec[] = [
|
||||
{ id: 'saturn', name: 'Saturn', kind: 'planet', horizonsCommand: '699', center: '500@10' },
|
||||
{ id: 'uranus', name: 'Uranus', kind: 'planet', horizonsCommand: '799', center: '500@10' },
|
||||
{ id: 'neptune', name: 'Neptune', kind: 'planet', horizonsCommand: '899', center: '500@10' },
|
||||
{ id: 'pluto', name: 'Pluto', kind: 'dwarf', horizonsCommand: '999', center: '500@10' },
|
||||
{ id: 'pluto', name: 'Pluto', kind: 'dwarf', horizonsCommand: '999', center: '500@10', obliquityDeg: 119.6 },
|
||||
{ id: 'moon', name: 'Moon', kind: 'moon', horizonsCommand: '301', center: '500@399', parentBodyId: 'earth' },
|
||||
{ id: 'phobos', name: 'Phobos', kind: 'moon', horizonsCommand: '401', center: '500@499', parentBodyId: 'mars' },
|
||||
{ id: 'deimos', name: 'Deimos', kind: 'moon', horizonsCommand: '402', center: '500@499', parentBodyId: 'mars' },
|
||||
@@ -60,9 +65,12 @@ export async function fetchSolarSystem(): Promise<BodyRecord[]> {
|
||||
console.warn(` no physical radius found for ${spec.name}; defaulting to 0.`);
|
||||
}
|
||||
|
||||
// A tidally locked moon's day is its orbit, which Horizons states as a word rather than a
|
||||
// number: Kepler gives the period from the elements just parsed and the parent it goes round.
|
||||
const rotationPeriodHours = result.tidallyLocked
|
||||
// Every moon listed here is tidally locked, so its day is its orbit — as drawn, from these
|
||||
// elements and the parent's mass by Kepler. Not every page says so: the Moon's gives a rate,
|
||||
// the true sidereal month, 1.4% off the orbit these elements trace, so its face drifted five
|
||||
// degrees an orbit; Titan's gives nothing, so it did not turn. Taking the orbit keeps one face
|
||||
// towards the parent, which is what synchronous means.
|
||||
const rotationPeriodHours = result.tidallyLocked || spec.kind === 'moon'
|
||||
? orbitalPeriodDays(result.orbit.semiMajorAxisAu, gmForParent(spec.parentBodyId)) * HOURS_PER_DAY
|
||||
: result.rotationPeriodHours;
|
||||
if (rotationPeriodHours === undefined) {
|
||||
@@ -78,7 +86,7 @@ export async function fetchSolarSystem(): Promise<BodyRecord[]> {
|
||||
orbit: result.orbit,
|
||||
...(spec.parentBodyId ? { parentBodyId: spec.parentBodyId } : {}),
|
||||
...(rotationPeriodHours !== undefined ? { rotationPeriodHours } : {}),
|
||||
...(result.obliquityDeg !== undefined ? { obliquityDeg: result.obliquityDeg } : {})
|
||||
...((result.obliquityDeg ?? spec.obliquityDeg) !== undefined ? { obliquityDeg: result.obliquityDeg ?? spec.obliquityDeg } : {})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user