リファレンス · 同じものを suncalc 1 の約束 (ラジアン、南からの方位) で
getMoonPosition関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The Moon's place in the sky, as suncalc 1 gave it: the altitude includes refraction.
インポート
import { getMoonPosition } from "@johnmorrisdotca/wakusei-planets/suncalc/legacy";
定義
function getMoonPosition(date: Date | number, lat: number, lng: number): LegacyMoonPosition
引数
| 名前 | 型 | 説明 |
|---|---|---|
date | number | Date | The moment. |
lat | number | Degrees north. |
lng | number | Degrees east. |
戻り値
LegacyMoonPosition
The azimuth and altitude in radians, the distance in kilometres and the parallactic angle in radians.
例
import { getMoonPosition } from "@johnmorrisdotca/wakusei-planets/suncalc/legacy";
const { distance } = getMoonPosition(new Date(Date.UTC(2026, 10, 7, 12)), 35.7, 139.7);
console.log(Math.round(distance / 1000));392出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。