Spacecraft Control Bundle 1
Control Decks

The following file shows an example setup file that loads modules shown in the block diagram.

Note that the simulation to link to is specified on the first line. There is a single system in this case, called CubeSat, representing a single CubeSat satellite's control software. The modules are loaded into this system, and the module names below are actually links to the class pages. A single variable value is set, a camera data command. (The remaining variables use their default values.) The Variable commands map the specified DSim variables to ControlDeck variables.

Simulation /Library/Application Support/VisualCommander/Model Libraries/CubeSat.ds2
System CubeSat
TimeScale 1
# Time
#--------------------------------------------------------------------------
Module CubeSat cs_timer Timer CS
# Time
#--------------------------------------------------------------------------
Module CubeSat fsw_time Time CS
# Interfaces
#--------------------------------------------------------------------------
Module CubeSat fsw_gps_meas GPS_Processing CS
Module CubeSat fsw_image_processing Image_Processing CS
Module CubeSat fsw_mems_imu_processing IMU_Processing CS
Module CubeSat cs_magnetometer_processing Magnetometer_Processing CS
# Catalogs
#--------------------------------------------------------------------------
Module CubeSat fsw_star_catalog Star_Catalog CS
# Utilities
#--------------------------------------------------------------------------
Module CubeSat fsw_ephemeris Ephemeris CS
Module CubeSat fsw_co_id Celestial_Object_ID CS
# Estimation
#--------------------------------------------------------------------------
Module CubeSat fsw_attitude_determination Attitude_Determination CS
# Control and Estimation
#--------------------------------------------------------------------------
Module CubeSat fsw_mass Mass CS
Module CubeSat fsw_attitude_control Attitude_Control CS
Module CubeSat cs_momentum_mgmt Momentum_Management CS
Module CubeSat cs_torquer_interface Magnetic_Torquer_Control CS
Module CubeSat cs_rwa_interface RWA_Control CS
# Initial values
#--------------------------------------------------------------------------
Set CubeSat camera_data_command [25 15 15 1024 1024 75 7.25e12]
# Inputs
#--------------------------------------------------------------------------
Variable CubeSat|Time:julianDate CubeSat jd_sim
Variable CubeSat:quaternion CubeSat q_eci_to_body_sim
Variable CubeSat:bodyRate CubeSat omega_sim
Variable CubeSat:position CubeSat position_sim
Variable CubeSat:velocity CubeSat velocity_sim
Variable CubeSat:mass CubeSat mass_sim
Variable CubeSat:center_mass CubeSat center_of_mass_sim
Variable CubeSat:inertia CubeSat inertia_sim
# Ephemeris
#--------------------------------------------------------------------------
Variable CubeSat|Gravity:observer CubeSat observer_sim
Variable CubeSat|Gravity:rotationMatrixBody CubeSat rotation_matrix_planet_sim
Variable CubeSat|Gravity:planet_index CubeSat planet_index_sim
Variable CubeSat|Gravity:positionBody CubeSat position_planet_sim
Variable CubeSat|Gravity:muBody CubeSat planet_mu_sim
Variable CubeSat|Gravity:radiusBody CubeSat planet_radius_sim
# Magnetometer
#--------------------------------------------------------------------------
Variable CubeSat|Magnetometer:b_measured CubeSat b_field_sim
# GPS
#--------------------------------------------------------------------------
Variable CubeSat|GPS:gps_message CubeSat gps_message_sim
# Imager
#-----------------------------------------------------------------
Variable CubeSat|IMU:body_rate_measured CubeSat body_rate_camera_sim
Variable CubeSat|Imager:centroid CubeSat centroid_camera_sim
Variable CubeSat:rWARate CubeSat rwa_rate_sim
# Output
#-----------------------------------------------------------------
Variable CubeSat|RWA:voltage_command CubeSat rwa_voltage_demand
Variable CubeSat|Torquer:pulsewidth_command CubeSat magnetic_torquer_pulsewidth_demand
Variable CubeSat|Torquer:magnetic_torquer_sign CubeSat magnetic_torquer_sign
Processes the magnetometer.
Definition: cs_magnetometer_processing.h:15
This class manages spacecraft momentum.
Definition: cs_momentum_mgmt.h:23
The RWA interface producing wheel voltages from torque demand.
Definition: cs_rwa_interface.h:22
This times and sends triggers to all modules.
Definition: cs_timer.h:16
The magnetic torquer interface producing sign and pulsewidth demand.
Definition: cs_torquer_interface.h:16
A PID based attitude control system.
Definition: fsw_attitude_control.h:45
Attitude determination using an Unscented Kalman Filter and a star camera.
Definition: fsw_attitude_determination.h:22
Celestial object identification.
Definition: fsw_co_id.h:29
This class gets the ephemeris from the simulation.
Definition: fsw_ephemeris.h:31
This module processes pseudo-GPS from the simulation.
Definition: fsw_gps_meas.h:23
This module processes images to produce centroids.
Definition: fsw_image_processing.h:24
This module outputs mass properties.
Definition: fsw_mass.h:22
MEMS IMU processing.
Definition: fsw_mems_imu_processing.h:19
Star catalog processing.
Definition: fsw_star_catalog.h:36
The onboard clock model.
Definition: fsw_time.h:21
const SC_DATA camera_data_command
Camera data command.
Definition: sc_data_names.h:40
const SC_DATA inertia
Spacecraft inertia.
Definition: sc_data_names.h:72
#define q_eci_to_body_sim
Simulation mapped variables.
Definition: sc_data_names.h:133
const SC_DATA mass
Spacecraft total mass (double)
Definition: sc_data_names.h:76