Reference · Your sky: altitude and azimuth for a place and a moment
greenwichSiderealTimefunction
The Greenwich mean sidereal time: how far the Earth has turned against the stars, as the right ascension on the meridian of Greenwich, in degrees (Meeus 12.4, the IAU 1982 expression). It uses UT, which is UTC to under a second, and is the mean time, without the nutation term (at most about 1.1 seconds of time, 17 arc-seconds).
Import it
import { greenwichSiderealTime } from "@johnmorrisdotca/hoshi-stars/sky";
Definition
function greenwichSiderealTime(when: When): number
Parameters
| Name | Type | Description |
|---|---|---|
when | When | The moment, a |
Returns
number
Degrees, 0 up to but not including 360. Divide by 15 for hours.
Examples
import { greenwichSiderealTime } from "@johnmorrisdotca/hoshi-stars/sky";
// Meeus example 12.a: 1987 April 10 at 0h UT is 13h10m46.3668s, 197.693195 degrees
console.log(greenwichSiderealTime(Date.UTC(1987, 3, 10)).toFixed(6));197.693195What it prints (run when this page was built)