Documentation / @interstellar-tools/equations / trueAnomalyAt
Function: trueAnomalyAt()
ts
function trueAnomalyAt(
orbit: Pick<OrbitInterface, 'e' | 'angle' | 'period'>,
date: Date
): Radians;Defined in: anomalies/anomaly-at.ts:86
The true anomaly (
Takes the mean anomaly at date from meanAnomalyAt, solves Kepler's equation with solveKepler, and converts the result with eccentricToTrueAnomaly.
Parameters
| Parameter | Type | Description |
|---|---|---|
orbit | Pick<OrbitInterface, "e" | "angle" |
date | Date | The date to find the body at. |
Returns
The true anomaly at date, in
Throws
If date is not a valid Date.
Throws
If the orbit's eccentricity is outside
Example
ts
import { PLANETS } from '@interstellar-tools/constants';
import { trueAnomalyAt } from '@interstellar-tools/equations';
const earth = PLANETS.find((planet) => planet.id === 'earth')!;
trueAnomalyAt(earth.orbit!, new Date('2026-10-17T12:00:00Z')); // ≈ 4.901 rad (280.8°)