WSF
WsfSixDOF_VehicleData.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2020 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFSIXDOFVEHICLEDATA_HPP
13#define WSFSIXDOFVEHICLEDATA_HPP
14
15#include <limits>
16#include <string>
17#include <vector>
18
19class UtLLAPos;
20
21namespace wsf
22{
23namespace six_dof
24{
25namespace DataType
26{
28{
31};
32
39} // namespace DataType
40
41namespace Appearance
42{
43enum
44{
45 IsDead = 0x00000001,
46 SmokePlume = 0x00000002,
47 FlamesPresent = 0x00000004,
48 TrailingEffect = 0x00000008,
49 PowerPlantOn = 0x00000010,
50 EngineSmoking = 0x00000020,
51 AfterburnerOn = 0x00000040,
52 LightsNavOn = 0x00000100,
53 LightStrobeOn = 0x00000200,
54 LightsLandingOn = 0x00000400,
55 LightsTaxiOn = 0x00000800,
56 LightsFormationOn = 0x00001000,
57 LightsLiveryOn = 0x00002000,
58 CanopyOpen = 0x00004000,
59 ChuteDeployed = 0x00008000,
60 LauncherRaised = 0x00010000,
61 LaunchFlash = 0x00020000
62};
63}
64
65// -----------------------------------------------------------------------------------------
66
68{
69 float lat = 0.0f;
70 float lon = 0.0f;
71 float alt_m = 0.0f;
72 float speed_kias = 0.0f;
73 float speed_ktas = 0.0f;
74 float speed_mach = 0.0f;
75};
76
77// This data structure is used to define a single PID's 'gain' data for both a single
78// data case and an entry in a tabular data case
80{
81 void clearData() { *this = PidGainData(); }
82
83 float KpGain = 0.0f;
84 float KiGain = 0.0f;
85 float KdGain = 0.0f;
86 float LowpassAlpha = 1.0f;
87 float MaxAccum = std::numeric_limits<float>::max();
88 float MaxErrorZero = std::numeric_limits<float>::max();
89 float MinErrorZero = std::numeric_limits<float>::min();
90 float KtAntiWindup = 0.0f;
91 float ControllingValue = 0.0f;
92};
93
94// This data structure is used to define a single PID's 'value' data
96{
97 float SetPoint = 0.0f;
98 float CurrentValue = 0.0f;
99 float KpValue = 0.0f;
100 float KiValue = 0.0f;
101 float KdValue = 0.0f;
102 float FFValue = 0.0f;
103 float OutputBase = 0.0f;
104 float OutputLimited = 0.0f;
105 float AccumError = 0.0f;
106 bool FFValueValid = false;
107};
108
137
138// This data structure is used to define an autopilot's PID 'value' data for a given technique
162
163// This data structure is used to define various autopilot limits
165{
172
173 // Limits
174 float pitchGLoad_Min = 0.0f;
175 float pitchGLoad_Max = 1.5f;
176 float alpha_Min = 0.0f;
177 float alpha_Max = 10.0f;
178 float pitchRate_Min = -5.0f;
179 float pitchRate_Max = 10.0f;
180 float vertSpd_Min = -3000.0f;
181 float vertSpd_Max = 3000.0f;
182 float yawGLoad_Max = 0.4f;
183 float beta_Max = 10.0f;
184 float yawRate_Max = 5.0f;
185 float rollRate_Max = 50.0f;
186 float bankAngle_Max = 45.0f;
187 float forwardAccel_Min = -1.0f;
188 float forwardAccel_Max = 2.0f;
189 float taxiSpeed_Max = 10.0f;
190 float taxiYawRate_Max = 5.0f;
191};
192
193namespace Lateral
194{
196{
198 Waypoint, // Fly waypoints
199 Point, // Fly to point
200 Heading, // Fly heading
201 YawRate, // Yaw cmd, rate
202 YawGLoad, // Yaw cmd, g-load
203 Bank, // Roll cmd, bank
204 DeltaRoll, // Roll cmd, delta-roll angle
205 RollRate, // Roll cmd, rate
207};
208}
209
210namespace Vertical
211{
213{
215 Waypoint, // Fly waypoints
216 Point, // Fly to point
217 Altitude, // Hold altitude
218 VertSpeed, // Hold vert speed
219 PitchAng, // Pitch cmd, angle
220 PitchRate, // Pitch cmd, rate
221 FltPathAng, // Pitch cmd, flt-path
222 DeltaPitch, // Pitch cmd, delta-angle
223 PitchGLoad, // Pitch cmd, g-load
224 Alpha, // Pitch cmd, alpha
225
226};
227}
228
229namespace Speed
230{
232{
234 Waypoint, // Fly waypoints
235 Throttle, // Hold a particular throttle setting
236 ForwardAccel, // Fly controlling accel
237 FPS, // Fly controlling ft/sec
238 KIAS, // Fly controlling KIAS
239 KTAS, // Fly controlling KTAS
240 Mach // Fly controlling mach
241};
242}
243
244namespace Control
245{
247{
249 BankToTurnNoYaw, // Bank-to-Turn-NoYaw BTTNY uses StickBack, StickRgt, Throttle
250 BankToTurnWithYaw, // Bank-to-Turn-WithYaw BTTWY uses StickBack, StickRgt, Throttle, Rudder
251 YawToTurnNoRoll, // Yaw-to-Turn-NoRoll YTTNR uses StickBack, RudderRgt, Throttle
252 YawToTurnRollRate, // Yaw-to-Turn-RollRate YTTZRR uses StickBack, RudderRgt, Throttle, StickRgt
253 YawToTurnZeroBank // Yaw-to-Turn-ZeroBank YTTZB uses StickBack, RudderRgt, Throttle, StickRgt
254};
255
256// Convenience functions for identifying whether BTT or YTT assumptions are appropriate
257bool IsBankToTurn(Method aMethod);
258bool IsYawToTurn(Method aMethod);
259} // namespace Control
260
261namespace Nav
262{
269
276} // namespace Nav
277
278// This data structure is used to waypoint parameters to help study waypoint control performance
302
303// This data structure is used to define the main autopilot data coming repeatedly from the sim
305{
306 // Autopilot current mode values
309};
310
311// This data structure is used to define the waypoint data from the sim
318
320{
321 bool location = false;
322 bool altitude = false;
323 bool verticalSpeed = false;
324 bool fuelBurn = false;
325 bool speed = false;
326 bool yaw = false;
327 bool pitch = false;
328 bool roll = false;
329 bool testingNoLag = false;
330 bool testingNoAlpha = false;
331};
332} // namespace six_dof
333} // namespace wsf
334
335#endif
Definition WsfSixDOF_VehicleData.hpp:42
@ LightsFormationOn
Definition WsfSixDOF_VehicleData.hpp:56
@ PowerPlantOn
Definition WsfSixDOF_VehicleData.hpp:49
@ LightsNavOn
Definition WsfSixDOF_VehicleData.hpp:52
@ AfterburnerOn
Definition WsfSixDOF_VehicleData.hpp:51
@ LightsTaxiOn
Definition WsfSixDOF_VehicleData.hpp:55
@ LightsLandingOn
Definition WsfSixDOF_VehicleData.hpp:54
@ FlamesPresent
Definition WsfSixDOF_VehicleData.hpp:47
@ LauncherRaised
Definition WsfSixDOF_VehicleData.hpp:60
@ ChuteDeployed
Definition WsfSixDOF_VehicleData.hpp:59
@ TrailingEffect
Definition WsfSixDOF_VehicleData.hpp:48
@ LightsLiveryOn
Definition WsfSixDOF_VehicleData.hpp:57
@ SmokePlume
Definition WsfSixDOF_VehicleData.hpp:46
@ EngineSmoking
Definition WsfSixDOF_VehicleData.hpp:50
@ IsDead
Definition WsfSixDOF_VehicleData.hpp:45
@ LightStrobeOn
Definition WsfSixDOF_VehicleData.hpp:53
@ LaunchFlash
Definition WsfSixDOF_VehicleData.hpp:61
@ CanopyOpen
Definition WsfSixDOF_VehicleData.hpp:58
Definition WsfSixDOF_VehicleData.hpp:245
Method
Definition WsfSixDOF_VehicleData.hpp:247
@ YawToTurnRollRate
Definition WsfSixDOF_VehicleData.hpp:252
@ Undefined
Definition WsfSixDOF_VehicleData.hpp:248
@ YawToTurnNoRoll
Definition WsfSixDOF_VehicleData.hpp:251
@ BankToTurnWithYaw
Definition WsfSixDOF_VehicleData.hpp:250
@ BankToTurnNoYaw
Definition WsfSixDOF_VehicleData.hpp:249
@ YawToTurnZeroBank
Definition WsfSixDOF_VehicleData.hpp:253
bool IsBankToTurn(Method aMethod)
Definition WsfSixDOF_VehicleData.cpp:14
bool IsYawToTurn(Method aMethod)
Definition WsfSixDOF_VehicleData.cpp:19
Definition WsfSixDOF_VehicleData.hpp:26
Simple
Definition WsfSixDOF_VehicleData.hpp:28
@ Float
Definition WsfSixDOF_VehicleData.hpp:29
@ Boolean
Definition WsfSixDOF_VehicleData.hpp:30
Angular
Definition WsfSixDOF_VehicleData.hpp:34
@ AngleDeg
Definition WsfSixDOF_VehicleData.hpp:36
@ AngleRad
Definition WsfSixDOF_VehicleData.hpp:37
@ Normalized
Definition WsfSixDOF_VehicleData.hpp:35
Definition WsfSixDOF_VehicleData.hpp:194
Mode
Definition WsfSixDOF_VehicleData.hpp:196
@ Beta
Definition WsfSixDOF_VehicleData.hpp:206
@ Undefined
Definition WsfSixDOF_VehicleData.hpp:197
@ Point
Definition WsfSixDOF_VehicleData.hpp:199
@ Waypoint
Definition WsfSixDOF_VehicleData.hpp:198
@ YawGLoad
Definition WsfSixDOF_VehicleData.hpp:202
@ Bank
Definition WsfSixDOF_VehicleData.hpp:203
@ RollRate
Definition WsfSixDOF_VehicleData.hpp:205
@ DeltaRoll
Definition WsfSixDOF_VehicleData.hpp:204
@ YawRate
Definition WsfSixDOF_VehicleData.hpp:201
@ Heading
Definition WsfSixDOF_VehicleData.hpp:200
Definition WsfSixDOF_VehicleData.hpp:262
LegType
Definition WsfSixDOF_VehicleData.hpp:264
@ FollowTrack
Definition WsfSixDOF_VehicleData.hpp:266
@ DirectTo
Definition WsfSixDOF_VehicleData.hpp:267
@ LegUndefined
Definition WsfSixDOF_VehicleData.hpp:265
SwitchingType
Definition WsfSixDOF_VehicleData.hpp:271
@ SwitchUndefined
Definition WsfSixDOF_VehicleData.hpp:272
@ OnPassing
Definition WsfSixDOF_VehicleData.hpp:274
@ OnApproach
Definition WsfSixDOF_VehicleData.hpp:273
Definition WsfSixDOF_VehicleData.hpp:110
Type
Definition WsfSixDOF_VehicleData.hpp:112
@ TaxiForwardAccel
Definition WsfSixDOF_VehicleData.hpp:131
@ LastPidType
Definition WsfSixDOF_VehicleData.hpp:134
@ TaxiHeading
Definition WsfSixDOF_VehicleData.hpp:124
@ Unknown
Definition WsfSixDOF_VehicleData.hpp:113
@ PitchAngle
Definition WsfSixDOF_VehicleData.hpp:116
@ RollHeading
Definition WsfSixDOF_VehicleData.hpp:128
@ RollRate
Definition WsfSixDOF_VehicleData.hpp:125
@ Alpha
Definition WsfSixDOF_VehicleData.hpp:114
@ PitchRate
Definition WsfSixDOF_VehicleData.hpp:117
@ DeltaRoll
Definition WsfSixDOF_VehicleData.hpp:126
@ DeltaPitch
Definition WsfSixDOF_VehicleData.hpp:119
@ TaxiYawRate
Definition WsfSixDOF_VehicleData.hpp:133
@ YawRate
Definition WsfSixDOF_VehicleData.hpp:122
@ BankAngle
Definition WsfSixDOF_VehicleData.hpp:127
@ ForwardAccel
Definition WsfSixDOF_VehicleData.hpp:129
@ TaxiSpeed
Definition WsfSixDOF_VehicleData.hpp:132
@ VerticalSpeed
Definition WsfSixDOF_VehicleData.hpp:115
@ Speed
Definition WsfSixDOF_VehicleData.hpp:130
@ YawHeading
Definition WsfSixDOF_VehicleData.hpp:123
@ FlightPathAngle
Definition WsfSixDOF_VehicleData.hpp:118
@ Altitude
Definition WsfSixDOF_VehicleData.hpp:120
@ Beta
Definition WsfSixDOF_VehicleData.hpp:121
Definition WsfSixDOF_VehicleData.hpp:230
Mode
Definition WsfSixDOF_VehicleData.hpp:232
@ Undefined
Definition WsfSixDOF_VehicleData.hpp:233
@ Throttle
Definition WsfSixDOF_VehicleData.hpp:235
@ Mach
Definition WsfSixDOF_VehicleData.hpp:240
@ KTAS
Definition WsfSixDOF_VehicleData.hpp:239
@ ForwardAccel
Definition WsfSixDOF_VehicleData.hpp:236
@ FPS
Definition WsfSixDOF_VehicleData.hpp:237
@ KIAS
Definition WsfSixDOF_VehicleData.hpp:238
@ Waypoint
Definition WsfSixDOF_VehicleData.hpp:234
Definition WsfSixDOF_VehicleData.hpp:211
Mode
Definition WsfSixDOF_VehicleData.hpp:213
@ Altitude
Definition WsfSixDOF_VehicleData.hpp:217
@ PitchGLoad
Definition WsfSixDOF_VehicleData.hpp:223
@ DeltaPitch
Definition WsfSixDOF_VehicleData.hpp:222
@ FltPathAng
Definition WsfSixDOF_VehicleData.hpp:221
@ Waypoint
Definition WsfSixDOF_VehicleData.hpp:215
@ Alpha
Definition WsfSixDOF_VehicleData.hpp:224
@ Undefined
Definition WsfSixDOF_VehicleData.hpp:214
@ PitchAng
Definition WsfSixDOF_VehicleData.hpp:219
@ Point
Definition WsfSixDOF_VehicleData.hpp:216
@ PitchRate
Definition WsfSixDOF_VehicleData.hpp:220
@ VertSpeed
Definition WsfSixDOF_VehicleData.hpp:218
Definition WsfSA_Processor.hpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Definition WsfSixDOF_VehicleData.hpp:305
bool autopilotEnabled
Definition WsfSixDOF_VehicleData.hpp:307
NavWaypointParameters navWaypointParameters
Definition WsfSixDOF_VehicleData.hpp:308
Definition WsfSixDOF_VehicleData.hpp:165
float yawGLoad_Max
Definition WsfSixDOF_VehicleData.hpp:182
float afterburnerThreshold
Definition WsfSixDOF_VehicleData.hpp:168
float forwardAccel_Max
Definition WsfSixDOF_VehicleData.hpp:188
float vertSpd_Min
Definition WsfSixDOF_VehicleData.hpp:180
float routeAllowableAngleError_rad
Definition WsfSixDOF_VehicleData.hpp:171
float taxiYawRate_Max
Definition WsfSixDOF_VehicleData.hpp:190
float taxiSpeed_Max
Definition WsfSixDOF_VehicleData.hpp:189
float alpha_Max
Definition WsfSixDOF_VehicleData.hpp:177
float beta_Max
Definition WsfSixDOF_VehicleData.hpp:183
bool enableSpeedBrakeAutoControl
Definition WsfSixDOF_VehicleData.hpp:167
float rollRate_Max
Definition WsfSixDOF_VehicleData.hpp:185
float pitchGLoad_Min
Definition WsfSixDOF_VehicleData.hpp:174
float alpha_Min
Definition WsfSixDOF_VehicleData.hpp:176
float pitchGLoad_Max
Definition WsfSixDOF_VehicleData.hpp:175
float turnRollInMultiplier
Definition WsfSixDOF_VehicleData.hpp:170
float speedBrakeThreshold
Definition WsfSixDOF_VehicleData.hpp:169
float vertSpd_Max
Definition WsfSixDOF_VehicleData.hpp:181
float forwardAccel_Min
Definition WsfSixDOF_VehicleData.hpp:187
float yawRate_Max
Definition WsfSixDOF_VehicleData.hpp:184
float bankAngle_Max
Definition WsfSixDOF_VehicleData.hpp:186
float pitchRate_Max
Definition WsfSixDOF_VehicleData.hpp:179
float pitchRate_Min
Definition WsfSixDOF_VehicleData.hpp:178
bool enableAfterburnerAutoControl
Definition WsfSixDOF_VehicleData.hpp:166
Definition WsfSixDOF_VehicleData.hpp:140
SinglePidValueData flightPathAnglePID
Definition WsfSixDOF_VehicleData.hpp:145
SinglePidValueData yawheadingPID
Definition WsfSixDOF_VehicleData.hpp:150
SinglePidValueData rollHeadingPID
Definition WsfSixDOF_VehicleData.hpp:155
SinglePidValueData deltaPitchPID
Definition WsfSixDOF_VehicleData.hpp:146
SinglePidValueData pitchRatePID
Definition WsfSixDOF_VehicleData.hpp:144
SinglePidValueData alphaPID
Definition WsfSixDOF_VehicleData.hpp:141
SinglePidValueData forwardAccelPID
Definition WsfSixDOF_VehicleData.hpp:156
SinglePidValueData altitudePID
Definition WsfSixDOF_VehicleData.hpp:147
SinglePidValueData betaPID
Definition WsfSixDOF_VehicleData.hpp:148
SinglePidValueData rollRatePID
Definition WsfSixDOF_VehicleData.hpp:152
SinglePidValueData taxiSpeedPID
Definition WsfSixDOF_VehicleData.hpp:159
SinglePidValueData taxiHeadingPID
Definition WsfSixDOF_VehicleData.hpp:151
SinglePidValueData taxiForwardAccelPID
Definition WsfSixDOF_VehicleData.hpp:158
SinglePidValueData taxiYawRatePID
Definition WsfSixDOF_VehicleData.hpp:160
SinglePidValueData deltaRollPID
Definition WsfSixDOF_VehicleData.hpp:153
SinglePidValueData verticalSpeedPID
Definition WsfSixDOF_VehicleData.hpp:142
SinglePidValueData bankAnglePID
Definition WsfSixDOF_VehicleData.hpp:154
SinglePidValueData pitchAnglePID
Definition WsfSixDOF_VehicleData.hpp:143
SinglePidValueData yawRatePID
Definition WsfSixDOF_VehicleData.hpp:149
SinglePidValueData speedPID
Definition WsfSixDOF_VehicleData.hpp:157
Definition WsfSixDOF_VehicleData.hpp:313
unsigned char waypointListNumItems
Definition WsfSixDOF_VehicleData.hpp:315
unsigned char currentWaypointIndex
Definition WsfSixDOF_VehicleData.hpp:314
AutopilotWaypointData waypointListData[50]
Definition WsfSixDOF_VehicleData.hpp:316
Definition WsfSixDOF_VehicleData.hpp:68
float speed_ktas
Definition WsfSixDOF_VehicleData.hpp:73
float speed_mach
Definition WsfSixDOF_VehicleData.hpp:74
float alt_m
Definition WsfSixDOF_VehicleData.hpp:71
float speed_kias
Definition WsfSixDOF_VehicleData.hpp:72
float lat
Definition WsfSixDOF_VehicleData.hpp:69
float lon
Definition WsfSixDOF_VehicleData.hpp:70
Definition WsfSixDOF_VehicleData.hpp:320
bool verticalSpeed
Definition WsfSixDOF_VehicleData.hpp:323
bool pitch
Definition WsfSixDOF_VehicleData.hpp:327
bool roll
Definition WsfSixDOF_VehicleData.hpp:328
bool testingNoAlpha
Definition WsfSixDOF_VehicleData.hpp:330
bool fuelBurn
Definition WsfSixDOF_VehicleData.hpp:324
bool yaw
Definition WsfSixDOF_VehicleData.hpp:326
bool altitude
Definition WsfSixDOF_VehicleData.hpp:322
bool testingNoLag
Definition WsfSixDOF_VehicleData.hpp:329
bool speed
Definition WsfSixDOF_VehicleData.hpp:325
bool location
Definition WsfSixDOF_VehicleData.hpp:321
Definition WsfSixDOF_VehicleData.hpp:280
float navWaypointPrevLon
Definition WsfSixDOF_VehicleData.hpp:285
float navWaypointTurnRadius_m
Definition WsfSixDOF_VehicleData.hpp:295
float navWaypointNextLat
Definition WsfSixDOF_VehicleData.hpp:290
float navWaypointTurnCenterLon
Definition WsfSixDOF_VehicleData.hpp:300
float navWaypointCurrLon
Definition WsfSixDOF_VehicleData.hpp:288
float navWaypointTurnCenterLat
Definition WsfSixDOF_VehicleData.hpp:299
float navWaypointTurnRefPtLon
Definition WsfSixDOF_VehicleData.hpp:298
float navWaypointTurnAngle_rad
Definition WsfSixDOF_VehicleData.hpp:296
bool navWaypointDataValid
Definition WsfSixDOF_VehicleData.hpp:281
float navWaypointCurrLat
Definition WsfSixDOF_VehicleData.hpp:287
float navWaypointCurrAlt
Definition WsfSixDOF_VehicleData.hpp:289
float navWaypointTurnRefPtLat
Definition WsfSixDOF_VehicleData.hpp:297
float navWaypointPrevAlt
Definition WsfSixDOF_VehicleData.hpp:286
float navWaypointAimHeading_rad
Definition WsfSixDOF_VehicleData.hpp:293
Nav::LegType navWaypointLegType
Definition WsfSixDOF_VehicleData.hpp:282
float navWaypointNextLon
Definition WsfSixDOF_VehicleData.hpp:291
Nav::SwitchingType navWaypointSwitchingType
Definition WsfSixDOF_VehicleData.hpp:283
float navWaypointNextAlt
Definition WsfSixDOF_VehicleData.hpp:292
float navWaypointStartTurnHdg_rad
Definition WsfSixDOF_VehicleData.hpp:294
float navWaypointPrevLat
Definition WsfSixDOF_VehicleData.hpp:284
Definition WsfSixDOF_VehicleData.hpp:80
float KdGain
Definition WsfSixDOF_VehicleData.hpp:85
float KiGain
Definition WsfSixDOF_VehicleData.hpp:84
float ControllingValue
Definition WsfSixDOF_VehicleData.hpp:91
float KtAntiWindup
Definition WsfSixDOF_VehicleData.hpp:90
void clearData()
Definition WsfSixDOF_VehicleData.hpp:81
float LowpassAlpha
Definition WsfSixDOF_VehicleData.hpp:86
float KpGain
Definition WsfSixDOF_VehicleData.hpp:83
float MaxErrorZero
Definition WsfSixDOF_VehicleData.hpp:88
float MaxAccum
Definition WsfSixDOF_VehicleData.hpp:87
float MinErrorZero
Definition WsfSixDOF_VehicleData.hpp:89
Definition WsfSixDOF_VehicleData.hpp:96
float KdValue
Definition WsfSixDOF_VehicleData.hpp:101
float KpValue
Definition WsfSixDOF_VehicleData.hpp:99
float KiValue
Definition WsfSixDOF_VehicleData.hpp:100
float CurrentValue
Definition WsfSixDOF_VehicleData.hpp:98
bool FFValueValid
Definition WsfSixDOF_VehicleData.hpp:106
float AccumError
Definition WsfSixDOF_VehicleData.hpp:105
float FFValue
Definition WsfSixDOF_VehicleData.hpp:102
float OutputLimited
Definition WsfSixDOF_VehicleData.hpp:104
float OutputBase
Definition WsfSixDOF_VehicleData.hpp:103
float SetPoint
Definition WsfSixDOF_VehicleData.hpp:97
Copyrights Multiple, All Rights Reserved