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