parallax

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: 4 Imported by: 0

Documentation

Overview

Parallax: Chapter 40, Correction for Parallax.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Horizontal

func Horizontal(Δ float64) (π unit.Angle)

Horizontal returns equatorial horizontal parallax of a body. 赤道地平视差

Argument Δ is distance in AU.

Meeus mentions use of this function for the Moon, Sun, planet, or comet. That is, for relatively distant objects. For parallax of the Moon (or other relatively close object) see moonposition.Parallax.

Example
// Example 40.a, p. 280
π := parallax.Horizontal(.37276)
fmt.Printf("%.3s", sexa.FmtAngle(π))
Output:

23.592″

func Topocentric

func Topocentric(α unit.RA, δ unit.Angle, Δ, ρsφʹ, ρcφʹ float64, L unit.Angle, jde float64) (αʹ unit.RA, δʹ unit.Angle)

Topocentric returns topocentric positions including parallax.

Arguments α, δ are geocentric right ascension and declination in radians. Δ is distance to the observed object in AU. ρsφʹ, ρcφʹ are parallax constants (see package globe.) L is geographic longitude of the observer, jde is time of observation.

Results are observed topocentric ra and dec in radians.

Example
// Example 40.a, p. 280
α, δ := parallax.Topocentric(
	unit.RAFromDeg(339.530208),
	unit.AngleFromDeg(-15.771083),
	.37276, .546861, .836339,
	unit.Angle(unit.NewHourAngle(' ', 7, 47, 27)),
	julian.CalendarGregorianToJD(2003, 8, 28+
		unit.NewTime(' ', 3, 17, 0).Day()))
fmt.Printf("α' = %.2d\n", sexa.FmtRA(α))
fmt.Printf("δ' = %.1d\n", sexa.FmtAngle(δ))
Output:

α' = 22ʰ38ᵐ8ˢ.54
δ' = -15°46′30″.0

func Topocentric2

func Topocentric2(α unit.RA, δ unit.Angle, Δ, ρsφʹ, ρcφʹ float64, L unit.Angle, jde float64) (Δα unit.HourAngle, Δδ unit.Angle)

Topocentric2 returns topocentric corrections including parallax.

This function implements the "non-rigorous" method descripted in the text.

Note that results are corrections, not corrected coordinates.

Example
// Example 40.a, p. 280
Δα, Δδ := parallax.Topocentric2(
	unit.RAFromDeg(339.530208),
	unit.AngleFromDeg(-15.771083),
	.37276, .546861, .836339,
	unit.Angle(unit.NewHourAngle(' ', 7, 47, 27)),
	julian.CalendarGregorianToJD(2003, 8, 28+
		unit.NewTime(' ', 3, 17, 0).Day()))
fmt.Printf("Δα = %.2s (sec of RA)\n", sexa.FmtHourAngle(Δα))
fmt.Printf("Δδ = %.1s (sec of Dec)\n", sexa.FmtAngle(Δδ))
Output:

Δα = 1.29ˢ (sec of RA)
Δδ = -14.1″ (sec of Dec)

func Topocentric3

func Topocentric3(α unit.RA, δ unit.Angle, Δ, ρsφʹ, ρcφʹ float64, L unit.Angle, jde float64) (Hʹ unit.HourAngle, δʹ unit.Angle)

Topocentric3 returns topocentric hour angle and declination including parallax.

This function implements the "alternative" method described in the text. The method should be similarly rigorous to that of Topocentric() and results should be virtually consistent.

Example
// same test case as example 40.a, p. 280
α := unit.RAFromDeg(339.530208)
δ := unit.AngleFromDeg(-15.771083)
Δ := .37276
ρsφʹ := .546861
ρcφʹ := .836339
L := unit.Angle(unit.NewHourAngle(' ', 7, 47, 27))
jde := julian.CalendarGregorianToJD(2003, 8, 28+
	unit.NewTime(' ', 3, 17, 0).Day())
Hʹ, δʹ := parallax.Topocentric3(α, δ, Δ, ρsφʹ, ρcφʹ, L, jde)
fmt.Printf("Hʹ = %.2d\n", sexa.FmtHourAngle(Hʹ))
θ0 := sidereal.Apparent(jde)
αʹ := unit.RAFromRad(θ0.Rad() - L.Rad() - Hʹ.Rad())
// same result as example 40.a, p. 280
fmt.Printf("αʹ = %.2d\n", sexa.FmtRA(αʹ))
fmt.Printf("δʹ = %.1d\n", sexa.FmtAngle(δʹ))
Output:

Hʹ = -4ʰ44ᵐ50ˢ.28
αʹ = 22ʰ38ᵐ8ˢ.54
δʹ = -15°46′30″.0

func TopocentricEcliptical

func TopocentricEcliptical(λ, β, s, φ unit.Angle, h float64, ε unit.Angle, θ unit.Time, π unit.Angle) (λʹ, βʹ, sʹ unit.Angle)

TopocentricEcliptical returns topocentric ecliptical coordinates including parallax.

Arguments λ, β are geocentric ecliptical longitude and latitude of a body, s is its geocentric semidiameter. φ, h are the observer's latitude and and height above the ellipsoid in meters. ε is the obliquity of the ecliptic, θ is local sidereal time, π is equatorial horizontal parallax of the body (see Horizonal()).

Results are observed topocentric coordinates and semidiameter.

Example
// exercise, p. 282
λʹ, βʹ, sʹ := parallax.TopocentricEcliptical(
	unit.NewAngle(' ', 181, 46, 22.5),
	unit.NewAngle(' ', 2, 17, 26.2),
	unit.NewAngle(' ', 0, 16, 15.5),
	unit.NewAngle(' ', 50, 5, 7.8),
	0,
	unit.NewAngle(' ', 23, 28, 0.8),
	unit.NewAngle(' ', 209, 46, 7.9).Time(),
	unit.NewAngle(' ', 0, 59, 27.7))
fmt.Printf("λʹ = %.1s\n", sexa.FmtAngle(λʹ))
fmt.Printf("βʹ = %+.1s\n", sexa.FmtAngle(βʹ))
fmt.Printf("sʹ = %.1s\n", sexa.FmtAngle(sʹ))
Output:

λʹ = 181°48′5.0″
βʹ = +1°29′7.1″
sʹ = 16′25.5″

Types

This section is empty.

Jump to

Keyboard shortcuts

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