Documentation
¶
Overview ¶
Solarxyz: Chapter 26, Rectangular Coordinates of the Sun.
Index ¶
- func LongitudeJ2000(e *pp.V87Planet, jde float64) (l unit.Angle)
- func Position(e *pp.V87Planet, jde float64) (x, y, z float64)
- func PositionB1950(e *pp.V87Planet, jde float64) (x, y, z float64)
- func PositionEquinox(e *pp.V87Planet, jde, epoch float64) (xp, yp, zp float64)
- func PositionJ2000(e *pp.V87Planet, jde float64) (x, y, z float64)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LongitudeJ2000 ¶
LongitudeJ2000 returns geometric longitude referenced to equinox J2000. J2000太阳地心黄经
func Position ¶
Position returns rectangular coordinates referenced to the mean equinox of date. Date 平分点太阳地心直角坐标
Example ¶
package main
import (
"fmt"
pp "github.com/mooncaker816/learnmeeus/v3/planetposition"
"github.com/mooncaker816/learnmeeus/v3/solarxyz"
)
func main() {
// Example 26.a, p. 172.
e, err := pp.LoadPlanet(pp.Earth)
if err != nil {
fmt.Println(err)
return
}
x, y, z := solarxyz.Position(e, 2448908.5)
fmt.Printf("X = %.7f\n", x)
fmt.Printf("Y = %.7f\n", y)
fmt.Printf("Z = %.7f\n", z)
// Meeus result (using appendix III):
// X = -0.9379952
// Y = -0.3116544
// Z = -0.1351215
}
Output: X = -0.9379963 Y = -0.3116537 Z = -0.1351207
func PositionB1950 ¶
PositionB1950 returns rectangular coordinates referenced to B1950. B1950 平分点参考系太阳直角坐标
Results are referenced to the mean equator and equinox of the epoch B1950 in the FK5 system, not FK4.
Example ¶
package main
import (
"fmt"
pp "github.com/mooncaker816/learnmeeus/v3/planetposition"
"github.com/mooncaker816/learnmeeus/v3/solarxyz"
)
func main() {
// Example 26.b, p. 175
e, err := pp.LoadPlanet(pp.Earth)
if err != nil {
fmt.Println(err)
return
}
x, y, z := solarxyz.PositionB1950(e, 2448908.5)
fmt.Printf("X0 = %.8f\n", x)
fmt.Printf("Y0 = %.8f\n", y)
fmt.Printf("Z0 = %.8f\n", z)
}
Output: X0 = -0.94148805 Y0 = -0.30266488 Z0 = -0.13121349
func PositionEquinox ¶
PositionEquinox returns rectangular coordinates referenced to an arbitrary epoch. 任意其它平分点参考系太阳直角坐标
Position will be computed for given Julian day "jde" but referenced to mean equinox "epoch" (year).
Example ¶
package main
import (
"fmt"
pp "github.com/mooncaker816/learnmeeus/v3/planetposition"
"github.com/mooncaker816/learnmeeus/v3/solarxyz"
)
func main() {
// Example 26.b, p. 175
e, err := pp.LoadPlanet(pp.Earth)
if err != nil {
fmt.Println(err)
return
}
x, y, z := solarxyz.PositionEquinox(e, 2448908.5, 2044)
fmt.Printf("X0 = %.8f\n", x)
fmt.Printf("Y0 = %.8f\n", y)
fmt.Printf("Z0 = %.8f\n", z)
}
Output: X0 = -0.93368100 Y0 = -0.32237347 Z0 = -0.13977803
func PositionJ2000 ¶
PositionJ2000 returns rectangular coordinates referenced to equinox J2000. J2000太阳直角坐标
Example ¶
package main
import (
"fmt"
pp "github.com/mooncaker816/learnmeeus/v3/planetposition"
"github.com/mooncaker816/learnmeeus/v3/solarxyz"
)
func main() {
// Example 26.b, p. 175 but for output see complete VSOP87
// results given on p. 176.
e, err := pp.LoadPlanet(pp.Earth)
if err != nil {
fmt.Println(err)
return
}
x, y, z := solarxyz.PositionJ2000(e, 2448908.5)
fmt.Printf("X0 = %.8f\n", x)
fmt.Printf("Y0 = %.8f\n", y)
fmt.Printf("Z0 = %.8f\n", z)
}
Output: X0 = -0.93739707 Y0 = -0.31316724 Z0 = -0.13577841
Types ¶
This section is empty.