Spacecraft Control Bundle 1
|
This class gets the ephemeris from the simulation. More...
#include <fsw_ephemeris.h>
Public Member Functions | |
fsw_ephemeris (const char *mod_name) | |
void | initialize_data () |
Create data and request event notification for FSW_EPHEMERIS_TRIGGER. More... | |
void | initialize_data_requests () |
Request the ephemeris simulation variables and the orbit state. More... | |
void | handle_event (int code) |
Get the ephemeris data from the sim variables and set the outputs. More... | |
Protected Attributes | |
EPH Inputs | |
The ephemeris inputs come from the simulation.
| |
CD_REQUEST_REF | observer_sim_ref |
The reference system center - sim input (int) More... | |
CD_REQUEST_REF | rotation_matrix_planet_sim_ref |
Rotation matrix of planet. 9x1 in row major form. - sim input. More... | |
CD_REQUEST_REF | planet_index_sim_ref |
SPICE id of planet - sim input. More... | |
CD_REQUEST_REF | position_planet_sim_ref |
Planet position - sim input. More... | |
CD_REQUEST_REF | velocity_planet_sim_ref |
Planet velocity - sim input. More... | |
CD_REQUEST_REF | planet_mu_sim_ref |
Planet gravitional constant - sim input. More... | |
CD_REQUEST_REF | planet_radius_sim_ref |
Planet radius - sim input. More... | |
CD_REQUEST_REF | od_state_ref |
State estimate - module input. More... | |
EPH Outputs | |
| |
CD_CREATE_REF | ephem_planet_mu_ref |
Planet mu (1,n) - module output. More... | |
CD_CREATE_REF | ephem_observer_ref |
Observer (int) More... | |
CD_CREATE_REF | ephem_planet_rotation_matrix_ref |
Rotation matrix - module output. More... | |
CD_CREATE_REF | ephem_planet_velocity_ref |
Planet velocity - module output. More... | |
CD_CREATE_REF | ephem_planet_position_ref |
Planet position - module output. More... | |
CD_CREATE_REF | ephem_planet_index_ref |
Planet index (1,n) - module output. More... | |
CD_CREATE_REF | ephem_planet_radius_ref |
Planet radius - module output. More... | |
CD_CREATE_REF | ephem_sun_vector_ref |
Sun vector - module output. More... | |
This class gets the ephemeris from the simulation.
It uses the SPICE library format.
The following ephemeris information is provided:
The flight software would have its own SPICE library. This class is provided solely for convenience during development.
void fsw_ephemeris::handle_event | ( | int | code | ) |
Get the ephemeris data from the sim variables and set the outputs.
The sun vector is set in two cases:
References ephem_observer_ref, ephem_planet_index_ref, ephem_planet_mu_ref, ephem_planet_position_ref, ephem_planet_radius_ref, ephem_planet_rotation_matrix_ref, ephem_planet_velocity_ref, ephem_sun_vector_ref, observer_sim_ref, od_state, od_state_ref, planet_index_sim_ref, planet_mu_sim_ref, planet_radius_sim_ref, position_planet_sim_ref, rotation_matrix_planet_sim_ref, and velocity_planet_sim_ref.
void fsw_ephemeris::initialize_data | ( | ) |
Create data and request event notification for FSW_EPHEMERIS_TRIGGER.
References ephem_observer, ephem_observer_ref, ephem_planet_index, ephem_planet_index_ref, ephem_planet_mu, ephem_planet_mu_ref, ephem_planet_position, ephem_planet_position_ref, ephem_planet_radius, ephem_planet_radius_ref, ephem_planet_rotation_matrix, ephem_planet_rotation_matrix_ref, ephem_planet_velocity, ephem_planet_velocity_ref, ephem_sun_vector, ephem_sun_vector_ref, FSW_EPHEMERIS_TRIGGER, and sc_data::path.
void fsw_ephemeris::initialize_data_requests | ( | ) |
Request the ephemeris simulation variables and the orbit state.
References observer_sim_ref, od_state_ref, planet_index_sim_ref, planet_mu_sim_ref, planet_radius_sim_ref, position_planet_sim_ref, rotation_matrix_planet_sim_ref, and velocity_planet_sim_ref.
|
protected |
Observer (int)
Referenced by handle_event(), and initialize_data().
|
protected |
Planet index (1,n) - module output.
Referenced by handle_event(), and initialize_data().
|
protected |
Planet mu (1,n) - module output.
Referenced by handle_event(), and initialize_data().
|
protected |
Planet position - module output.
Referenced by handle_event(), and initialize_data().
|
protected |
Planet radius - module output.
Referenced by handle_event(), and initialize_data().
|
protected |
Rotation matrix - module output.
Referenced by handle_event(), and initialize_data().
|
protected |
Planet velocity - module output.
Referenced by handle_event(), and initialize_data().
|
protected |
Sun vector - module output.
Referenced by handle_event(), and initialize_data().
|
protected |
The reference system center - sim input (int)
Referenced by handle_event(), and initialize_data_requests().
|
protected |
State estimate - module input.
Used for the sun vector calculation when the sun is the observer.
Estimated orbit state (6x1 matrix). Consists of [r;v] in km and km/s.
path | "od_state" |
type | sd_type_matrix |
Referenced by handle_event(), and initialize_data_requests().
|
protected |
SPICE id of planet - sim input.
Referenced by handle_event(), and initialize_data_requests().
|
protected |
Planet gravitional constant - sim input.
Referenced by handle_event(), and initialize_data_requests().
|
protected |
Planet radius - sim input.
Referenced by handle_event(), and initialize_data_requests().
|
protected |
Planet position - sim input.
Referenced by handle_event(), and initialize_data_requests().
|
protected |
Rotation matrix of planet. 9x1 in row major form. - sim input.
Referenced by handle_event(), and initialize_data_requests().
|
protected |
Planet velocity - sim input.
Referenced by handle_event(), and initialize_data_requests().