Пример #1
0
func ExampleSunAltitude() {
	j := julian.CalendarGregorianToJD(1992, 4, 12)
	earth, err := pp.LoadPlanet(pp.Earth)
	if err != nil {
		fmt.Println(err)
		return
	}
	_, _, _, l0, b0 := moon.Physical(j, earth)
	h := moon.SunAltitude(-20*math.Pi/180, 9.7*math.Pi/180, l0, b0)
	fmt.Printf("%+.3f\n", h*180/math.Pi)
	// Output:
	// +2.318
}
Пример #2
0
func ExampleSunAltitude() {
	j := julian.CalendarGregorianToJD(1992, 4, 12)
	earth, err := pp.LoadPlanet(pp.Earth)
	if err != nil {
		fmt.Println(err)
		return
	}
	_, _, _, l0, b0 := moon.Physical(j, earth)
	h := moon.SunAltitude(
		unit.AngleFromDeg(-20), unit.AngleFromDeg(9.7), l0, b0)
	fmt.Printf("%+.3f\n", h.Deg())
	// Output:
	// +2.318
}
Пример #3
0
func ExamplePhysical() {
	j := julian.CalendarGregorianToJD(1992, 4, 12)
	earth, err := pp.LoadPlanet(pp.Earth)
	if err != nil {
		fmt.Println(err)
		return
	}
	l, b, P, l0, b0 := moon.Physical(j, earth)
	fmt.Printf("l = %.2f\n", l.Deg())
	fmt.Printf("b = %+.2f\n", b.Deg())
	fmt.Printf("P = %.2f\n", P.Deg())
	fmt.Printf("l0 = %.2f\n", l0.Deg())
	fmt.Printf("b0 = %+.2f\n", b0.Deg())
	// Output:
	// l = -1.23
	// b = +4.20
	// P = 15.08
	// l0 = 67.90
	// b0 = +1.46
}