Documentation / @interstellar-tools/temporal / marsSolDate
Function: marsSolDate()
ts
function marsSolDate(date: Date): number;Defined in: mars-time.ts:54
The Mars Sol Date of a moment: a continuous count of sols, Mars's mean solar days, like the Julian date for Earth.
Where:
is the Julian date in Terrestrial Time (days) is the sol in Earth days, MARS_SOL_DAYS
Notes
- The count starts on 29 December 1873, at about noon in Greenwich.
- Each new sol begins at mean midnight at Airy-0, when coordinatedMarsTime wraps to 0.
- From NASA GISS's Mars24 algorithm, refined from Allison & McEwen (2000).
Parameters
| Parameter | Type | Description |
|---|---|---|
date | Date | The moment, as a UTC Date (on or after 1972-01-01). |
Returns
number
The Mars Sol Date in sols.
Throws
- If
dateis not a validDate. - If
dateis before 1972-01-01, where TT isn't defined from the leap seconds.
Example
ts
marsSolDate(new Date('2000-01-06T00:00:00Z')); // ≈ 44 795.99976