Documentation ¶
Overview ¶
Moon: Chapter 53, Ephemeris for Physical Observations of the Moon.
Incomplete. Topocentric functions are commented out for lack of test data.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Physical ¶
Physical returns quantities useful for physical observation of the Moon.
Returned l, b are librations in selenographic longitude and latitude. They represent combined optical and physical librations. Topocentric librations are not considered.
Returned P is the the position angle of the Moon's axis of rotation.
Returned l0, b0 are the selenographic coordinates of the Sun.
Example ¶
package main import ( "fmt" "github.com/soniakeys/meeus/v3/julian" "github.com/soniakeys/meeus/v3/moon" pp "github.com/soniakeys/meeus/v3/planetposition" ) func main() { 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
func SunAltitude ¶
SunAltitude returns altitude of the Sun above the lunar horizon.
Arguments η, θ are selenographic longitude and latitude of a site on the Moon, l0, b0 are selenographic coordinates of the Sun, as returned by Physical(), for example.
Example ¶
package main import ( "fmt" "github.com/soniakeys/meeus/v3/julian" "github.com/soniakeys/meeus/v3/moon" pp "github.com/soniakeys/meeus/v3/planetposition" "github.com/soniakeys/unit" ) func main() { 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
func Sunrise ¶
Sunrise returns time of sunrise for a point on the Moon near the given date.
Arguments η, θ are selenographic longitude and latitude of a site on the Moon, jde can be any date.
Returned is the time of sunrise as a jde nearest the given jde.
Example ¶
package main import ( "fmt" "time" "github.com/soniakeys/meeus/v3/julian" "github.com/soniakeys/meeus/v3/moon" pp "github.com/soniakeys/meeus/v3/planetposition" "github.com/soniakeys/unit" ) func main() { earth, err := pp.LoadPlanet(pp.Earth) if err != nil { fmt.Println(err) return } j0 := julian.CalendarGregorianToJD(1992, 4, 15) j := moon.Sunrise( unit.AngleFromDeg(-20), unit.AngleFromDeg(9.7), j0, earth) y, m, d := julian.JDToCalendar(j) fmt.Printf("%d %s %.4f TD\n", y, time.Month(m), d) }
Output: 1992 April 11.8069 TD
Types ¶
This section is empty.