![]() |
ModelSpace
|
Class to propagate CR3BP dynamics in characteristic units. More...
Classes | |
class | Accelerometer |
Accelerometer Model. More... | |
class | ArgParser |
Class to parse arguments from the command line in any language. More... | |
class | AsphericalGravityModel |
Aspherical gravity model with J2 and J3 effects. More... | |
class | AutoDoc |
Class to document from code. More... | |
class | BiasNoiseModel |
Bias and noise model. More... | |
class | ConfigurationWriter |
Write out script from UX to execute using set toolchain. Base class for override. More... | |
struct | Connection |
Hold all information related to a connection point in the ImGUI UX. More... | |
class | CR3BPDynamics |
class | CR3BPDynamicsModel |
Circular Restricted Three Body Problem Dynamics Model. More... | |
class | CsvLogger |
Class for logging to CSV. More... | |
struct | Dispersion |
Struct to store all data associated with dispersion. More... | |
class | DispersionEngine |
Class to generate input dispersions for the simulation. More... | |
class | EffectiveSolarAreaModel |
Effective Solar Area model. More... | |
class | FlatPlateDragModel |
Flat plate drag model. More... | |
class | FrameStateSensorModel |
Frame state sensor model. More... | |
class | GravityGradientModel |
Gravity Gradient Model. More... | |
class | GroundStationModel |
Simple ground station model. More... | |
class | GroundStationSensor |
Ground Station Sensor Model. More... | |
class | Gyro |
Gyro Model. More... | |
class | Hdf5Logger |
Class for logging to HDF5. More... | |
struct | ImNode |
Hold all data related to a visual node in the ImGUI UX. More... | |
class | ImpulseModel |
Impulse Model. More... | |
class | IMU |
IMU Model. More... | |
class | LogEvent |
Class to execute logging. More... | |
class | LogManager |
Class to manage logs. More... | |
class | LvcStateSensorModel |
LVC State Sensor Model. More... | |
class | LvlhFrameManagerModel |
LVLV Frame Manager Model. More... | |
class | Model |
Base model class for derived implementation. More... | |
class | ModelSpacePyConfigWriter |
Write out ModelSpace Python file from node information. More... | |
class | NodeBuilder |
Generate a list of mapped nodes and connections from json. More... | |
struct | NormalDispersion |
Struct to store all data associated with normal dispersion. More... | |
class | NormalRandom |
Class to generate random numbers according to normal distribution. More... | |
class | OrbitalElementsSensorModel |
Orbital elements sensor model. More... | |
class | OrbitalElementsStateInit |
Model to produce position/velocity vector from orbital elements. More... | |
class | PlanetInfo |
Planet Information Model. More... | |
class | PlanetRelativeStatesModel |
Planet relative states model. More... | |
class | PointMassGravityModel |
Point mass gravity model. More... | |
class | ProximityMonitor |
The time trigger monitor is a simple implementation of the monitor that triggers continuously after a set time. The time is set upon construction, but may be changed during run via function. More... | |
class | RangeAzElSensorModel |
Range, azimuth, and elevation sensor model. More... | |
class | RateMonitor |
Monitor to trigger at a particular rate. More... | |
class | SimpleCameraSensor |
Simple Camera Model. More... | |
class | SimplePlanet |
Simple Planet Model. More... | |
class | SimpleSpacecraft |
Simple Spacecraft Model. More... | |
class | SimpleThrusterModel |
Simple thruster model. More... | |
class | SimScheduler |
Simple implementation of the scheduler class. More... | |
class | SimTerminationEvent |
Class to trigger termination in scheduler. More... | |
class | SimTimeManager |
Class to manage time for the simulation object. More... | |
class | SimulationExecutive |
Implementation of the executive class for simulation. More... | |
class | SixDOFDynamicsModel |
Model to implement 6-DOF dynamics. More... | |
class | SolarPanelPowerModel |
Solar panel power model. More... | |
class | SolarRadiationPressureModel |
Solar Radiation Pressure Model. More... | |
class | SphericalHarmonicsGravityModel |
Spherical Harmonics Model. More... | |
class | SpiceManager |
The Spice Manager is a single class instance to manage spice frames and return SPICE states. More... | |
class | SpicePlanet |
The model to maintain planet state using SPICE. More... | |
class | StarTracker |
Star Tracker Model. More... | |
class | SynodicFrameManagerModel |
Synodic Frame Manager Model. More... | |
class | TimedImpulsiveBurnModel |
Timed Impulsive Burn Model. More... | |
class | TimeTriggerMonitor |
The time trigger monitor is a simple implementation of the monitor that triggers continuously after a set time. The time is set upon construction, but may be changed during run via function. More... | |
struct | UniformDispersion |
Struct to store all data associated with uniform dispersion. More... | |
class | UniformRandom |
Class to generate random numbers according to uniform distribution. More... | |
class | VisualsModel |
Class to write out frame information via socket using a standard interface as follows: More... | |
Enumerations | |
enum | connection_type_e { PARAM = -1 , INPUT = -2 , ALL_INPUT = -3 , OUTPUT = 1 } |
Hold acceptable values for connection type. | |
enum | node_types_e { STANDARD = 0 , MODEL = 1 , SIM_EXEC = 2 , TEXT_NODE = 3 , FRAME = 4 , LOGGER = 5 , VIZKIT = 6 } |
Node type definition to allow config writer to identify custom nodes. | |
enum | cmds_e { OFF , ON } |
enum | simulation_steps_e { NOT_SCHEDULED =-2 , STARTUP_ONLY =-1 , ALL =0 , START_STEP =1 , DERIVATIVE =2 , END_STEP =3 } |
enum | integrator_type_e { FORWARD_EULER = 1 , RK4 = 4 } |
enum | radius_type_e { EQUATORIAL , POLAR } |
Functions | |
double | muStar (double m1, double m2) |
Function to return the characteristic mass for CR3BP. | |
double | lStar (double r) |
Function to return the characteristic length for CR3BP. | |
double | tStar (double r, double mu) |
Function to return the characteristic time for the CR3BP. | |
clockwerk::CartesianVector< double, 3 > | convertPosDim2Nd (clockwerk::CartesianVector< double, 3 > pos_d, double l_star) |
Function to convert position from dimensional to characteristic units. | |
clockwerk::CartesianVector< double, 3 > | convertVelDim2Nd (clockwerk::CartesianVector< double, 3 > vel_d, double l_star, double t_star) |
Function to convert velocity from dimensional to characteristic units. | |
clockwerk::CartesianVector< double, 3 > | convertPosNd2Dim (clockwerk::CartesianVector< double, 3 > pos_nd, double l_star) |
Function to convert position from characteristic to dimensional units. | |
clockwerk::CartesianVector< double, 3 > | convertVelNd2Dim (clockwerk::CartesianVector< double, 3 > vel_nd, double l_star, double t_star) |
Function to convert velocity from characteristic to dimensional units. | |
void | simpleEncrypt (char *unencrypted, char *encrypted, char size, const std::string &key) |
Function to perform a simple encryption of a buffer of data. | |
void | simpleDecrypt (char *encrypted, char *unencrypted, char size, const std::string &key) |
Function to decrypt a buffer of data – companion to simpleEncrypt. | |
void | writeFileBinarySize (char *buffer, char buffer_size, const std::string &filename) |
Function to write a buffer of bytes to a file, along with their size. | |
void | readFileBinarySize (char buffer[MAX_SIZE_CHAR], char *size_actual, const std::string &filename) |
Function to read a buffer of bytes from a file. | |
int | checkVerifyLicense (const std::string &license_file, const std::string &license_server) |
Function to check and verify that user has license for the simulation. | |
void | parseLicenseString (std::string str, std::string &licensee, int &year, int &month, int &day) |
Function to parse license string for relevant data. | |
bool | contains (const std::string &parent_str, const std::string &substr) |
Function to return whether substr is in parent_str. | |
std::string | trim (const std::string &str, const std::string &whitespace=" \t") |
Function to trim leading and trailing whitespace from string. | |
void | loadKernel (std::string kernel) |
A function to load in a sinle spice kernel. | |
std::string | toUpper (const std::string &input) |
Function to convert a string to all upper case. | |
std::string | toLower (const std::string &input) |
Function to convert a string to all lower case. | |
bool | caseInsensitiveEqual (const std::string &in_a, const std::string &in_b) |
Function to compare two strings independent of case. | |
int | frameRelativeInit (clockwerk::Frame< double > &target, clockwerk::Frame< double > &reference, const clockwerk::CartesianVector< double, 3 > &pos_tgt_ref__ref, const clockwerk::CartesianVector< double, 3 > &vel_tgt_ref__ref) |
Function to initialize frame target relative to freame reference inertially. | |
int | orbitInit (clockwerk::Frame< double > &target, clockwerk::Frame< double > &planet, double mu, double a, double e, double i, double RAAN, double w, double f) |
Function to initialize a body's position and velocity from an orbit. | |
std::string | writeTrajectory (const std::vector< double > &lat, const std::vector< double > &lon, const std::vector< double > &alt, bool project_to_ground=true, const std::string &color="7f00ffff") |
Function to write a trajectory into a KML file | |
void | writeKmlFile (const std::string &file, const std::vector< std::vector< double > > &lat, const std::vector< std::vector< double > > &lon, const std::vector< std::vector< double > > &alt, const std::vector< std::string > &colors, bool project_to_ground=true) |
Function to write a full KML file from trajectory data. | |
int | readGravityCoefficientsFile (const std::string &filename, double cbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double sbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], long int &n, long int &m) |
Reads gravitational coefficients from a file and stores them in provided matrices. | |
void | neumannNormalization (double cbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double sbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double c[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double s[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1]) |
Applies Neumann normalization to spherical harmonic coefficients. | |
int | sphericalHarmonics (long N, long M, double r, double phi, double theta, double Re, double K, double C[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double S[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], clockwerk::CartesianVector< double, 3 > &grad_v) |
Computes the gradient of the gravitational potential using spherical harmonics. | |
int | legendre (long N, long M, double x, double P[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double sd_p[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1]) |
Calculates the associated Legendre functions and their derivatives. | |
double | fact (long n) |
Computes the factorial of a non-negative integer. | |
double | oddfact (long n) |
Computes the double factorial of an odd integer. | |
template<typename T > | |
int | mean (T *array, unsigned int size, T &result) |
template<typename T > | |
int | variance (T *array, unsigned int size, T &result) |
template<typename T > | |
int | stdev (T *array, unsigned int size, T &result) |
template<typename T > | |
int | max (T *array, unsigned int size, T &result) |
template<typename T > | |
int | min (T *array, unsigned int size, T &result) |
Variables | |
const std::vector< std::pair< connection_type_e, std::string > > | CONN_TYPES |
Hold all connection type enum values to loop through. | |
const int | MAX_ITER = 5 |
const int | MAX_SIZE_CHAR = 0xFF |
const std::string | KEY = "kodasandymoosebuddy" |
const int | NO_ERROR = 0 |
const int | ERROR_LICENSE = 300 |
const double | ON_STATE = 1e-15 |
const std::string | ARG_INDICATOR = "--" |
const int | HASH_MULTIPLIER = 37 |
const int | HASH_ADDER = 3 |
const std::string | DEFAULT_SIMULATION_TIME = "2023 September 26, 12:00:00 MDT" |
This is the default simulation time. | |
const double | GPS_TO_J2000_ET_OFFSET = 630763200.0 |
This is the offset between the GPS and J2000 epochs for calculation of GPS time. | |
const std::string | OBJNAME = "MSO" |
const std::string | JSONSTART = "{" |
const std::string | JSONEND = "}" |
const std::string | OBJSTART = "[" |
const std::string | OBJEND = "]" |
const std::string | FRAMESTART = "{" |
const std::string | FRAMEEND = "}" |
const std::string | QUOTEMARK = "\'" |
const double | PC_15_2 = 0.5*15.0 |
const double | PC_3_2 = 0.5*3.0 |
const double | PC_35_2 = 0.5*35 |
const std::string | TITLE = "= " |
const std::string | AUTHOR_EMAIL_START = " <" |
const std::string | AUTHOR_EMAIL_END = "> " |
const std::string | HEADER_ONE = "== " |
const std::string | HEADER_TWO = "=== " |
const std::string | CODE_LITERAL = "```" |
const std::string | TABLE_HEADER_START = "[\%header,cols=" |
const std::string | TABLE_HEADER_END = "*]\n" |
const std::string | TABLE_MARKER = "|===\n" |
const std::string | TABLE_LINE_START = "|" |
const std::string | IMAGE_START = "image::" |
const std::string | ALIAS_START = "[" |
const std::string | ALIAS_END = "]" |
const std::string | LINK_START = "link:++" |
const std::string | LINK_END = "++" |
const std::string | DOC_REF_START = "xref:" |
const int | NMAX_SPHERICAL_HARMONICS = 18 |
const int | MAX_SPICE_NAME_LENGTH = 33 |
const unsigned int | NUM_CR3BP_STATES = 6 |
Class to propagate CR3BP dynamics in characteristic units.
File: Conversions.h
This file contains analysis utilities to convert units in the circular restricted three body problem (cr3bp).
All conversions are per Dr. Pernicka of Missouri S&T and the following online utilities: https://orbital-mechanics.space/the-n-body-problem/circular-restricted-three-body-problem.html
Author: Alex Reynolds alex..nosp@m.reyn.nosp@m.olds@.nosp@m.attx.nosp@m..tech
This class is used to propagate circular restricted 3 body problem dynamics in characteristic units. It sets internal parameters on the basis of the setters for mu and l, which are used in the propagation.
bool modelspace::caseInsensitiveEqual | ( | const std::string & | in_a, |
const std::string & | in_b | ||
) |
Function to compare two strings independent of case.
in_a | The first string to compare |
in_b | The second string to compare |
int modelspace::checkVerifyLicense | ( | const std::string & | license_file, |
const std::string & | license_server | ||
) |
Function to check and verify that user has license for the simulation.
license_file | The license file containing the user's data, if it exists |
license_server | The license server which may be used to locate another file |
bool modelspace::contains | ( | const std::string & | parent_str, |
const std::string & | substr | ||
) |
Function to return whether substr is in parent_str.
parent_str | The string to search |
substr | The string to search for |
clockwerk::CartesianVector< double, 3 > modelspace::convertPosDim2Nd | ( | clockwerk::CartesianVector< double, 3 > | pos_d, |
double | l_star | ||
) |
Function to convert position from dimensional to characteristic units.
pos_d | The position of the body in dimensional units |
l_star | The characteristic length of the system |
clockwerk::CartesianVector< double, 3 > modelspace::convertPosNd2Dim | ( | clockwerk::CartesianVector< double, 3 > | pos_nd, |
double | l_star | ||
) |
Function to convert position from characteristic to dimensional units.
pos_nd | The position of the body in non-dimensional units |
l_star | The characteristic length of the system |
clockwerk::CartesianVector< double, 3 > modelspace::convertVelDim2Nd | ( | clockwerk::CartesianVector< double, 3 > | vel_d, |
double | l_star, | ||
double | t_star | ||
) |
Function to convert velocity from dimensional to characteristic units.
vel_d | The velocity of the body in dimensional units |
l_star | The characteristic length of the system |
t_star | The characteristic time of the system |
clockwerk::CartesianVector< double, 3 > modelspace::convertVelNd2Dim | ( | clockwerk::CartesianVector< double, 3 > | vel_nd, |
double | l_star, | ||
double | t_star | ||
) |
Function to convert velocity from characteristic to dimensional units.
vel_nd | The velocity of the body in non-dimensional units |
l_star | The characteristic length of the system |
t_star | The characteristic time of the system |
double modelspace::fact | ( | long | n | ) |
Computes the factorial of a non-negative integer.
This helper function calculates the factorial of a given integer n (n!). It is used to normalize spherical harmonics coefficients.
[in] | n | Non-negative integer for which to calculate the factorial. |
int modelspace::frameRelativeInit | ( | clockwerk::Frame< double > & | target, |
clockwerk::Frame< double > & | reference, | ||
const clockwerk::CartesianVector< double, 3 > & | pos_tgt_ref__ref, | ||
const clockwerk::CartesianVector< double, 3 > & | vel_tgt_ref__ref | ||
) |
Function to initialize frame target relative to freame reference inertially.
target | The target frame whose state we want to set |
reference | The frame we are setting state relative to |
pos_tgt_ref__ref | The position of target relative to reference, in ref frame coordinates |
vel_tgt_ref__ref | The inertial velocity of target origin relative to reference origin, in ref frame coords |
int modelspace::legendre | ( | long | N, |
long | M, | ||
double | x, | ||
double | P[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
double | sd_p[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1] | ||
) |
Calculates the associated Legendre functions and their derivatives.
Computes the associated Legendre functions up to degree N and order M with Neumann normalization. This includes calculating scaled derivatives (sdP), which handle singularities by multiplying the derivative by sqrt(1 - x^2).
[in] | N | Maximum degree of the Legendre functions. |
[in] | M | Maximum order of the Legendre functions. |
[in] | x | Argument for Legendre functions, typically cos(theta). |
[out] | P | Matrix of associated Legendre functions up to degree N and order M. |
[out] | sd_p | Matrix of scaled derivatives of Legendre functions. |
void modelspace::loadKernel | ( | std::string | kernel | ) |
A function to load in a sinle spice kernel.
A | single spice kernel to load |
double modelspace::lStar | ( | double | r | ) |
Function to return the characteristic length for CR3BP.
r | The circular orbit radius of the secondary body about the first |
double modelspace::muStar | ( | double | m1, |
double | m2 | ||
) |
Function to return the characteristic mass for CR3BP.
m1 | The mass of the primary body |
m2 | The mass of the secondary body |
void modelspace::neumannNormalization | ( | double | cbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], |
double | sbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
double | c[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
double | s[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1] | ||
) |
Applies Neumann normalization to spherical harmonic coefficients.
This function transforms spherical harmonic coefficients from their original format (typically EGM96 style normalization) to Neumann normalization. The input matrices cbar
and sbar
contain the cosine and sine coefficients, which are normalized and stored in the output matrices c
and s
for use in gravitational calculations.
The Neumann normalization ensures that the coefficients are scaled to a standard that provides orthonormality and consistency across spherical harmonics terms.
[in] | cbar | Matrix of original cosine coefficients. |
[in] | sbar | Matrix of original sine coefficients. |
[out] | c | Matrix to store Neumann-normalized cosine coefficients. |
[out] | s | Matrix to store Neumann-normalized sine coefficients. |
NMAX_SPHERICAL_HARMONICS
. Applying the normalization to coefficients beyond this range may result in undefined behavior. double modelspace::oddfact | ( | long | n | ) |
Computes the double factorial of an odd integer.
Calculates the product of all odd numbers up to and including the specified integer n. This is used in the Legendre function for terms involving odd factorials.
[in] | n | Non-negative odd integer for which to calculate the double factorial. |
int modelspace::orbitInit | ( | clockwerk::Frame< double > & | target, |
clockwerk::Frame< double > & | planet, | ||
double | mu, | ||
double | a, | ||
double | e, | ||
double | i, | ||
double | RAAN, | ||
double | w, | ||
double | f | ||
) |
Function to initialize a body's position and velocity from an orbit.
target | The target frame to initialize |
planet | The planet frame our orbit is relative to |
mu | Gravitational parameter of the planet |
a | Orbit semimajor axis, in meters |
e | Orbit eccentricity |
i | Orbit inclination, radians |
RAAN | Orbit Right Ascention of the Ascending Node, radians |
w | Orbit argument of periapsis, radians |
f | Orbit true anomaly, radians |
void modelspace::parseLicenseString | ( | std::string | str, |
std::string & | licensee, | ||
int & | year, | ||
int & | month, | ||
int & | day | ||
) |
Function to parse license string for relevant data.
str | The license string to parse (loaded from file) |
licensee | The licensing organization |
year | The year when the locally stored license expires |
month | The month when the locally stored license expires |
day | The day when the locally stored license expires |
void modelspace::readFileBinarySize | ( | char | buffer[MAX_SIZE_CHAR], |
char * | size_actual, | ||
const std::string & | filename | ||
) |
Function to read a buffer of bytes from a file.
buffer | The buffer of data to read from – max size is the max value of a char |
buffer_size | The size of the buffer to be written |
filename | The name of the file to write to |
int modelspace::readGravityCoefficientsFile | ( | const std::string & | filename, |
double | cbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
double | sbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
long int & | n, | ||
long int & | m | ||
) |
Reads gravitational coefficients from a file and stores them in provided matrices.
This function opens a specified file containing spherical harmonic gravitational coefficients and populates the provided matrices cbar
and sbar
with these values up to degree and order NMAX_SPHERICAL_HARMONICS
. The function checks for the file's existence before attempting to read from it. This code is derived from the open-source NASA 42 simulation.
[in] | filename | Path to the file containing the gravitational coefficients. |
[out] | cbar | Matrix to store cosine harmonic coefficients. |
[out] | sbar | Matrix to store sine harmonic coefficients. |
[out] | n | Max degree loaded from egm96 file. |
[out] | m | Max order loaded from egm96 file. |
NO_ERROR | If the file is successfully read and coefficients are loaded. |
ERROR_FILE_NOT_FOUND | If the specified file does not exist. |
void modelspace::simpleDecrypt | ( | char * | encrypted, |
char * | unencrypted, | ||
char | size, | ||
const std::string & | key | ||
) |
Function to decrypt a buffer of data – companion to simpleEncrypt.
unencrypted | The encrypted buffer to decrypt |
encrypted | The unencrypted buffer result |
size | The size of the buffer |
key | The encryption key to use for the buffer |
void modelspace::simpleEncrypt | ( | char * | unencrypted, |
char * | encrypted, | ||
char | size, | ||
const std::string & | key | ||
) |
Function to perform a simple encryption of a buffer of data.
unencrypted | The unencrypted buffer to encrypt |
encrypted | The encrypted buffer result |
size | The size of the buffer |
key | The encryption key to use for the buffer |
int modelspace::sphericalHarmonics | ( | long | N, |
long | M, | ||
double | r, | ||
double | phi, | ||
double | theta, | ||
double | Re, | ||
double | K, | ||
double | C[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
double | S[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], | ||
clockwerk::CartesianVector< double, 3 > & | grad_v | ||
) |
Computes the gradient of the gravitational potential using spherical harmonics.
This function calculates the radial, latitudinal, and longitudinal components of the gravitational potential gradient up to degree N and order M using normalized Legendre coefficients. The result is stored in gradV. The maximum size is 18x18
[in] | N | Maximum degree of spherical harmonics. |
[in] | M | Maximum order of spherical harmonics. |
[in] | r | Radial distance from planet's center. |
[in] | phi | Longitude (angle from prime meridian in radians). |
[in] | theta | Colatitude (angle from the north pole in radians). |
[in] | Re | Reference radius, typically planet's radius in meters. |
[in] | K | Scaling constant, typically planet's gravitational parameter divided by Re. |
[in] | C | Normalized Legendre coefficients (cosine terms). |
[in] | S | Normalized Legendre coefficients (sine terms). |
[out] | grad_v | Gradient of the gravitational potential [radial, latitudinal, longitudinal]. |
std::string modelspace::toLower | ( | const std::string & | input | ) |
Function to convert a string to all lower case.
input | String to be converted |
std::string modelspace::toUpper | ( | const std::string & | input | ) |
Function to convert a string to all upper case.
input | String to be converted |
std::string modelspace::trim | ( | const std::string & | str, |
const std::string & | whitespace = " \t" |
||
) |
Function to trim leading and trailing whitespace from string.
str | The string to trim |
whitespace | The whitespace we're looking to trim off. Defaults to " \t" |
double modelspace::tStar | ( | double | r, |
double | mu | ||
) |
Function to return the characteristic time for the CR3BP.
r | The circular orbit radius of the secondary body about the first |
mu | The mass of the primary body |
void modelspace::writeFileBinarySize | ( | char * | buffer, |
char | buffer_size, | ||
const std::string & | filename | ||
) |
Function to write a buffer of bytes to a file, along with their size.
buffer | The buffer of data to write to file |
buffer_size | The size of the buffer to be written |
filename | The name of the file to write to |
void modelspace::writeKmlFile | ( | const std::string & | file, |
const std::vector< std::vector< double > > & | lat, | ||
const std::vector< std::vector< double > > & | lon, | ||
const std::vector< std::vector< double > > & | alt, | ||
const std::vector< std::string > & | colors, | ||
bool | project_to_ground = true |
||
) |
Function to write a full KML file from trajectory data.
file | The file to write kml data to |
lat | A vector of doubles corresponding to latitude |
lon | A vector of doubles corresponding to longitude |
alt | A vector of doubles corresponding to altitude |
colors | A vector of |
project_to_ground | A bolean indicating whether the trajectory should be projected to the ground |
std::string modelspace::writeTrajectory | ( | const std::vector< double > & | lat, |
const std::vector< double > & | lon, | ||
const std::vector< double > & | alt, | ||
bool | project_to_ground = true , |
||
const std::string & | color = "7f00ffff" |
||
) |
Function to write a trajectory into a KML file
lat | A vector of doubles corresponding to latitude |
lon | A vector of doubles corresponding to longitude |
alt | A vector of doubles corresponding to altitude |
project_to_ground | A bolean indicating whether the trajectory should be projected to the ground |
const std::vector<std::pair<connection_type_e, std::string> > modelspace::CONN_TYPES |
Hold all connection type enum values to loop through.