opihiexarata.orbit.solution module
The orbit solution class.
- class opihiexarata.orbit.solution.OrbitalSolution(observation_record: list[str], solver_engine: OrbitEngine, vehicle_args: dict = {})[source]
Bases:
ExarataSolution
This is the class which solves a record of observations to derive the orbital parameters of asteroids or objects in general. A record of observations must be provided.
- semimajor_axis
The semi-major axis of the orbit solved, in AU.
- Type:
float
- semimajor_axis_error
The error on the semi-major axis of the orbit solved, in AU.
- Type:
float
- eccentricity
The eccentricity of the orbit solved.
- Type:
float
- eccentricity_error
The error on the eccentricity of the orbit solved.
- Type:
float
- inclination
The angle of inclination of the orbit solved, in degrees.
- Type:
float
- inclination_error
The error on the angle of inclination of the orbit solved, in degrees.
- Type:
float
- longitude_ascending_node
The longitude of the ascending node of the orbit solved, in degrees.
- Type:
float
- longitude_ascending_node_error
The error on the longitude of the ascending node of the orbit solved, in degrees.
- Type:
float
- argument_perihelion
The argument of perihelion of the orbit solved, in degrees.
- Type:
float
- argument_perihelion_error
The error on the argument of perihelion of the orbit solved, in degrees.
- Type:
float
- mean_anomaly
The mean anomaly of the orbit solved, in degrees.
- Type:
float
- mean_anomaly_error
The error on the mean anomaly of the orbit solved, in degrees.
- Type:
float
- true_anomaly
The true anomaly of the orbit solved, in degrees. This value is calculated from the mean anomaly.
- Type:
float
- true_anomaly_error
The error on the true anomaly of the orbit solved, in degrees. This value is calculated from the error on the mean anomaly.
- Type:
float
- epoch_julian_day
The epoch where for these osculating orbital elements. This value is in Julian days.
- Type:
float
- __calculate_eccentric_anomaly() tuple[float, float]
Calculating the eccentric anomaly and error from the mean anomaly.
- Parameters:
None –
- Returns:
eccentric_anomaly (float) – The eccentric anomaly as derived from the mean anomaly.
eccentric_anomaly_error (float) – The eccentric anomaly error derived as an average from the upper and lower ranges of the mean anomaly.
- __calculate_true_anomaly() tuple[float, float]
Calculating the true anomaly and error from the eccentric anomaly.
- Parameters:
None –
- Returns:
true_anomaly (float) – The true anomaly as derived from the mean anomaly.
true_anomaly_error (float) – The true anomaly error derived as an average from the upper and lower ranges of the eccentric anomaly.
- __init__(observation_record: list[str], solver_engine: OrbitEngine, vehicle_args: dict = {}) None [source]
The initialization function. Provided the list of observations, solves the orbit for the Keplarian orbits.
- Parameters:
observation_record (list) – A list of the standard MPC 80-column observation records. Each element of the list should be a string representing the observation.
solver_engine (OrbitEngine) – The engine which will be used to complete the orbital elements from the observation record.
vehicle_args (dictionary) – If the vehicle function for the provided solver engine needs extra arguments not otherwise provided by the standard input, they are given here.
- Return type:
None
- opihiexarata.orbit.solution._calculate_eccentric_anomaly(mean_anomaly: float, eccentricity: float) float [source]
Calculate the eccentric anomaly from the mean anomaly and eccentricity of an orbit. This is found iteratively using Newton’s method.
- Parameters:
mean_anomaly (float) – The mean anomaly of the orbit, in degrees.
- Returns:
eccentric_anomaly – The eccentric anomaly as derived from the mean anomaly, in degrees.
- Return type:
float
- opihiexarata.orbit.solution._calculate_true_anomaly(eccentric_anomaly: float, eccentricity: float) float [source]
Calculate the true anomaly from the mean anomaly and eccentricity of an orbit.
We use the more numerically stable equation from https://ui.adsabs.harvard.edu/abs/1973CeMec…7..388B.
- Parameters:
eccentric_anomaly (float) – The eccentric anomaly of the orbit, in degrees.
- Returns:
true_anomaly – The true anomaly as derived from the eccentric anomaly, in degrees.
- Return type:
float
- opihiexarata.orbit.solution._vehicle_custom_orbit(observation_record: list[str], vehicle_args: dict) dict [source]
This is the vehicle function for the specification of a custom orbit.
A check is done for the extra vehicle arguments to ensure that the orbital elements desired are within the arguments. The observation record is not of concern for this vehicle.
- Parameters:
observation_record (list) – The MPC standard 80-column record for observations of the asteroid by which the orbit shall be computed from.
vehicle_args (dict) – The arguments to be passed to the Engine class to help its creation and solving abilities. In this case, it is just the orbital elements as defined.
- opihiexarata.orbit.solution._vehicle_orbfit_orbit_determiner(observation_record: list[str]) dict [source]
This uses the Orbfit engine to calculate orbital elements from the observation record. The results are then returned to be managed by the main class.
- Parameters:
observation_record (list) – The MPC standard 80-column record for observations of the asteroid by which the orbit shall be computed from.
- Returns:
orbit_results – The results of the orbit computation using the Orbfit engine. Namely, this returns the 6 classical Kepler elements, using mean anomaly.
- Return type:
dict