Reference · The realistic Earth's pure parts
subsolarPointfunction
The point where the Sun is at the zenith at ms: latitude is the Sun's declination, longitude runs west at 15 degrees an hour.
Import it
import { subsolarPoint } from "@johnmorrisdotca/chikyu-earth/realistic";
Definition
function subsolarPoint(ms: number): GeoPoint
Parameters
| Name | Type | Description |
|---|---|---|
ms | number | A moment, in milliseconds since the Unix epoch. |
Returns
GeoPoint
The longitude and latitude on the Earth that has the Sun straight overhead.
Examples
import { subsolarPoint } from "@johnmorrisdotca/chikyu-earth/realistic";
const sun = subsolarPoint(Date.UTC(2026, 5, 21, 12));
console.log(sun.lat.toFixed(1), sun.lon.toFixed(1));23.4 0.5What it prints (run when this page was built)