新增函数&修复bug

This commit is contained in:
2020-07-14 15:38:51 +08:00
parent 08fcbf9f89
commit 1c4397c9dc
12 changed files with 526 additions and 551 deletions
+6 -6
View File
@@ -1,14 +1,14 @@
package earth
import (
"time"
"b612.me/astro/basic"
)
/*
地球偏心率
jde, utc世界时
*/
func EarthEccentricity(jde float64) float64 {
// EarthEccentricity 地球偏心率
// 返回date对应UTC时间的地球偏心率
func EarthEccentricity(date time.Time) float64 {
jde := basic.Date2JDE(date.UTC())
return basic.Earthe(basic.TD2UT(jde, true))
}