Module common

Module common 

Source
Expand description

Set of common functions used by spv-rs exposed if you want to used them for your own calculations.

Functions§

a_to_au
Takes a in as (arcseconds) and parllax in mas (milliarcsecond) and outputs a in au.
apogee
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 in au.
apparent_mag_to_absolute_mag
au_to_m
Simple function motsly used by spv-rs to convert au to meters (used for semi major-axis in most cases but can be used for other stuff too).
declination_total
Calculates total declination in degrees with declination_degree, declination_min and declination_s in degrees, minutes and seconds respectively.
eccentric_anomaly
Calculates the eccentric anomaly in degrees
eccentricity
If you for some reason had these parameters and not e then here ya go.
flattening
Flattening is another way to defining eccentricity for an ellipse.
flight_path_angle
Calculates the flight path angle for the companion body in degrees
linear_eccentricity
Distance between one foci and the center of the ellipse in au.
mean_motion
Mean motion or n
parallax_to_parsec
Parallax to parsec convert function where the parallax parameter is in mas (milliarcseconds).
perigee
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 in au.
period
If you dind’t have the period already
radius
Calculates the total radius for a twobody system
relative_apogee
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 in meters.
relative_perigee
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 in meters.
right_ascension_total
Calculates total right ascension in degrees with right_ascension_h, right_ascension_min and right_ascension_s in hours, minutes and seconds respectively.
semi_major_axis
If you for some reason had these parameters and not a then here ya go
semi_minor_axis
Calculates the semi minor axis for a twobody system and returns it in meters.
semi_parameter
Calculates the semi parameter for a twobody system and returns it in meters.
specific_angular_momentum_coordinates
Calculates the specific angular momentum coordinates
specific_angular_momentum_value
Calculates the specific angular momentum value
specific_mechanical_energy
Specific mechanical energy (used by other equation but exposed here if you need it)
standard_gravitational_parameter
Calculates the stadard gravitational parameter
temperature
true_anomaly
Calculates the true anomaly in degrees