astro/earth/earth.go
2020-07-14 15:38:51 +08:00

15 lines
274 B
Go

package earth
import (
"time"
"b612.me/astro/basic"
)
// EarthEccentricity 地球偏心率
// 返回date对应UTC时间的地球偏心率
func EarthEccentricity(date time.Time) float64 {
jde := basic.Date2JDE(date.UTC())
return basic.Earthe(basic.TD2UT(jde, true))
}