planetary

package
v3.0.0-...-8217f41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Planetary: Chapter 36, The Calculation of some Planetary Phenomena.

Incomplete: Some functions unimplemented for lack of test data.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func JupiterConj

func JupiterConj(y float64) (jde float64)

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

func JupiterOpp(y float64) (jde float64)

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

func MarsOpp(y float64) (jde float64)

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

func MarsStation2(y float64) (jde float64)
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

func MercuryEastElongation(y float64) (jde float64, elongation unit.Angle)

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

func MercuryInfConj(y float64) (jde float64)

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

func MercurySupConj(y float64) (jde float64)

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

func MercuryWestElongation(y float64) (jde float64, elongation unit.Angle)

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

func NeptuneConj(y float64) (jde float64)

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

func NeptuneOpp(y float64) (jde float64)

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

func SaturnConj(y float64) (jde float64)

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

func SaturnOpp(y float64) (jde float64)

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

func UranusConj(y float64) (jde float64)

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

func UranusOpp(y float64) (jde float64)

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

func VenusInfConj(y float64) (jde float64)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL