LRAUV  revA
SimInitStruct.h
Go to the documentation of this file.
1 
9 #ifndef SIMINITSTRUCT_H_
10 #define SIMINITSTRUCT_H_
11 
12 #include <math.h>
13 #include <cstring>
14 #include <stdint.h>
15 
23 {
24  // Initial Position Vector
25  double initLat_; // arcdeg // Initial latitude
26  double initLon_; // arcdeg // Initial longitude
27  float initZ_; // m // Initial depth
28  float initPitch_; // rad // Pitch wrto LV
29  float initRoll_; // rad // Roll wrto LV
30  float initHeading_; // rad // Yaw wrto LV
31 
32  // Initial Vehicle configuration
33  float initMassPosition_; // m
34  float initBuoyancyPosition_; // m3
35 
36  // Initial Rate Vector
37  float initU_; // m/s // vel x wrto B
38  float initV_; // m/s // vel y wrto B
39  float initW_; // m/s // vel z wrto B
40  float initP_; // rad/s // Pitch rate wrto LV
41  float initQ_; // rad/s // Roll rate wrto LV
42  float initR_; // rad/s // Yaw rate wrto LV
43 
44  // Optional environmental parameters
45  float northCurrent_; // m/s // vel x wrto LV
46  float eastCurrent_; // m/s // vel y wrto LV
47  float vertCurrent_; // m/s // vel w wrto LV
48  float magneticVariation_; // rad // if not specified, calculated from lat & lon
49  float soundSpeed_; // m/s // if not specified, calculated from density, pressure
50  float density_; // kg/m3 // sea water density.
51  float sst_; // degK // sea surface temperature. Extends to the mixed layer depth
52  float tMixed_; // degK // temperature at mixed layer depth. Linear change from surface
53  float t300_; // degK // temperature at 300 meters. Linear change from mixed layer depth
54  float sss_; // ppt // sea surface salinity. Extends to the mixed layer depth
55  float sMixed_; // ppt // salinity at mixed layer depth. Linear change from surface
56  float s300_; // ppt // salinity at 300 meters. Linear change from mixed layer depth
57  uint8_t oceanModelData_[256]; // path to ocean model data output.
58  float mixedLayerDepth_; // meter // depth of mixed layer
59 
60  // Recommended environmental parameter
61  float defaultDensity_; // kg/m3 // Always specify: used outside of 4D model
62 
63  // Variable buoyancy setting
64  float buoyancyNeutral_; // cc // volume in buoyancy "bag" at neutral trim
65 
67  //
68  float mass_;
69  float movableMass_;
70  float volume_;
80  float momentXX_;
81  float momentYY_;
82  float momentZZ_;
83 
84  //
86  //
87  //
88  /* added mass */
89  float kpDot_;
90  float mqDot_;
91  float nrDot_;
92  float xuDot_;
93  float yvDot_;
94  float zwDot_;
95 
96  /* added mass cross terms */
97  float kvDot_;
98  float mwDot_;
99  float nvDot_;
100  float yrDot_;
101  float ypDot_;
102  float zqDot_;
103 
104  // /* quadratic drag */
105  float kpabp_; // Kp|p| , kg-m^2
106  float mqabq_; // Mq|q| , kg-m^2
107  float nrabr_; // Nr|r| , kg-m^2
108  float xuabu_;
109  float yvabv_; // Yv|v| , kg/m
110  float zwabw_; // Zw|w| , kg/m
111  //
112  // /* quadratic drag cross terms */
113  float mwabw_; // Mw|w| , kg
114  float nvabv_; // Nv|v| , kg
115  float yrabr_; // Yr|r| , ?
116  float zqabq_; // Zq|q| , ?
117  //
118  // /* in-line lift and drag */
119  float muq_; // Muq , kg-m
120  float muw_; // Muw , kg
121  float mpr_; // Mpr , kg-m^2
122  //
123  float nur_; // Nur , kg-m
124  float nuv_; // Nuv , kg
125  float npq_; // Npq , kg-m^2
126  //
127  float xvv_; // Xvv , kg/m
128  float xww_; // Xww , kg/m
129  float xvr_; // Xvr , kg
130  float xwq_; // Xwq , kg
131  float xrr_; // Xrr , kg-m
132  float xqq_; // Xqq , kg-m
133 
134  float yur_; // Yur , kg
135  float yuv_; // Yuv , kg/m
136  float ywp_; // Ywp , kg-m
137 
138  float zuq_; // Zuq , kg
139  float zuw_; // Zuw , kg/m
140  float zvp_; // Zvp , kg
141 
142  float kvt2_; // ? , ?
143 
144  float aspectRatio_; // , Unitless
145  float stallAngle_; // , Deg.
146 
147  float rudderHystWidth_; // , rad
148  float rudderHystCenter_; // , rad
149  float rudderSpeed_; // , rad/s
150 
151  float elevatorHystWidth_; // , rad
152  float elevatorHystCenter_; // , rad
153  float elevatorSpeed_; // , rad/s
154 
155  float movableMassHystWidth_; // , meter
156  float movableMassHystCenter_; // , meter
157  float movableMassSpeed_; // , meter/s
158 
159  float buoyancyHystWidth_; // , m^3
160  float buoyancyHystCenter_; // , m^3
161  float buoyancySpeed_; // , m^3/s
162 
163  float finArea_; // , m^2
164  float coeffDrag_; // Coef. of Drag , Unitless
165  float coeffLift_; // Coef. of Lift , Unitless
166 
167  float lowerRudX_;
168  float lowerRudY_;
169  float lowerRudZ_;
170  float upperRudX_;
171  float upperRudY_;
172  float upperRudZ_;
173  float portElevX_;
174  float portElevY_;
175  float portElevZ_;
176  float stbdElevX_;
177  float stbdElevY_;
178  float stbdElevZ_;
179 
187  float dropWt1X_;
188  float dropWt1Y_;
189  float dropWt1Z_;
190 
193 
196  :
197  // Initial Position Vector
198  initLat_( 36.737845 ), // arcdeg // Initial latitude
199  initLon_( -121.8804227 ), // arcdeg // Initial longitude
200  initZ_( 0.000000 ), // m // Initial depth
201  initPitch_( 000.0000 ), // rad // Pitch wrto LV
202  initRoll_( 000.0000 ), // rad // Roll wrto LV
203  initHeading_( 0.0 ) , // rad // Yaw wrto LV
204 
205  // Initial Vehicle Configuration
206  initMassPosition_( 0.0 ), // m
207  initBuoyancyPosition_( 0.0 ), // m3
208 
209  // Initial Rate Vector
210  initU_( 0.000000 ), // m/s // vel x wrto B
211  initV_( 0.000000 ), // m/s // vel y wrto B
212  initW_( 0.000000 ), // m/s // vel z wrto B
213  initP_( 000.0000 ), // rad/s // Pitch rate wrto LV
214  initQ_( 000.0000 ), // rad/s // Roll rate wrto LV
215  initR_( 000.0000 ), // rad/s // Yaw rate wrto LV
216 
217  northCurrent_( nanf( "" ) ), // m/s // vel x wrto LV
218  eastCurrent_( nanf( "" ) ), // m/s // vel y wrto LV
219  vertCurrent_( nanf( "" ) ), // m/s // vel z wrto LV
220  magneticVariation_( nanf( "" ) ), // rad // if not specified, calculated from lat & lon
221  soundSpeed_( nanf( "" ) ), // m/s // if not specified, calculated from density, pressure
222  density_( nanf( "" ) ), // kg/m3 // sea water density.
223  sst_( nanf( "" ) ), // degK // sea surface temperature. Extends to the mixed layer depth
224  tMixed_( nanf( "" ) ), // degK // temperature at mixed layer depth. Linear change from surface
225  t300_( nanf( "" ) ), // degK // temperature at 300 meters. Linear change from mixed layer depth
226  sss_( nanf( "" ) ), // ppt // sea surface salinity. Extends to the mixed layer depth
227  sMixed_( nanf( "" ) ), // ppt // salinity at mixed layer depth. Linear change from surface
228  s300_( nanf( "" ) ), // ppt // salinity at 300 meters. Linear change from mixed layer depth
229  mixedLayerDepth_( nanf( "" ) ), // meter // depth of mixed layer
230 
231  // Recommended environmental parameter
232  defaultDensity_( 1025.00 ), // kg/m3 // Always specify: used outside of 4D model
233 
234  // Variable buoyancy setting
235  buoyancyNeutral_( nanf( "" ) ), // cc // volume in buoyancy "bag" at neutral trim
236 
237  mass_( nanf( "" ) ),
238  movableMass_( nanf( "" ) ),
239  volume_( nanf( "" ) ),
240  centerOfMassX_( nanf( "" ) ),
241  centerOfMassY_( nanf( "" ) ),
242  centerOfMassZ_( nanf( "" ) ),
243  centerOfMovableMassX_( nanf( "" ) ),
244  centerOfMovableMassY_( nanf( "" ) ),
245  centerOfMovableMassZ_( nanf( "" ) ),
246  centerOfBuoyX_( nanf( "" ) ),
247  centerOfBuoyY_( nanf( "" ) ),
248  centerOfBuoyZ_( nanf( "" ) ),
249  momentXX_( nanf( "" ) ),
250  momentYY_( nanf( "" ) ),
251  momentZZ_( nanf( "" ) ),
252 
253  //
255  //
256  //
257 /* added mass */
258  kpDot_( nanf( "" ) ),
259  mqDot_( nanf( "" ) ),
260  nrDot_( nanf( "" ) ),
261  xuDot_( nanf( "" ) ),
262  yvDot_( nanf( "" ) ),
263  zwDot_( nanf( "" ) ),
264 
265 /* added mass cross terms */
266  kvDot_( nanf( "" ) ),
267  mwDot_( nanf( "" ) ),
268  nvDot_( nanf( "" ) ),
269  yrDot_( nanf( "" ) ),
270  ypDot_( nanf( "" ) ),
271  zqDot_( nanf( "" ) ),
272 
273  // /* quadratic drag */
274  kpabp_( nanf( "" ) ), // Kp|p| , kg-m^2
275  mqabq_( nanf( "" ) ), // Mq|q| , kg-m^2
276  nrabr_( nanf( "" ) ), // Nr|r| , kg-m^2
277  xuabu_( nanf( "" ) ),
278  yvabv_( nanf( "" ) ), // Yv|v| , kg/m
279  zwabw_( nanf( "" ) ), // Zw|w| , kg/m
280  //
281  // /* quadratic drag cross terms */
282  mwabw_( nanf( "" ) ), // Mw|w| , kg
283  nvabv_( nanf( "" ) ), // Nv|v| , kg
284  yrabr_( nanf( "" ) ), // Yr|r| , ?
285  zqabq_( nanf( "" ) ), // Zq|q| , ?
286  //
287  // /* in-line lift and drag */
288  muq_( nanf( "" ) ), // Muq , kg-m
289  muw_( nanf( "" ) ), // Muw , kg
290  mpr_( nanf( "" ) ), // Mpr , kg-m^2
291  //
292  nur_( nanf( "" ) ), // Nur , kg-m
293  nuv_( nanf( "" ) ), // Nuv , kg
294  npq_( nanf( "" ) ), // Npq , kg-m^2
295  //
296  xvv_( nanf( "" ) ), // Xvv , kg/m
297  xww_( nanf( "" ) ), // Xww , kg/m
298  xvr_( nanf( "" ) ), // Xvr , kg
299  xwq_( nanf( "" ) ), // Xwq , kg
300  xrr_( nanf( "" ) ), // Xrr , kg-m
301  xqq_( nanf( "" ) ), // Xqq , kg-m
302 
303  yur_( nanf( "" ) ), // Yur , kg
304  yuv_( nanf( "" ) ), // Yuv , kg/m
305  ywp_( nanf( "" ) ), // Ywp , kg-m
306 
307  zuq_( nanf( "" ) ), // Zuq , kg
308  zuw_( nanf( "" ) ), // Zuw , kg/m
309  zvp_( nanf( "" ) ), // Zvp , kg
310 
311  kvt2_( nanf( "" ) ), // ? , ?
312 
313  aspectRatio_( nanf( "" ) ), // , Unitless
314  stallAngle_( nanf( "" ) ), // , Deg.
315 
316  rudderHystWidth_( nanf( "" ) ), // , rad
317  rudderHystCenter_( nanf( "" ) ), // , rad
318  rudderSpeed_( nanf( "" ) ), // , rad
319 
320  elevatorHystWidth_( nanf( "" ) ), // , rad
321  elevatorHystCenter_( nanf( "" ) ), // , rad
322  elevatorSpeed_( nanf( "" ) ), // , rad/sec
323 
324  movableMassHystWidth_( nanf( "" ) ), // , meter
325  movableMassHystCenter_( nanf( "" ) ), // , meter
326  movableMassSpeed_( nanf( "" ) ), // , meter/sec
327 
328  buoyancyHystWidth_( nanf( "" ) ), // , m^3
329  buoyancyHystCenter_( nanf( "" ) ), // , m^3
330  buoyancySpeed_( nanf( "" ) ), // , m^3/sec
331 
332  finArea_( nanf( "" ) ), // , m^2
333  coeffDrag_( nanf( "" ) ), // Coef. of Drag , Unitless
334  coeffLift_( nanf( "" ) ), // Coef. of Lift , Unitless
335 
336  lowerRudX_( nanf( "" ) ),
337  lowerRudY_( nanf( "" ) ),
338  lowerRudZ_( nanf( "" ) ),
339  upperRudX_( nanf( "" ) ),
340  upperRudY_( nanf( "" ) ),
341  upperRudZ_( nanf( "" ) ),
342  portElevX_( nanf( "" ) ),
343  portElevY_( nanf( "" ) ),
344  portElevZ_( nanf( "" ) ),
345  stbdElevX_( nanf( "" ) ),
346  stbdElevY_( nanf( "" ) ),
347  stbdElevZ_( nanf( "" ) ),
348 
349  designSpeed_( nanf( "" ) ),
350  designPropEff_( nanf( "" ) ),
351  designOmega_( nanf( "" ) ),
352  designThrust_( nanf( "" ) ),
353  designTorque_( nanf( "" ) ),
354  dropWt1Volume_( nanf( "" ) ),
355  dropWt1Mass_( nanf( "" ) ),
356  dropWt1X_( nanf( "" ) ),
357  dropWt1Y_( nanf( "" ) ),
358  dropWt1Z_( nanf( "" ) ),
359  cylinderLength_( nanf( "" ) ),
360  cylinderRadius_( nanf( "" ) )
361  {
362  memset( oceanModelData_, 0, sizeof( oceanModelData_ ) );
363  }
364 
365 };
366 
367 #endif /* SIMINITSTRUCT_H_ */
float stallAngle_
Definition: SimInitStruct.h:145
float ywp_
Definition: SimInitStruct.h:136
double initLon_
Definition: SimInitStruct.h:26
float upperRudX_
Definition: SimInitStruct.h:170
float elevatorHystWidth_
Definition: SimInitStruct.h:151
float yur_
Definition: SimInitStruct.h:134
float dropWt1Y_
Definition: SimInitStruct.h:188
float zvp_
Definition: SimInitStruct.h:140
float nuv_
Definition: SimInitStruct.h:124
float centerOfMassX_
Definition: SimInitStruct.h:71
double initLat_
Definition: SimInitStruct.h:25
float initR_
Definition: SimInitStruct.h:42
float designTorque_
Definition: SimInitStruct.h:184
float dropWt1Z_
Definition: SimInitStruct.h:189
float centerOfBuoyX_
Definition: SimInitStruct.h:77
float tMixed_
Definition: SimInitStruct.h:52
float portElevX_
Definition: SimInitStruct.h:173
float xuabu_
Definition: SimInitStruct.h:108
float movableMass_
Definition: SimInitStruct.h:69
float centerOfMovableMassZ_
Definition: SimInitStruct.h:76
float yrDot_
Definition: SimInitStruct.h:100
float yrabr_
Definition: SimInitStruct.h:115
float rudderHystWidth_
Definition: SimInitStruct.h:147
float s300_
Definition: SimInitStruct.h:56
float nvabv_
Definition: SimInitStruct.h:114
float finArea_
Definition: SimInitStruct.h:163
float centerOfMovableMassY_
Definition: SimInitStruct.h:75
float initMassPosition_
Definition: SimInitStruct.h:33
float yuv_
Definition: SimInitStruct.h:135
float mixedLayerDepth_
Definition: SimInitStruct.h:58
float movableMassHystCenter_
Definition: SimInitStruct.h:156
float momentXX_
Definition: SimInitStruct.h:80
float zuw_
Definition: SimInitStruct.h:139
uint8_t oceanModelData_[256]
Definition: SimInitStruct.h:57
float centerOfMassZ_
Definition: SimInitStruct.h:73
float stbdElevX_
Definition: SimInitStruct.h:176
float movableMassHystWidth_
Definition: SimInitStruct.h:155
float vertCurrent_
Definition: SimInitStruct.h:47
float coeffDrag_
Definition: SimInitStruct.h:164
float stbdElevY_
Definition: SimInitStruct.h:177
float zuq_
Definition: SimInitStruct.h:138
float t300_
Definition: SimInitStruct.h:53
float cylinderLength_
Definition: SimInitStruct.h:191
float xvv_
Definition: SimInitStruct.h:127
float centerOfMassY_
Definition: SimInitStruct.h:72
float momentZZ_
Definition: SimInitStruct.h:82
float dropWt1Volume_
Definition: SimInitStruct.h:185
float initP_
Definition: SimInitStruct.h:40
float sMixed_
Definition: SimInitStruct.h:55
float initV_
Definition: SimInitStruct.h:38
float lowerRudY_
Definition: SimInitStruct.h:168
float initZ_
Definition: SimInitStruct.h:27
float mwDot_
Definition: SimInitStruct.h:98
float initBuoyancyPosition_
Definition: SimInitStruct.h:34
float yvabv_
Definition: SimInitStruct.h:109
float muw_
Definition: SimInitStruct.h:120
float zqabq_
Definition: SimInitStruct.h:116
float nrabr_
Definition: SimInitStruct.h:107
float muq_
Definition: SimInitStruct.h:119
float zwabw_
Definition: SimInitStruct.h:110
float initPitch_
Definition: SimInitStruct.h:28
float xrr_
Definition: SimInitStruct.h:131
float centerOfBuoyY_
Definition: SimInitStruct.h:78
float coeffLift_
Definition: SimInitStruct.h:165
float designOmega_
Definition: SimInitStruct.h:182
float dropWt1Mass_
Definition: SimInitStruct.h:186
float rudderSpeed_
Definition: SimInitStruct.h:149
float buoyancyHystWidth_
Definition: SimInitStruct.h:159
float initRoll_
Definition: SimInitStruct.h:29
float sst_
Definition: SimInitStruct.h:51
float xwq_
Definition: SimInitStruct.h:130
float initQ_
Definition: SimInitStruct.h:41
float mass_
Definition: SimInitStruct.h:68
float xww_
Definition: SimInitStruct.h:128
float designSpeed_
Definition: SimInitStruct.h:180
float mqabq_
Definition: SimInitStruct.h:106
float mwabw_
Definition: SimInitStruct.h:113
float ypDot_
Definition: SimInitStruct.h:101
float designPropEff_
Definition: SimInitStruct.h:181
float portElevZ_
Definition: SimInitStruct.h:175
float dropWt1X_
Definition: SimInitStruct.h:187
float buoyancyHystCenter_
Definition: SimInitStruct.h:160
float rudderHystCenter_
Definition: SimInitStruct.h:148
float nrDot_
Definition: SimInitStruct.h:91
float designThrust_
Definition: SimInitStruct.h:183
float xvr_
Definition: SimInitStruct.h:129
float npq_
Definition: SimInitStruct.h:125
float xuDot_
Definition: SimInitStruct.h:92
float mqDot_
Definition: SimInitStruct.h:90
float kvt2_
Definition: SimInitStruct.h:142
float eastCurrent_
Definition: SimInitStruct.h:46
float zwDot_
Definition: SimInitStruct.h:94
float upperRudY_
Definition: SimInitStruct.h:171
float nvDot_
Definition: SimInitStruct.h:99
float upperRudZ_
Definition: SimInitStruct.h:172
float nur_
Definition: SimInitStruct.h:123
float elevatorSpeed_
Definition: SimInitStruct.h:153
float kpDot_
Definition: SimInitStruct.h:89
float buoyancyNeutral_
Definition: SimInitStruct.h:64
float lowerRudX_
Definition: SimInitStruct.h:167
float buoyancySpeed_
Definition: SimInitStruct.h:161
float initW_
Definition: SimInitStruct.h:39
float volume_
Definition: SimInitStruct.h:70
float kpabp_
Definition: SimInitStruct.h:105
float movableMassSpeed_
Definition: SimInitStruct.h:157
float yvDot_
Definition: SimInitStruct.h:93
float kvDot_
Definition: SimInitStruct.h:97
float stbdElevZ_
Definition: SimInitStruct.h:178
float cylinderRadius_
Definition: SimInitStruct.h:192
float centerOfMovableMassX_
Definition: SimInitStruct.h:74
float mpr_
Definition: SimInitStruct.h:121
float portElevY_
Definition: SimInitStruct.h:174
float centerOfBuoyZ_
Definition: SimInitStruct.h:79
float aspectRatio_
Definition: SimInitStruct.h:144
float initHeading_
Definition: SimInitStruct.h:30
float magneticVariation_
Definition: SimInitStruct.h:48
float momentYY_
Definition: SimInitStruct.h:81
float northCurrent_
Definition: SimInitStruct.h:45
float initU_
Definition: SimInitStruct.h:37
A struct of values that is passed from the LRAUV to the Simulator, to initialize the simulator...
Definition: SimInitStruct.h:22
float lowerRudZ_
Definition: SimInitStruct.h:169
float density_
Definition: SimInitStruct.h:50
SimInitStruct()
Constructor.
Definition: SimInitStruct.h:195
float defaultDensity_
Definition: SimInitStruct.h:61
float soundSpeed_
Definition: SimInitStruct.h:49
float sss_
Definition: SimInitStruct.h:54
float elevatorHystCenter_
Definition: SimInitStruct.h:152
float xqq_
Definition: SimInitStruct.h:132
float zqDot_
Definition: SimInitStruct.h:102