Reference · Your sky: altitude and azimuth for a place and a moment
HorizontalOptionstype
How to read the position and whether to bend the light.
Import it
import type { HorizontalOptions } from "@johnmorrisdotca/hoshi-stars/sky";
Definition
interface HorizontalOptions {
equinox?: "J2000" | "date";
refraction?: boolean;
pressureHpa?: number;
temperatureC?: number;
}
Members
| Name | Type | Description |
|---|---|---|
equinox (optional) | "J2000" | "date" | undefined |
|
refraction (optional) | boolean | undefined | True to lift the altitude by the air's bending of light (Saemundsson's formula, Meeus 16.4): about 0.48 degrees at the horizon, 0.02 at 45 degrees up. Default false, the geometric altitude. Not applied below -1 degree, where the formula stops being true. |
pressureHpa (optional) | number | undefined | Air pressure in hectopascals for the refraction; default 1010 (a standard sea-level day). Only used with |
temperatureC (optional) | number | undefined | Air temperature in degrees Celsius for the refraction; default 10. Only used with |
Examples
import type { HorizontalOptions } from "@johnmorrisdotca/hoshi-stars/sky";
const options: HorizontalOptions = { refraction: true, pressureHpa: 900, temperatureC: -5 };
console.log(options.refraction);trueWhat it prints (run when this page was built)