Documentation
¶
Overview ¶
Planetary: Chapter 36, The Calculation of some Planetary Phenomena.
Incomplete: Some functions unimplemented for lack of test data.
Index ¶
- func JupiterConj(y float64) (jde float64)
- func JupiterOpp(y float64) (jde float64)
- func MarsOpp(y float64) (jde float64)
- func MarsStation2(y float64) (jde float64)
- func MercuryEastElongation(y float64) (jde float64, elongation unit.Angle)
- func MercuryInfConj(y float64) (jde float64)
- func MercurySupConj(y float64) (jde float64)
- func MercuryWestElongation(y float64) (jde float64, elongation unit.Angle)
- func NeptuneConj(y float64) (jde float64)
- func NeptuneOpp(y float64) (jde float64)
- func SaturnConj(y float64) (jde float64)
- func SaturnOpp(y float64) (jde float64)
- func UranusConj(y float64) (jde float64)
- func UranusOpp(y float64) (jde float64)
- func VenusInfConj(y float64) (jde float64)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JupiterConj ¶
JupiterConj returns the time of an conjunction of Jupiter. 计算木星的冲日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
func JupiterOpp ¶
JupiterOpp returns the time of an opposition of Jupiter. 计算木星的冲日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
func MarsOpp ¶
MarsOpp returns the time of an opposition of Mars. 计算火星的冲日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
func MarsStation2 ¶
Example ¶
package main
import (
"fmt"
"math"
"time"
"github.com/mooncaker816/learnmeeus/v3/julian"
"github.com/mooncaker816/learnmeeus/v3/planetary"
)
func main() {
// Example 36.d, p. 254
j := planetary.MarsStation2(1997.3)
fmt.Printf("%.3f\n", j)
y, m, df := julian.JDToCalendar(j)
d, f := math.Modf(df)
fmt.Printf("%d %s %d, at %dʰ\n", y, time.Month(m), int(d), int(f*24+.5))
}
Output: 2450566.255 1997 April 27, at 18ʰ
func MercuryEastElongation ¶
MercuryEastElongation returns the time and elongation of a greatest eastern elongation of Mercury. 水星最大东角距
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
func MercuryInfConj ¶
MercuryInfConj returns the time of an inferior conjunction of Mercury. 计算水星的下合日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
Example ¶
package main
import (
"fmt"
"math"
"time"
"github.com/mooncaker816/learnmeeus/v3/julian"
"github.com/mooncaker816/learnmeeus/v3/planetary"
)
func main() {
// Example 36.a, p. 252
j := planetary.MercuryInfConj(1993.75)
fmt.Printf("%.3f\n", j)
y, m, df := julian.JDToCalendar(j)
d, f := math.Modf(df)
fmt.Printf("%d %s %d, at %dʰ\n", y, time.Month(m), int(d), int(f*24+.5))
}
Output: 2449297.645 1993 November 6, at 3ʰ
func MercurySupConj ¶
MercurySupConj returns the time of a superior conjunction of Mercury. 计算水星的上合日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
func MercuryWestElongation ¶
MercuryWestElongation returns the time and elongation of a greatest western elongation of Mercury. 水星最大西角距
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
Example ¶
// Example 36.c, p. 253
j, e := planetary.MercuryWestElongation(1993.9)
fmt.Printf("%.2f\n", j)
y, m, df := julian.JDToCalendar(j)
d, f := math.Modf(df)
fmt.Printf("%d %s %d, at %dʰ\n", y, time.Month(m), int(d), int(f*24+.5))
fmt.Printf("%.4f deg\n", e.Deg())
fmt.Printf("%m\n", sexa.FmtAngle(e))
Output: 2449314.14 1993 November 22, at 15ʰ 19.7506 deg 19°45′
func NeptuneConj ¶
NeptuneConj returns the time of an conjunction of Neptune. 计算海王星的冲日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
func NeptuneOpp ¶
NeptuneOpp returns the time of an opposition of Neptune. 计算海王星的冲日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
func SaturnConj ¶
SaturnConj returns the time of a conjunction of Saturn. 计算土星的合日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
Example ¶
package main
import (
"fmt"
"math"
"time"
"github.com/mooncaker816/learnmeeus/v3/julian"
"github.com/mooncaker816/learnmeeus/v3/planetary"
)
func main() {
// Example 36.b, p. 252
j := planetary.SaturnConj(2125.5)
fmt.Printf("%.3f\n", j)
y, m, df := julian.JDToCalendar(j)
d, f := math.Modf(df)
fmt.Printf("%d %s %d, at %dʰ\n", y, time.Month(m), int(d), int(f*24+.5))
}
Output: 2497437.904 2125 August 26, at 10ʰ
func SaturnOpp ¶
SaturnOpp returns the time of an opposition of Saturn. 计算土星的冲日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
func UranusConj ¶
UranusConj returns the time of an conjunction of Uranus. 计算天王星的合日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
func UranusOpp ¶
UranusOpp returns the time of an opposition of Uranus. 计算天王星的冲日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
func VenusInfConj ¶
VenusInfConj returns the time of an inferior conjunction of Venus. 计算金星的下合日
Result is time (as a jde) of the event nearest the given time (as a decimal year.)
Types ¶
This section is empty.