本文へ移動

Hoshi Stars星

肉眼で見える星の名前・色・距離、88星座の線と境界、メシエ天体、そしてそれらを描くための7種類の図法を使えます。

「星」(ほし) は、夜空に光って見えるものです。 名前について(英語)

目次

リファレンス · 自分の空 (場所と時刻から高度と方位)

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

引数

名前型説明
positionSkyPoint

A right ascension and declination in degrees, J2000 or (with equinox: "date") of the date.

observerObserver

Latitude north and longitude east in degrees.

whenWhen

The moment, a Date or milliseconds since 1970.

options (省略可)HorizontalOptions

The same as horizontal.

戻り値

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

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/hoshi-stars 0.7.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。