func ExamplePhaseAngleEq2() { i := moonillum.PhaseAngleEq2( unit.RAFromDeg(134.6885), unit.AngleFromDeg(13.7684), unit.RAFromDeg(20.6579), unit.AngleFromDeg(8.6964)) k := base.Illuminated(i) fmt.Printf("k = %.4f\n", k) // Output: // k = 0.6775 }
func ExampleLimb() { // Example 48.a, p. 347. χ := base.Limb( unit.RAFromDeg(134.6885), unit.AngleFromDeg(13.7684), unit.RAFromDeg(20.6579), unit.AngleFromDeg(8.6964)) fmt.Printf("χ = %.1f\n", χ.Deg()) // Output: // χ = 285.0 }
func ExamplePhaseAngleEq() { i := moonillum.PhaseAngleEq( unit.RAFromDeg(134.6885), unit.AngleFromDeg(13.7684), 368410, unit.RAFromDeg(20.6579), unit.AngleFromDeg(8.6964), 149971520) fmt.Printf("i = %.4f\n", i.Deg()) // Output: // i = 69.0756 }
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) }
func ExampleTopocentric() { // Example 40.a, p. 280 α, δ := parallax.Topocentric( 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("α' = %.2d\n", sexa.FmtRA(α)) fmt.Printf("δ' = %.1d\n", sexa.FmtAngle(δ)) // Output: // α' = 22ʰ38ᵐ8ˢ.54 // δ' = -15°46′30″.0 }
func ExampleTopocentric3() { // same test case as example 40.a, p. 280 α := unit.RAFromDeg(339.530208) δ := unit.AngleFromDeg(-15.771083) Δ := .37276 ρsφʹ := .546861 ρcφʹ := .836339 L := unit.Angle(unit.NewHourAngle(' ', 7, 47, 27)) jde := julian.CalendarGregorianToJD(2003, 8, 28+ unit.NewTime(' ', 3, 17, 0).Day()) Hʹ, δʹ := parallax.Topocentric3(α, δ, Δ, ρsφʹ, ρcφʹ, L, jde) fmt.Printf("Hʹ = %.2d\n", sexa.FmtHourAngle(Hʹ)) θ0 := sidereal.Apparent(jde) αʹ := unit.RAFromRad(θ0.Rad() - L.Rad() - Hʹ.Rad()) // same result as example 40.a, p. 280 fmt.Printf("αʹ = %.2d\n", sexa.FmtRA(αʹ)) fmt.Printf("δʹ = %.1d\n", sexa.FmtAngle(δʹ)) // Output: // Hʹ = -4ʰ44ᵐ50ˢ.28 // αʹ = 22ʰ38ᵐ8ˢ.54 // δʹ = -15°46′30″.0 }