Functions

Takes a in as (arcseconds) and parllax in mas (milliarcsecond) and outputs a in au.

Calculates r max or the maximum distance between the primary and companion boides in a twobody system also known as apogee (suffix may change depending on what object it reffers to). Output is just the x coordinate in the ellipses plane.

Position of the companion star in a twobody system with no rotation applied. a is semi major-axis in au, e is eccentricity, period is in years and t_p is time since periastron in years. Output is a 2-dimensional vector with x and y in that order all in meters. We only need a 2-dimensional vector here due to the fact that everything is on a plane in 2D.

Position of the companion star in a twobody system with rotation relative to the earth/sun plane applied. a is semi major-axis in au, e is eccentricity, period is in years, t_p is time since periastron in years, lotn is Longitude of the node (Omega) in degrees, aop is Argument of periastron (omega) in degrees and finally i is the Inclination in degrees. Output is a 3-dimensional vector with x, y and z in that order all in meters.

Velocity of the companion star in a twobody system with rotation relative to the earth/sun plane applied. a is semi major-axis in au, e is eccentricity, period is in years, t_p is time since periastron in years, lotn is Longitude of the node (Omega) in degrees, aop is Argument of periastron (omega) in degrees and finally i is the Inclination in degrees. Output is a 3-dimensional vector with x, y and z in that order all in meters/second.

Velocity of the companion star in a twobody system with no rotation applied. a is semi major-axis in au, e is eccentricity, period is in years and t_p is time since periastron in years. Output is a 2-dimensional vector with x and y in that order all in meters/second. We only need a 2-dimensional vector here due to the fact that everything is on a plane in 2D.

Calculates total declination in degrees with declination_degree, declination_min and declination_s in degrees, minutes and seconds respectively.

Calculates the eccentric anomaly in degrees

Method for getting base manipulation matrix that is used to rotate the companion star in a twobody system relative to the earth/sun plane. lotn is Longitude of the node (Omega) in degrees, aop is Argument of periastron (omega) in degrees and finally i is the Inclination in degrees. Output is a 3-dimensional matrix with x1, x2 and x3 in the first collum, y1, y2 and y3 in the second collum and z1, z2 and z3 in the third collum.

Calculates the flight path angle for the companion body in degrees

Calculates r min or the minimum distance between the primary and companion boides in a twobody system also known as perigee (suffix may change depending on what object it reffers to). Output is just the x coordinate in the ellipses plane.

Position of a single celestial object relative to the sun. Can be used in conjuction with companion functions to place a twobody system relative to the sun. parallax is in mas (milliarcseconds), right_ascension is in degrees and declination in degrees. Output is a 3-dimensional vector with x, y and z in that order all in meters.

Calculates the total radius for a twobody system

Calculates r max or the maximum distance between the primary and companion boides in a twobody system also known as apogee (suffix may change depending on what object it reffers to). Output is 3-dimensional vector that represents the coordinates for apogee rotated to be relative to the earth/sun plane.

Calculates r min or the minimum distance between the primary and companion boides in a twobody system also known as perigee (suffix may change depending on what object it reffers to). Output is 3-dimensional vector that represents the coordinates for perigee rotated to be relative to the earth/sun plane.

Calculates total right ascension in degrees with right_ascension_h, right_ascension_min and right_ascension_s in hours, minutes and seconds respectively.

Calculates the semi minor axis for a twobody system

Calculates the semi parameter for a twobody system

Calculates the specific angular momentum coordinates

Calculates the specific angular momentum value

Calculates the stadard gravitational parameter

Calculates the true anomaly in degrees

Velocity of a single celestial object relative to the sun. Can be used in conjuction with companion functions to place a twobody system relative to the sun. parallax is in mas (milliarcseconds), right_ascension is in degrees and declination in degrees, proper_motion_ra is the right ascension part of the proper motion variable in as (arcseconds), proper_motion_dec is the declination part of the proper motion variable in as (arcseconds) and radial_velocity is in km/s. Output is a 3-dimensional vector with x, y and z in that order all in meters/second.