7#include <ControlDeck2/ControlDeck2.h>
8#import <SCControl/SCControl.h>
12#ifndef FSW_ATTITUDE_DETERMINATION_SUN_STAR
13#define FSW_ATTITUDE_DETERMINATION_SUN_STAR
26 void initialize_data_requests();
128 ml_matrix u_meas_catalog(ml_matrix
id, ml_matrix u_catalog);
131 ml_matrix q_eci_to_body;
133 ml_matrix gyro_bias_camera;
135 double julian_date_old;
138 static ml_matrix meas_fun_ukf (
const ml_matrix &x,
void *context);
140 static ml_matrix meas_fun_ukf_2 (
const ml_matrix &x,
void *context);
142 static ml_matrix att_prop( ml_matrix x,
double t,
void *context);
148 ml_matrix q_eci_to_camera;
150 ml_matrix q_eci_to_camera_single_frame;
155 typedef struct estimation_struct
158 ml_matrix q_eci_to_body;
159 ml_matrix u_meas_cat;
161 ml_matrix body_rate_bias;
162 ml_matrix spacecraft_r_v;
163 ml_matrix q_body_to_sun_sensor;
164 ml_matrix q_body_to_star_sensor;
165 ml_matrix sun_sensor_id;
175 star_sun_mag_meas_data est_meas_data;
181 cd_control_module *fsw_attitude_determination_sun_star_builder(
const char *name);
The attitude determination system using an Unscented Kalman Filter with: star camera,...
Definition: fsw_attitude_determination_sun_star.h:22
CD_CREATE_REF ad_sun_meas_noise_covariance_command_ref
Sun sensor measurement noise.
Definition: fsw_attitude_determination_sun_star.h:117
CD_CREATE_REF ad_parameter_command_ref
The [alpha, kappa, and beta] parameters.
Definition: fsw_attitude_determination_sun_star.h:101
CD_CREATE_REF ad_use_sun_data_command_ref
Select sun sensor data.
Definition: fsw_attitude_determination_sun_star.h:115
CD_CREATE_REF ad_q_eci_to_camera_single_frame_ref
Single frame ad camera.
Definition: fsw_attitude_determination_sun_star.h:81
CD_CREATE_REF ad_meas_sun_noise_covariance_command_ref
UKF measurement noise covariance.
Definition: fsw_attitude_determination_sun_star.h:109
CD_CREATE_REF ad_use_single_frame_command_ref
Use single frame camera solutions.
Definition: fsw_attitude_determination_sun_star.h:95
CD_REQUEST_REF sun_sensor_roll_ref
Sun sensor roll measurement.
Definition: fsw_attitude_determination_sun_star.h:49
CD_CREATE_REF camera_data_command_ref
Camera data.
Definition: fsw_attitude_determination_sun_star.h:89
CD_CREATE_REF ad_q_eci_to_camera_ref
Single frame ad camera.
Definition: fsw_attitude_determination_sun_star.h:83
CD_CREATE_REF ad_initial_covariance_command_ref
UKF initial covariance.
Definition: fsw_attitude_determination_sun_star.h:103
CD_CREATE_REF ad_meas_star_noise_covariance_command_ref
UKF measurement noise covariance.
Definition: fsw_attitude_determination_sun_star.h:107
CD_REQUEST_REF unit_vector_ref
Star catalog unit vectors.
Definition: fsw_attitude_determination_sun_star.h:39
CD_CREATE_REF ad_use_star_data_command_ref
Select star data.
Definition: fsw_attitude_determination_sun_star.h:113
CD_REQUEST_REF u_star_camera_ref
Unit vectors for identified stars.
Definition: fsw_attitude_determination_sun_star.h:41
CD_REQUEST_REF sun_sensor_valid_ref
Sun sensor data validity flag.
Definition: fsw_attitude_determination_sun_star.h:53
CD_CREATE_REF ad_q_body_to_camera_ref
Q ECI to Body from the simulation.
Definition: fsw_attitude_determination_sun_star.h:71
CD_CREATE_REF ad_q_body_to_star_sensor_ref
Quaternion from body to the sun sensor.
Definition: fsw_attitude_determination_sun_star.h:93
CD_REQUEST_REF meas_stars_ref
Measurements.
Definition: fsw_attitude_determination_sun_star.h:63
CD_REQUEST_REF q_eci_to_body_sim_ref
Q ECI to Body from the simulation.
Definition: fsw_attitude_determination_sun_star.h:57
CD_CREATE_REF ad_planet_data_ref
Q ECI to Body from the simulation.
Definition: fsw_attitude_determination_sun_star.h:73
CD_CREATE_REF ad_covariance_camera_ref
AD covariance.
Definition: fsw_attitude_determination_sun_star.h:79
CD_REQUEST_REF b_field_meas_ref
B field.
Definition: fsw_attitude_determination_sun_star.h:59
CD_CREATE_REF ad_reset_command_ref
Attitude determination commands.
Definition: fsw_attitude_determination_sun_star.h:97
CD_CREATE_REF ad_gyro_bias_camera_ref
Gyro bias estimated.
Definition: fsw_attitude_determination_sun_star.h:77
CD_REQUEST_REF jd_ref
Julian date.
Definition: fsw_attitude_determination_sun_star.h:61
CD_REQUEST_REF star_id_camera_ref
Identified stars.
Definition: fsw_attitude_determination_sun_star.h:35
CD_REQUEST_REF sun_sensor_pitch_ref
Sun sensor pitch measurement.
Definition: fsw_attitude_determination_sun_star.h:47
CD_CREATE_REF ad_q_eci_to_body_ref
Quaternion from eci to body estimated.
Definition: fsw_attitude_determination_sun_star.h:75
CD_CREATE_REF ad_initial_state_command_ref
UKF initial state.
Definition: fsw_attitude_determination_sun_star.h:111
CD_CREATE_REF ad_plant_noise_covariance_command_ref
UKF plant noise covariance.
Definition: fsw_attitude_determination_sun_star.h:105
void handle_event(int code)
Definition: fsw_attitude_determination_sun_star.cc:136
CD_REQUEST_REF od_state_ref
Spacecraft state [r;v] od_state.
Definition: fsw_attitude_determination_sun_star.h:45
CD_CREATE_REF ad_on_command_ref
Attitude determination on command.
Definition: fsw_attitude_determination_sun_star.h:99
CD_REQUEST_REF ephem_sun_vector_ref
Sun vector.
Definition: fsw_attitude_determination_sun_star.h:55
void initialize_data()
Create data and request the FSW_ATTITUDE_DETERMINATION_TRIGGER.
Definition: fsw_attitude_determination_sun_star.cc:19
CD_REQUEST_REF camera_rate_meas_ref
Measured camera rate.
Definition: fsw_attitude_determination_sun_star.h:43
CD_REQUEST_REF u_star_catalog_ref
Corresponding catalog unit vectors.
Definition: fsw_attitude_determination_sun_star.h:65
CD_REQUEST_REF star_data_ref
Star data.
Definition: fsw_attitude_determination_sun_star.h:37
CD_CREATE_REF ad_q_body_to_sun_sensor_ref
Quaternion from body to the sun sensor.
Definition: fsw_attitude_determination_sun_star.h:91
CD_REQUEST_REF magnetometer_ref
Magnetometer measurements.
Definition: fsw_attitude_determination_sun_star.h:51
Define the data names used throughout the control system.
const SC_DATA julian_date
Julian date.
Definition: sc_data_names.h:82
Define the trigger and variables names for the software system.