本文へ移動

Hoshi Stars星

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

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

目次

リファレンス · 星・天体・位置の近くにあるもの (空と宇宙で)、隣り合う星座

NearestTarget型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

Where a query starts: a star, a deep-sky object, a name starByName or deepSkyObject (the Messier objects) finds, or a point in J2000 degrees. A point may carry lightYears to be used with by: "space". A point in space is { x, y, z } in parsecs on the J2000 equatorial axes with the Sun at the origin (x toward right ascension 0, z toward the north pole), like the star browser of a planetarium; it works by angle too, as the direction from the Sun.

インポート

import type { NearestTarget } from "@johnmorrisdotca/hoshi-stars/nearest";

定義

type NearestTarget = Star | NearbyStar | DeepSkyObject | string | {
    rightAscension: number;
    declination: number;
    lightYears?: number;
} | {
    x: number;
    y: number;
    z: number;
};

例

import { nearest, type NearestTarget } from "@johnmorrisdotca/hoshi-stars/nearest";

const target: NearestTarget = { rightAscension: 83.8, declination: -5.4 };
console.log(nearest(target, { count: 1 })[0]?.thing.name);
undefined

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

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

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