You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
astro/earth/earth.go

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))
}