WSF
WsfP6DOF_Mover.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 2003-2015 The Boeing 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// Updated by Infoscitex, a DCS Company.
13// ****************************************************************************
14
15#ifndef WSFP6DOF_MOVER_HPP
16#define WSFP6DOF_MOVER_HPP
17
18#include "wsf_p6dof_export.h"
19
20#include <list>
21
22#include "P6DofPilotObject.hpp"
23#include "P6DofRoute.hpp"
24#include "P6DofUtils.hpp"
25#include "P6DofVehicle.hpp"
26#include "P6DofVehicleType.hpp"
27#include "P6DofWaypoint.hpp"
28#include "UtCallback.hpp"
29#include "UtCallbackHolder.hpp"
30#include "UtQuaternion.hpp"
31#include "WsfMover.hpp"
33#include "WsfRoute.hpp"
34#include "WsfWaypoint.hpp"
35
37class UtInput;
38class WsfDraw;
39class WsfManeuver;
40class WsfManeuverSequence;
42class WsfVisualPart;
43
44// ====================================================================================================================
48// ====================================================================================================================
49
50class WSF_P6DOF_EXPORT WsfP6DOF_Mover : public WsfMover
51{
52public:
54 explicit WsfP6DOF_Mover(WsfScenario& aScenario);
55 WsfP6DOF_Mover(const WsfP6DOF_Mover& aSrc);
56
58 ~WsfP6DOF_Mover() override;
59
60 WsfP6DOF_Mover& operator=(const WsfP6DOF_Mover& other) = delete;
61
62 WsfMover* Clone() const override;
63
64 bool ProcessInput(UtInput& aInput) override;
65 bool Initialize(double aSimTime) override;
66 void Update(double aSimTime) override;
67
68 // TODO -- At the present time, only the AIR domain is specified, but P6DOF can support AIR and SPACE domains.
70
71 // Returns a pointer to the P6DOF vehicle object
73
74 static int GetTypeId() { return WsfStringId::UnsafeGetNumber("WSF_P6DOF_MOVER"); }
75
76 // Return the index of the planned route
77 size_t GetPlannedRouteIndex() const;
78
79 // Return the index of the temporary route
80 size_t GetTempRouteIndex() const;
81
82 // Sets the P6DOF vehicle to the specified NED heading (in radians)
83 void SetHeading(double aHeading) override;
84
85 // Sets the P6DOF vehicle to the specified NED pitch angle (in radians)
86 void SetPitch(double aPitch) override;
87
88 // Sets the P6DOF vehicle to the specified NED roll angle (in radians)
89 void SetRoll(double aRoll) override;
90
91 // Sets the orientation of the P6DOF vehicle to the specified values (in radians)
92 void SetOrientationNED(double aHeading, double aPitch, double aRoll) override;
93
94 // This provides a set of top-level state data for the P6DOF vehicle
95 void GetStateData(double& aSimTime_sec,
96 double& aLat,
97 double& aLon,
98 double& aAlt_m,
99 double& aLocalHeading_deg,
100 double& aLocalPitch_deg,
101 double& aLocalRoll_deg,
102 double& aAlpha_deg,
103 double& aBeta_deg,
104 double& aSpeed_kts,
105 double& aVertSpeed_fpm,
106 double& aYawRate_dps,
107 double& aPitchRate_dps,
108 double& aRollRate_dps) const;
109
110 // This returns the P6DOF vehicle type name for the WsfP6DOF_Mover
111 std::string GetP6DofVehicleTypeName() const;
112
113 // This returns the P6DOF vehicle type from which the vehicle of the WsfP6DOF_Mover was derived.
114 std::string GetP6DofVehicleTypeDerivedFromName() const;
115
116 // This returns the base name for the P6DOF vehicle type if it is a subobject. If it is not a subobject,
117 // an empty string will be returned.
118 std::string GetP6DofVehicleTypeSubobjectBaseName() const;
119
120 // ====================================================================================================================
121
122 // State Variable Accessors -- Get platform state info specific to P6DOF objects
123
124 // Returns vertical speed in m/sec
125 double GetVerticalSpeed();
126
127 // Returns yaw rate in rad/sec
128 double GetYawRate();
129
130 // Returns pitch rate in rad/sec
131 double GetPitchRate();
132
133 // Returns roll rate in rad/sec
134 double GetRollRate();
135
136 // Returns flight path angle in radians
137 const double GetFlightPathAngle_rad();
138
139 // Returns flight path angle in degrees
140 double GetFlightPathAngle();
141
142 // Returns the current g-load in the vehicle's z-axis. Positive g-load is in the negative z direction.
143 double GetGLoad();
144
145 // OnPlatformBrokenEvent is called for all platform parts when a platform is "broken", which is typically the result
146 // of combat damage or destruction. By default, most platform parts are "turned off" with this function, but
147 // WsfP6DOF_Mover overrides the function to prevent being turned off, since the mover may continue to move.
148 void OnPlatformBrokenEvent(double aSimTime) override;
149
150 // ====================================================================================================================
151
152 // Direct Control Input -- These functions allow direct control input from AFSIM script
153
154 // This should be called to take direct control of the P6DOF object before using SetDirectStickAndRudderInput,
155 // SetDirectThrottleInput, and SetDirectControlInputs.
156 void TakeDirectControlInput();
157
158 // This should be called to release direct control of the P6DOF object, which will disable the use of
159 // SetDirectStickAndRudderInput, SetDirectThrottleInput, and SetDirectControlInputs.
160 void ReleaseDirectControlInput();
161
162 // The aStickX value assumes that 1 is full right stick, 0 is centered, and -1 is full left stick.
163 // The aStickY value assumes that 1 is full back stick, 0 is centered, and -1 is full forward stick.
164 // The aRudder value assumes that 1 is full right rudder, 0 is centered, and -1 is full left rudder.
165 // The aThrottleLeverPosition value assumes that 0 is idle, 1 is full power without augmentation/afterburner
166 // (military power), and 2 is full power with full augmentation/afterburner (full afterburner).
167 // This function requires that TakeManualControl be called prior to use.
168 void SetDirectControlInputs(double aStickX, double aStickY, double aRudder, double aThrottleLeverPosition);
169
170 // ====================================================================================================================
171
172 // CommonController/autopilot control commands
173
174 bool GoToLocation(double aSimTime, double aLatitude, double aLongitude, double aAltitude) override;
175
176 bool TurnToHeading(double aSimTime,
177 double aHeading, // radians
178 double aRadialAccel, // meters/second^2
179 WsfPath::TurnDirection aTurnDirection) override;
180
181 bool GoToSpeed(double aSimTime,
182 double aSpeed, // meters/sec
183 double aLinearAccel,
184 bool aKeepRoute) override;
185
186 bool GoToAltitude(double aSimTime,
187 double aAltitude, // meters
188 double aClimbDiveRate,
189 bool aKeepRoute) override;
190
191 bool TurnToRelativeHeading(double aSimTime,
192 double aHeadingChange,
193 double aRadialAccel,
194 WsfPath::TurnDirection aTurnDirection) override;
195
196 // This allows enabling/disabling the autopilot
197 void EnableAutopilot(bool aState);
198
199 // Returns the minimum potential thrust in lbs at the current flight conditions
200 double GetMinimumPotentialThrust_lbs() const;
201
202 // Returns the maximum potential thrust in lbs at the current flight conditions
203 double GetMaximumPotentialThrust_lbs() const;
204
205 // Returns the current alpha (angle of attack) in radians
206 double GetAlpha_rad() const;
207
208 // Returns the current alpha (angle of attack) in degrees
209 double GetAlpha_deg() const;
210
211 // Returns the current beta (angle of sideslip) in radians
212 double GetBeta_rad() const;
213
214 // Returns the current beta (angle of sideslip) in degrees
215 double GetBeta_deg() const;
216
217 // Returns the current angle of attack rate (alpha-dot) in radians/sec
218 double GetAlphaDot_rps() const;
219
220 // Returns the current angle of attack rate (alpha-dot) in degrees/sec
221 double GetAlphaDot_dps() const;
222
223 // This returns the current angle of sideslip rate (beta-dot) in radians/sec
224 double GetBetaDot_rps() const;
225
226 // This returns the current angle of sideslip rate (beta-dot) in degrees/sec
227 double GetBetaDot_dps() const;
228
229 // This returns the current center of gravity in meters
230 UtVec3dX GetCg() const;
231
232 // This returns the current heading in radians
233 double GetHeading_rad() const;
234
235 // This returns the current heading in degrees
236 double GetHeading() const;
237
238 // This returns the current pitch in radians
239 double GetPitch_rad() const;
240
241 // This returns the current pitch in degrees
242 double GetPitch() const;
243
244 // This returns the current roll in radians
245 double GetRoll_rad() const;
246
247 // This returns the current roll in degrees
248 double GetRoll() const;
249
250 // Returns the most recent lift in newtons
251 double GetLift_nt() const;
252
253 // Returns the most recent lift in lbs
254 double GetLift_lbs() const;
255
256 // Returns the most recent drag in newtons
257 double GetDrag_nt() const;
258
259 // Returns the most recent drag in lbs
260 double GetDrag_lbs() const;
261
262 // Returns the most recent side force in newtons
263 double GetSideForce_nt() const;
264
265 // Returns the most recent side force in lbs
266 double GetSideForce_lbs() const;
267
268 // This returns the thrust magnitude in newtons
269 double GetThrustMagnitude_nt() const;
270
271 // This returns the thrust magnitude in lbs
272 double GetThrustMagnitude_lbs() const;
273
274 // Returns the most recent yaw moment in newton*meters
275 double GetYawMoment_nm() const;
276
277 // Returns the most recent yaw moment in ft*lbs
278 double GetYawMoment_ftlbs() const;
279
280 // Returns the most recent pitch moment in newton*meters
281 double GetPitchMoment_nm() const;
282
283 // Returns the most recent pitch moment in ft*lbs
284 double GetPitchMoment_ftlbs() const;
285
286 // Returns the most recent roll moment in newton*meters
287 double GetRollMoment_nm() const;
288
289 // Returns the most recent roll moment in ft*lbs
290 double GetRollMoment_ftlbs() const;
291
292 // Returns the current speed in ft/sec
293 double GetSpeed_fps() const;
294
295 // Returns the current speed in KIAS
296 double GetSpeed_KIAS() const;
297
298 // Returns the current speed in KCAS
299 double GetSpeed_KCAS() const;
300
301 // Returns the current speed in KTAS
302 double GetSpeed_KTAS() const;
303
304 // Returns the current speed in Mach
305 double GetSpeed_Mach() const;
306
307 // Returns the current mass in lbs
308 double GetCurrentWeight_lbs() const;
309
310 // Returns the current mass in kg
311 double GetCurrentWeight_kg() const;
312
313 // Returns the empty mass in lbs
314 double GetEmptyWeight_lbs() const;
315
316 // Returns the empty mass in kg
317 double GetEmptyWeight_kg() const;
318
319 // Returns the design weight for max-g maneuvering in lbs
320 double GetDesignWeightForMaxG_lbs() const; // Note, this currently uses empty weight
321
322 // Returns the current altitude in meters
323 double GetAlt_m() const;
324
325 // Returns the wing area in feet
326 double GetWingArea_sqft() const;
327
328 // Returns the forward acceleration in body coordinates in gees
329 double GetNx_g() const;
330
331 // Returns the side acceleration in body coordinates in gees
332 double GetNy_g() const;
333
334 // Returns the downward acceleration in body coordinates in gees
335 double GetNz_g() const;
336
337 // This returns a 'handle' to a control surface. If there is no control surface with the specified name, the function
338 // returns 0;
339 size_t GetControlSurfaceHandle(const std::string& aControlSurfaceName) const;
340
341 // This returns a 'handle' to the first control surface that contains the specified string. If there is no control
342 // surface that contains the name, the function returns 0;
343 size_t GetControlSurfaceHandleContainingString(const std::string& aString) const;
344
345 // This returns a 'handle' to the first control surface that contains the two specified strings. If there is no
346 // control surface that contains the names, the function returns 0;
347 size_t GetControlSurfaceHandleContainingTwoStrings(const std::string& aString1, const std::string& aString2) const;
348
349 // Returns the position (deg) of the specified control surface, or returns zero if no surface exists
350 double GetAngleOfControlSurface(std::string aControlSurfaceName) const;
351
352 // Returns the position (deg) of the specified control surface (based on handle), or returns zero if no surface exists
353 double GetAngleOfControlSurface(size_t aHandle) const;
354
355 // Returns a normalized (either +/-1 or 0-1) angle of the specified control surface (based on handle),
356 // or returns zero if no surface exists
357 double GetNormalizedAngleOfControlSurface(size_t aHandle) const;
358
359 // Returns a list(vector) containing the names of the control surfaces
360 std::vector<std::string> GetListOfControlSurfaceNames() const;
361
362 // Returns the position (deg) of the ailerons (common position)
363 double GetAileronsBothPosition() const;
364
365 // Returns the position (deg) of the left stabilator
366 double GetStabilatorLeftPosition() const;
367
368 // Returns the position (deg) of the right stabilator
369 double GetStabilatorRightPosition() const;
370
371 // Returns the position (deg) of the rudder(s) (common position)
372 double GetRudderPosition() const;
373
374 // Returns the position (deg) of the landing gear (common position)
375 double GetLandingGearPosition() const;
376
377 // Returns the position of the landing gear lever
378 double GetLandingGearLeverPosition() const;
379
380 // Returns the position (rad) of the speed brakes (common position)
381 double GetSpeedBrakePosition_rad() const;
382
383 // Returns the position (deg) of the speed brakes (common position)
384 double GetSpeedBrakePosition() const;
385
386 // Returns the position (deg) of the flaps (common position)
387 double GetFlapsPosition() const;
388
389 // Returns the position of the flaps lever
390 double GetFlapsLeverPosition() const;
391
392 // Returns the position (deg) of the spoilers (common position)
393 double GetSpoilersPosition() const;
394
395 // Returns the position of the spoilers lever
396 double GetSpoilersLeverPosition() const;
397
398 // Returns the position (deg) of the nose wheel steering angle
399 double GetNoseWheelAngle() const;
400
401 // These functions return the control surface angle in degrees
402 double GetAngleAileronLeft() const;
403 double GetAngleAileronRight() const;
404 double GetAngleFlapLeft() const;
405 double GetAngleFlapRight() const;
406 double GetAngleSpoilerLeft() const;
407 double GetAngleSpoilerRight() const;
408 double GetAngleStabilizerLeft() const;
409 double GetAngleStabilizerRight() const;
410 double GetAngleElevator() const;
411 double GetAngleRudderLeft() const;
412 double GetAngleRudder() const;
413 double GetAngleRudderRight() const;
414 double GetAngleSpeedBrake() const;
415 double GetAngleLandingGear() const;
416 double GetAngleLandingGearNose() const;
417 double GetAngleLandingGearMainLeft() const;
418 double GetAngleLandingGearMainRight() const;
419
420 // These functions return the normalized control surface angle
421 double GetNormalizedAileronLeft() const;
422 double GetNormalizedAileronRight() const;
423 double GetNormalizedFlapLeft() const;
424 double GetNormalizedFlapRight() const;
425 double GetNormalizedSpoilerLeft() const;
426 double GetNormalizedSpoilerRight() const;
427 double GetNormalizedStabilizerLeft() const;
428 double GetNormalizedStabilizerRight() const;
429 double GetNormalizedElevator() const;
430 double GetNormalizedRudderLeft() const;
431 double GetNormalizedRudder() const;
432 double GetNormalizedRudderRight() const;
433 double GetNormalizedSpeedBrake() const;
434 double GetNormalizedLandingGear() const;
435 double GetNormalizedLandingGearNose() const;
436 double GetNormalizedLandingGearMainLeft() const;
437 double GetNormalizedLandingGearMainRight() const;
438
439 // These functions return true if the data for that control surface is valid
440 bool AileronLeftValid() const;
441 bool AileronRightValid() const;
442 bool FlapLeftValid() const;
443 bool FlapRightValid() const;
444 bool SpoilerLeftValid() const;
445 bool SpoilerRightValid() const;
446 bool StabilizerLeftValid() const;
447 bool StabilizerRightValid() const;
448 bool ElevatorValid() const;
449 bool RudderLeftValid() const;
450 bool RudderValid() const;
451 bool RudderRightValid() const;
452 bool SpeedBrakeValid() const;
453 bool LandingGearValid() const;
454 bool LandingGearNoseValid() const;
455 bool LandingGearMainLeftValid() const;
456 bool LandingGearMainRightValid() const;
457 bool ThrottleValid() const;
458
459 // These functions return the normalized control input (lever) value
460 double GetStickRightInput() const;
461 double GetStickBackInput() const;
462 double GetRudderRightInput() const;
463 double GetThrottleInput() const;
464 double GetSpeedBrakeInput() const;
465 double GetSpoilerInput() const;
466 double GetLandingGearInput() const;
467
468 // This returns true if the positive-side stall warning is occurring
469 bool StallWarningAlert() const;
470
471 // GetAeroParametersAtAltitude returns several parameters for a vehicle at the specified altitude (ft) and
472 // speed (ft/sec). Parameters include air density [ ((lbf*sec^2)/ft^4) or slugs/ft^3 ], dynamic pressure (lbf/sq-ft),
473 // static pressure (lbf/sq-ft), and Mach.
474 void GetAeroParametersAtAltitude(double aAltitude_ft,
475 double aSpeed_fps,
476 double& aAirDensity,
477 double& aDynamicPressure_psf,
478 double& aStaticPressure_psf,
479 double& aSpeedOfSound_fps,
480 double& aMach) const;
481
482 // Returns the current dynamic pressure for the object in lbs/sq-ft
483 double GetDynamicPressure_psf() const;
484
485 // This returns the CLmax value for the specified Mach
486 double GetCLMaxAtMach(double aMach) const;
487
488 // This returns the alpha (in degrees) at CLmax for the specified Mach
489 double GetAlphaAtCLMaxAtMach_deg(double aMach) const;
490
491 // This returns the type of the active pilot object as a string
492 std::string GetActivePilot() const;
493
494 // This makes the manual pilot active (if present)
495 void ActivateManualPilot();
496
497 // This makes the manual pilot active (if present)
498 void ActivateSyntheticPilot();
499
500 // This makes the manual pilot active (if present)
501 void ActivateHardwareAutopilot();
502
503 // This makes the manual pilot active (if present)
504 void ActivateGuidanceAutopilot();
505
506 // This returns the autopilot's lateral mode as an enum
507 P6DOF::Lateral::Mode GetAutopilotLateralModeEnum() const;
508
509 // This returns the autopilot's lateral mode as a string
510 std::string GetAutopilotLateralMode() const;
511
512 // This returns the value of the autopilot's lateral mode
513 float GetAutopilotLateralModeValue() const;
514
515 // This returns the autopilot's vertical mode as an enum
516 P6DOF::Vertical::Mode GetAutopilotVerticalModeEnum() const;
517
518 // This returns the autopilot's vertical mode as a string
519 std::string GetAutopilotVerticalMode() const;
520
521 // This returns the value of the autopilot's vertical mode
522 float GetAutopilotVerticalModeValue() const;
523
524 // This returns the autopilot's speed mode as an enum
525 P6DOF::Speed::Mode GetAutopilotSpeedModeEnum() const;
526
527 // This returns the autopilot's speed mode as a string
528 std::string GetAutopilotSpeedMode() const;
529
530 // This returns the value of the autopilot's speed mode
531 float GetAutopilotSpeedModeValue() const;
532
533 // ====================================================================================================================
534
535 bool ReturnToRoute(double aSimTime) override;
536
537 // FollowRoute_1: FollowRoute(WsfRoute aRoute);
538 // FollowRoute_2: FollowRoute(WsfRoute aRoute, string aRouteAction);
539 // FollowRoute_3: FollowRoute(string aRouteName);
540 // FollowRoute_4: FollowRoute(string aRouteName, string aRouteAction);
541 // FollowRoute_5: FollowRoute(WsfRoute aRoute, int aIndex);
542 // FollowRoute_6: FollowRoute(string aRouteName, int aIndex);
543 // Implementing UpdateRoute() will enable FollowRoute_1 & FollowRoute_3
544 bool UpdateRoute(double aSimTime, const WsfRoute& aRoute) override;
545
546 // Implementing GoToClosestPoint() & GoToLabel() will enable FollowRoute_2 & FollowRoute_4
547 // virtual bool GoToClosestPoint(double aSimTime);
548 // virtual bool GoToLabel(double aSimTime,
549 // const WsfStringId& aLabelId);
550
551 // Implementing GoToWaypoint() will enable FollowRoute_5 & FollowRoute_6
552
553 // Fly to a waypoint on the planned route specified by the waypoint index
554 bool GoToWaypoint(double, // aSimTime,
555 unsigned int aDestination) override;
556
557 // Update the planned route with a new route
558 bool SetDefaultRoute(const WsfRoute& aRoute);
559
560 // Update the temporary route with a new route
561 bool SetTempRoute(const WsfRoute& aRoute);
562
563 // Replace the temporary route with a new route, and move the platform to the first waypoint
564 bool SetRoute(double aSimTime, const WsfRoute& aRoute) override;
565
566 const WsfRoute* GetRoute() const override { return mWsfRoutePtr; }
567
568 const WsfRoute* GetDefaultRoute() const override { return mDefaultWsfRoutePtr; }
569
570 int RoutePointIndex() const override;
571
572 // ====================================================================================================================
573
574 // These functions support guidance (WsfP6DOF_GuidanceComputer)
575
577 void SetGuidance(WsfMoverGuidance* aGuidancePtr) { mGuidancePtr = aGuidancePtr; }
578
581
582 // WsfGuidedMover and WsfGuidanceComputer use SetYandZForces(double aYForce,double aZForce), but WsfP6DOF_Mover uses
583 // SetYandZGLoads(double aYGLoad, double aZGLoad) instead. This is because the P6DOF autopilot accepts g-load
584 // commands for pitch and yaw. This function is used by WsfP6DOF_GuidanceComputer to command a P6DOF vehicle.
585 void SetYandZGLoads(double aYGLoad, double aZGLoad);
586
587 // This sets a yaw rate (rad/sec) command for the P6DOF autopilot for use in guidance
588 void SetCommandedYawRate(double aRate) { mCommandedYawRate = aRate; }
589
590 // This sets a pitch rate (rad/sec) command for the P6DOF autopilot for use in guidance
591 void SetCommandedPitchRate(double aRate) { mCommandedPitchRate = aRate; }
592
593 // This sets a roll rate (rad/sec) command for the P6DOF autopilot for use in guidance
594 void SetCommandedRollRate(double aRate) { mCommandedRollRate = aRate; }
595
596 // This sets a speed (m/sec) command for the P6DOF autopilot for use in guidance
597 void SetCommandedSpeed(double aCommandedSpeed) { mCommandedSpeed = aCommandedSpeed; }
598
599 // void SetCommandedEngineStopTime(double aStopTime) { mCommandedEngineStopTime = aStopTime; }
600
601 // This sets the minimum height above terrain (in meters) for terrain following
602 void SetMinimumHeightAboveTerrain(double aMinimum) { mMinimumHeightAboveTerrain = aMinimum; }
603
604 // This returns the current stage index
605 int CurrentStage() const { return (int)mStageIndex; }
606
607 // This sets the current target when using guidance
608 void SetTargetData(P6DOF::CurrentTargetData& aCurrentTarget) { mCurrentTarget = aCurrentTarget; }
609
614
615 UtCallbackListN<void(double)> RouteChanged;
616 UtCallbackListN<void(double, double)> StageIgnition;
617 UtCallbackListN<void(double, double)> StageBurnout;
618 UtCallbackListN<void(double, double)> StageSeparation;
620
621 // This outputs the current kinematic status. It is Used by WsfP6DOF_GuidanceComputer.
622 // This is deprecated.
623 void WriteKinematicStatus(ut::log::MessageStream& aStream);
624
625 // ====================================================================================================================
626
627 // Functions to support scripting
628
629 const char* GetScriptClassName() const override { return "WsfP6DOF_Mover"; }
630
631 // This allows an external force (such as a ground tug) to apply a force to the nose gear. The angle is measured as
632 // zero being forward and positive angles being to the right.
633 void ApplyExternalForce(double aForceMagnitude_lbs, double aAngle_deg);
634
635 // This removes any external forces on the nose gear.
636 void RemoveExternalForce();
637
638 // This should be called to enable direct braking commands in script.
639 void EnableDirectBraking();
640
641 // This sets the parking brake, if equipped.
642 void SetParkingBrake();
643
644 // This applies the left main gear wheel brake with a normalized value or 0 for no braking and 1.0 for full braking.
645 void ApplyLeftGearBrake(double aValue);
646
647 // This applies the right main gear wheel brake with a normalized value or 0 for no braking and 1.0 for full braking.
648 void ApplyRightGearBrake(double aValue);
649
650 // This releases both wheel brakes.
651 void ReleaseWheelBrakes();
652
653 // This should be called to disable any further direct braking commands in script.
654 void ReleaseDirectBraking();
655
656 // This starts up the engines. It is a simple, instant-on startup.
657 void StartupEngines(double aTimeSec);
658
659 // This shuts down up the engines. It is a simple, instant shutdown.
660 void ShutdownEngines(double aTimeSec);
661
662 // Returns mass in lbs
663 double GetTotalWeight_lbs() const;
664
665 // Returns mass in kg
666 double GetTotalWeight_kg() const;
667
668 // This retracts the landing gear
669 void RetractLandingGear();
670
671 // This lowers the landing gear
672 void LowerLandingGear();
673
674 // Set the flaps position in normalized values ranging from 0 when flaps are retracted to 1 when flaps are fully
675 // deployed.
676 void SetFlapsPosition(double aPosition);
677
678 // Set the spoilers position in normalized values ranging from 0 when spoilers are retracted to 1 when spoilers are
679 // fully deployed.
680 void SetSpoilersPosition(double aPosition);
681
682 void SetThrustReverserPosition(double aPosition);
683 void SetEnableNWS(bool aNWS_Enabled);
684
685 // Add fuel (in kg) to vehicle
686 void AddFuel(double aFuelMass_kg);
687
688 // Returns total fuel capacity (internal and external) in kg
689 double GetTotalFuelCapacity() const;
690
691 // Returns total internal fuel capacity in kg
692 double GetInternalFuelCapacity() const;
693
694 // Returns total external fuel capacity in kg
695 double GetExternalFuelCapacity() const;
696
697 // Returns total fuel remaining (internal and external) in kg
698 double GetTotalFuelRemaining() const;
699
700 // Returns internal fuel remaining in kg
701 double GetInternalFuelRemaining() const;
702
703 // Returns external fuel remaining in kg
704 double GetExternalFuelRemaining() const;
705
706 // Returns fuel tank capacity in kg
707 double GetFuelTankCapacity(const std::string& aTankName) const;
708
709 // This returns the current amount of fuel in the specified tank in kg
710 double GetFuelInTank(const std::string& aTankName) const;
711
712 // This will set the fuel in a specified tank to the specified level (kg), as long as the tank capacity can contain
713 // it -- otherwise, the tank will be filled and the excess fuel will be "wasted".
714 void SetFuelInTank(const std::string& aTankName, double aFuel_kg);
715
716 // This returns the total fuel flow (kg/sec) for all engines on the vehicle
717 double GetTotalFuelFlow() const;
718
719 // This will instantly empty all internal and external fuel tanks
720 void EmptyAllInternalandExternalTanks();
721
722 // This will instantly empty all internal fuel tanks
723 void EmptyAllInternalTanks();
724
725 // This will instantly empty all external fuel tanks
726 void EmptyAllExternalTanks();
727
728 // This sets the Joker fuel state (kg)
729 void SetJokerFuelState(double aJokerFuel_kg);
730
731 // This sets the Bingo fuel state (kg)
732 void SetBingoFuelState(double aBingoFuel_kg);
733
734 // This returns the Joker fuel state (kg)
735 double GetJokerFuelState();
736
737 // This returns the Bingo fuel state (kg)
738 double GetBingoFuelState();
739
740 // This returns true if Joker fuel state has been reached
741 bool JokerFuelReached();
742
743 // This returns true if Bingo fuel state has been reached
744 bool BingoFuelReached();
745
746 // This enables/disables controls. When controls are disabled,
747 // all control inputs are set to zero.
748 void EnableControls(bool aEnabled);
749
750 // This returns the controls enabled/disabled state.
751 bool ControlsEnabled() const;
752
753 // Returns true if there is weight on any wheel
754 bool GetWeightOnWheels() const;
755
756 // Returns true if there is weight on the nose wheel
757 bool GetWeightOnNoseWheel() const;
758
759 // This returns true if at least one engine (thrust producer) is producing thrust
760 bool IsProducingThrust() const;
761
762 // This returns thrust magnitude in Newtons
763 double GetTotalThrust() const;
764
765 // This returns forward thrust in Newtons
766 double GetTotalForwardThrust() const;
767
768 // This returns true if any afterburner is on
769 bool GetAfterburnerOn() const;
770
771 // This returns thrust in Newtons for the specified engine
772 double GetEngineThrust(const std::string& aEngineName) const;
773
774 // This returns the fuel flow (kg/sec) for the specified engine
775 double GetEngineFuelFlowRate(const std::string& aEngineName) const;
776
777 // This returns true if the afterburner is active for the specified engine
778 bool GetEngineAfterburnerOn(const std::string& aEngineName) const;
779
780 // This returns the total fuel flow rate in kg/sec
781 double GetTotalFuelFlowRate() const;
782
783 // This adds a new fuel transfer to the propulsion system. The fuel transfer name must be unique.
784 // It returns true if the transfer is created.
785 bool AddFuelTransfer(std::string aFuelTransferName, std::string aSourceTankName, std::string aTargetTankName);
786
787 // This removes the fuel transfer with the specified name. It returns true if the removal is successful.
788 bool RemoveFuelTransfer(std::string aFuelTransferName);
789
790 // This specifies the fuel feed (input tank name) for the specified engine.
791 // It returns true if the assignment is successful.
792 bool SetFuelFeed(std::string aEngineName, std::string aFuelTankName);
793
794 // This specifies the fuel feed (input tank name) for all engines.
795 // It returns true if the assignment is successful.
796 bool SetFuelFeed(std::string aFuelTankName);
797
798 // EnableThrustVectoring enables/disable thrust vectoring
799 void EnableThrustVectoring(bool aEnableThrustVectoring);
800
801 // Limits and settings functions
802
803 // This reverts all autopilot current limit settings to the default limits
804 void RevertLimitsToDefaults();
805
806 // This returns the minimum pitch g-load for the autopilot
807 double GetPitchGLoadMin();
808
809 // This returns the maximum pitch g-load for the autopilot
810 double GetPitchGLoadMax();
811
812 // This returns the minimum angle of attack (alpha) in degrees
813 double GetAlphaMin();
814
815 // This returns the maximum angle of attack (alpha) in degrees
816 double GetAlphaMax();
817
818 // This returns the minimum pitch rate in deg/sec
819 double GetPitchRateMin();
820
821 // This returns the maximum pitch rate in deg/sec
822 double GetPitchRateMax();
823
824 // This returns the minimum vertical speed in ft/min
825 double GetVerticalSpeedMin();
826
827 // This returns the maximum vertical speed in ft/min
828 double GetVerticalSpeedMax();
829
830 // This returns the maximum yaw g-load
831 double GetYawGLoadMax();
832
833 // This returns the maximum angle of sideslip (beta) in degrees
834 double GetBetaMax();
835
836 // This returns the maximum yaw rate in deg/sec
837 double GetYawRateMax();
838
839 // This returns the maximum roll rate in deg/sec
840 double GetRollRateMax();
841
842 // This returns the maximum bank angle in degrees
843 double GetBankAngleMax();
844
845 // This returns the minimum forward acceleration in gees
846 double GetForwardAccelMin();
847
848 // This returns the maximum forward acceleration in gees
849 double GetForwardAccelMax();
850
851 // This returns the maximum ground taxi speed in ft/sec
852 double GetTaxiSpeedMax();
853
854 // This returns the maximum ground taxi yaw rate in deg/sec
855 double GetTaxiYawRateMax();
856
857 // This sets the minimum pitch g-load for the autopilot
858 void SetPitchGLoadMin(double aGees);
859
860 // This sets the maximum pitch g-load for the autopilot
861 void SetPitchGLoadMax(double aGees);
862
863 // This sets the minimum angle of attack (alpha) in degrees
864 void SetAlphaMin(double aAlpha);
865
866 // This sets the maximum angle of attack (alpha) in degrees
867 void SetAlphaMax(double aAlpha);
868
869 // This sets the minimum pitch rate in deg/sec
870 void SetPitchRateMin(double aPitchRate);
871
872 // This sets the maximum pitch rate in deg/sec
873 void SetPitchRateMax(double aPitchRate);
874
875 // This sets the minimum vertical speed in ft/min
876 void SetVerticalSpeedMin(double aVertSpeed);
877
878 // This sets the maximum vertical speed in ft/min
879 void SetVerticalSpeedMax(double aVertSpeed);
880
881 // This sets the maximum yaw g-load
882 void SetYawGLoadMax(double aYawGLoad);
883
884 // This sets the maximum angle of sideslip (beta) in degrees
885 void SetBetaMax(double aBeta);
886
887 // This sets the maximum yaw rate in deg/sec
888 void SetYawRateMax(double aYawRate);
889
890 // This sets the maximum roll rate in deg/sec
891 void SetRollRateMax(double aRollRate);
892
893 // This sets the maximum bank angle in degrees
894 void SetBankAngleMax(double aBankAngle);
895
896 // This sets the minimum forward acceleration in gees
897 void SetForwardAccelMin(double aForwardAccel);
898
899 // This sets the maximum forward acceleration in gees
900 void SetForwardAccelMax(double aForwardAccel);
901
902 // This sets the maximum ground taxi speed in ft/sec
903 void SetTaxiSpeedMax(double aSpeedMax);
904
905 // This sets the maximum ground taxi yaw rate in deg/sec
906 void SetTaxiYawRateMax(double aSpeedMax);
907
908 // This sets the turn roll-in multiplier for the autopilot when following routes
909 void SetTurnRollInMultiplier(double aValue);
910
911 // Sets the route allowable error in radians
912 void SetRouteAllowableAngleError(double aValue_rad);
913
914 // This returns the current turn roll-in multiplier for the autopilot when following routes
915 double GetCurrentTurnRollInMultiplier();
916
917 // This returns the default turn roll-in multiplier for the autopilot when following routes
918 double GetDefaultTurnRollInMultiplier();
919
920 // Gets the current route allowable error in radians
921 double GetCurrentRouteAllowableAngleError();
922
923 // Gets the default route allowable error in radians
924 double GetDefaultRouteAllowableAngleError();
925
926 // Get the maximum bank angle is deg.
927 double GetBankAngleMax() const;
928
929 // Autopilot commands
930
931 // This enable/disables taxi mode
932 void SetTaxiMode(bool aTaxiModeEnabled);
933
934 // This sets the turn radius (in feet) used for taxiing
935 void SetTaxiRadius(double aTaxiRadius_ft);
936
937 // This sets the autopilot to use pitch angle mode with the specified pitch angle (in degrees)
938 void SetAutopilotPitchAngle(double aPitchAngle_deg);
939
940 // This sets the autopilot to use flight path angle mode with the specified flight path angle (in degrees)
941 void SetAutopilotFlightPathAngle(double aFlightPathAngle_deg);
942
943 // This sets the autopilot to use vertical speed mode with the specified vertical speed (in ft/min)
944 void SetAutopilotVerticalSpeed(double aVerticalSpeed_fpm);
945
946 // This sets the autopilot to use altitude mode with the specified altitude (in feet)
947 void SetAutopilotAltitude(double aAltitude_ft);
948
949 // This sets the autopilot to use roll/bank angle mode with the specified roll/bank angle (in degrees)
950 void SetAutopilotRollAngle(double aRollAngle_deg);
951
952 // This sets the autopilot to use roll rate mode with the specified roll rate (in deg/sec)
953 void SetAutopilotRollRate(double aRollRate_dps);
954
955 // This sets the autopilot to use pitch g-load mode with the specified g-load
956 void SetPitchGLoad(double aGLoad);
957
958 // This sets the autopilot to use pitch rate mode with the specified pitch rate (in deg/sec)
959 void SetAutopilotPitchRate(double aPitchRate_dps);
960
961 // This sets the autopilot to use delta pitch mode with the specified delta pitch (in degrees)
962 void SetAutopilotDeltaPitch(double DeltaPitchAngle_deg);
963
964 // This sets the autopilot to use delta roll mode with the specified delta roll (in degrees)
965 void SetAutopilotDeltaRoll(double DeltaRollAngle_deg);
966
967 // This sets the autopilot to hold maintain the specified speed (in KTAS, knots true air speed)
968 void SetAutopilotSpeedKTAS(double aSpeed_KTAS);
969
970 // This sets the autopilot to hold maintain the specified speed (in KCAS, knots calibrated air speed)
971 void SetAutopilotSpeedKCAS(double aSpeed_KCAS);
972
973 // This sets the autopilot to hold maintain the specified speed (in Mach)
974 void SetAutopilotSpeedMach(double aSpeed_Mach);
975
976 // This sets the autopilot to use waypoint mode in the lateral channel
977 void SetAutopilotLateralWaypointMode();
978
979 // This sets the autopilot to use waypoint mode in the vertical channel
980 void SetAutopilotVerticalWaypointMode();
981
982 // This sets the autopilot to use waypoint mode in the speed channel
983 void SetAutopilotSpeedWaypointMode();
984
985 // This sets the autopilot to use waypoint mode
986 void SetAutopilotWaypointMode();
987
988 // This sets the autopilot to hold all controls in a centered/neutralized position
989 void SetAutopilotNoControl();
990
991 // This allows the use of direct throttle input rather than through the autopilot
992 void EnableDirectThrottleInput();
993
994 // This allows direct throttle input, setting the throttle to idle
995 void MoveThrottleToIdle();
996
997 // This allows direct throttle input, setting the throttle to full (military) power
998 void MoveThrottleToFull();
999
1000 // This allows direct throttle input, setting the throttle to full afterburner
1001 void MoveThrottleToAfterburner();
1002
1003 // This restores normal throttle input control to the autopilot
1004 void ReleaseDirectThrottleInput();
1005
1006 // This allows the use of direct speed brake input rather than through the autopilot
1007 void EnableDirectSpeedBrakeInput();
1008
1009 // This allows direct speed brake input, setting the speed brake to fully open/extended
1010 void OpenSpeedBrake();
1011
1012 // This allows direct speed brake input, setting the speed brake to fully close/retracted
1013 void CloseSpeedBrake();
1014
1015 // This restores normal speed brake input control to the autopilot
1016 void ReleaseDirectSpeedBrakeInput();
1017
1018 // Returns the current stick back control input position
1019 double GetStickBackPosition() const;
1020
1021 // Returns the current stick right control input position
1022 double GetStickRightPosition() const;
1023
1024 // This returns the current rudder right control input position
1025 double GetRudderRightPosition() const;
1026
1027 // This returns the current military (non-afterburner) throttle control input position
1028 double GetThrottleMilitaryPosition() const;
1029
1030 // This returns the current afterburner throttle control input position
1031 double GetThrottleAfterburnerPosition() const;
1032
1033 // This returns the current thrust reverser control input position
1034 double GetThrustReverserControlPosition() const;
1035
1036 // This returns the current speed brake control input position
1037 double GetSpeedBrakeControlPosition() const;
1038
1039 // This activates the sequencer with the specified name. If no such sequencer exists, it does nothing.
1040 bool ActivateSequencer(const std::string& aSequencerName);
1041
1042 // This returns a pointer to the test object. It should only be used in testing.
1044
1045 // Damage and Destruction
1046
1047 // This sets the damage factor for the mover
1048 void SetDamageFactor(double aDamageFactor);
1049
1050 // This destroys the mover
1051 void SetDestroyed();
1052
1053 // This returns true if the mover is destroyed
1054 bool GetIsDestroyed();
1055
1056 // Appearance
1057
1058 // This returns true if one or more engines are operating
1059 bool GetEngineIsOperating() const;
1060
1061 // This returns true if one or more engines are producing visible smoke
1062 bool GetEngineIsSmoking() const;
1063
1064 // This returns true if one or more engines have an operating afterburner
1065 bool GetEngineAfterburnerIsOn() const;
1066
1067 // This allows control to have the engines produce visible smoke
1068 void MakeEnginesSmoke(bool aEngineSmoking);
1069
1070 // This returns true if one or more engines are producing contrails
1071 bool GetContrailTrailingEffect() const;
1072
1073 // This returns true if the mover is producing visible rocket smoke
1074 bool GetRocketSmokeTrailingEffect() const;
1075
1076 // This returns true if the mover is producing visible damage smoke
1077 bool GetDamageSmokeTrailingEffect() const;
1078
1079 // This allows control to have the mover produce visible damage smoke
1080 void SetDamageSmokeTrailingEffect(bool aEffectActive);
1081
1082 // This returns true if the mover is producing a visible rising smoke plume
1083 bool GetRisingSmokePlumeIsPresent() const;
1084
1085 // This allows control to have the mover produce a visible rising smoke plume
1086 void SetRisingSmokePlumeIsPresent(bool aSmoking);
1087
1088 // This returns true if the mover is producing visible launch smoke
1089 bool GetLaunchFlashSmokeIsPresent() const;
1090
1091 // This allows control to have the mover produce a visible launch smoke
1092 void SetLaunchFlashSmokeIsPresent(bool aLaunchFlashSmoke);
1093
1094 // This returns true if the mover is producing visible flames
1095 bool GetFlamesArePresent() const;
1096
1097 // This allows control to have the mover produce a visible flames
1098 void SetFlamesArePresent(bool aFlaming);
1099
1100 // This returns true if the mover is lightly damaged
1101 bool GetIsLightlyDamaged() const;
1102
1103 // This allows control to have the mover be lightly damaged
1104 void SetIsLightlyDamaged();
1105
1106 // This returns true if the mover is heavily damaged
1107 bool GetIsHeavilyDamaged() const;
1108
1109 // This allows control to have the mover be heavily damaged
1110 void SetIsHeavilyDamaged();
1111
1112 // This is used to prevent crashes when passing through the ground/sea surface or the artificial "floor" of sea
1113 // level. It is usually set to true when testing.
1114 void SetTestingIgnoreAllCrashes(bool aValue);
1115
1116 // This returns true when crashes with the ground will be ignored
1117 bool GetTestingIgnoreAllCrashes() const;
1118
1119 // This is used to prevent the vehicle from going below sea level at any time. The effectively limits the altitude to
1120 // zero. It is sometimes set to true when testing.
1121 void SetTestingClampToSealLevelMinAlt(bool aValue);
1122
1123 // This returns true when the vehicle will be prevented from going below sea level at any time.
1124 // The altitude will effectively be limited to zero.
1125 bool GetTestingClampToSealLevelMinAlt() const;
1126
1127 // Maneuver related
1128
1129 // This returns the current maneuver that is being executed, or nullptr if there is none.
1130 WsfManeuver* GetCurrentManeuver() const;
1131
1132 // This returns the sequence that is currently being executed, or nullptr if there is none.
1133 WsfManeuverSequence* GetManeuverSequence() const;
1134
1135 // This executes the given maneuver. This will replace any current sequence with the single manuever provided.
1136 void ExecuteManeuver(double aSimTime, std::unique_ptr<WsfManeuver>&& aManeuverPtr);
1137
1138 // This executes the given sequence of maneuvers. This will replace any current sequence with the given sequence.
1139 void ExecuteManeuverSequence(double aSimTime, std::unique_ptr<WsfManeuverSequence>&& aSequencePtr);
1140
1141 // This will cancel the currently executing maneuver sequence.
1142 void CancelManeuvers();
1143
1144 // Formation related
1145
1146 void GetInitialState(double aLocWCS[3], double aVelWCS[3], double aOrientationNED[3]) const;
1147 void SetInitialLatLon(double aLat, double aLon);
1148 void SetInitialAlt(double aAlt_m);
1149 void SetInitialNEDHeading(double aHeading_rad);
1150 void SetInitialNEDPitch(double aPitch_rad);
1151 void SetInitialNEDRoll(double aRoll_rad);
1152 void SetInitialNEDVelocity(double aVelNorth_mps, double aVelEast_mps, double aVelDown_mps);
1153
1154 void ResetPosition(double aSimTime) override;
1155
1156 // Subobject related
1157
1158 // This will jettison the specified subobject, returning a pointer to the platform if successful, or null if it
1159 // fails. Note that this function does not add the platform to the simulation -- this must be performed outside of
1160 // this function.
1161 WsfPlatform* DirectJettisonSubobjectPlatform(P6DofVehicle* aJettisonedObject, double aSimTime_sec);
1162
1163 // ====================================================================================================================
1164
1165protected:
1167 double mMaxGees;
1168 double mSpeed;
1170
1171 void SetP6DofVehicle(std::unique_ptr<P6DofVehicle> aP6DofVehicle);
1172
1173 bool ExecuteTriggersCB(unsigned int aPointIndex);
1174 bool ExecuteTriggers(double aSimTime, unsigned int aPointIndex) override;
1175
1176 void CrashIntoGroundCB(double aSimTime);
1177
1178 void UpdatePlatformFromP6DofVehicle(P6DofVehicle* aP6DofVehicle, UtEntity* aPlatform);
1179
1180 void CheckForNewlyJettisonedPlatforms(double aSimTime);
1181
1182 // This is a callback to handle a jettison
1183 void HandleSubobjectJettison(std::unique_ptr<P6DofVehicle>& aJettisonedObject);
1184
1185 // This is used to perform common tasks required when a subobject is jettisoned. If it succeeds, it returns a
1186 // pointer to a newly created platform. If it fails, it returns null.
1187 WsfPlatform* CommonSubobjectJettisonTasks(std::unique_ptr<P6DofVehicle> aJettisonedObject);
1188
1190
1191 void UpdateAppearance(double aSimTime);
1192
1193 void InitializeSubobject(double aSimTime,
1194 std::string& aRootName,
1195 P6DofVehicle* aObject,
1196 const UtQuaternion& aRotation,
1197 const UtVec3d& aOffset);
1198
1199 std::string LateralModeToString(P6DOF::Lateral::Mode aMode) const;
1200 std::string VerticalModeToString(P6DOF::Vertical::Mode aMode) const;
1201 std::string SpeedModeToString(P6DOF::Speed::Mode aMode) const;
1202
1204 ut::CloneablePtr<P6DofVehicle> mP6DofVehiclePtr;
1210
1211 std::queue<WsfPlatform*> mNewlyJettisonedPlatforms;
1212
1246
1247 // The WsfRoute route the basis of P6DofRoute. This is kept within WsfP6DOF_Mover to avoid storing it within the
1248 // "framework agnostic" core of P6DOF.
1251
1252 // These functions are for guidance
1254 double mYGLoad;
1255 double mZGLoad;
1260
1265
1268
1269 unsigned int mStageIndex;
1270
1272
1274 double mFMM_LocWCS[3];
1277
1279
1280 bool mEnginesOffAtStart; // Allows engines to be "off" at startup
1301
1302 // Event Pipe Manager for P6dof Data. Maps a message name to an update rate and number of updates.
1303 std::map<std::string, std::pair<double, int>> mEventPipeManager;
1304 UtCallbackHolder mCallbacks;
1305 std::map<std::string, std::vector<WsfVisualPart*>> mVisualPartManager;
1306 std::unique_ptr<WsfManeuverSequence> mManeuverPtr;
1307
1308 // TODO Parking Brake, Throttle Idle/Full/AB, Taxi Mode, NWS, AP No Control, Wash-In at Start
1309
1310 std::unique_ptr<WsfP6DOF_MoverTestObject> mTestSupportObjectPtr;
1311};
1312
1313#endif
WsfSpatialDomain
A collection of enumerations and type definitions that are used across a number of components.
Definition WsfTypes.hpp:32
@ WSF_SPATIAL_DOMAIN_AIR
Cars, trucks, buildings, etc.
Definition WsfTypes.hpp:35
Definition P6DofPilotManager.hpp:38
Definition P6DofRoute.hpp:27
Definition P6DofVehicleType.hpp:41
Definition P6DofVehicle.hpp:53
Provides the capability to draw shapes into the WSF replay file.
Definition WsfDraw.hpp:35
Definition WsfMoverGuidance.hpp:23
virtual bool ExecuteTriggers(double aSimTime, unsigned int aPointIndex)
Definition WsfMover.cpp:360
bool ProcessInput(UtInput &aInput) override
Definition WsfMover.cpp:138
virtual bool TurnToHeading(double aSimTime, double aHeading, double aRadialAccel, WsfPath::TurnDirection aTurnDirection)
Definition WsfMover.cpp:454
bool Initialize(double aSimTime) override
Definition WsfMover.cpp:108
virtual bool ReturnToRoute(double aSimTime)
Definition WsfMover.cpp:393
virtual void SetPitch(double aPitch)
Definition WsfMover.cpp:218
virtual bool GoToAltitude(double aSimTime, double aAltitude, double aClimbDiveRate, bool aKeepRoute)
Definition WsfMover.cpp:383
WsfMover * Clone() const override=0
virtual bool GoToSpeed(double aSimTime, double aSpeed, double aLinearAccel, bool aKeepRoute)
Definition WsfMover.cpp:441
virtual void SetOrientationNED(double aHeading, double aPitch, double aRoll)
Definition WsfMover.cpp:240
WsfMover()=delete
virtual void SetRoll(double aRoll)
Definition WsfMover.cpp:229
virtual bool GoToWaypoint(double aSimTime, unsigned int aDestination)
Definition WsfMover.cpp:512
virtual bool SetRoute(double aSimTime, const WsfRoute &aRoute)
Definition WsfMover.cpp:481
virtual void ResetPosition(double aSimTime)
Informs the mover to use the current platform state.
Definition WsfMover.hpp:94
virtual bool GoToLocation(double aSimTime, double aLatitude, double aLongitude, double aAltitude)
Definition WsfMover.cpp:428
virtual bool TurnToRelativeHeading(double aSimTime, double aHeadingChange, double aRadialAccel, WsfPath::TurnDirection aTurnDirection)
Definition WsfMover.cpp:467
void Update(double aSimTime) override
Definition WsfMover.cpp:310
virtual void SetHeading(double aHeading)
Definition WsfMover.cpp:207
virtual bool UpdateRoute(double aSimTime, const WsfRoute &aRoute)
Definition WsfMover.cpp:492
virtual int RoutePointIndex() const
Definition WsfMover.hpp:141
Definition WsfP6DOF_MoverTestObject.hpp:31
double mSpeed
Definition WsfP6DOF_Mover.hpp:1168
double mLastWheelBrakeRightPosition
Definition WsfP6DOF_Mover.hpp:1244
double mLastRudder
Definition WsfP6DOF_Mover.hpp:1232
std::map< std::string, std::pair< double, int > > mEventPipeManager
Definition WsfP6DOF_Mover.hpp:1303
double mDamageFactor
Definition WsfP6DOF_Mover.hpp:1298
bool mLandingGearDownAtStart
Definition WsfP6DOF_Mover.hpp:1281
void CheckForNewlyJettisonedPlatforms(double aSimTime)
Definition WsfP6DOF_Mover.cpp:1537
double mInitialSpeed_NED_Z_fps
Definition WsfP6DOF_Mover.hpp:1223
void WriteKinematicStatus(ut::log::MessageStream &aStream)
Definition WsfP6DOF_Mover.cpp:2310
double mCommandedRollRate
Definition WsfP6DOF_Mover.hpp:1258
const char * GetScriptClassName() const override
Definition WsfP6DOF_Mover.hpp:629
bool ExecuteTriggersCB(unsigned int aPointIndex)
Definition WsfP6DOF_Mover.cpp:1139
bool mTaxiModeEnabledAtStart
Definition WsfP6DOF_Mover.hpp:1286
double mInitialSpeed_NED_Y_fps
Definition WsfP6DOF_Mover.hpp:1222
double mLaunchSmokeTime_sec
Definition WsfP6DOF_Mover.hpp:1292
double mInitialNEDHeading
Definition WsfP6DOF_Mover.hpp:1216
double mTargetPosition_Longitude
Definition WsfP6DOF_Mover.hpp:1220
void SetGuidance(WsfMoverGuidance *aGuidancePtr)
Set the pointer to the mover guidance object. Ownership is retained by the caller.
Definition WsfP6DOF_Mover.hpp:577
double mLastThrustVectorRollRightPosition
Definition WsfP6DOF_Mover.hpp:1241
double mLastThrustReverserLeverPosition
Definition WsfP6DOF_Mover.hpp:1238
std::queue< WsfPlatform * > mNewlyJettisonedPlatforms
Definition WsfP6DOF_Mover.hpp:1211
double mLastFlapsLeverPosition
Definition WsfP6DOF_Mover.hpp:1236
UtVec3d mVectorToTarget_NED
Definition WsfP6DOF_Mover.hpp:1166
bool mValidInitialNEDHeading
Definition WsfP6DOF_Mover.hpp:1226
void SetCommandedRollRate(double aRate)
Definition WsfP6DOF_Mover.hpp:594
double mCommandedYawRate
Definition WsfP6DOF_Mover.hpp:1256
double mInitialSpeed_NED_X_fps
Definition WsfP6DOF_Mover.hpp:1221
double mCommandedSpeed
Definition WsfP6DOF_Mover.hpp:1259
double mBingoFuel_lbs
Definition WsfP6DOF_Mover.hpp:1300
double mLastStickX
Definition WsfP6DOF_Mover.hpp:1230
P6DofVehicle * mP6DofVehicleCopyPtr
Definition WsfP6DOF_Mover.hpp:1207
double mInitialPosition_Latitude
Definition WsfP6DOF_Mover.hpp:1213
void UpdatePlatformFromP6DofVehicle(P6DofVehicle *aP6DofVehicle, UtEntity *aPlatform)
Definition WsfP6DOF_Mover.cpp:1699
void InitializeSubobject(double aSimTime, std::string &aRootName, P6DofVehicle *aObject, const UtQuaternion &aRotation, const UtVec3d &aOffset)
Definition WsfP6DOF_Mover.cpp:904
double mYGLoad
Definition WsfP6DOF_Mover.hpp:1254
bool mValidInitialSpeed_NED
Definition WsfP6DOF_Mover.hpp:1229
bool mThrottleFullAtStart
Definition WsfP6DOF_Mover.hpp:1284
std::unique_ptr< WsfManeuverSequence > mManeuverPtr
Definition WsfP6DOF_Mover.hpp:1306
bool mProducesLaunchSmoke
Definition WsfP6DOF_Mover.hpp:1291
P6DOF::CurrentTargetData mCurrentTarget
Definition WsfP6DOF_Mover.hpp:1278
double mCommandedEngineStopTime
Definition WsfP6DOF_Mover.hpp:1264
double mInitialNEDRoll
Definition WsfP6DOF_Mover.hpp:1218
bool mLightDamage
Definition WsfP6DOF_Mover.hpp:1295
bool mThrottleIdleAtStart
Definition WsfP6DOF_Mover.hpp:1283
double mFMM_Heading
Definition WsfP6DOF_Mover.hpp:1275
bool mEnableThrustVectoringAtStart
Definition WsfP6DOF_Mover.hpp:1289
const WsfRoute * GetDefaultRoute() const override
Definition WsfP6DOF_Mover.hpp:568
WsfSpatialDomain GetSpatialDomain() const override
Definition WsfP6DOF_Mover.hpp:69
double mLastLandingGearLeverPosition
Definition WsfP6DOF_Mover.hpp:1237
std::unique_ptr< WsfP6DOF_MoverTestObject > mTestSupportObjectPtr
Definition WsfP6DOF_Mover.hpp:1310
double mLastThrottle
Definition WsfP6DOF_Mover.hpp:1233
bool mHeavyDamage
Definition WsfP6DOF_Mover.hpp:1296
WsfPlatform * CommonSubobjectJettisonTasks(std::unique_ptr< P6DofVehicle > aJettisonedObject)
Definition WsfP6DOF_Mover.cpp:1546
bool mLastNWS_Enabled
Definition WsfP6DOF_Mover.hpp:1245
double mLastWheelBrakeLeftPosition
Definition WsfP6DOF_Mover.hpp:1243
double mLastThrustVectorPitchUpPosition
Definition WsfP6DOF_Mover.hpp:1240
WsfRoute * mWsfRoutePtr
Definition WsfP6DOF_Mover.hpp:1249
UtCallbackListN< void(double)> RouteChanged
Definition WsfP6DOF_Mover.hpp:615
bool mNWSEnabledAtStart
Definition WsfP6DOF_Mover.hpp:1287
double mLastThrustVectorYawRightPosition
Definition WsfP6DOF_Mover.hpp:1239
double mLastNoseWheelSteeringRightPosition
Definition WsfP6DOF_Mover.hpp:1242
void HandleSubobjectJettison(std::unique_ptr< P6DofVehicle > &aJettisonedObject)
Definition WsfP6DOF_Mover.cpp:1631
double mFMM_LocWCS[3]
Definition WsfP6DOF_Mover.hpp:1274
static int GetTypeId()
Definition WsfP6DOF_Mover.hpp:74
std::string LateralModeToString(P6DOF::Lateral::Mode aMode) const
Definition WsfP6DOF_Mover.cpp:970
bool mLaunchFlashSmoke
Definition WsfP6DOF_Mover.hpp:1294
void SetCommandedSpeed(double aCommandedSpeed)
Definition WsfP6DOF_Mover.hpp:597
double mJokerFuel_lbs
Definition WsfP6DOF_Mover.hpp:1299
WsfRoute * mDefaultWsfRoutePtr
Definition WsfP6DOF_Mover.hpp:1250
double mFMM_Time
Information captured at time of 'first missile motion' (needed by trajectory output).
Definition WsfP6DOF_Mover.hpp:1273
bool mEnginesOffAtStart
Definition WsfP6DOF_Mover.hpp:1280
void SetCommandedYawRate(double aRate)
Definition WsfP6DOF_Mover.hpp:588
bool mParkingBrakeOnAtStart
Definition WsfP6DOF_Mover.hpp:1282
bool mRisingSmokePlume
Definition WsfP6DOF_Mover.hpp:1293
std::string SpeedModeToString(P6DOF::Speed::Mode aMode) const
Definition WsfP6DOF_Mover.cpp:1094
const WsfRoute * GetRoute() const override
Definition WsfP6DOF_Mover.hpp:566
bool mFollowVerticalTrack
Definition WsfP6DOF_Mover.hpp:1209
void SetMinimumHeightAboveTerrain(double aMinimum)
Definition WsfP6DOF_Mover.hpp:602
double mLastSpoilerLeverPosition
Definition WsfP6DOF_Mover.hpp:1235
const P6DofVehicleType * mP6DofVehicleTypePtr
Definition WsfP6DOF_Mover.hpp:1205
double mLastStickY
Definition WsfP6DOF_Mover.hpp:1231
double mZGLoad
Definition WsfP6DOF_Mover.hpp:1255
void CrashIntoGroundCB(double aSimTime)
Definition WsfP6DOF_Mover.cpp:1188
std::string VerticalModeToString(P6DOF::Vertical::Mode aMode) const
Definition WsfP6DOF_Mover.cpp:1029
bool mThrottleAfterburnerAtStart
Definition WsfP6DOF_Mover.hpp:1285
double mTargetPosition_Latitude
Definition WsfP6DOF_Mover.hpp:1219
int CurrentStage() const
Definition WsfP6DOF_Mover.hpp:605
double mInitialAltitude_m
Definition WsfP6DOF_Mover.hpp:1215
WsfP6DOF_Mover & operator=(const WsfP6DOF_Mover &other)=delete
WsfMoverGuidance * GetGuidance() const
Get the pointer to the mover guidance object.
Definition WsfP6DOF_Mover.hpp:580
WsfP6DOF_Mover(WsfScenario &aScenario)
Constructor.
Definition WsfP6DOF_Mover.cpp:89
UtCallbackListN< void(double, double)> StageSeparation
Definition WsfP6DOF_Mover.hpp:618
bool mEnableControlsAtStart
Definition WsfP6DOF_Mover.hpp:1290
void SetP6DofVehicle(std::unique_ptr< P6DofVehicle > aP6DofVehicle)
Definition WsfP6DOF_Mover.cpp:1836
WsfMoverGuidance * mGuidancePtr
Definition WsfP6DOF_Mover.hpp:1253
double mInitialPosition_Longitude
Definition WsfP6DOF_Mover.hpp:1214
double mMinimumHeightAboveTerrain
The minimum height above terrain required for terrain following.
Definition WsfP6DOF_Mover.hpp:1267
WsfP6DOF_MoverTestObject * GetTestSupportObject() const
Definition WsfP6DOF_Mover.hpp:1043
double mMaxGees
Definition WsfP6DOF_Mover.hpp:1167
P6DofVehicle * GetP6DofVehicle() const
Definition WsfP6DOF_Mover.hpp:72
P6DofRoute * ConvertWsfRouteToP6DofRoute(const WsfRoute *aWsfRoute)
Definition WsfP6DOF_Mover.cpp:1646
UtVec3d mManeuverPlane
Definition WsfP6DOF_Mover.hpp:1169
bool mValidInitialNEDPitch
Definition WsfP6DOF_Mover.hpp:1227
bool mDestroyed
Definition WsfP6DOF_Mover.hpp:1297
bool mValidInitialPosition
Definition WsfP6DOF_Mover.hpp:1224
double mInitialNEDPitch
Definition WsfP6DOF_Mover.hpp:1217
bool mAutopilotNoControlAtStart
Definition WsfP6DOF_Mover.hpp:1288
double mLastSpdBrakeLeverPosition
Definition WsfP6DOF_Mover.hpp:1234
UtCallbackListN< void(double, double)> StageBurnout
Definition WsfP6DOF_Mover.hpp:617
UtCallbackListN< void(double, double)> StageIgnition
Definition WsfP6DOF_Mover.hpp:616
std::map< std::string, std::vector< WsfVisualPart * > > mVisualPartManager
Definition WsfP6DOF_Mover.hpp:1305
void SetTargetData(P6DOF::CurrentTargetData &aCurrentTarget)
Definition WsfP6DOF_Mover.hpp:608
ut::CloneablePtr< P6DofVehicle > mP6DofVehiclePtr
Definition WsfP6DOF_Mover.hpp:1204
bool mValidInitialAltitude_ft
Definition WsfP6DOF_Mover.hpp:1225
double mCommandedPitchRate
Definition WsfP6DOF_Mover.hpp:1257
UtCallbackHolder mCallbacks
Definition WsfP6DOF_Mover.hpp:1304
unsigned int mStageIndex
The index of the current stage.
Definition WsfP6DOF_Mover.hpp:1269
void UpdateAppearance(double aSimTime)
Definition WsfP6DOF_Mover.cpp:1370
bool mValidInitialNEDRoll
Definition WsfP6DOF_Mover.hpp:1228
P6DofPilotManager * mPilotManagerPtr
Definition WsfP6DOF_Mover.hpp:1206
bool mUseWashInInitConditions
Definition WsfP6DOF_Mover.hpp:1208
void SetCommandedPitchRate(double aRate)
Definition WsfP6DOF_Mover.hpp:591
WsfDraw * mDrawPtr
Definition WsfP6DOF_Mover.hpp:1203
bool SetDamageFactor(double aSimTime, double aDamageFactor)
Definition WsfPlatformPart.cpp:158
virtual void OnPlatformBrokenEvent(double aSimTime)
Owning platform has issued a broken event.
Definition WsfPlatformPart.cpp:215
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
A collection of WsfWaypoint objects that represent a path to be followed.
Definition WsfRoute.hpp:40
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfVisualPart.hpp:26
Mode
Definition P6DofVehicleData.hpp:302
Mode
Definition P6DofVehicleData.hpp:338
Mode
Definition P6DofVehicleData.hpp:319
TurnDirection
Turn direction for TurnToHeading and TurnToRelativeHeading.
Definition WsfPath.hpp:88
Definition P6DofVehicleData.hpp:430
Copyrights Multiple, All Rights Reserved