astro/star/parallactic.go
starainrt c8dd777a7b
docs: 统一公开 API 的中英双语注释
- 补齐公开接口说明段的英文描述,保持签名注释和详细说明均为中英双语结构
- 规范农历、坐标、公式、轨道、日晷、太阳、恒星及行星事件等 API 的注释口径
2026-05-27 16:08:11 +08:00

21 lines
694 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package star
import (
"time"
"b612.me/astro/basic"
)
// ParallacticAngle 恒星视差角(天顶方向角) / stellar parallactic angle.
//
// ra/dec 为瞬时赤经赤纬单位度lon/lat 为观测者经纬度,东正西负、北正南负。
// 返回值为有符号视差角,单位度。
// ra/dec are apparent equatorial coordinates in degrees; lon/lat are east-positive and north-positive.
// Returns the signed parallactic angle in degrees.
func ParallacticAngle(date time.Time, ra, dec, lon, lat float64) float64 {
jde := basic.Date2JDE(date)
_, loc := date.Zone()
timezone := float64(loc) / 3600.0
return basic.StarParallacticAngle(jde, ra, dec, lon, lat, timezone)
}