Reference · Your sky: altitude and azimuth for a place and a moment
localSiderealTimefunction
The local mean sidereal time: the right ascension that is on your meridian, due south or north of you, in degrees. A star with this right ascension is crossing the meridian.
Import it
import { localSiderealTime } from "@johnmorrisdotca/hoshi-stars/sky";
Definition
function localSiderealTime(when: When, longitude: number): number
Parameters
| Name | Type | Description |
|---|---|---|
when | When | The moment, a |
longitude | number | Degrees east of Greenwich (west is negative). Any finite number. |
Returns
number
Degrees, 0 up to but not including 360.
Examples
import { localSiderealTime } from "@johnmorrisdotca/hoshi-stars/sky";
// Greenwich's 197.693195 degrees at 0h UT, 1987 April 10, and Washington is 77.07 degrees west of it
console.log(localSiderealTime(Date.UTC(1987, 3, 10), -77.0656).toFixed(3)); // 120.628120.628What it prints (run when this page was built)