Ejemplo n.º 1
0
func ExampleESmart() {
	// Example 28.b, p. 185
	eq := eqtime.ESmart(julian.CalendarGregorianToJD(1992, 10, 13))
	fmt.Printf("+%.7f rad\n", eq)
	fmt.Printf("%+.1d", base.NewFmtHourAngle(eq))
	// Output:
	// +0.0598256 rad
	// +13ᵐ42ˢ.7
}
Ejemplo n.º 2
0
func ExampleE() {
	// Example 28.a, p. 184
	earth, err := pp.LoadPlanet(pp.Earth, "")
	if err != nil {
		fmt.Println(err)
		return
	}
	j := julian.CalendarGregorianToJD(1992, 10, 13)
	eq := eqtime.E(j, earth)
	fmt.Printf("%+.1d", base.NewFmtHourAngle(eq))
	// Output:
	// +13ᵐ42ˢ.6
}
Ejemplo n.º 3
0
func ExampleApproxAnnualPrecession() {
	// Example 21.a, p. 132.
	eq := &coord.Equatorial{
		base.NewRA(10, 8, 22.3).Rad(),
		base.NewAngle(false, 11, 58, 2).Rad(),
	}
	epochFrom := 2000.0
	epochTo := 1978.0
	Δα, Δδ := precess.ApproxAnnualPrecession(eq, epochFrom, epochTo)
	fmt.Printf("%+.3d\n", base.NewFmtHourAngle(Δα.Rad()))
	fmt.Printf("%+.2d\n", base.NewFmtAngle(Δδ.Rad()))
	// Output:
	// +3ˢ.207
	// -17″.71
}