Пример #1
0
func ExampleEllipticAscending() {
	// Example 39.a, p. 276
	t, r := node.EllipticAscending(17.9400782, .96727426,
		111.84644*math.Pi/180,
		julian.CalendarGregorianToJD(1986, 2, 9.45891))
	y, m, d := julian.JDToCalendar(t)
	fmt.Printf("%d %s %.2f\n", y, time.Month(m), d)
	fmt.Printf("%.4f AU\n", r)
	// Output:
	// 1985 November 9.16
	// 1.8045 AU
}
Пример #2
0
func ExampleEllipticAscending_venus() {
	// Example 39.c, p. 278
	var k elementplanet.Elements
	elementplanet.Mean(elementplanet.Venus,
		julian.CalendarGregorianToJD(1979, 1, 1), &k)
	t, _ := node.EllipticAscending(k.Axis, k.Ecc,
		k.Peri-k.Node,
		perihelion.Perihelion(perihelion.Venus, 1979))
	y, m, d := julian.JDToCalendar(t)
	fmt.Printf("%d %s %.3f\n", y, time.Month(m), d)
	// Output:
	// 1978 November 27.409
}