class KeplerianOrbit
#include <keplerianOrbit.h>

The KeplerianOrbit class represents an elliptical orbit and provides a coherent set of common outputs such as position and velocity, orbital period, semi-parameter, etc. It uses the utility orbitalMotion to do orbital element to position and velocity conversion.

Public Functions


This constructor initialized to an arbitrary orbit

KeplerianOrbit(classicElements oe, GravBodyData *planet)

The constructor requires orbital elements and a planet

KeplerianOrbit(const KeplerianOrbit &orig)

The copy constructor works with python copy


Generic Destructor

Eigen::Vector3d r_BP_P()

body position vector relative to planet

body position vector relative to planet

Eigen::Vector3d v_BP_P()

body velocity vector relative to planet

body velocity vector relative to planet

Eigen::Vector3d h_BP_P()

angular momentum of body relative to planet

angular momentum of body relative to planet

double M()

return mean anomaly angle

double n()

return mean orbit rate

double P()

return mean orbit rate

return orbit period

double f()

return orbital period

return true anomaly

double fDot()

return true anomaly

return true anomaly rate

double RAAN()

return right ascencion of the ascending node

double omega()

return argument of periapses

double i()

return inclination angle

double e()

return eccentricty

double a()

return semi-major axis

double h()

return orbital angular momentum magnitude

double Energy()

return orbital energy

double r()

return orbit radius

double v()

return velocity magnitude

double r_a()

return radius at apoapses

double r_p()

return radius at periapses

double fpa()

return flight path angle

double E()

return eccentric anomaly angle

double p()

return semi-latus rectum or the parameter

double rDot()

return radius rate

double c3()

return escape velocity

classicElements oe()

This method returns the orbital element set for the orbit


classicElements oe

void set_planet(GravBodyData *plt)

This method sets the planet being orbited

void set_a(double a)

set semi-major axis

void set_e(double e)

set eccentricity

void set_i(double i)

set inclination angle

void set_omega(double omega)

set argument of periapsis

void set_RAAN(double RAAN)

set right ascension of the ascending node

void set_f(double f)

set true anomaly angle

Private Functions

void change_orbit()

This method populates all outputs from orbital elements coherently if any of the classical orbital elements are changed

void change_f()

This method only changes the outputs dependent on true anomaly so that one orbit may be queried at various points along the orbit

Private Members

GravBodyData *planet
double mu
double semi_major_axis
double eccentricity
double inclination
double argument_of_periapsis
double right_ascension
double true_anomaly
double true_anomaly_rate
double orbital_period
double orbital_energy
double v_infinity
double orbit_radius
double radial_rate
double r_apogee
double r_perigee
double semi_parameter
double flight_path_angle
double eccentric_anomaly
double mean_motion
double mean_anomaly
Eigen::Vector3d orbital_angular_momentum_P
Eigen::Vector3d position_BP_P
Eigen::Vector3d velocity_BP_P