コード例 #1
0
ファイル: solar_test.go プロジェクト: thecc4re/meeus
func ExampleApparentLongitude() {
	// Example 25.a, p. 165.
	T := base.J2000Century(julian.CalendarGregorianToJD(1992, 10, 13))
	fmt.Println("λ:", sexa.NewFmtAngle(solar.ApparentLongitude(T)))
	// Output:
	// λ: 199°54′32″
}
コード例 #2
0
ファイル: moonillum_test.go プロジェクト: thecc4re/meeus
func TestPhaseAngleEcl2(t *testing.T) {
	j := julian.CalendarGregorianToJD(1992, 4, 12)
	λ, β, _ := moonposition.Position(j)
	λ0 := solar.ApparentLongitude(base.J2000Century(j))
	i := moonillum.PhaseAngleEcl2(λ, β, λ0)
	k := base.Illuminated(i)
	ref := .6775
	if math.Abs(k-ref) > 1e-4 {
		t.Errorf("k = %.4f", k)
	}
}
コード例 #3
0
ファイル: moonillum_test.go プロジェクト: thecc4re/meeus
func TestPhaseAngleEcl(t *testing.T) {
	j := julian.CalendarGregorianToJD(1992, 4, 12)
	λ, β, Δ := moonposition.Position(j)
	T := base.J2000Century(j)
	λ0 := solar.ApparentLongitude(T)
	R := solar.Radius(T) * base.AU
	i := moonillum.PhaseAngleEcl(λ, β, Δ, λ0, R)
	ref := 69.0756 * math.Pi / 180
	if math.Abs((i-ref)/ref) > 1e-4 {
		t.Errorf("i = %.4f", i*180/math.Pi)
	}
}