Documentation / @interstellar-tools/equations / subsolarPoint
Function: subsolarPoint()
ts
function subsolarPoint(
model: IauRotationModelInterface,
sunDirection: Vector3DTupleType,
date: Date
): PlanetocentricPointInterface;Defined in: cartography/subsolar-point.ts:81
The subsolar point: where on a body the Sun is overhead, from its IAU rotation model and the direction from the body to the Sun.
The direction is turned into the body-fixed frame by bodyOrientation's matrix,
Notes
- Any direction will do: the direction to Earth gives the sub-Earth point, the centre of the disk a telescope sees.
- The latitude is planetocentric, from the body's centre. Maps of Mars use planetographic latitudes, which are a little further from the equator on a flattened body: −25.23° where this gives −24.98°.
- The longitude is east, around the model's pole. Mars's maps also count west, which is
. - The axes of
sunDirectionare the ICRF's. Light time is the caller's to apply: the Sun moves little in the minutes its light takes.
Parameters
| Parameter | Type | Description |
|---|---|---|
model | IauRotationModelInterface | The body's IAU rotation model, for example body.rotation.iau from a dataset. |
sunDirection | Vector3DTupleType | The direction from the body to the Sun in the ICRF, of any length. |
date | Date | The moment, as a UTC Date, on or after 1972-01-01. |
Returns
The planetocentric latitude and east longitude where the Sun is overhead.
Throws
- If
dateis not a validDate. - If
sunDirectionis zero or not finite,dateis before 1972-01-01, or the model gives an angle that isn't finite.
Example
ts
import { PLANETS } from '@interstellar-tools/constants';
const mars = PLANETS.find((planet) => planet.id === 'mars')!;
const date = new Date('2000-01-06T00:00:00Z');
// From Mars to the Sun: minus Mars's place around the Sun
const { r } = stateAt(mars.orbit!, date);
const point = subsolarPoint(mars.rotation!.iau!, [-r[0], -r[1], -r[2]], date); // ≈ { latitude: -24.98, longitude: 185.27 }, 174.73° westSee
- bodyOrientation, for the matrix.
- https://www.giss.nasa.gov/tools/mars24/help/algorithm.html NASA GISS's Mars24 algorithm and worked examples