Documentation
¶
Overview ¶
Binary: Chapter 57, Binary Stars
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApparentEccentricity ¶
ApparentEccentricity returns apparent eccenticity of a binary star given true orbital elements. 视轨道离心率
e is eccentricity of the true orbit i is inclination relative to the line of sight ω is longitude of periastron
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/binary"
"github.com/soniakeys/unit"
)
func main() {
// Example 57.b, p. 400
fmt.Printf("%.3f\n", binary.ApparentEccentricity(.2763,
unit.AngleFromDeg(59.025), unit.AngleFromDeg(219.907)))
}
Output: 0.860
func M ¶
M computes mean anomaly for the given date. 计算year时刻伴星的平近点角
year is a decimal year specifying the date T is time of periastron, as a decimal year 经过近点的时刻,一般表达形式为带小数点的年 P is period of revolution in mean solar years 旋转周期,单位是平太阳年
func Position ¶
Position computes apparent position angle and angular distance of components of a binary star. 计算某一时刻的视位置角θ和角距离ρ,需提前求得 M,再解开普勒方程的到 E
e is eccentricity of the true orbit a is angular apparent semimajor axis i is inclination relative to the line of sight Ω is position angle of the ascending node ω is longitude of periastron E is eccentric anomaly, computed for example with package kepler and the mean anomaly as returned by function M in this package.
Return value θ is the apparent position angle, ρ is the angular distance.
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/binary"
"github.com/mooncaker816/learnmeeus/v3/kepler"
"github.com/soniakeys/unit"
)
func main() {
// Example 57.a, p. 398
M := binary.M(1980, 1934.008, 41.623)
fmt.Printf("M = %.3f\n", M.Deg())
E, err := kepler.Kepler1(.2763, M, 4)
if err != nil {
fmt.Println(err)
return
}
fmt.Printf("E = %.3f\n", E.Deg())
θ, ρ := binary.Position(.2763, unit.AngleFromSec(.907),
unit.AngleFromDeg(59.025), unit.AngleFromDeg(23.717),
unit.AngleFromDeg(219.907), E)
fmt.Printf("θ = %.1f\n", θ.Deg())
fmt.Printf("ρ = %.3f\n", ρ.Sec())
}
Output: M = 37.788 E = 49.896 θ = 318.4 ρ = 0.411
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.