![]() |
ModelSpace
|
The Spice Manager is a single class instance to manage spice frames and return SPICE states. More...
#include <spiceutils.h>
Public Member Functions | |
void | loadKernels (std::vector< std::string > kernel_list) |
A function to load in a list of SPICE kernels. | |
void | registerSpiceBody (const std::string &body_name) |
Function to register a spice body with the spice manager. | |
std::string | getBodyFrameName (const std::string &body_name) |
Get the frame name associated with a body. | |
void | setCentralBody (const std::string ¢ral_body) |
Function to set the central body in the SPICE manager. | |
std::string | centralBody () |
Function to output the current central body. | |
double | getGravitationalParameter (const std::string &body_name) |
Function to return the gravitational parameter for a SPICE body. | |
clockwerk::CartesianVector< double, 3 > | getSpicePosition (const std::string &body_name, double tdb_time) |
Function to return the position of a SPICE body relative to central body. | |
clockwerk::CartesianVector< double, 3 > | getSpiceVelocity (const std::string &body_name, double tdb_time) |
Function to return the velocity of a SPICE body relative to central body. | |
clockwerk::DCM< double > | getSpiceAttitude (const std::string &body_name, double tdb_time) |
Function to return the attitude of a SPICE body relative to central body. | |
clockwerk::CartesianVector< double, 3 > | getSpiceAngularVelocity (const std::string &body_name, double tdb_time) |
Function to return the angular velocity of a SPICE body relative to central body. | |
Protected Attributes | |
std::vector< std::string > | _spice_bodies |
std::string | _central_body |
bool | _manual_set = false |
bool | _kernels_loaded = false |
double | _tmp_state [6] |
double | _lt = 0.0 |
double | _tmp_dbl [3][3] |
clockwerk::DCM< double > | _tmp_dcm_p_pci |
double | _tmp_vec [3] |
clockwerk::CartesianVector< double, 3 > | _tmp_omega_p_pci__pci |
double | _ftmtrx [6][6] |
The Spice Manager is a single class instance to manage spice frames and return SPICE states.
The Spice Manager is a wrapper around SPICE utilities to simplify the process of getting SPICE states. It needs to exist for the following reasons:
By default, the Spice Manager will select the central body to be Earth, if the Earth is present in the simulation. If Earth is not present, the Spice Manager will select its central body as the largest body present in the simulation by mass. (i.e. Sun > Venus)
If the user desires a different central body than the one chosen by the SPICE manager, the central body may be set via setCentralBody. This will override the default behavior.
|
inline |
Function to output the current central body.
std::string modelspace::SpiceManager::getBodyFrameName | ( | const std::string & | body_name | ) |
Get the frame name associated with a body.
body_name | The body name to query |
double modelspace::SpiceManager::getGravitationalParameter | ( | const std::string & | body_name | ) |
Function to return the gravitational parameter for a SPICE body.
body_name | The body name to return gravitational parameter for |
clockwerk::CartesianVector< double, 3 > modelspace::SpiceManager::getSpiceAngularVelocity | ( | const std::string & | body_name, |
double | tdb_time | ||
) |
Function to return the angular velocity of a SPICE body relative to central body.
body_name | The body name to query |
tdb_time | The ephemeris time to query state position |
clockwerk::DCM< double > modelspace::SpiceManager::getSpiceAttitude | ( | const std::string & | body_name, |
double | tdb_time | ||
) |
Function to return the attitude of a SPICE body relative to central body.
body_name | The body name to query |
tdb_time | The ephemeris time to query state position |
clockwerk::CartesianVector< double, 3 > modelspace::SpiceManager::getSpicePosition | ( | const std::string & | body_name, |
double | tdb_time | ||
) |
Function to return the position of a SPICE body relative to central body.
body_name | The body name to query |
tdb_time | The ephemeris time to query state position |
clockwerk::CartesianVector< double, 3 > modelspace::SpiceManager::getSpiceVelocity | ( | const std::string & | body_name, |
double | tdb_time | ||
) |
Function to return the velocity of a SPICE body relative to central body.
body_name | The body name to query |
tdb_time | The ephemeris time to query state position |
void modelspace::SpiceManager::loadKernels | ( | std::vector< std::string > | kernel_list | ) |
A function to load in a list of SPICE kernels.
kernel_list | A vector list of kernel files to load |
void modelspace::SpiceManager::registerSpiceBody | ( | const std::string & | body_name | ) |
Function to register a spice body with the spice manager.
body_name | The SPICE body name to register |
void modelspace::SpiceManager::setCentralBody | ( | const std::string & | central_body | ) |
Function to set the central body in the SPICE manager.
central_body | The central body to set |