Spacecraft Control Bundle 1
fsw_solar_wing_torque_control.h
1/*
2 * Header file for object of class fsw_solar_wing_torque_control.
3 * Copyright 2010, Princeton Satellite Systems, Inc.
4 * All Rights Reserved.
5 */
6
7#include <ControlDeck2/ControlDeck2.h>
8#include <SCControl/SCControl.h>
9
10#ifndef FSW_SOLAR_WING_TORQUE_CONTROL
11#define FSW_SOLAR_WING_TORQUE_CONTROL
12
13
15
20class fsw_solar_wing_torque_control : public cd_control_module
21{
22 public:
23 fsw_solar_wing_torque_control (const char * mod_name);
24 void initialize_data();
25 void initialize();
26 void handle_event(int code);
27
28 protected:
33 // request for read access
34 // request input
35 // inputs Read from External Data Points
36 CD_REQUEST_REF angle_ref;
37 CD_REQUEST_REF ephem_sun_vector_ref;
38 CD_REQUEST_REF quaternion_ref;
39 CD_REQUEST_REF julian_date_ref;
41
46 CD_CREATE_REF solar_wing_error_ref;
48 CD_CREATE_REF torque_demand_ref;
50
51 //*! \name Outputs Written to External Data Points
52 // request for write access
53 // request output destination
55 CD_REQUEST_REF voltage_demand_ref;
57
62 // create for read access
64 CD_CREATE_REF gain_a_command_ref;
66 CD_CREATE_REF gain_b_command_ref;
68 CD_CREATE_REF gain_c_command_ref;
70 CD_CREATE_REF gain_d_command_ref;
71 CD_CREATE_REF inertia_command_ref;
73 CD_CREATE_REF torque_constant_ref;
75
76 private:
77
78 PD controller;
79 double julian_date_old;
80 int init_controller;
81
82};
83
84extern "C"
85{
86 cd_control_module *fsw_solar_wing_torque_control_builder(const char *name);
87}
88
89#endif
Generate the torque control for the solar wing motor.
Definition: fsw_solar_wing_torque_control.h:21
CD_REQUEST_REF quaternion_ref
The estimated quaternion.
Definition: fsw_solar_wing_torque_control.h:38
CD_REQUEST_REF ephem_sun_vector_ref
Sun vector.
Definition: fsw_solar_wing_torque_control.h:37
CD_CREATE_REF solar_wing_error_ref
Error.
Definition: fsw_solar_wing_torque_control.h:46
CD_CREATE_REF gain_b_command_ref
The solar wing state space gain b matrix (double)
Definition: fsw_solar_wing_torque_control.h:66
CD_CREATE_REF torque_constant_ref
Torque constant (double)
Definition: fsw_solar_wing_torque_control.h:73
CD_CREATE_REF cell_face_sign_command_ref
Sign of cell face (double)
Definition: fsw_solar_wing_torque_control.h:72
CD_CREATE_REF gain_c_command_ref
The solar wing state space gain c matrix (double)
Definition: fsw_solar_wing_torque_control.h:68
CD_CREATE_REF gain_d_command_ref
The solar wing state space gain d matrix (double)
Definition: fsw_solar_wing_torque_control.h:70
CD_REQUEST_REF angle_ref
Solar wing angles.
Definition: fsw_solar_wing_torque_control.h:36
CD_REQUEST_REF julian_date_ref
Julian date (double)
Definition: fsw_solar_wing_torque_control.h:39
CD_CREATE_REF solar_wing_offset_command_ref
Error.
Definition: fsw_solar_wing_torque_control.h:47
CD_CREATE_REF gain_a_command_ref
The solar wing state space gain a matrix (double)
Definition: fsw_solar_wing_torque_control.h:64
CD_REQUEST_REF voltage_demand_ref
Voltage demand variable.
Definition: fsw_solar_wing_torque_control.h:55
void initialize_data()
Create data and request the FSW_SOLAR_WING_TORQUE_CONTROL_TRIGGER.
Definition: fsw_solar_wing_torque_control.cc:16
CD_CREATE_REF torque_demand_ref
Torque demand.
Definition: fsw_solar_wing_torque_control.h:48
CD_CREATE_REF inertia_command_ref
The solar wing inertia.
Definition: fsw_solar_wing_torque_control.h:71