SkyBody型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One body to draw over the stars: a planet, the Moon, a dwarf planet. Everything is given by the page (this package computes no positions).
phase is the lit fraction of the disc, 0 (new, dark) to 1 (full, or a planet with no visible phase). A body drawn as a disc (the Moon, always; any other whose disc is 4 pixels wide or more) shows it:
the lit part is a crescent below 0.5 and gibbous above. brightLimb says on which side it is lit.
インポート
import type { SkyBody } from "@johnmorrisdotca/hoshi-stars/chart";
定義
interface SkyBody {
id: string;
names: SkyBodyNames;
ra: number;
dec: number;
magnitude: number;
phase: number;
brightLimb?: number | undefined;
size?: number | undefined;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | string | What a pick says it was ( |
names | SkyBodyNames | The name written beside it, in English and in Japanese; the chart's language chooses. |
ra | number | Where, in degrees: right ascension 0 to 360 and declination -90 to 90 (J2000, the frame the stars are in). A body whose number is not finite is not drawn. |
dec | number | |
magnitude | number | The apparent visual magnitude (the Moon's is about -12.7 when full, Venus's about -4, Mars's 1.8 at its faintest). A body fainter than the chart's magnitude setting (5), made fainter by 2.5 for each tenfold of zoom as a telescope does, is left out. |
phase | number | The lit fraction of the disc, 0 to 1. A value outside it is held to it; one that is not a number counts as 1 (full). |
brightLimb (省略可) | number | undefined | Where the lit side is: the position angle of the middle of the bright limb in degrees, measured from celestial north through east (the Almanac's convention; 90 is east, the side of the next star to rise). When left out, the lit side is the right of the chart. |
size (省略可) | number | undefined | The apparent diameter in arc-seconds. Left out, the body is a dot sized by its magnitude like a star; given, the disc is drawn at its true size where that is bigger than the dot. |
例
import type { SkyBody } from "@johnmorrisdotca/hoshi-stars/chart";
const moon: SkyBody = { id: "moon", names: { en: "Moon", ja: "月" }, ra: 83.2, dec: 21.4, magnitude: -11.7, phase: 0.25, brightLimb: 250, size: 1860 };
console.log(moon.names.en, moon.phase);
// Moon 0.25Moon 0.25出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。