Reference · Your sky: altitude and azimuth for a place and a moment
Horizontaltype
Where a star or a planet is in your sky: degrees above the horizon (negative below it) and degrees round from north through east.
Import it
import type { Horizontal } from "@johnmorrisdotca/hoshi-stars/sky";
Definition
interface Horizontal {
altitude: number;
azimuth: number;
}
Members
| Name | Type | Description |
|---|---|---|
altitude | number | Degrees above the horizon, -90 (straight down) to 90 (the zenith). Negative means below the horizon. |
azimuth | number | Degrees from north through east: 0 north, 90 east, 180 south, 270 west. 0 up to but not including 360; 0 at the zenith and nadir, where it has no meaning. |
Examples
import type { Horizontal } from "@johnmorrisdotca/hoshi-stars/sky";
const view: Horizontal = { altitude: 45, azimuth: 90 };
console.log(view.altitude, view.azimuth); // 45 degrees up, due east45 90What it prints (run when this page was built)