WSF
WsfSixDOF_PilotObject.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 WSFSIXDOFPILOTOBJECT_HPP
13#define WSFSIXDOFPILOTOBJECT_HPP
14
15#include "wsf_six_dof_export.h"
16
17#include <cinttypes>
18#include <string>
19#include <vector>
20
21#include "UtCallback.hpp"
22#include "UtCallbackHolder.hpp"
23#include "UtCloneablePtr.hpp"
24#include "UtInput.hpp"
27#include "WsfSixDOF_Object.hpp"
28#include "WsfSixDOF_Route.hpp"
31
32namespace wsf
33{
34namespace six_dof
35{
36class KinematicState;
37
38class WSF_SIX_DOF_EXPORT PilotObject : public Object
39{
40public:
41 PilotObject() = default;
42
43 PilotObject& operator=(const PilotObject& other) = delete;
44
45 // In most instances, PilotObject children should override this function
46 virtual bool ProcessInput(UtInput& aInput);
47
48 // In many instances, PilotObject children should override this function
49 void Update(int64_t aSimTime_nanosec);
50
51 virtual void ManageFrozenControls() = 0;
52
53 void SetLastSimTime(int64_t aLastSimTime_nanosec) { mLastSimTime_nanosec = aLastSimTime_nanosec; }
54
55 // This returns the "type" of pilot object -- each child of this class
56 // should override this function.
57 virtual std::string GetPilotType() const = 0;
58
59 // Callback function for achieving waypoint. The callback registration
60 // should be performed in Mover.
61 UtCallbackListN<bool(unsigned int)> WaypointAchieved;
62
63 // Pilot manager functions -------------------------------------------------------------
64
65 // PilotManager Functions -- These functions (which are inherited,
66 // and not overridable) are called by the PilotManager as it conveys
67 // information to each PilotObject that it manages.
68
69 // This function should be called every update by PilotManager,
70 // which will be called from Mover. Each PilotObject passes these
71 // values to its CommonController (autopilot), if one exists, where
72 // values can be differentiated to determine deltaRoll, for example.
73 void InputAngleDeltas(double aYaw_rad, double aPitch_rad, double aRoll_rad);
74
75 // This enables/disables controls. When controls are disabled,
76 // all control inputs are set to zero.
77 void EnableControlInputs(bool aEnabled) { mControlsEnabled = aEnabled; }
78
79 // This returns the controls enabled/disabled state.
80 bool ControlsAreEnabled() const { return mControlsEnabled; }
81
82 // This function is called by PilotManager when the Mover is destroyed in flight.
83 virtual void SetDestroyed();
84
85 // Control input positions -------------------------------------------------------------
86
87 // These functions return the current positions of specified control inputs
88
89 // This returns the current stick back control input position
90 virtual double GetStickBackControllerPosition() const = 0;
91
92 // This returns the current stick right control input position
93 virtual double GetStickRightControllerPosition() const = 0;
94
95 // This returns the current rudder right control input position
96 virtual double GetRudderRightControllerPosition() const = 0;
97
98 // This returns the current throttle control input position,
99 // using IDLE=0, MIL=1.0, and AB=2.0
100 virtual double GetThrottleControllerPosition() const = 0;
101
102 // This returns the current military (non-afterburner) throttle control
103 // input position. For a combined military/afterburner throttle value,
104 // use GetThrottleControllerPosition() instead.
105 virtual double GetThrottleMilitaryControllerPosition() const = 0;
106
107 // This returns the current afterburner throttle control input
108 // position. For a combined military/afterburner throttle value,
109 // use GetThrottleControllerPosition() instead.
111
112 // This returns the current speed brakes control input position
113 virtual double GetSpeedBrakesControllerPosition() const = 0;
114
115 // This returns the current flaps control input position
116 virtual double GetFlapsControllerPosition() const = 0;
117
118 // This returns the current landing gear control input position
119 virtual double GetLandingGearControllerPosition() const = 0;
120
121 // This returns the current spoilers control input position
122 virtual double GetSpoilersControllerPosition() const = 0;
123
124 // This returns the current thrust reverser control input position
125 virtual double GetThrustReverserControllerPosition() const = 0;
126
127 // Manual pilot functions --------------------------------------------------------------
128 // TODO -- These will be moved to the manual pilot classes, as appropriate
129
130 // These functions provide an interface for a ManualPilot controlled via
131 // input from a crew station.
132
133 // This returns true if "external manual control" is active
134 virtual bool UsingManualControl() const;
135
136 // When called, controls will be set through SetManualControlData()
137 virtual void TakeManualControl();
138
139 // When called, the autopilot will gain control
140 virtual void ReleaseManualControl();
141
142 // This allows external controls to be "injected" into the PilotObject.
143 // This variant allows a reduced set of inputs, omitting rudder.
144 // The aStickRightPosition and aStickAftPosition values are +/-1. The
145 // aSpdBrakeLeverPosition, aSpoilerLeverPosition, and aFlapsLeverPosition
146 // are 0-1. The aThrottleLeverPosition assumes that 0 is idle, 1 is full power
147 // without augmentation/afterburner (military power), and 2 is full power
148 // with full augmentation/afterburner (full afterburner).
149 virtual void SetManualControlData(double aStickRightPosition,
150 double aStickAftPosition,
151 double aThrottleLeverPosition,
152 double aSpdBrakeLeverPosition,
153 double aSpoilerLeverPosition,
154 double aFlapsLeverPosition) = 0;
155
156 // This allows external controls to be "injected" into the PilotObject.
157 // This variant includes rudder control. The aStickRightPosition, aStickAftPosition
158 // and aRudderRightPosition values are +/-1. The aSpdBrakeLeverPosition,
159 // aSpoilerLeverPosition, and aFlapsLeverPosition are 0-1. The
160 // aThrottleLeverPosition assumes that 0 is idle, 1 is full power without
161 // augmentation/afterburner (military power), and 2 is full power with full
162 // augmentation/afterburner (full afterburner).
163 virtual void SetManualControlData(double aStickRightPosition,
164 double aStickAftPosition,
165 double aRudderRightPosition,
166 double aThrottleLeverPosition,
167 double aSpdBrakeLeverPosition,
168 double aSpoilerLeverPosition,
169 double aFlapsLeverPosition) = 0;
170
171 // This allows external controls to be "injected" into the PilotObject.
172 // This variant adds landing gear control. The aStickRightPosition, aStickAftPosition
173 // and aRudderRightPosition values are +/-1. The aSpdBrakeLeverPosition,
174 // aSpoilerLeverPosition, aFlapsLeverPosition, and aLandingGearLeverPosition are 0-1.
175 // The aThrottleLeverPosition assumes that 0 is idle, 1 is full power without
176 // augmentation/afterburner (military power), and 2 is full power with full
177 // augmentation/afterburner (full afterburner). The aLandingGearLeverPosition assumes
178 // that 0 is gear up and 1 is gear full down and locked.
179 virtual void SetManualControlData(double aStickRightPosition,
180 double aStickAftPosition,
181 double aRudderRightPosition,
182 double aThrottleLeverPosition,
183 double aSpdBrakeLeverPosition,
184 double aSpoilerLeverPosition,
185 double aFlapsLeverPosition,
186 double aLandingGearLeverPosition) = 0;
187
188 // This allows external controls to be "injected" into the PilotObject.
189 // This variant adds thrust vectoring and enhanced landing gear and braking
190 // controls. The aStickRightPosition, aStickAftPosition, aRudderRightPosition,
191 // aThrustVectorYawRightPosition, aThrustVectorPitchUpPosition,
192 // aThrustVectorRollRightPosition, and aNoseWheelSteeringRightPosition values
193 // are +/-1. The aWheelBrakeLeftPosition and aWheelBrakeRightPosition assume
194 // that 0 is brake off and 1 is full brake. The aSpdBrakeLeverPosition,
195 // aSpoilerLeverPosition, aFlapsLeverPosition, and aLandingGearLeverPosition
196 // are 0-1. The aThrottleLeverPosition assumes that 0 is idle, 1 is full power
197 // without augmentation/afterburner (military power), and 2 is full power with
198 // full augmentation/afterburner (full afterburner). The
199 // aThrustReverserLeverPosition assumes that 0 is no reverser and 1 is full
200 // reverser. The aLandingGearLeverPosition assumes that 0 is gear up and 1 is
201 // gear full down and locked. The aNWS_Enabled is a flag to enable/disable
202 // Nose Wheel Steering (NWS) and assumes false is normal mode and true is NWS
203 // mode. NWS mode provides a greater range of motion for the nose wheel, often
204 // used when taxiing.
205 virtual void SetManualControlData(double aStickRightPosition,
206 double aStickAftPosition,
207 double aRudderRightPosition,
208 double aThrottleLeverPosition,
209 double aThrustReverserLeverPosition,
210 double aThrustVectorYawRightPosition,
211 double aThrustVectorPitchUpPosition,
212 double aThrustVectorRollRightPosition,
213 double aSpdBrakeLeverPosition,
214 double aSpoilerLeverPosition,
215 double aFlapsLeverPosition,
216 double aLandingGearLeverPosition,
217 double aNoseWheelSteeringRightPosition,
218 double aWheelBrakeLeftPosition,
219 double aWheelBrakeRightPosition,
220 bool aNWS_Enabled) = 0;
221
222 // These functions provide control for CAS
223
224 virtual void SetControlAugmentationModeActive(bool aCASIsActive);
225 virtual bool ControlAugmentationModeIsActive() const;
226
227 // This allows external trim inputs to be "injected" into the PilotObject.
228 // The values represent how long the trim switch has been pressed multiplied
229 // by the direction. Thus, a negative direction will result in a negative value.
230 virtual void SetTrimManualControlData(double aNoseUpTrimDeltaT_sec,
231 double aRollRightTrimDeltaT_sec,
232 double aYawRightTrimDeltaT_sec);
233
234 // Synthetic pilot functions -----------------------------------------------------------
235 // TODO -- These will be moved to the synthetic pilot class, as appropriate
236
237 // These functions provide an interface for a SyntheticPilot controlled via
238 // script commands
239
240 // When called, controls will be set through SetControlData()
241 virtual void TakeExternalDirectControl();
242
243 // When called, the autopilot will gain control
244 virtual void ReleaseExternalDirectControl();
245
246 // This allows external controls to be "injected" into the PilotObject.
247 // This variant allows a reduced set of inputs, omitting rudder.
248 // The aStickRightPosition and aStickAftPosition values are +/-1. The
249 // aSpdBrakeLeverPosition, aSpoilerLeverPosition, and aFlapsLeverPosition
250 // are 0-1. The aThrottleLeverPosition assumes that 0 is idle, 1 is full power
251 // without augmentation/afterburner (military power), and 2 is full power
252 // with full augmentation/afterburner (full afterburner).
253 virtual void SetExternalDirectControlData(double aStickRightPosition,
254 double aStickAftPosition,
255 double aThrottleLeverPosition,
256 double aSpdBrakeLeverPosition,
257 double aSpoilerLeverPosition,
258 double aFlapsLeverPosition) = 0;
259
260 // This allows external controls to be "injected" into the PilotObject.
261 // This variant includes rudder control. The aStickRightPosition, aStickAftPosition
262 // and aRudderRightPosition values are +/-1. The aSpdBrakeLeverPosition,
263 // aSpoilerLeverPosition, and aFlapsLeverPosition are 0-1. The
264 // aThrottleLeverPosition assumes that 0 is idle, 1 is full power without
265 // augmentation/afterburner (military power), and 2 is full power with full
266 // augmentation/afterburner (full afterburner).
267 virtual void SetExternalDirectControlData(double aStickRightPosition,
268 double aStickAftPosition,
269 double aRudderRightPosition,
270 double aThrottleLeverPosition,
271 double aSpdBrakeLeverPosition,
272 double aSpoilerLeverPosition,
273 double aFlapsLeverPosition) = 0;
274
275 // This allows external controls to be "injected" into the PilotObject.
276 // This variant adds landing gear control. The aStickRightPosition, aStickAftPosition
277 // and aRudderRightPosition values are +/-1. The aSpdBrakeLeverPosition,
278 // aSpoilerLeverPosition, aFlapsLeverPosition, and aLandingGearLeverPosition are 0-1.
279 // The aThrottleLeverPosition assumes that 0 is idle, 1 is full power without
280 // augmentation/afterburner (military power), and 2 is full power with full
281 // augmentation/afterburner (full afterburner). The aLandingGearLeverPosition assumes
282 // that 0 is gear up and 1 is gear full down and locked.
283 virtual void SetExternalDirectControlData(double aStickRightPosition,
284 double aStickAftPosition,
285 double aRudderRightPosition,
286 double aThrottleLeverPosition,
287 double aSpdBrakeLeverPosition,
288 double aSpoilerLeverPosition,
289 double aFlapsLeverPosition,
290 double aLandingGearLeverPosition) = 0;
291
292 // This allows external controls to be "injected" into the PilotObject.
293 // This variant adds thrust vectoring and enhanced landing gear and braking
294 // controls. The aStickRightPosition, aStickAftPosition, aRudderRightPosition,
295 // aThrustVectorYawRightPosition, aThrustVectorPitchUpPosition,
296 // aThrustVectorRollRightPosition, and aNoseWheelSteeringRightPosition values
297 // are +/-1. The aWheelBrakeLeftPosition and aWheelBrakeRightPosition assume
298 // that 0 is brake off and 1 is full brake. The aSpdBrakeLeverPosition,
299 // aSpoilerLeverPosition, aFlapsLeverPosition, and aLandingGearLeverPosition
300 // are 0-1. The aThrottleLeverPosition assumes that 0 is idle, 1 is full power
301 // without augmentation/afterburner (military power), and 2 is full power with
302 // full augmentation/afterburner (full afterburner). The
303 // aThrustReverserLeverPosition assumes that 0 is no reverser and 1 is full
304 // reverser. The aLandingGearLeverPosition assumes that 0 is gear up and 1 is
305 // gear full down and locked. The aNWS_Enabled is a flag to enable/disable
306 // Nose Wheel Steering (NWS) and assumes false is normal mode and true is NWS
307 // mode. NWS mode provides a greater range of motion for the nose wheel, often
308 // used when taxiing.
309 virtual void SetExternalDirectControlData(double aStickRightPosition,
310 double aStickAftPosition,
311 double aRudderRightPosition,
312 double aThrottleLeverPosition,
313 double aThrustReverserLeverPosition,
314 double aThrustVectorYawRightPosition,
315 double aThrustVectorPitchUpPosition,
316 double aThrustVectorRollRightPosition,
317 double aSpdBrakeLeverPosition,
318 double aSpoilerLeverPosition,
319 double aFlapsLeverPosition,
320 double aLandingGearLeverPosition,
321 double aNoseWheelSteeringRightPosition,
322 double aWheelBrakeLeftPosition,
323 double aWheelBrakeRightPosition,
324 bool aNWS_Enabled) = 0;
325
326 // This allows external trim inputs to be "injected" into the PilotObject.
327 // The values represent how long the trim switch has been pressed multiplied
328 // by the direction. Thus, a negative direction will result in a negative value.
329 virtual void SetExternalDirectControlTrimManualControlData(double aNoseUpTrimDeltaT_sec,
330 double aRollRightTrimDeltaT_sec,
331 double aYawRightTrimDeltaT_sec);
332
333 // Testing support functions -----------------------------------------------------------
334
335 // Testing Support -- These functions are used when testing. Note that they are
336 // inherited, and are not overridable, since all PilotObjects support "testing".
337
338 // This returns true if "testing control" is active
339 bool UsingTestControl() const { return mTestControl; }
340
341 // When called, controls will only respond to SetTest<type>ControllerPosition()
342 // functions.
343 void TakeTestControl();
344
345 // When called, normal (non-test) control inputs will be used.
346 void ReleaseTestControl();
347
348 // This next group of functions are typically used to set controls for testing
349 // and "calculation" functions.
350
351 // Sets the stick right control: -1=Full Forward (nose down), 0=Neutral,
352 // 1=Full Aft (nose up)
353 virtual void SetTestStickBackControllerPosition(double aStickAftPosition) = 0;
354
355 // Sets the stick right control: -1=Full Left, 0=Neutral, 1=Full Right
356 virtual void SetTestStickRightControllerPosition(double aStickRightPosition) = 0;
357
358 // Sets the rudder right control: -1=Full Left, 0=Neutral, 1=Full Right
359 virtual void SetTestRudderRightControllerPosition(double aRudderRightPosition) = 0;
360
361 // Sets the speed brake control: 0=Closed, 1=Open
362 virtual void SetTestSpeedBrakesControllerPosition(double aSpeedBrakesPosition) = 0;
363
364 // Sets the flaps control: 0=Retracted, 1=Fully Extended
365 virtual void SetTestFlapsControllerPosition(double aFlapsPosition) = 0;
366
367 // Sets the spoilers control: 0=Retracted, 1=Fully Extended
368 virtual void SetTestSpoilersControllerPosition(double aSpoilersPosition) = 0;
369
370 // Sets the landing gear control: 0=Retracted, 1=Fully Extended
371 virtual void SetTestLandingGearControllerPosition(double aLandingGearPosition) = 0;
372
373 // This sets the throttle control (combined afterburner/military setting).
374 // The throttle controller position assumes that 0 is idle, 1 is full power
375 // without augmentation/afterburner (military power), and 2 is full power
376 // with full augmentation/afterburner (full afterburner)
377 virtual void SetTestThrottleControllerPosition(double aThrottlePosition);
378
379 // This sets the current military (non-afterburner) throttle control input position
380 virtual void SetTestThrottleMilitaryControllerPosition(double aThrottleLeverPosition);
381
382 // This sets the current afterburner throttle control input position
383 virtual void SetTestThrottleAfterburnerControllerPosition(double aThrottleLeverPosition);
384
385 // These functions provide the ability to "preposition" the vehicle to a
386 // specified altitude and speed during testing. Note that these should only be
387 // used in testing, since they directly modify the speed/altitude.
388
389 // Prepositions the vehicle to the specified altitude (ft) and KTAS.
390 // Note: This should only be used in testing mode.
391 virtual void SetPrePositionTAS(double aAltitude_ft, double aKTAS);
392
393 // Prepositions the vehicle to the specified altitude (ft) and KCAS.
394 // Note: This should only be used in testing mode.
395 virtual void SetPrePositionCAS(double aAltitude_ft, double aKCAS);
396
397 // Prepositions the vehicle to the specified altitude (ft) and Mach.
398 // Note: This should only be used in testing mode.
399 virtual void SetPrePositionMach(double aAltitude_ft, double aMach);
400
401 // Prepositions the vehicle to the specified altitude (ft) and Dynamic Pressure.
402 // Note: This should only be used in testing mode.
403 virtual void SetPrePositionQ(double aAltitude_ft, double aDynamicPressure_lbft2);
404
405 // -------------------------------------------------------------------------------------
406
407 // These functions provide an interface for autopilot commands
408 // TODO -- These will be moved to the other derived pilot classes, as appropriate
409
411
412 // This loads a AutopilotData with data
413 virtual void GetAutopilotData(AutopilotData* aData);
414
415 // This loads a sAutopilotPidGroupGainData with data and returns true if data is valid
416 virtual bool GetAutopilotPidGainData(Pid::Type aTableType, size_t& aNumElements, PidGainData aPidGainData[]);
417
418 // This loads a AutopilotPidGroupValueData with data and returns true if data is valid
420
421 // Set the planned route
422 // Note this function takes ownership of aRoute and will delete it!
423 virtual void SetPlannedRoute(Route* aRoute);
424
425 // Set the temporary route
426 // Note this function takes ownership of aRoute and will delete it!
427 virtual void SetTempRoute(Route* aRoute);
428
429 // -------------------------------------------------------------------------------------
430
431 // Theses functions provide additional controls for afterburner and speed brakes and
432 // define how the CommonController (autopilot) will utilize them.
433
434 // These functions provide special "override" commands
435
436 // Afterburner use is enabled by default, but can be enabled/disabled
437
438 virtual bool GetAfterburnerEnabled() const;
439 virtual void SetAfterburnerEnabled(bool aEnabled);
440
441 // Afterburner will be used (if enabled) if command exceeds the threshold value
442
443 virtual double GetAfterburnerThreshold() const;
444 virtual void SetAfterburnerThreshold(double aValue = 1.0);
445
446 // Speed brake use is enabled by default, but can be enabled/disabled
447
448 virtual bool GetSpeedBrakeEnabled() const;
449 virtual void SetSpeedBrakeEnabled(bool aEnabled);
450
451 // Speed brake will be used (if enabled) if command is less than the threshold value
452 virtual double GetSpeedBrakeThreshold() const;
453 virtual void SetSpeedBrakeThreshold(double aValue = 0.0);
454
455 // Returns the current turn roll-in multiplier for autopilot turns when following waypoints
457
458 // Sets the current turn roll-in multiplier for autopilot turns when following waypoints
459 void SetTurnRollInMultiplier(double aValue = 1.0);
460
461 // -------------------------------------------------------------------------------------
462
463 // The CommonController (autopilot) typically controls the throttle and speed brakes
464 // as part of its speed control. However, these can be overridden with direct commands.
465
467
469
470 // Throttle is normally controlled by the autopilot, but it can be overridden
471 // using these direct input functions.
472
473 virtual void EnableDirectThrottleInput();
474 virtual void ReleaseDirectThrottleInput();
475
476 virtual void MoveThrottleToIdle();
477 virtual void MoveThrottleToFull();
478 virtual void MoveThrottleToAfterburner();
479 virtual void SetDirectThrottleInput(double aValue);
480
481 // Stick and rudder are normally controlled by the autopilot, but can be overridden
482 // using these direct input functions.
483
484 virtual void EnableDirectStickBackInput();
485 virtual void ReleaseDirectStickBackInput();
486
487 virtual void EnableDirectStickRightInput();
488 virtual void ReleaseDirectStickRightInput();
489
490 virtual void EnableDirectRudderRightInput();
491 virtual void ReleaseDirectRudderRightInput();
492
493 virtual void SetDirectStickBackInput(double aValue) = 0;
494 virtual void SetDirectStickRightInput(double aValue) = 0;
495 virtual void SetDirectRudderRightInput(double aValue) = 0;
496
497 // Speed brakes are normally controlled by the autopilot, but they can be overridden
498 // using these direct input functions.
499
500 virtual void EnableDirectSpeedBrakeInput();
501 virtual void ReleaseDirectSpeedBrakeInput();
502
503 virtual void OpenSpeedBrake() = 0;
504 virtual void CloseSpeedBrake() = 0;
505 virtual void SetDirectSpeedBrakesInput(double aValue) = 0;
506
507 // -------------------------------------------------------------------------------------
508
509 // These functions provide control inputs for landing gear, flaps, spoilers,
510 // thrust reversers, and nose wheel steering (NWS)
511
512 virtual void SetLandingGearControlPosition(double aPosition) = 0;
513 virtual void SetFlapsControlPosition(double aPosition) = 0;
514 virtual void SetSpoilersControlPosition(double aPosition) = 0;
515 virtual void SetThrustReverserControlPosition(double aPosition) = 0;
516
517 // -------------------------------------------------------------------------------------
518
519 // These functions provide various waypoint-related support.
520 // TODO -- These will be moved to the other derived pilot classes, as appropriate
521
522 // This will replace the planned route with temporary waypoints
523 // This may be called during a simulation [from script] because of
524 // some special stimulus
525 // Note this function takes ownership of aRoute and will delete it!
526 virtual void FlyTempWaypoints(Route* aRoute);
527
528 // Return the index of the current waypoint on the planned route
529 virtual size_t GetPlannedWaypointIndex() const { return mCurrentPlannedWaypointIndex; };
530
531 // Set the planned waypoint index, causing the SixDOF object to fly to this waypoint
532 virtual bool SetPlannedWaypointIndex(size_t aIndex);
533
534 // Sets the position of the SixDOF Object to a planned waypoint
535 virtual bool SetPositionToPlannedWaypoint(size_t aIndex);
536
537 // Return the index of the current waypoint on the temporary route
538 virtual size_t GetTempWaypointIndex() const { return mCurrentTempWaypointIndex; };
539
540 // Set the temp waypoint index, causing the SixDOF object to fly to this waypoint
541 virtual bool SetTempWaypointIndex(size_t aIndex);
542
543 // Sets the position of the SixDOF Mover to a temp waypoint
544 virtual bool SetPositionToTempWaypoint(size_t aIndex);
545
546 // Return whether or not the platform is flying the planned route. Otherwise
547 // it is flying the temporary route
548 virtual bool IsOnPlannedRoute() const { return mTempActionPtr == nullptr; }
549
550 // This will cause the vehicle to ignore waypoints and fly to the specified point
551 virtual void FlyAtPoint(const UtLLAPos& aPt);
552
553 // This will return to the initial "planned" waypoints/route
554 virtual void ReturnToPlannedWaypoints();
555
557 virtual void TurnToHeading(double aHeading_rad, // radians
558 double aRadialAccel, // meters/sec^2
560
561 virtual void GoToSpeed(double aSpeed, // knots true air speed
562 double aLinearAccel); // meters/sec^2
563
564 virtual void GoToAltitude(double aAltitude, // meters
565 double aClimbRate); // meters/sec
566
567 virtual bool FlyRates(double aRollRate, // deg/sec
568 double aPitchRate, // deg/sec
569 double aAcceleration, // feet/sec^2
570 double aSpeed); // knots (true air speed)
571
572 virtual bool FlyHeadingSpeedAltitude(double aHeading_rad, // rad
573 double aSpeed, // knots (true air speed)
574 double aAltitude, // feet
575 double aMaxGees, // Gs
576 double aMaxClimb); // feet/minute
577
578 virtual bool FlySpecificTurn(double aRollError, // degrees
579 double aGees, // Gs
580 double aSpeed); // knots (true air speed)
581
582 virtual bool FlySpecificVector(double aRollError, // degrees
583 double aPitchError, // degrees
584 double aMaxGees, // Gs
585 double aSpeed); // knots (true air speed)
586
587 virtual bool FlyYawPitchAccel(double aYawAccel_g, // accel in g's
588 double aPitchAccel_g); // accel in g's
589
590 virtual bool AutopilotIsEnabled() const { return mAutopilotEnabled; }
591
592 // Gets the "planned" waypoint list - if it doesn't exist, an empty vector
593 // will be returned
594 virtual void GetPlannedWaypoints(AutopilotWaypointDataList* aWaypointDataList) const;
595
596 // Gets the "temp" waypoint list - if it doesn't exist, an empty vector
597 // will be returned
598 virtual void GetTempWaypoints(AutopilotWaypointDataList* aWaypointDataList) const;
599
600 // Gets the current waypoint list (either temp or planned) - if neither exists,
601 // an empty vector will be returned
602 virtual void GetCurrentWaypoints(AutopilotWaypointDataList* aWaypointDataList) const;
603
604 // -------------------------------------------------------------------------------------
605
606 // These functions provide autopilot "controls"
607 // TODO -- These will be moved to the other derived pilot classes, as appropriate
608
609 // This enables/disables the autopilot
610 virtual void EnableAutopilot(bool aState);
611
612 // This sets the autopilot to use pitch angle mode with the specified pitch angle (in degrees)
613 virtual void SetAutopilotPitchAngle(double aPitchAngle_deg);
614
615 // This sets the autopilot to use pitch rate mode with the specified pitch rate (in deg/sec)
616 virtual void SetAutopilotPitchRate(double aPitchRate_dps);
617
618 // This sets the autopilot to use flight path angle mode with the specified flight path angle (in degrees)
619 virtual void SetAutopilotFlightPathAngle(double aFlightPathAngle_deg);
620
621 // This sets the autopilot to use vertical speed mode with the specified vertical speed (in ft/min)
622 virtual void SetAutopilotVerticalSpeed(double aVerticalSpeed_fpm);
623
624 // This sets the autopilot to use altitude mode with the specified altitude (in feet)
625 virtual void SetAutopilotAltitude(double aAltitude_ft);
626
627 // This sets the autopilot to use pitch g-load mode with the specified g-load
628 virtual void SetPitchGLoad(double aGLoad);
629
630 // This sets the autopilot to use alpha (angle of attack) mode with the specified alpha (in degrees)
631 virtual void SetAutopilotAlpha(double aAlpha_deg);
632
633 // This sets the autopilot to use delta pitch mode with the specified delta pitch (in degrees)
634 virtual void SetAutopilotDeltaPitch(double aDeltaPitchAngle_deg);
635
636 // This sets the autopilot to use roll/bank angle mode with the specified roll/bank angle (in degrees)
637 virtual void SetAutopilotRollAngle(double aRollAngle_deg);
638
639 // This sets the autopilot to use roll rate mode with the specified roll rate (in deg/sec)
640 virtual void SetAutopilotRollRate(double aRollRate_dps);
641
642 // This sets the autopilot to use delta roll mode with the specified delta roll (in degrees)
643 virtual void SetAutopilotDeltaRoll(double aDeltaRollAngle_deg);
644
645 // This sets the autopilot to use heading mode with the specified heading (in degrees)
646 virtual void SetAutopilotRollHeading(double aRollHeading_deg);
647
648 // This sets the autopilot to use heading mode with the specified heading (in degrees)
649 virtual void SetAutopilotYawHeading(double aYawHeading_deg);
650
651 // This sets the autopilot to use yaw rate mode with the specified yaw rate (in deg/sec)
652 virtual void SetAutopilotYawRate(double aYawRate_dps);
653
654 // This sets the autopilot to use beta (angle of sideslip) mode with the specified beta (in degrees)
655 virtual void SetAutopilotBeta(double aBeta_deg);
656
657 // This sets the autopilot to use yaw g-load mode with the specified g-load
658 virtual void SetAutopilotYawGLoad(double aBeta_deg);
659
660 // This sets the autopilot to maintain the specified speed (in KTAS, knots true air speed)
661 virtual void SetAutopilotSpeedKTAS(double aSpeed_KTAS);
662
663 // This sets the autopilot to maintain the specified speed (in KCAS, knots calibrated air speed)
664 virtual void SetAutopilotSpeedKCAS(double aSpeed_KCAS);
665
666 // This sets the autopilot to maintain the specified speed (in Mach)
667 virtual void SetAutopilotSpeedMach(double aSpeed_Mach);
668
669 // This sets the autopilot to hold the specified throttle position
670 virtual void SetAutopilotThrottle(double aSpeed_Mach);
671
672 // This sets the autopilot to use waypoint mode in the lateral channel
673 virtual void SetAutopilotLateralWaypointMode();
674
675 // This sets the autopilot to use waypoint mode in the vertical channel
676 virtual void SetAutopilotVerticalWaypointMode();
677
678 // This sets the autopilot to use waypoint mode in the speed channel
679 virtual void SetAutopilotSpeedWaypointMode();
680
681 // This sets the autopilot to use waypoint mode
682 virtual void SetAutopilotWaypointMode();
683
684 // This sets the autopilot to hold all controls in a centered/neutralized position
685 virtual void SetAutopilotNoControl();
686
687 // -------------------------------------------------------------------------------------
688
689 // Virtual functions for autopilot commands - default to no action
690 virtual void HoldAltitude(){};
691 virtual void HoldVerticalSpeed(){};
692 virtual void HoldPitchAngle(){};
693 virtual void HoldBankAngle(){};
694 virtual void HoldHeading(){};
695 virtual void HoldSpeedKCAS(){};
696 virtual void HoldSpeedKTAS(){};
697 virtual void HoldSpeedMach(){};
698
699protected:
700 PilotObject(const PilotObject& aSrc);
701
702 // Inherited PilotObject Functions -- These functions are not overridden;
703 // child PilotObjects will simply inherit these internal functions.
704
705 // This "zeros" control inputs if controls are disabled
706 virtual void ZeroDisabledControlData() = 0;
707
708 // This updates the active pilot object with the commands from the parent vehicle
709 virtual void InheritParentControlData() = 0;
710
711 // This is called during Initialize to initial the common controller (autopilot)
713
714 // This drives control inputs to those provided by the CommonController (autopilot)
715 virtual void UpdateControlInputsUsingCommonControllerData(int64_t aSimTime_nanosec);
716
717 // SetThrottleData assumes that 1 is full, unaugmented power (military power)
718 // and 2.0 is full afterburner. This function is called (directly or indirectly)
719 // by all variants of the SetControlData functions.
720 virtual void SetThrottleData(double aThrottleLeverPosition) = 0;
721
722 // This sets the current military (non-afterburner) throttle control input position
723 virtual void SetThrottleMilitaryData(double aThrottleLeverPosition) = 0;
724
725 // This sets the current afterburner throttle control input position
726 virtual void SetThrottleAfterburnerData(double aThrottleLeverPosition) = 0;
727
728 virtual void EnforceControlLimits();
729
730 void EnforceSingleControlLimit(double& aValue, const double& aMinValue, const double& aMaxValue);
731
732 // *** THIS SHOULD BE OVERRIDDEN BY EACH PILOT OBJECT ***
733 // This uses the internal controls (mAutopilotControls of type
734 // AutopilotDataTypes::sAutopilotControls) to set the actual controls
736
737 // *** THIS SHOULD BE OVERRIDDEN BY EACH PILOT OBJECT ***
738 // This uses the internal controls (mAutopilotControls of type
739 // AutopilotDataTypes::sAutopilotControls) to set the actual controls
741
742 // This uses the internal controls (mAutopilotControls of type
743 // AutopilotDataTypes::sAutopilotControls) to set the actual controls.
744 // Uses LoadControlDataWithAutopilotControlData internally.
746
747 // This uses the internal controls (mAutopilotControls of
748 // type AutopilotDataTypes::sAutopilotControls) to set
749 // the actual controls. Uses LoadControlDataWithAutopilotControlData
750 // internally.
752
753 // This uses the internal controls (mAutopilotControls of
754 // type AutopilotDataTypes::sAutopilotControls) to modify
755 // the actual controls. Uses LoadControlDataWithAutopilotControlData
756 // internally.
758
759 // Waypoint Functions
760 // TODO -- These may be moved to the other derived pilot classes, as appropriate
761
762 // This inherited function sets the location, orientation, and speed
763 // of the Mover. It is called from SetPositionToPlannedWaypoint
764 // and SetPositionToTempWaypoint.
765 virtual void SetObjectState(double aLat,
766 double aLon,
767 double aAlt,
768 double aNEDVelN_mps,
769 double aNEDVelE_mps,
770 double aNEDVelD_mps,
771 double aLocalHeading_rad,
772 double aLocalPitch_rad,
773 double aLocalRoll_rad);
774
775 // This copies the planned action, waypoints, and route data into the
776 // temp action and waypoints. This includes mAutopilotActionPtr,
777 // mPlannedPrevWptData, mPlannedCurrWptData, mPlannedNextWptData,
778 // mPlannedRoute, and mCurrentPlannedWaypointIndex. It returns true
779 // if the data was copied successfully.
780 virtual bool ClonePlannedActionToTempAction();
781
782 // This sets the temp action to hold the current altitude, heading,
783 // and speed (ktas). If the temp action is null, it will also create it.
785
786 // This creates a temp action (if null) and then sets the action to
787 // hold the current altitude, heading, and speed (ktas). If the
788 // temp action was not null, it will be left untouched.
789 virtual void CreateTempActionIfNeeded();
790
791 // This will leave the temp action untouched, if it already exists.
792 // If the temp action is null, it uses the CopyPlannedActionToTempAction
793 // to copy planned data to the temp data (if planned data exists) or
794 // it uses SetTempActionToHoldCurrentConditions to set the new
795 // temp action data to use the current conditions (alt, heading, speed).
797
798 // Control flags -----------------------------------------------------------------------
799 // TODO -- As derived pilot classes as modified, the need for these control modes
800 // may be eliminated
801
802 // PilotObject uses the following "control flags" that denote the source of
803 // control inputs. These include (listed in order of priority):
804 //
805 // * mTestControl -- This flag is used for any type of testing or predictive
806 // code. If true, this flag takes priority over all other flag
807 // types. When active, control inputs are set through the
808 // SetTestControlInputs() functions.
809 //
810 // * EnableControls -- If false, this flag will cause all control inputs to go to
811 // their default/neutral state.
812 //
813 // * mAutopilotEnabled -- This flag indicates that the autopilot is controlling
814 // the object. It is the second highest priority flag.
815 //
816 // * mManualControl -- This flag indicates that control inputs are being
817 // provided by a manual source, fed through the
818 // SetManualControlData() functions.
819 //
820 // * mExternalDirectControl -- This flag indicates that control inputs are being
821 // provided by a script interface, providing direct
822 // input to the manual pilot, fed through the
823 // SetExternalDirectControlData() functions.
824 //
825 // * mControlAugmentationModeActive -- If true, this indicates that the control
826 // inputs from mExternalManualControl are
827 // routed through the control augmentation
828 // inputs, rather than feeding the flight
829 // control system directly.
830 //
831 // * mStabilityAugmentation[Yaw/Pitch/Roll]ModeActive -- Where true, this
832 // indicates that the control inputs from either
833 // manual or autopilot control are routed through
834 // stability augmentation inputs, rather than feeding
835 // the flight control system directly.
836
837 // This returns true if the "testing" control mode is active.
838 virtual bool ControlModeTestingActive() const;
839
840 // This returns true if the "disabled controls" control mode is active. Note that, due
841 // to control priorities, this may become false due to higher priority control modes
842 // being active.
843 virtual bool ControlModeDisabledActive() const;
844
845 // This returns true if the autopilot is enabled and active. Note that, due to control
846 // priorities, this may become false due to higher priority control modes being active.
847 virtual bool ControlModeAutopilotActive() const;
848
849 // This returns true if the "manual controls" control mode is active. Note that,
850 // due to control priorities, this may become false due to higher priority control modes
851 // being active.
852 virtual bool ControlModeManualActive() const;
853
854 // This returns true if the "external direct controls" control mode is active. Note that,
855 // due to control priorities, this may become false due to higher priority control modes
856 // being active.
857 virtual bool ControlModeExternalDirectActive() const;
858
859 // This returns true if the "Control Augmentation System" (CAS) is active. When active,
860 // control inputs from mExternalManualControl are routed through the CAS inputs, rather
861 // than feeding the flight control system directly.
862 virtual bool ControlModeControlAugmentationActive() const;
863
864 // This returns true if the "Stability Augmentation System" (SAS) is active. When active,
865 // control inputs from mExternalManualControl are modified by the SAS inputs
866 virtual bool ControlModeStabilityAugmentationActive() const;
867
868 // Attributes ==========================================================================
869
870 // This is essentially a copy of the kinematic state of the vehicle. It is passed to
871 // the pilot object through the Update() function.
872
874
875 // CommonController (autopilot) data ---------------------------------------------------
876
878
879 UtCloneablePtr<AutopilotAction> mAutopilotActionPtr{nullptr};
883 UtCloneablePtr<const Route> mPlannedRoutePtr{nullptr};
885
886 UtCloneablePtr<AutopilotAction> mTempActionPtr{nullptr};
890 UtCloneablePtr<Route> mTempRoutePtr{nullptr};
892
894
895 // Manual control input data ----------------------------------------------------------
896
897 // These are normalized control inputs, after having non-linear mapping effects applied,
898 // that are used by the Control Augmentation System (CAS).
902
903 // These provide a "factor" to convert normalized inputs in g-load or roll rate.
908
909 // These provide a "factor" to convert scale trim commands based on vehicle response.
910 // Fast-responding aircraft should have lower factor values than slow-responding
911 // vehicles.
912 double mPitchTrimFactor = 0.1;
913 double mRollTrimFactor = 0.1;
914 double mYawTrimFactor = 0.1;
915
916 // These are trim control inputs and indicate how long a trim switch has been
917 // actuated. This is an "integrated" level, so if a nose up trim was actuated for
918 // 1 second, then a nose down trim was actuated for 1.5 seconds, and then nose up
919 // trim was actuated for 0.3 seconds, the value would be -0.2 seconds, indicating
920 // a nose down trim.
924
925 // These are the current trim values
926 double mTrimNoseUp = 0.0;
927 double mTrimRollRight = 0.0;
928 double mTrimYawRight = 0.0;
929
930 // These curves modify the control input, providing non-liner mapping and making
931 // manual control easier than liner control mapping.
932 UtCloneablePtr<UtTable::Curve> mPitchControlMapping{nullptr};
933 UtCloneablePtr<UtTable::Curve> mRollControlMapping{nullptr};
934 UtCloneablePtr<UtTable::Curve> mYawControlMapping{nullptr};
935
936 // Control override flags --------------------------------------------------------------
942
943 // Mode control flags ------------------------------------------------------------------
944 // TODO -- As derived pilot classes as modified, the need for these control modes
945 // *may* be eliminated
946
947 // This indicates that the CAS system is active. Note that, for full operation, the CAS
948 // also requires that mAutopilotEnabled also be true.
950
951 // This indicates that the SAS system is active.
955
956 // Mode control flags ------------------------------------------------------------------
957 // TODO -- As derived pilot classes as modified, the need for these control modes
958 // *may* be eliminated
959
960 // This indicates that control is being performed through a link to a parent vehicle.
961 bool mParentControl = false;
962
963 // This indicates that manual/direct control is being performed through a manual pilot.
964 bool mManualControl = false;
965
966 // This indicates that manual/direct control is being performed through a synthetic
967 // pilot.
969
970 // This indicates if the common controller (autopilot) is active/enabled. Note that CAS
971 // uses the "autopilot", so this must be true for the CAS to operate.
972 bool mAutopilotEnabled = true;
973
974 // This is a top-level flag that indicates whether the controls are enabled/disabled.
975 // When false, all controls will use the nominal condition (typically zero).
976 bool mControlsEnabled = true;
977
978 // The test control flag supersedes and has priority over all other mode flags.
979 bool mTestControl = false;
980
981 // If this is true, control inputs are disabled
982 bool mIsDestroyed = false;
983};
984} // namespace six_dof
985} // namespace wsf
986
987#endif
aObjectPtr Update(simTime)
Definition WsfSixDOF_AutopilotAction.hpp:26
Definition WsfSixDOF_CommonController.hpp:38
eAutopilotTurnDir
Definition WsfSixDOF_CommonController.hpp:58
Definition WsfSixDOF_KinematicState.hpp:34
Definition WsfSixDOF_PilotObject.hpp:39
virtual void SetAfterburnerThreshold(double aValue=1.0)
Definition WsfSixDOF_PilotObject.cpp:1532
virtual void SetTestThrottleMilitaryControllerPosition(double aThrottleLeverPosition)
Definition WsfSixDOF_PilotObject.cpp:1672
virtual double GetLandingGearControllerPosition() const =0
virtual bool ClonePlannedActionToTempAction()
Definition WsfSixDOF_PilotObject.cpp:2442
const Waypoint * mPlannedPrevWptDataPtr
Definition WsfSixDOF_PilotObject.hpp:880
int64_t mLastSimTime_nanosec
Definition WsfSixDOF_PilotObject.hpp:873
virtual std::string GetPilotType() const =0
virtual void UpdateControlInputsUsingCommonControllerData(int64_t aSimTime_nanosec)
Definition WsfSixDOF_PilotObject.cpp:116
virtual void SetDirectStickBackInput(double aValue)=0
virtual void SetTestThrottleAfterburnerControllerPosition(double aThrottleLeverPosition)
Definition WsfSixDOF_PilotObject.cpp:1680
virtual double GetStickBackControllerPosition() const =0
virtual void HoldHeading()
Definition WsfSixDOF_PilotObject.hpp:694
virtual void SetTestSpeedBrakesControllerPosition(double aSpeedBrakesPosition)=0
bool mControlOverrideRudderRight
Definition WsfSixDOF_PilotObject.hpp:939
virtual void SetExternalDirectControlData(double aStickRightPosition, double aStickAftPosition, double aThrottleLeverPosition, double aSpdBrakeLeverPosition, double aSpoilerLeverPosition, double aFlapsLeverPosition)=0
double mRollRightTrimDeltaT_sec
Definition WsfSixDOF_PilotObject.hpp:922
virtual void SetThrottleMilitaryData(double aThrottleLeverPosition)=0
virtual double GetThrustReverserControllerPosition() const =0
virtual bool GetAfterburnerEnabled() const
Definition WsfSixDOF_PilotObject.cpp:1496
virtual void ReleaseExternalDirectControl()
Definition WsfSixDOF_PilotObject.cpp:1654
virtual void ZeroDisabledControlData()=0
double mTrimRollRight
Definition WsfSixDOF_PilotObject.hpp:927
virtual void TakeExternalDirectControl()
Definition WsfSixDOF_PilotObject.cpp:1644
virtual double GetRudderRightControllerPosition() const =0
const Waypoint * mPlannedNextWptDataPtr
Definition WsfSixDOF_PilotObject.hpp:882
virtual bool ControlModeControlAugmentationActive() const
Definition WsfSixDOF_PilotObject.cpp:2636
virtual void SetControlDataWithStabilityAugmentationControls()
Definition WsfSixDOF_PilotObject.cpp:553
virtual double GetThrottleAfterburnerControllerPosition() const =0
virtual bool ControlModeDisabledActive() const
Definition WsfSixDOF_PilotObject.cpp:2563
virtual void SetTestFlapsControllerPosition(double aFlapsPosition)=0
virtual void HoldBankAngle()
Definition WsfSixDOF_PilotObject.hpp:693
virtual void SetPrePositionQ(double aAltitude_ft, double aDynamicPressure_lbft2)
Definition WsfSixDOF_PilotObject.cpp:496
virtual void ReleaseManualControl()
Definition WsfSixDOF_PilotObject.cpp:1634
virtual void SetManualControlData(double aStickRightPosition, double aStickAftPosition, double aRudderRightPosition, double aThrottleLeverPosition, double aSpdBrakeLeverPosition, double aSpoilerLeverPosition, double aFlapsLeverPosition)=0
virtual void SetManualControlData(double aStickRightPosition, double aStickAftPosition, double aThrottleLeverPosition, double aSpdBrakeLeverPosition, double aSpoilerLeverPosition, double aFlapsLeverPosition)=0
bool mManualControl
Definition WsfSixDOF_PilotObject.hpp:964
const Waypoint * mPlannedCurrWptDataPtr
Definition WsfSixDOF_PilotObject.hpp:881
virtual void HoldAltitude()
Definition WsfSixDOF_PilotObject.hpp:690
virtual bool ControlAugmentationModeIsActive() const
Definition WsfSixDOF_PilotObject.cpp:1853
virtual void OpenSpeedBrake()=0
virtual bool ControlModeAutopilotActive() const
Definition WsfSixDOF_PilotObject.cpp:2573
virtual void SetObjectState(double aLat, double aLon, double aAlt, double aNEDVelN_mps, double aNEDVelE_mps, double aNEDVelD_mps, double aLocalHeading_rad, double aLocalPitch_rad, double aLocalRoll_rad)
Definition WsfSixDOF_PilotObject.cpp:510
size_t mCurrentPlannedWaypointIndex
Definition WsfSixDOF_PilotObject.hpp:884
virtual size_t GetTempWaypointIndex() const
Definition WsfSixDOF_PilotObject.hpp:538
virtual bool ControlModeExternalDirectActive() const
Definition WsfSixDOF_PilotObject.cpp:2608
virtual void InheritParentControlData()=0
bool mExternalDirectControl
Definition WsfSixDOF_PilotObject.hpp:968
virtual void SetThrottleAfterburnerData(double aThrottleLeverPosition)=0
virtual void SetPlannedRoute(Route *aRoute)
Definition WsfSixDOF_PilotObject.cpp:783
virtual void HoldSpeedMach()
Definition WsfSixDOF_PilotObject.hpp:697
double mControlAugmentationStickBack
Definition WsfSixDOF_PilotObject.hpp:899
virtual void SetTestStickRightControllerPosition(double aStickRightPosition)=0
virtual void SetExternalDirectControlTrimManualControlData(double aNoseUpTrimDeltaT_sec, double aRollRightTrimDeltaT_sec, double aYawRightTrimDeltaT_sec)
Definition WsfSixDOF_PilotObject.cpp:1858
virtual bool GetSpeedBrakeEnabled() const
Definition WsfSixDOF_PilotObject.cpp:1545
const Waypoint * mTempPrevWptDataPtr
Definition WsfSixDOF_PilotObject.hpp:887
virtual void SetControlDataWithControlAugmentationControls()
Definition WsfSixDOF_PilotObject.cpp:545
double mControlAugmentationStickRight
Definition WsfSixDOF_PilotObject.hpp:900
virtual void ManageFrozenControls()=0
virtual void SetTempActionToPlannedDataOrCurrentConditions()
Definition WsfSixDOF_PilotObject.cpp:2538
virtual CommonController * GetCommonController() const =0
virtual void HoldPitchAngle()
Definition WsfSixDOF_PilotObject.hpp:692
bool UsingTestControl() const
Definition WsfSixDOF_PilotObject.hpp:339
virtual void SetTestThrottleControllerPosition(double aThrottlePosition)
Definition WsfSixDOF_PilotObject.cpp:1664
virtual void GetAutopilotPidValueData(AutopilotPidGroupValueData *aData)
Definition WsfSixDOF_PilotObject.cpp:744
virtual void SetDirectStickRightInput(double aValue)=0
double mYawControlAugmentationFactor_deg
Definition WsfSixDOF_PilotObject.hpp:906
virtual void SetTempRoute(Route *aRoute)
Definition WsfSixDOF_PilotObject.cpp:889
virtual double GetSpoilersControllerPosition() const =0
virtual bool IsOnPlannedRoute() const
Definition WsfSixDOF_PilotObject.hpp:548
bool mControlOverrideStickBack
Definition WsfSixDOF_PilotObject.hpp:937
AutopilotAction * GetCurrentAction() const
Definition WsfSixDOF_PilotObject.cpp:571
bool mIsDestroyed
Definition WsfSixDOF_PilotObject.hpp:982
void SetLastSimTime(int64_t aLastSimTime_nanosec)
Definition WsfSixDOF_PilotObject.hpp:53
virtual double GetThrottleControllerPosition() const =0
virtual void TakeManualControl()
Definition WsfSixDOF_PilotObject.cpp:1624
virtual void SetPrePositionMach(double aAltitude_ft, double aMach)
Definition WsfSixDOF_PilotObject.cpp:484
bool mControlOverrideSpeedBrakes
Definition WsfSixDOF_PilotObject.hpp:941
void EnableControlInputs(bool aEnabled)
Definition WsfSixDOF_PilotObject.hpp:77
virtual void LoadControlDataWithAutopilotControlData()=0
virtual void SetControlDataWithAutopilotControls()
Definition WsfSixDOF_PilotObject.cpp:537
virtual void HoldSpeedKCAS()
Definition WsfSixDOF_PilotObject.hpp:695
virtual void CloseSpeedBrake()=0
double GetTurnRollInMultiplier()
Definition WsfSixDOF_PilotObject.cpp:1594
void SetTurnRollInMultiplier(double aValue=1.0)
Definition WsfSixDOF_PilotObject.cpp:1606
double mNoseUpTrimDeltaT_sec
Definition WsfSixDOF_PilotObject.hpp:921
virtual void SetExternalDirectControlData(double aStickRightPosition, double aStickAftPosition, double aRudderRightPosition, double aThrottleLeverPosition, double aSpdBrakeLeverPosition, double aSpoilerLeverPosition, double aFlapsLeverPosition, double aLandingGearLeverPosition)=0
virtual void SetDirectRudderRightInput(double aValue)=0
double mYawTrimFactor
Definition WsfSixDOF_PilotObject.hpp:914
virtual void HoldSpeedKTAS()
Definition WsfSixDOF_PilotObject.hpp:696
double mPitchTrimFactor
Definition WsfSixDOF_PilotObject.hpp:912
virtual void ReleaseDirectSpeedBrakeInput()
Definition WsfSixDOF_PilotObject.cpp:1833
virtual void SetManualControlData(double aStickRightPosition, double aStickAftPosition, double aRudderRightPosition, double aThrottleLeverPosition, double aThrustReverserLeverPosition, double aThrustVectorYawRightPosition, double aThrustVectorPitchUpPosition, double aThrustVectorRollRightPosition, double aSpdBrakeLeverPosition, double aSpoilerLeverPosition, double aFlapsLeverPosition, double aLandingGearLeverPosition, double aNoseWheelSteeringRightPosition, double aWheelBrakeLeftPosition, double aWheelBrakeRightPosition, bool aNWS_Enabled)=0
virtual void SetPrePositionCAS(double aAltitude_ft, double aKCAS)
Definition WsfSixDOF_PilotObject.cpp:472
double mPitchControlAugmentationFactor_g
Definition WsfSixDOF_PilotObject.hpp:904
UtCloneablePtr< UtTable::Curve > mPitchControlMapping
Definition WsfSixDOF_PilotObject.hpp:932
CommonController::sAutopilotControls mAutopilotControls
Definition WsfSixDOF_PilotObject.hpp:877
virtual void CreateTempActionIfNeeded()
Definition WsfSixDOF_PilotObject.cpp:2511
UtCallbackListN< bool(unsigned int)> WaypointAchieved
Definition WsfSixDOF_PilotObject.hpp:61
virtual void GetAutopilotData(AutopilotData *aData)
Definition WsfSixDOF_PilotObject.cpp:580
virtual void SetControlAugmentationModeActive(bool aCASIsActive)
Definition WsfSixDOF_PilotObject.cpp:1838
bool mYawStabilityAugmentationModeActive
Definition WsfSixDOF_PilotObject.hpp:954
bool mParentControl
Definition WsfSixDOF_PilotObject.hpp:961
virtual void SetManualControlData(double aStickRightPosition, double aStickAftPosition, double aRudderRightPosition, double aThrottleLeverPosition, double aSpdBrakeLeverPosition, double aSpoilerLeverPosition, double aFlapsLeverPosition, double aLandingGearLeverPosition)=0
size_t mCurrentTempWaypointIndex
Definition WsfSixDOF_PilotObject.hpp:891
double mControlAugmentationRudderRight
Definition WsfSixDOF_PilotObject.hpp:901
double mYawControlAugmentationFactor_g
Definition WsfSixDOF_PilotObject.hpp:905
virtual void EnableDirectSpeedBrakeInput()
Definition WsfSixDOF_PilotObject.cpp:1823
virtual bool GetAutopilotPidGainData(Pid::Type aTableType, size_t &aNumElements, PidGainData aPidGainData[])
Definition WsfSixDOF_PilotObject.cpp:732
virtual void SetPrePositionTAS(double aAltitude_ft, double aKTAS)
Definition WsfSixDOF_PilotObject.cpp:450
virtual void SetTestRudderRightControllerPosition(double aRudderRightPosition)=0
CommonController::sAutopilotControls * GetCurrentControlLimits()
Definition WsfSixDOF_PilotObject.hpp:468
virtual void SetThrustReverserControlPosition(double aPosition)=0
PilotObject & operator=(const PilotObject &other)=delete
virtual void FlyTempWaypoints(Route *aRoute)
Definition WsfSixDOF_PilotObject.cpp:899
virtual void SetLandingGearControlPosition(double aPosition)=0
virtual double GetAfterburnerThreshold() const
Definition WsfSixDOF_PilotObject.cpp:1520
virtual void EnforceControlLimits()
Definition WsfSixDOF_PilotObject.cpp:754
bool mPitchStabilityAugmentationModeActive
Definition WsfSixDOF_PilotObject.hpp:952
virtual void SetThrottleData(double aThrottleLeverPosition)=0
virtual void SetExternalDirectControlData(double aStickRightPosition, double aStickAftPosition, double aRudderRightPosition, double aThrottleLeverPosition, double aSpdBrakeLeverPosition, double aSpoilerLeverPosition, double aFlapsLeverPosition)=0
virtual void SetTestStickBackControllerPosition(double aStickAftPosition)=0
virtual bool ProcessInput(UtInput &aInput)
Definition WsfSixDOF_PilotObject.cpp:362
UtCloneablePtr< AutopilotAction > mTempActionPtr
Definition WsfSixDOF_PilotObject.hpp:886
UtCloneablePtr< Route > mTempRoutePtr
Definition WsfSixDOF_PilotObject.hpp:890
virtual void SetAfterburnerEnabled(bool aEnabled)
Definition WsfSixDOF_PilotObject.cpp:1507
bool InitializeCommonController()
Definition WsfSixDOF_PilotObject.cpp:431
virtual void SetTestSpoilersControllerPosition(double aSpoilersPosition)=0
virtual void SetDirectSpeedBrakesInput(double aValue)=0
const Waypoint * mTempNextWptDataPtr
Definition WsfSixDOF_PilotObject.hpp:889
bool ControlsAreEnabled() const
Definition WsfSixDOF_PilotObject.hpp:80
virtual void SetTrimManualControlData(double aNoseUpTrimDeltaT_sec, double aRollRightTrimDeltaT_sec, double aYawRightTrimDeltaT_sec)
Definition WsfSixDOF_PilotObject.cpp:417
bool mTestControl
Definition WsfSixDOF_PilotObject.hpp:979
virtual void SetSpoilersControlPosition(double aPosition)=0
double mYawRightTrimDeltaT_sec
Definition WsfSixDOF_PilotObject.hpp:923
virtual double GetStickRightControllerPosition() const =0
virtual void LoadControlDataWithAutopilotStabilityData()=0
virtual bool ControlModeManualActive() const
Definition WsfSixDOF_PilotObject.cpp:2588
UtCloneablePtr< UtTable::Curve > mRollControlMapping
Definition WsfSixDOF_PilotObject.hpp:933
bool mControlOverrideThrottle
Definition WsfSixDOF_PilotObject.hpp:940
virtual void SetSpeedBrakeThreshold(double aValue=0.0)
Definition WsfSixDOF_PilotObject.cpp:1581
virtual double GetSpeedBrakesControllerPosition() const =0
virtual void HoldVerticalSpeed()
Definition WsfSixDOF_PilotObject.hpp:691
Route mTransitionRoute
Definition WsfSixDOF_PilotObject.hpp:893
bool mControlOverrideStickRight
Definition WsfSixDOF_PilotObject.hpp:938
virtual size_t GetPlannedWaypointIndex() const
Definition WsfSixDOF_PilotObject.hpp:529
virtual bool UsingManualControl() const
Definition WsfSixDOF_PilotObject.cpp:1619
virtual bool ControlModeStabilityAugmentationActive() const
Definition WsfSixDOF_PilotObject.cpp:2666
bool mAutopilotEnabled
Definition WsfSixDOF_PilotObject.hpp:972
bool mControlsEnabled
Definition WsfSixDOF_PilotObject.hpp:976
virtual double GetFlapsControllerPosition() const =0
virtual void SetExternalDirectControlData(double aStickRightPosition, double aStickAftPosition, double aRudderRightPosition, double aThrottleLeverPosition, double aThrustReverserLeverPosition, double aThrustVectorYawRightPosition, double aThrustVectorPitchUpPosition, double aThrustVectorRollRightPosition, double aSpdBrakeLeverPosition, double aSpoilerLeverPosition, double aFlapsLeverPosition, double aLandingGearLeverPosition, double aNoseWheelSteeringRightPosition, double aWheelBrakeLeftPosition, double aWheelBrakeRightPosition, bool aNWS_Enabled)=0
virtual double GetSpeedBrakeThreshold() const
Definition WsfSixDOF_PilotObject.cpp:1569
virtual void SetTempActionToHoldCurrentConditions()
Definition WsfSixDOF_PilotObject.cpp:2486
double mRollTrimFactor
Definition WsfSixDOF_PilotObject.hpp:913
virtual void SetFlapsControlPosition(double aPosition)=0
UtCloneablePtr< UtTable::Curve > mYawControlMapping
Definition WsfSixDOF_PilotObject.hpp:934
virtual void SetSpeedBrakeEnabled(bool aEnabled)
Definition WsfSixDOF_PilotObject.cpp:1556
bool mControlAugmentationModeActive
Definition WsfSixDOF_PilotObject.hpp:949
double mRollControlAugmentationFactor_dps
Definition WsfSixDOF_PilotObject.hpp:907
void InputAngleDeltas(double aYaw_rad, double aPitch_rad, double aRoll_rad)
Definition WsfSixDOF_PilotObject.cpp:409
virtual double GetThrottleMilitaryControllerPosition() const =0
const Waypoint * mTempCurrWptDataPtr
Definition WsfSixDOF_PilotObject.hpp:888
virtual bool ControlModeTestingActive() const
Definition WsfSixDOF_PilotObject.cpp:2558
double mTrimYawRight
Definition WsfSixDOF_PilotObject.hpp:928
bool mRollStabilityAugmentationModeActive
Definition WsfSixDOF_PilotObject.hpp:953
void EnforceSingleControlLimit(double &aValue, const double &aMinValue, const double &aMaxValue)
Definition WsfSixDOF_PilotObject.cpp:771
UtCloneablePtr< AutopilotAction > mAutopilotActionPtr
Definition WsfSixDOF_PilotObject.hpp:879
UtCloneablePtr< const Route > mPlannedRoutePtr
Definition WsfSixDOF_PilotObject.hpp:883
virtual bool AutopilotIsEnabled() const
Definition WsfSixDOF_PilotObject.hpp:590
double mTrimNoseUp
Definition WsfSixDOF_PilotObject.hpp:926
virtual void SetTestLandingGearControllerPosition(double aLandingGearPosition)=0
Definition WsfSixDOF_Route.hpp:32
Definition WsfSixDOF_Waypoint.hpp:26
Type
Definition WsfSixDOF_VehicleData.hpp:112
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
Definition WsfSixDOF_VehicleData.hpp:140
Definition WsfSixDOF_VehicleData.hpp:313
Definition WsfSixDOF_CommonController.hpp:41
Definition WsfSixDOF_VehicleData.hpp:80
Copyrights Multiple, All Rights Reserved