func ExampleTopocentric2() { // Example 40.a, p. 280 Δα, Δδ := parallax.Topocentric2(339.530208*math.Pi/180, -15.771083*math.Pi/180, .37276, .546861, .836339, base.NewHourAngle(false, 7, 47, 27).Rad(), julian.CalendarGregorianToJD(2003, 8, 28+(3+17./60)/24)) fmt.Printf("Δα = %.2f sec of RA\n", Δα*180/math.Pi*60*60/15) fmt.Printf("Δδ = %.1f sec\n", Δδ*180/math.Pi*60*60) // Output: // Δα = 1.29 sec of RA // Δδ = -14.1 sec }
func ExampleTopocentric2() { // Example 40.a, p. 280 Δα, Δδ := parallax.Topocentric2( unit.RAFromDeg(339.530208), unit.AngleFromDeg(-15.771083), .37276, .546861, .836339, unit.Angle(unit.NewHourAngle(' ', 7, 47, 27)), julian.CalendarGregorianToJD(2003, 8, 28+ unit.NewTime(' ', 3, 17, 0).Day())) fmt.Printf("Δα = %.2s (sec of RA)\n", sexa.FmtHourAngle(Δα)) fmt.Printf("Δδ = %.1s (sec of Dec)\n", sexa.FmtAngle(Δδ)) // Output: // Δα = 1.29ˢ (sec of RA) // Δδ = -14.1″ (sec of Dec) }