1 | /* |
2 | * Academic License - for use in teaching, academic research, and meeting |
3 | * course requirements at degree granting institutions only. Not for |
4 | * government, commercial, or other organizational use. |
5 | * |
6 | * File: AHRSControl.h |
7 | * |
8 | * Code generated for Simulink model 'AHRSControl'. |
9 | * |
10 | * Model version : 1.115 |
11 | * Simulink Coder version : 9.3 (R2020a) 18-Nov-2019 |
12 | * C/C++ source code generated on : Fri Jul 10 14:44:58 2020 |
13 | * |
14 | * Target selection: ert.tlc |
15 | * Embedded hardware selection: Intel->x86-32 (Windows32) |
16 | * Code generation objectives: |
17 | * 1. Execution efficiency |
18 | * 2. RAM efficiency |
19 | * Validation result: Not run |
20 | */ |
21 | |
22 | #ifndef RTW_HEADER_AHRSControl_h_ |
23 | #define RTW_HEADER_AHRSControl_h_ |
24 | #include <math.h> |
25 | #include "AHRS_Bus.h" |
26 | #ifndef AHRSControl_COMMON_INCLUDES_ |
27 | # define AHRSControl_COMMON_INCLUDES_ |
28 | #include "rtwtypes.h" |
29 | #endif /* AHRSControl_COMMON_INCLUDES_ */ |
30 | |
31 | /* Child system includes */ |
32 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
33 | #include "AHRSControl_AHRS_Control.h" |
34 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
35 | |
36 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
37 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
38 | |
39 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
40 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
41 | |
42 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
43 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
44 | |
45 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
46 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
47 | |
48 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
49 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
50 | |
51 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
52 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
53 | |
54 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
55 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
56 | |
57 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
58 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
59 | |
60 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
61 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
62 | |
63 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
64 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
65 | |
66 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
67 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
68 | |
69 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
70 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
71 | |
72 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
73 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
74 | |
75 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
76 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
77 | |
78 | /* Model Code Variants */ |
79 | |
80 | /* Block signals and states (default storage) for model 'AHRSControl' */ |
81 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
82 | |
83 | typedef struct { |
84 | real_T Integrator2; /* '<S14>/Integrator2' */ |
85 | real_T Integrator1; /* '<S13>/Integrator1' */ |
86 | real_T Integrator; /* '<S12>/Integrator' */ |
87 | real_T Integrator2_DSTATE; /* '<S14>/Integrator2' */ |
88 | real_T Integrator1_DSTATE; /* '<S13>/Integrator1' */ |
89 | real_T Integrator_DSTATE; /* '<S12>/Integrator' */ |
90 | real_T UnitDelay_DSTATE; /* '<S10>/Unit Delay' */ |
91 | real_T UnitDelay_DSTATE_f; /* '<S9>/Unit Delay' */ |
92 | real_T UnitDelay_DSTATE_j; /* '<S8>/Unit Delay' */ |
93 | } DW_AHRSControl_f_T; |
94 | |
95 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
96 | |
97 | /* Constant parameters (default storage) */ |
98 | typedef struct { |
99 | /* Expression: [2.395,-0.3609,-0.002145,0.808700,-0.0205;;] |
100 | * Referenced by: '<S8>/Gain' |
101 | */ |
102 | real_T Gain_Gain[5]; |
103 | |
104 | /* Expression: [;-0.1427,-1.115,0.04573,-0.04318,-0.1007;] |
105 | * Referenced by: '<S9>/Gain' |
106 | */ |
107 | real_T Gain_Gain_d[5]; |
108 | |
109 | /* Expression: [;;-0.02792,-0.02229,-2.25,-0.06152,0.03151] |
110 | * Referenced by: '<S10>/Gain' |
111 | */ |
112 | real_T Gain_Gain_b[5]; |
113 | } ConstP_AHRSControl_T; |
114 | |
115 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
116 | |
117 | /* Constant parameters (default storage) */ |
118 | extern const ConstP_AHRSControl_T AHRSControl_ConstP; |
119 | |
120 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
121 | |
122 | extern void AHRSControl_Disable(void); |
123 | extern void AHRSControl_AHRS_Control(const int16_T rtu_Pilot_theta_cmd, const |
124 | int16_T rtu_Pilot_phi_cmd, const int16_T rtu_Pilot_r_cmd, const AHRS_Bus |
125 | *rtu_AHRS1, const AHRS_Bus *rtu_AHRS2, const AHRS_Bus *rtu_AHRS3, real_T |
126 | rty_actuator_commands[3]); |
127 | |
128 | #ifndef AHRSControl_MDLREF_HIDE_CHILD_ |
129 | |
130 | /* Block states (default storage) */ |
131 | extern DW_AHRSControl_f_T AHRSControl_DW; |
132 | |
133 | #endif /*AHRSControl_MDLREF_HIDE_CHILD_*/ |
134 | |
135 | /*- |
136 | * The generated code includes comments that allow you to trace directly |
137 | * back to the appropriate location in the model. The basic format |
138 | * is <system>/block_name, where system is the system number (uniquely |
139 | * assigned by Simulink) and block_name is the name of the block. |
140 | * |
141 | * Use the MATLAB hilite_system command to trace the generated code back |
142 | * to the model. For example, |
143 | * |
144 | * hilite_system('<S3>') - opens system 3 |
145 | * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3 |
146 | * |
147 | * Here is the system hierarchy for this model |
148 | * |
149 | * '<Root>' : 'AHRSControl' |
150 | * '<S1>' : 'AHRSControl/AHRS_Control' |
151 | * '<S2>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl' |
152 | * '<S3>' : 'AHRSControl/AHRS_Control/AHRS_voter' |
153 | * '<S4>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl/Heli_inner_loop' |
154 | * '<S5>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl/Heli_outer_loop' |
155 | * '<S6>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl/Heli_inner_loop/Filter' |
156 | * '<S7>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl/Heli_inner_loop/ModelInfo' |
157 | * '<S8>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl/Heli_inner_loop/pitch_feedback' |
158 | * '<S9>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl/Heli_inner_loop/roll_feedback' |
159 | * '<S10>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl/Heli_inner_loop/yaw_feedback' |
160 | * '<S11>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl/Heli_outer_loop/ModelInfo' |
161 | * '<S12>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl/Heli_outer_loop/PitchLoop' |
162 | * '<S13>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl/Heli_outer_loop/RollLoop' |
163 | * '<S14>' : 'AHRSControl/AHRS_Control/AHRSLoopCtrl/Heli_outer_loop/YawLoop' |
164 | * '<S15>' : 'AHRSControl/AHRS_Control/AHRS_voter/Avg_Value' |
165 | * '<S16>' : 'AHRSControl/AHRS_Control/AHRS_voter/Mid_Value' |
166 | * '<S17>' : 'AHRSControl/AHRS_Control/AHRS_voter/ModelInfo' |
167 | * '<S18>' : 'AHRSControl/AHRS_Control/AHRS_voter/Single_Value' |
168 | */ |
169 | |
170 | /*- |
171 | * Requirements for '<Root>': AHRSControl |
172 | */ |
173 | #endif /* RTW_HEADER_AHRSControl_h_ */ |
174 | |
175 | /* |
176 | * File trailer for generated code. |
177 | * |
178 | * [EOF] |
179 | */ |
180 | |