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>
43 lines
1.5 KiB
TypeScript
43 lines
1.5 KiB
TypeScript
/**
|
|
* Osculating Keplerian orbital elements at a reference epoch. Positions are derived
|
|
* client-side by propagating these elements forward/backward from `epochJd` (see
|
|
* `shared/astro/kepler.ts`), rather than fetching per-frame positions.
|
|
*/
|
|
export interface OrbitalElements {
|
|
semiMajorAxisAu: number;
|
|
eccentricity: number;
|
|
inclinationDeg: number;
|
|
longitudeOfAscendingNodeDeg: number;
|
|
argumentOfPeriapsisDeg: number;
|
|
meanAnomalyAtEpochDeg: number;
|
|
epochJd: number;
|
|
}
|
|
|
|
/**
|
|
* A solar-system planet, moon, or dwarf planet, sourced from JPL Horizons/SSD orbital
|
|
* elements. `systemStarId` links back to the HYG star index (the Sun, see `SUN_STAR_ID`).
|
|
*/
|
|
export interface BodyRecord {
|
|
id: string;
|
|
systemStarId: number;
|
|
name: string;
|
|
kind: 'planet' | 'moon' | 'dwarf';
|
|
radiusKm: number;
|
|
orbit: OrbitalElements;
|
|
/**
|
|
* For `kind: 'moon'`, the `id` of the planet it orbits — its `orbit` is expressed
|
|
* relative to that planet, not heliocentrically. Undefined for planets/dwarfs.
|
|
*/
|
|
parentBodyId?: string;
|
|
/**
|
|
* How the body turns on its own axis: the sidereal rotation period in hours, negative where
|
|
* Horizons gives a negative rate (Venus, Uranus), and the tilt of that axis from its orbital
|
|
* plane — which past 90 degrees already says the turn is retrograde.
|
|
*
|
|
* Absent where Horizons publishes neither — the view then leaves the body still rather than
|
|
* spinning it at an invented rate.
|
|
*/
|
|
rotationPeriodHours?: number;
|
|
obliquityDeg?: number;
|
|
}
|