Documentation
¶
Overview ¶
DeltaT: Chapter 10, Dynamical Time and Universal Time.
Functions in this package compute ΔT for various ranges of dates.
ΔT = TD - UT.
TD = "Dynamical Time", which is related to:
ET "Ephermis Time", an older term. TDB "Barycentric Dynamical Time", very close to TD. TDT "Terrestrial Dynamical Time", a more correct term. TT "Terrestrial Time", a newer and more correct term.
UT = "Universal Time", which is related (if ambiguously) to GMT "Greenwich Mean Time".
The return value for all functions is ΔT in seconds.
Index ¶
- func Interp10A(jde float64) (ΔT unit.Time)
- func Poly1800to1899(jde float64) (ΔT unit.Time)
- func Poly1800to1997(jde float64) (ΔT unit.Time)
- func Poly1900to1997(jde float64) (ΔT unit.Time)
- func Poly948to1600(year float64) (ΔT unit.Time)
- func PolyAfter2000(year float64) (ΔT unit.Time)
- func PolyBefore948(year float64) (ΔT unit.Time)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Interp10A ¶
Interp10A returns ΔT at a date, accurate from years 1620 to 2010. 根据上述观测数据,对于1620年至2018年之间的ΔT进行插值计算
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/deltat"
"github.com/mooncaker816/learnmeeus/v3/julian"
)
func main() {
// Example 10.a, p. 78.
dt := deltat.Interp10A(julian.CalendarGregorianToJD(1977, 2, 18))
fmt.Printf("%+.1f seconds\n", dt)
}
Output: +47.6 seconds
func Poly1800to1899 ¶
Poly1800to1899 returns a polynomial approximation of ΔT valid for years 1800 to 1899.
The accuracy is within 0.9 seconds. 1800至1899ΔT经验公式,最大误差0.9秒
func Poly1800to1997 ¶
Poly1800to1997 returns a polynomial approximation of ΔT valid for years 1800 to 1997.
The accuracy is within 2.3 seconds. 1800至1997ΔT经验公式,最大误差2.3秒
func Poly1900to1997 ¶
Poly1900to1997 returns a polynomial approximation of ΔT valid for years 1900 to 1997.
The accuracy is within 0.9 seconds. 1900至1997ΔT经验公式,最大误差0.9秒
Example ¶
package main
import (
"fmt"
"time"
"github.com/mooncaker816/learnmeeus/v3/base"
"github.com/mooncaker816/learnmeeus/v3/deltat"
"github.com/mooncaker816/learnmeeus/v3/julian"
)
func main() {
// Example 10.a, p. 78.
jd := julian.TimeToJD(time.Date(1977, 2, 18, 3, 37, 40, 0, time.UTC))
year := base.JDEToJulianYear(jd)
fmt.Printf("julian year %.1f\n", year)
fmt.Printf("%+.1f seconds\n", deltat.Poly1900to1997(jd))
}
Output: julian year 1977.1 +47.1 seconds
func Poly948to1600 ¶
Poly948to1600 returns a polynomial approximation of ΔT valid for calendar years 948 to 1600. +984年至1600年的ΔT推算公式
func PolyAfter2000 ¶
PolyAfter2000 returns a polynomial approximation of ΔT valid for calendar years after 2000. 2000年以后的ΔT推算公式
func PolyBefore948 ¶
PolyBefore948 returns a polynomial approximation of ΔT valid for calendar years before 948. +948年之前的ΔT推算公式
Example ¶
// Example 10.b, p. 80.
ΔT := deltat.PolyBefore948(333.1)
UT := unit.TimeFromHour(6)
TD := UT + ΔT
fmt.Printf("%+.0f seconds\n", ΔT)
fmt.Printf("333 February 6 at %m TD", sexa.FmtTime(TD))
Output: +6146 seconds 333 February 6 at 7ʰ42ᵐ TD
Types ¶
This section is empty.