Spacecraft Models Package 2.0
Spacecraft Models for DSim
|
Generates gravity for two solar systems. More...
#include <gravity_two_solar_system.h>
Inherits dsim_model.
Public Member Functions | |
gravity_two_solar_system (dsim_model_setup *setup) | |
Constructor. | |
~gravity_two_solar_system () | |
Destructor. | |
void * | describe_setup (void *ds) |
Describe the setup data. | |
bool | parse_setup (const char *command, const char *data) |
Parse input setup commands. More... | |
void | initialize_data () |
Initialize the model data. More... | |
void | initialization_complete () |
Finish initialization. | |
void | initialize_timestep () |
Computations done prior to numerical integration. More... | |
void | rhs (double t, double jd) |
Right hand side. | |
void | complete_timestep () |
Computations done after numerical integration. | |
Generates gravity for two solar systems.
This model computes the gravitational accelerations for the sun's solar system using SPICE and a second solar system.
bool gravity_two_solar_system::parse_setup | ( | const char * | command, |
const char * | data | ||
) |
Parse input setup commands.
Parses AddBody and AddCenter lines and adds planets to the linked list.
The AddBody command is followed by the planet name or ID, for example
AddBody Sun, AddBody 10
AddCenter Earth, AddCenter 399 AddBody Jupiter
A separate line is required for each planet.
Adding a planet causes a set of published variables to be added to the model, including:
A frame may be selected using SetFrame. The available frames are
void gravity_two_solar_system::initialize_data | ( | ) |
Initialize the model data.
String for SPICE frame, name, i.e. "J2000" or "ECLIPJ2000"
References accel, angularRateVectorBody, frame, muBody_dsim, n_files, n_targets, observer, positionBody, radiusBody, rotationMatrixBody, and velocityBody.
void gravity_two_solar_system::initialize_timestep | ( | ) |
Computations done prior to numerical integration.
Update the ephemeris and the planet rotation.