airmassfunction
The airmass of the line of sight at an altitude, by Kasten and Young (1989): 1 at the zenith, 2 at 30 degrees, about 38 at the horizon. Good to the horizon, which a plane-parallel secant is not.
Import it
import { airmass } from "@johnmorrisdotca/hoshi-stars/tonight";
Definition
function airmass(altitude: number): number
Parameters
| Name | Type | Description |
|---|---|---|
altitude | number | Degrees above the horizon, 0 to 90. |
Returns
number
The airmass.
Examples
import { airmass } from "@johnmorrisdotca/hoshi-stars/tonight";
console.log(airmass(90).toFixed(1), airmass(30).toFixed(1)); // 1.0 2.01.0 2.0What it prints (run when this page was built)