binary

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Binary: Chapter 57, Binary Stars

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApparentEccentricity

func ApparentEccentricity(e float64, i, ω unit.Angle) float64

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/soniakeys/meeus/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

func M(year, T, P float64) unit.Angle

M computes mean anomaly for the given date.

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

func Position(e float64, a, i, Ω, ω, E unit.Angle) (θ, ρ unit.Angle)

Position computes apparent position angle and angular distance of components of a binary star.

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/soniakeys/meeus/v3/binary"
	"github.com/soniakeys/meeus/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.

Jump to

Keyboard shortcuts

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