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