7#include <ControlDeck2/ControlDeck2.h>
8#import <SCControl/SCControl.h>
12#ifndef FSW_ATTITUDE_DETERMINATION_MULTI_SENSOR
13#define FSW_ATTITUDE_DETERMINATION_MULTI_SENSOR
26 void initialize_data_requests();
136 ml_matrix u_meas_catalog(ml_matrix
id, ml_matrix u_catalog);
139 ml_matrix q_eci_to_body;
141 ml_matrix gyro_bias_camera;
143 double julian_date_old;
146 static ml_matrix meas_fun_ukf (
const ml_matrix &x,
void *context);
148 static ml_matrix meas_fun_ukf_2 (
const ml_matrix &x,
void *context);
150 static ml_matrix att_prop( ml_matrix x,
double t,
void *context);
156 ml_matrix q_eci_to_camera;
158 ml_matrix q_eci_to_camera_single_frame;
163 typedef struct estimation_struct
166 ml_matrix q_eci_to_body;
167 ml_matrix u_meas_cat;
169 ml_matrix body_rate_bias;
170 ml_matrix spacecraft_r_v;
171 ml_matrix q_body_to_magnetometer;
172 ml_matrix q_body_to_sun_sensor;
173 ml_matrix q_body_to_star_sensor;
174 ml_matrix sun_sensor_id;
179 int use_magnetometer_data;
185 star_sun_mag_meas_data est_meas_data;
191 cd_control_module *fsw_attitude_determination_multi_sensor_builder(
const char *name);
The attitude determination system using an Unscented Kalman Filter with: star camera,...
Definition: fsw_attitude_determination_multi_sensor.h:22
CD_CREATE_REF ad_q_eci_to_body_ref
Quaternion from eci to body estimated.
Definition: fsw_attitude_determination_multi_sensor.h:75
CD_CREATE_REF ad_covariance_camera_ref
AD covariance.
Definition: fsw_attitude_determination_multi_sensor.h:79
CD_REQUEST_REF jd_ref
Julian date.
Definition: fsw_attitude_determination_multi_sensor.h:61
void handle_event(int code)
Definition: fsw_attitude_determination_multi_sensor.cc:146
CD_CREATE_REF ad_q_body_to_camera_ref
Q ECI to Body from the simulation.
Definition: fsw_attitude_determination_multi_sensor.h:71
CD_CREATE_REF ad_use_star_data_command_ref
Select star data.
Definition: fsw_attitude_determination_multi_sensor.h:117
CD_CREATE_REF ad_parameter_command_ref
The [alpha, kappa, and beta] parameters.
Definition: fsw_attitude_determination_multi_sensor.h:103
CD_CREATE_REF ad_on_command_ref
Attitude determination on command.
Definition: fsw_attitude_determination_multi_sensor.h:101
CD_CREATE_REF ad_initial_covariance_command_ref
UKF initial covariance.
Definition: fsw_attitude_determination_multi_sensor.h:105
CD_CREATE_REF ad_initial_state_command_ref
UKF initial state.
Definition: fsw_attitude_determination_multi_sensor.h:115
CD_REQUEST_REF star_data_ref
Star data.
Definition: fsw_attitude_determination_multi_sensor.h:37
CD_CREATE_REF camera_data_command_ref
Camera data.
Definition: fsw_attitude_determination_multi_sensor.h:89
CD_REQUEST_REF od_state_ref
Spacecraft state [r;v] od_state.
Definition: fsw_attitude_determination_multi_sensor.h:45
CD_REQUEST_REF meas_stars_ref
Measurements.
Definition: fsw_attitude_determination_multi_sensor.h:63
CD_CREATE_REF ad_use_magnetometer_data_command_ref
Select magnetometer data.
Definition: fsw_attitude_determination_multi_sensor.h:119
CD_REQUEST_REF b_field_meas_ref
B field.
Definition: fsw_attitude_determination_multi_sensor.h:59
CD_REQUEST_REF u_star_catalog_ref
Corresponding catalog unit vectors.
Definition: fsw_attitude_determination_multi_sensor.h:65
CD_REQUEST_REF sun_sensor_roll_ref
Sun sensor roll measurement.
Definition: fsw_attitude_determination_multi_sensor.h:49
CD_REQUEST_REF star_id_camera_ref
Identified stars.
Definition: fsw_attitude_determination_multi_sensor.h:35
CD_REQUEST_REF camera_rate_meas_ref
Measured camera rate.
Definition: fsw_attitude_determination_multi_sensor.h:43
CD_CREATE_REF ad_use_sun_data_command_ref
Select sun sensor data.
Definition: fsw_attitude_determination_multi_sensor.h:121
CD_CREATE_REF ad_reset_command_ref
Attitude determination commands.
Definition: fsw_attitude_determination_multi_sensor.h:99
CD_REQUEST_REF q_eci_to_body_sim_ref
Q ECI to Body from the simulation.
Definition: fsw_attitude_determination_multi_sensor.h:57
CD_CREATE_REF ad_q_body_to_sun_sensor_ref
Quaternion from body to the sun sensor.
Definition: fsw_attitude_determination_multi_sensor.h:93
CD_CREATE_REF ad_meas_sun_noise_covariance_command_ref
UKF measurement noise covariance.
Definition: fsw_attitude_determination_multi_sensor.h:111
CD_REQUEST_REF u_star_camera_ref
Unit vectors for identified stars.
Definition: fsw_attitude_determination_multi_sensor.h:41
CD_CREATE_REF ad_q_body_to_magnetometer_ref
Quaternion from body to the magnetometer frame.
Definition: fsw_attitude_determination_multi_sensor.h:91
CD_REQUEST_REF sun_sensor_pitch_ref
Sun sensor pitch measurement.
Definition: fsw_attitude_determination_multi_sensor.h:47
CD_REQUEST_REF unit_vector_ref
Star catalog unit vectors.
Definition: fsw_attitude_determination_multi_sensor.h:39
CD_CREATE_REF ad_sun_meas_noise_covariance_command_ref
Sun sensor measurement noise.
Definition: fsw_attitude_determination_multi_sensor.h:125
CD_CREATE_REF ad_gyro_bias_camera_ref
Gyro bias estimated.
Definition: fsw_attitude_determination_multi_sensor.h:77
CD_REQUEST_REF ephem_sun_vector_ref
Sun vector.
Definition: fsw_attitude_determination_multi_sensor.h:55
CD_CREATE_REF ad_b_field_meas_noise_covariance_command_ref
B field measurement noise.
Definition: fsw_attitude_determination_multi_sensor.h:123
CD_REQUEST_REF sun_sensor_valid_ref
Sun sensor data validity flag.
Definition: fsw_attitude_determination_multi_sensor.h:53
CD_CREATE_REF ad_q_body_to_star_sensor_ref
Quaternion from body to the sun sensor.
Definition: fsw_attitude_determination_multi_sensor.h:95
CD_CREATE_REF ad_q_eci_to_camera_single_frame_ref
Single frame ad camera.
Definition: fsw_attitude_determination_multi_sensor.h:81
CD_CREATE_REF ad_planet_data_ref
Q ECI to Body from the simulation.
Definition: fsw_attitude_determination_multi_sensor.h:73
CD_CREATE_REF ad_plant_noise_covariance_command_ref
UKF plant noise covariance.
Definition: fsw_attitude_determination_multi_sensor.h:107
CD_REQUEST_REF magnetometer_ref
Magnetometer measurements.
Definition: fsw_attitude_determination_multi_sensor.h:51
CD_CREATE_REF ad_meas_magnetometer_noise_covariance_command_ref
UKF measurement noise covariance.
Definition: fsw_attitude_determination_multi_sensor.h:113
CD_CREATE_REF ad_q_eci_to_camera_ref
Single frame ad camera.
Definition: fsw_attitude_determination_multi_sensor.h:83
CD_CREATE_REF ad_use_single_frame_command_ref
Use single frame camera solutions.
Definition: fsw_attitude_determination_multi_sensor.h:97
void initialize_data()
Create data and request the FSW_ATTITUDE_DETERMINATION_TRIGGER.
Definition: fsw_attitude_determination_multi_sensor.cc:19
CD_CREATE_REF ad_meas_star_noise_covariance_command_ref
UKF measurement noise covariance.
Definition: fsw_attitude_determination_multi_sensor.h:109
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.