Documentation / @interstellar-tools/temporal / marsLocalMeanSolarTime
Function: marsLocalMeanSolarTime()
ts
function marsLocalMeanSolarTime(date: Date, longitude: Radians): number;Defined in: mars-time.ts:133
The local mean solar time on Mars at a longitude, in hours: Coordinated Mars Time plus the east longitude in hours, 15° to the hour.
Where:
is the planetocentric east longitude (rad)
Notes
- East longitude, as the IAU gives it for Mars. Mars24 counts west longitude, so 184.702° W there is 175.298° E here.
- It's mean time, by a Sun that moves evenly. The real Sun can be up to about 50 minutes ahead of or behind it.
Parameters
| Parameter | Type | Description |
|---|---|---|
date | Date | The moment, as a UTC Date (on or after 1972-01-01). |
longitude | Radians | The east longitude in radians (finite; any turn). |
Returns
number
The local mean solar time in Mars hours, from 0 up to 24.
Throws
- If
dateis not a validDate, orlongitudeis not a finite number. - If
dateis before 1972-01-01.
Example
ts
const DEG = Math.PI / 180;
// Spirit's site, at local midnight on Earth's clock: 00:51 mean time
marsLocalMeanSolarTime(
new Date('2004-01-03T13:46:31Z'),
(175.298 * DEG) as Radians
); // ≈ 0.8519 h