Exemple #1
0
func ExamplePosition() {
	// Example 57.1, p. 398
	M := binary.M(1980, 1934.008, 41.623)
	fmt.Printf("M = %.3f\n", M*180/math.Pi)
	E, err := kepler.Kepler1(.2763, M, 6)
	if err != nil {
		fmt.Println(err)
		return
	}
	θ, ρ := binary.Position(.907, .2763, 59.025*math.Pi/180,
		23.717*math.Pi/180, 219.907*math.Pi/180, E)
	fmt.Printf("θ = %.1f\n", θ*180/math.Pi)
	fmt.Printf("ρ = %.3f\n", ρ)
	// Output:
	// M = 37.788
	// θ = 318.4
	// ρ = 0.411
}
Exemple #2
0
func ExamplePosition() {
	// Example 57.a, p. 398
	M := binary.M(1980, 1934.008, 41.623)
	fmt.Printf("M = %.3f\n", M.Deg())
	E, err := kepler.Kepler1(.2763, M, 4)
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Printf("E = %.3f\n", E.Deg())
	θ, ρ := binary.Position(.2763, unit.AngleFromSec(.907),
		unit.AngleFromDeg(59.025), unit.AngleFromDeg(23.717),
		unit.AngleFromDeg(219.907), E)
	fmt.Printf("θ = %.1f\n", θ.Deg())
	fmt.Printf("ρ = %.3f\n", ρ.Sec())
	// Output:
	// M = 37.788
	// E = 49.896
	// θ = 318.4
	// ρ = 0.411
}