func ExampleEclipticPrecessor_ReduceElements() { // Example 24.a, p. 160. ele := &elementequinox.Elements{ Inc: 47.122 * math.Pi / 180, Peri: 151.4486 * math.Pi / 180, Node: 45.7481 * math.Pi / 180, } JFrom := base.JDEToJulianYear(base.BesselianYearToJDE(1744)) JTo := base.JDEToJulianYear(base.BesselianYearToJDE(1950)) p := precess.NewEclipticPrecessor(JFrom, JTo) p.ReduceElements(ele, ele) fmt.Printf("i = %.4f\n", ele.Inc*180/math.Pi) fmt.Printf("Ω = %.4f\n", ele.Node*180/math.Pi) fmt.Printf("ω = %.4f\n", ele.Peri*180/math.Pi) // Output: // i = 47.1380 // Ω = 48.6037 // ω = 151.4782 }
func ExampleEclipticPrecessor_ReduceElements() { // Example 24.a, p. 160. ele := &elementequinox.Elements{ Inc: unit.AngleFromDeg(47.122), Peri: unit.AngleFromDeg(151.4486), Node: unit.AngleFromDeg(45.7481), } JFrom := base.JDEToJulianYear(base.BesselianYearToJDE(1744)) JTo := base.JDEToJulianYear(base.BesselianYearToJDE(1950)) p := precess.NewEclipticPrecessor(JFrom, JTo) p.ReduceElements(ele, ele) fmt.Printf("i = %.4f\n", ele.Inc.Deg()) fmt.Printf("Ω = %.4f\n", ele.Node.Deg()) fmt.Printf("ω = %.4f\n", ele.Peri.Deg()) // Output: // i = 47.1380 // Ω = 48.6037 // ω = 151.4782 }