isAboveHorizon関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Whether a position is above the horizon of a place at a moment (altitude greater than 0). With refraction: true it counts the bending of the light, so a star can be seen a little below the geometric horizon.
インポート
import { isAboveHorizon } from "@johnmorrisdotca/hoshi-stars/sky";
定義
function isAboveHorizon(position: SkyPoint, observer: Observer, when: When, options?: HorizontalOptions): boolean
引数
| 名前 | 型 | 説明 |
|---|---|---|
position | SkyPoint | A right ascension and declination in degrees, J2000 or (with |
observer | Observer | Latitude north and longitude east in degrees. |
when | When | The moment, a |
options (省略可) | HorizontalOptions | The same as |
戻り値
boolean
True when it is up.
例
import { starByName, starPosition } from "@johnmorrisdotca/hoshi-stars";
import { isAboveHorizon } from "@johnmorrisdotca/hoshi-stars/sky";
// Polaris never sets for anyone in the northern hemisphere
const polaris = starPosition(starByName("Polaris")!);
console.log(isAboveHorizon(polaris, { latitude: 49.28, longitude: -123.12 }, Date.now()));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。