Documentation
¶
Overview ¶
Moonillum: Chapter 48, Illuminated Fraction of the Moon's Disk
Also see functions Illuminated and Limb in package base. The function for computing illuminated fraction given a phase angle (48.1) is base.Illuminated. Formula (48.5) is implemented as base.Limb.
Index ¶
- func PhaseAngle3(jde float64) unit.Angle
- func PhaseAngleEcl(λ, β unit.Angle, Δ float64, λ0 unit.Angle, R float64) unit.Angle
- func PhaseAngleEcl2(λ, β, λ0 unit.Angle) unit.Angle
- func PhaseAngleEq(α unit.RA, δ unit.Angle, Δ float64, α0 unit.RA, δ0 unit.Angle, R float64) unit.Angle
- func PhaseAngleEq2(α unit.RA, δ unit.Angle, α0 unit.RA, δ0 unit.Angle) unit.Angle
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PhaseAngle3 ¶
PhaseAngle3 computes the phase angle of the Moon given a julian day.
Less accurate than PhaseAngle functions taking coordinates.
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/base"
"github.com/mooncaker816/learnmeeus/v3/julian"
"github.com/mooncaker816/learnmeeus/v3/moonillum"
)
func main() {
i := moonillum.PhaseAngle3(julian.CalendarGregorianToJD(1992, 4, 12))
k := base.Illuminated(i)
fmt.Printf("i = %.2f\n", i.Deg())
fmt.Printf("k = %.4f\n", k)
}
Output: i = 68.88 k = 0.6801
func PhaseAngleEcl ¶
PhaseAngleEcl computes the phase angle of the Moon given ecliptic coordinates.
Arguments λ, β, Δ are geocentric longitude, latitude, and distance to the Moon; λ0, R are longitude and distance to the Sun. Distances must be in the same units as each other.
func PhaseAngleEcl2 ¶
PhaseAngleEcl2 computes the phase angle of the Moon given ecliptic coordinates.
Less accurate than PhaseAngleEcl.
Arguments λ, β are geocentric longitude and latitude of the Moon; λ0 is longitude of the Sun.
func PhaseAngleEq ¶
func PhaseAngleEq(α unit.RA, δ unit.Angle, Δ float64, α0 unit.RA, δ0 unit.Angle, R float64) unit.Angle
PhaseAngleEQ computes the phase angle of the Moon given equatorial coordinates.
Arguments α, δ, Δ are geocentric right ascension, declination, and distance to the Moon; α0, δ0, R are coordinates of the Sun. Angles must be in radians. Distances must be in the same units as each other.
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/moonillum"
"github.com/soniakeys/unit"
)
func main() {
i := moonillum.PhaseAngleEq(
unit.RAFromDeg(134.6885),
unit.AngleFromDeg(13.7684),
368410,
unit.RAFromDeg(20.6579),
unit.AngleFromDeg(8.6964),
149971520)
fmt.Printf("i = %.4f\n", i.Deg())
}
Output: i = 69.0756
func PhaseAngleEq2 ¶
PhaseAngleEQ2 computes the phase angle of the Moon given equatorial coordinates.
Less accurate than PhaseAngleEq.
Arguments α, δ are geocentric right ascension and declination of the Moon; α0, δ0 are coordinates of the Sun.
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/base"
"github.com/mooncaker816/learnmeeus/v3/moonillum"
"github.com/soniakeys/unit"
)
func main() {
i := moonillum.PhaseAngleEq2(
unit.RAFromDeg(134.6885),
unit.AngleFromDeg(13.7684),
unit.RAFromDeg(20.6579),
unit.AngleFromDeg(8.6964))
k := base.Illuminated(i)
fmt.Printf("k = %.4f\n", k)
}
Output: k = 0.6775
Types ¶
This section is empty.