2026-05-01 22:38:44 +08:00
|
|
|
|
package star
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
"b612.me/astro/basic"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// ParallacticAngle 恒星视差角(天顶方向角) / stellar parallactic angle.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ra/dec 为瞬时赤经赤纬,单位度;lon/lat 为观测者经纬度,东正西负、北正南负。
|
|
|
|
|
|
// 返回值为有符号视差角,单位度。
|
2026-05-27 16:08:11 +08:00
|
|
|
|
// ra/dec are apparent equatorial coordinates in degrees; lon/lat are east-positive and north-positive.
|
|
|
|
|
|
// Returns the signed parallactic angle in degrees.
|
2026-05-01 22:38:44 +08:00
|
|
|
|
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)
|
|
|
|
|
|
}
|