deltat

package
v3.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2018 License: MIT Imports: 4 Imported by: 0

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

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Interp10A

func Interp10A(jde float64) (ΔT unit.Time)

Interp10A returns ΔT at a date, accurate from years 1620 to 2010.

Example
package main

import (
	"fmt"

	"github.com/soniakeys/meeus/v3/deltat"
	"github.com/soniakeys/meeus/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

func Poly1800to1899(jde float64) (ΔT unit.Time)

Poly1800to1899 returns a polynomial approximation of ΔT valid for years 1800 to 1899.

The accuracy is within 0.9 seconds.

func Poly1800to1997

func Poly1800to1997(jde float64) (ΔT unit.Time)

Poly1800to1997 returns a polynomial approximation of ΔT valid for years 1800 to 1997.

The accuracy is within 2.3 seconds.

func Poly1900to1997

func Poly1900to1997(jde float64) (ΔT unit.Time)

Poly1900to1997 returns a polynomial approximation of ΔT valid for years 1900 to 1997.

The accuracy is within 0.9 seconds.

Example
package main

import (
	"fmt"
	"time"

	"github.com/soniakeys/meeus/v3/base"
	"github.com/soniakeys/meeus/v3/deltat"
	"github.com/soniakeys/meeus/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

func Poly948to1600(year float64) (ΔT unit.Time)

Poly948to1600 returns a polynomial approximation of ΔT valid for calendar years 948 to 1600.

func PolyAfter2000

func PolyAfter2000(year float64) (ΔT unit.Time)

PolyAfter2000 returns a polynomial approximation of ΔT valid for calendar years after 2000.

func PolyBefore948

func PolyBefore948(year float64) (ΔT unit.Time)

PolyBefore948 returns a polynomial approximation of ΔT valid for calendar years before 948.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL