12#ifndef WSFRIGIDBODYSIXDOFMOVER_HPP
13#define WSFRIGIDBODYSIXDOFMOVER_HPP
50 static int GetTypeId() {
return WsfStringId::UnsafeGetNumber(
"WSF_RIGID_BODY_SIX_DOF_MOVER"); }
57 double GetYawMoment_nm()
const;
60 double GetYawMoment_ftlbs()
const;
63 double GetPitchMoment_nm()
const;
66 double GetPitchMoment_ftlbs()
const;
69 double GetRollMoment_nm()
const;
72 double GetRollMoment_ftlbs()
const;
76 size_t GetControlSurfaceHandle(
const std::string& aControlSurfaceName)
const;
80 size_t GetControlSurfaceHandleContainingString(
const std::string& aString)
const;
84 size_t GetControlSurfaceHandleContainingTwoStrings(
const std::string& aString1,
const std::string& aString2)
const;
87 double GetAngleOfControlSurface(std::string aControlSurfaceName)
const;
90 double GetAngleOfControlSurface(
size_t aHandle)
const;
94 double GetNormalizedAngleOfControlSurface(
size_t aHandle)
const;
97 std::vector<std::string> GetListOfControlSurfaceNames()
const;
100 double GetAileronsBothPosition()
const;
103 double GetStabilatorLeftPosition()
const;
106 double GetStabilatorRightPosition()
const;
109 double GetRudderPosition()
const;
112 double GetLandingGearPosition()
const;
115 double GetSpeedBrakePosition_rad()
const;
118 double GetSpeedBrakePosition()
const override;
121 double GetFlapsPosition()
const override;
124 double GetSpoilersPosition()
const override;
127 double GetNoseWheelAngle()
const;
130 double GetAngleAileronLeft()
const;
131 double GetAngleAileronRight()
const;
132 double GetAngleFlapLeft()
const;
133 double GetAngleFlapRight()
const;
134 double GetAngleSpoilerLeft()
const;
135 double GetAngleSpoilerRight()
const;
136 double GetAngleStabilizerLeft()
const;
137 double GetAngleStabilizerRight()
const;
138 double GetAngleElevator()
const;
139 double GetAngleRudderLeft()
const;
140 double GetAngleRudder()
const;
141 double GetAngleRudderRight()
const;
142 double GetAngleSpeedBrake()
const;
143 double GetAngleLandingGear()
const;
144 double GetAngleLandingGearNose()
const;
145 double GetAngleLandingGearMainLeft()
const;
146 double GetAngleLandingGearMainRight()
const;
149 double GetNormalizedAileronLeft()
const override;
150 double GetNormalizedAileronRight()
const override;
151 double GetNormalizedFlapLeft()
const override;
152 double GetNormalizedFlapRight()
const override;
153 double GetNormalizedSpoilerLeft()
const override;
154 double GetNormalizedSpoilerRight()
const override;
155 double GetNormalizedStabilizerLeft()
const override;
156 double GetNormalizedStabilizerRight()
const override;
157 double GetNormalizedElevator()
const override;
158 double GetNormalizedRudderLeft()
const override;
159 double GetNormalizedRudder()
const override;
160 double GetNormalizedRudderRight()
const override;
161 double GetNormalizedSpeedBrake()
const override;
162 double GetNormalizedLandingGear()
const override;
163 double GetNormalizedLandingGearNose()
const override;
164 double GetNormalizedLandingGearMainLeft()
const override;
165 double GetNormalizedLandingGearMainRight()
const override;
168 bool AileronLeftValid()
const override;
169 bool AileronRightValid()
const override;
170 bool FlapLeftValid()
const override;
171 bool FlapRightValid()
const override;
172 bool SpoilerLeftValid()
const override;
173 bool SpoilerRightValid()
const override;
174 bool StabilizerLeftValid()
const override;
175 bool StabilizerRightValid()
const override;
176 bool ElevatorValid()
const override;
177 bool RudderLeftValid()
const override;
178 bool RudderValid()
const override;
179 bool RudderRightValid()
const override;
180 bool SpeedBrakeValid()
const override;
181 bool LandingGearValid()
const override;
182 bool LandingGearNoseValid()
const override;
183 bool LandingGearMainLeftValid()
const override;
184 bool LandingGearMainRightValid()
const override;
185 bool ThrottleValid()
const override;
195 void ApplyExternalForce(
double aForceMagnitude_lbs,
double aAngle_deg);
198 void RemoveExternalForce();
201 void EnableDirectBraking();
204 void SetParkingBrake();
207 void ApplyLeftGearBrake(
double aValue);
210 void ApplyRightGearBrake(
double aValue);
213 void ReleaseWheelBrakes();
216 void ReleaseDirectBraking();
219 void RetractLandingGear();
222 void LowerLandingGear();
226 void SetFlapsPosition(
double aPosition)
override;
230 void SetSpoilersPosition(
double aPosition)
override;
232 void SetThrustReverserPosition(
double aPosition);
233 void SetEnableNWS(
bool aNWS_Enabled);
236 bool GetWeightOnWheels()
const override;
239 bool GetWeightOnNoseWheel()
const;
244 double GetTaxiSpeedMax();
247 double GetTaxiYawRateMax();
250 void SetTaxiSpeedMax(
double aSpeedMax);
253 void SetTaxiYawRateMax(
double aSpeedMax);
258 void SetTaxiMode(
bool aTaxiModeEnabled);
261 void SetTaxiRadius(
double aTaxiRadius_ft);
279 void CalculateCurrentMassProperties()
override;
283 void SetCurrentWeight_lbs(
double aWeight_lbs);
287 void ShiftCurrentCg_ft(UtVec3dX aDeltaCg_ft);
294 const Integrator* GetIntegrator()
const override;
303 void SetLastSimTime(
double aSimTime_sec,
bool aIncludeSubobjects =
false)
override;
312 void CalculateAeroBodyForceAndMoments(UtVec3dX& aLiftBodyVector_lbs,
313 UtVec3dX& aDragBodyVector_lbs,
314 UtVec3dX& aSideForceBodyVector_lbs,
315 UtVec3dX& aMoment_ftlbs,
316 UtVec3dX& aReferencePt_ft)
override;
320 void CalculateAeroBodyForceAndRotation(UtVec3dX& aLiftBodyVector_lbs,
321 UtVec3dX& aDragBodyVector_lbs,
322 UtVec3dX& aSideForceBodyVector_lbs,
323 UtVec3dX& aRotationAccelerationLimits_rps2,
324 UtVec3dX& aStabilizingFrequency_rps)
override;
328 void CalculateAlphaAtSpecifiedGLoad_deg(
double aGLoad,
double& aAlpha_deg)
const override;
332 void CalculateStickBackForZeroMoment(
double aAlpha_deg,
double& aStickBack);
336 void CalculateStickBackForZeroMoment(
double aAlpha_deg,
double aMach,
double& aStickBack);
340 void CalculateBetaAtSpecifiedGLoad_deg(
double aGLoad,
double& aBeta_deg)
const override;
345 void CalculateControlsAeroCoefficientVectors(
double aMach,
354 double CalculateControlsCLArea(
double aMach,
double aAlpha_rad,
double aStickBack);
358 double CalculateControlsCdArea(
double aMach,
double aAlpha_rad,
double aStickBack);
361 void CalculateCmAreaForCoreAndControls(
double aMach,
365 double& aThrustProduced_lbs,
367 double& aControlsCm);
370 void CalculateCLAreaForCoreAndControls(
double aMach,
double aAlpha_rad,
double aStickBack,
double& aCoreCL,
double& aControlsCL);
373 void CalculateCdAreaForCoreAndControls(
double aMach,
double aAlpha_rad,
double aStickBack,
double& aCoreCd,
double& aControlsCd);
377 void CalculateTotalCmAndCL(
double aMach,
double aAlpha_rad,
double aStickBack,
double& aTotalCm,
double& aTotalCL);
383 void SetActiveAeroObject(
const std::string& aName)
override;
395 double GetWingArea_sqft()
const;
398 double GetRefArea_sqft()
const;
405 double MaxPotentialManeuverGLoad()
const override;
415 void CalculatePropulsionFM(int64_t aSimTime_nanosec,
418 UtVec3dX& aInertialPropulsionVector_lbs,
419 UtVec3dX& aPropulsionMoment_ftlbs);
429 double GetMaximumPotentialThrust_lbs()
const override;
432 double GetMinimumPotentialThrust_lbs()
const override;
436 double GetCurrentThrust_lbs()
override;
440 double GetCurrentForwardThrust_lbs()
override;
443 double GetTotalVehicleFuelFlow_pph()
const override;
446 double GetTotalFuelFlow_pph()
const override;
461 bool HasFlaps()
const;
463 size_t GetInputHandle(
const std::string& aInputName)
const override;
464 bool GetBooleanInput(
size_t aHandle)
const override;
465 bool GetLastBooleanInput(
size_t aHandle)
const override;
468 void RestoreControlSurfaceAngles(std::vector<RigidBodyFlightControlSystem::ControlSurfaceElement*>& aControlsList,
469 std::vector<double>& aAngleList);
474 bool UseSimpleYawDamper()
const;
477 double GetStickRightInput()
const override;
478 double GetStickBackInput()
const override;
479 double GetRudderRightInput()
const override;
480 double GetThrottleInput()
const override;
481 double GetSpeedBrakeInput()
const override;
482 double GetSpoilerInput()
const override;
483 double GetLandingGearInput()
const override;
489 void CalculateLandingGearFM(int64_t aSimTime_nanosec,
490 const UtVec3dX& aNonLandingGearTotalForceVecInertial_lbs,
491 UtVec3dX& aInertialTotalGearVector_lbs,
492 UtVec3dX& aTotalGearMoment_ftlbs);
495 void SetLandingGearPositionAtStart(
double aPosition);
499 void ForceLandingGearPositionInstantly(std::string aLandingGearControlSurfaceHandleName,
double aPosition);
502 void ForceLandingGearUpInstantly(
const std::string& aLandingGearControlSurfaceHandleName);
505 void ForceLandingGearDownInstantly(
const std::string& aLandingGearControlSurfaceHandleName);
518 void ZeroKinematicsDuringTesting()
override;
524 bool InitializeDetails(
double aSimTime_sec)
override;
527 void UpdateFlightControls(int64_t aSimTime_nanosec)
override;
531 double CalculatePitchMomentAlphaStickBack_ftlbs(
double aAlpha_deg,
double aDesiredStickBack);
533 void CalculateMovableAero(
double aDynPress_lbsqft,
538 const UtVec3dX& aAngularRates_rps,
539 UtVec3dX& aAeroMoment,
543 double& aLiftFactor);
545 void CalculateThrustVectorAndMomentUpdatePropulsion(
double aSimTime_sec,
546 double aDeltaTime_sec,
550 void UpdatePropulsionFuelBurn(
double aSimTime_sec,
double aDeltaTime_sec,
const KinematicState& aState)
override;
552 void CalculateObjectPropulsion(
double aSimTime_sec,
555 double aDynPress_lbsqft,
556 double aStatPress_lbssqft,
562 double& aFuelBurnRate_pps,
563 double& aFuelBurned_lbs)
override;
565 void CalculateObjectPropulsion(
double aSimTime_sec,
568 double aDynPress_lbsqft,
569 double aStatPress_lbssqft,
575 double& aFuelBurnRate_pps,
576 double& aFuelBurned_lbs)
override;
578 void UpdateObjectPropulsion(
double aSimTime_sec,
581 double aDynPress_lbsqft,
582 double aStatPress_lbssqft,
588 double& aFuelBurnRate_pps,
589 double& aFuelBurned_lbs);
591 void ObjectPropulsionCalculations(
double aSimTime_sec,
594 double aDynPress_lbsqft,
595 double aStatPress_lbssqft,
601 double& aFuelBurnRate_pps,
602 double& aFuelBurned_lbs,
605 void CalcTotalFuelFlowAndQuantity(
double& aCurrentTotalFuelFlow_pph,
606 double& aCurrentTotalFuel_lbs,
607 double& aMaxTotalFuel_lbs)
override;
610 double GetAngleSurface(
size_t aHandle)
const;
613 double GetNormalizedSurfaceAngle(
size_t aHandle)
const;
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfSixDOF_AeroCoreObject.hpp:35
Definition WsfSixDOF_ForceAndMomentsObject.hpp:28
Definition WsfSixDOF_ForceAndRotationObject.hpp:30
Definition WsfSixDOF_Integrator.hpp:31
Definition WsfSixDOF_KinematicState.hpp:34
Definition WsfSixDOF_MoverTestObject.hpp:33
Mover(const WsfScenario &aScenario)
Constructor.
Definition WsfSixDOF_Mover.cpp:63
MassProperties mMassProperties
Definition WsfSixDOF_Mover.hpp:1823
Definition WsfSixDOF_PilotManager.hpp:34
Definition WsfSixDOF_PropulsionSystem.hpp:35
Definition WsfRigidBodySixDOF_AeroCoreObject.hpp:28
Definition WsfRigidBodySixDOF_FlightControlSystem.hpp:44
Definition WsfRigidBodySixDOF_LandingGear.hpp:36
Definition WsfRigidBodySixDOF_MoverTestObject.hpp:23
Definition WsfRigidBodySixDOF_Mover.hpp:38
bool mParkingBrakeOnAtStart
Definition WsfRigidBodySixDOF_Mover.hpp:638
static int GetTypeId()
Definition WsfRigidBodySixDOF_Mover.hpp:50
bool mLastNWS_Enabled
Definition WsfRigidBodySixDOF_Mover.hpp:650
PropulsionSystem * GetPropulsionSystem() const override
Definition WsfRigidBodySixDOF_Mover.hpp:422
double mLastWheelBrakeRightPosition
Definition WsfRigidBodySixDOF_Mover.hpp:649
size_t mHandleStabilizerLeft
Definition WsfRigidBodySixDOF_Mover.hpp:658
RigidBodyMover & operator=(const RigidBodyMover &other)=delete
size_t mHandleLandingGearMainRight
Definition WsfRigidBodySixDOF_Mover.hpp:668
std::string GetActiveAeroObjectName() const
Definition WsfRigidBodySixDOF_Mover.hpp:389
RigidBodyPilotManager * GetRigidBodyPilotManager() const
Definition WsfRigidBodySixDOF_Mover.hpp:454
ut::CloneablePtr< RigidBodyAeroCoreObject > mAeroCoreObjPtr
Definition WsfRigidBodySixDOF_Mover.hpp:624
size_t mHandleAileronRight
Definition WsfRigidBodySixDOF_Mover.hpp:653
size_t mHandleSpoilerRight
Definition WsfRigidBodySixDOF_Mover.hpp:657
PilotManager * GetPilotManager() const override
Definition WsfRigidBodySixDOF_Mover.hpp:453
double mLastThrustVectorYawRightPosition
Definition WsfRigidBodySixDOF_Mover.hpp:644
size_t mHandleLandingGear
Definition WsfRigidBodySixDOF_Mover.hpp:665
bool ProcessInput(UtInput &aInput) override
Definition WsfRigidBodySixDOF_Mover.cpp:145
UtVec3dX GetCenterOfGravity_ft() const override
Definition WsfRigidBodySixDOF_Mover.hpp:401
std::unique_ptr< RigidBodyMoverTestObject > mTestSupportObjectPtr
Definition WsfRigidBodySixDOF_Mover.hpp:620
size_t mHandleRudderLeft
Definition WsfRigidBodySixDOF_Mover.hpp:661
ut::CloneablePtr< RigidBodyLandingGear > mLandingGearPtr
Definition WsfRigidBodySixDOF_Mover.hpp:635
size_t mHandleRudder
Definition WsfRigidBodySixDOF_Mover.hpp:662
AeroCoreObject * GetAeroCoreObject() const override
Definition WsfRigidBodySixDOF_Mover.hpp:408
std::list< ut::CloneablePtr< RigidBodyAeroMovableObject > > mAeroPartList
Definition WsfRigidBodySixDOF_Mover.hpp:625
RigidBodyFlightControlSystem * GetFlightControls() const
Definition WsfRigidBodySixDOF_Mover.hpp:458
size_t mHandleStabilizerRight
Definition WsfRigidBodySixDOF_Mover.hpp:659
RigidBodyAeroCoreObject * GetActiveAeroObject() const
Definition WsfRigidBodySixDOF_Mover.hpp:386
double mLastNoseWheelSteeringRightPosition
Definition WsfRigidBodySixDOF_Mover.hpp:647
size_t mHandleSpoilerLeft
Definition WsfRigidBodySixDOF_Mover.hpp:656
size_t mHandleAileronLeft
Definition WsfRigidBodySixDOF_Mover.hpp:652
bool HasLandingGear() const
Definition WsfRigidBodySixDOF_Mover.hpp:508
size_t mHandleLandingGearMainLeft
Definition WsfRigidBodySixDOF_Mover.hpp:667
size_t mHandleFlapRight
Definition WsfRigidBodySixDOF_Mover.hpp:655
RigidBodyAeroCoreObject * mActiveAeroObjPtr
Definition WsfRigidBodySixDOF_Mover.hpp:627
double mLastThrustVectorPitchUpPosition
Definition WsfRigidBodySixDOF_Mover.hpp:645
size_t mHandleRudderRight
Definition WsfRigidBodySixDOF_Mover.hpp:663
double mLastThrustReverserLeverPosition
Definition WsfRigidBodySixDOF_Mover.hpp:643
const char * GetScriptClassName() const override
Definition WsfRigidBodySixDOF_Mover.hpp:191
bool mTaxiModeEnabledAtStart
Definition WsfRigidBodySixDOF_Mover.hpp:639
ut::CloneablePtr< RigidBodyIntegrator > mIntegratorPtr
Definition WsfRigidBodySixDOF_Mover.hpp:631
bool Initialize(double aSimTime) override
Definition WsfRigidBodySixDOF_Mover.cpp:383
double mLastThrustVectorRollRightPosition
Definition WsfRigidBodySixDOF_Mover.hpp:646
MoverTestObject * GetTestSupportObject() const override
Definition WsfRigidBodySixDOF_Mover.hpp:265
size_t mHandleLandingGearNose
Definition WsfRigidBodySixDOF_Mover.hpp:666
bool mLandingGearDownAtStart
Definition WsfRigidBodySixDOF_Mover.hpp:637
ut::CloneablePtr< RigidBodyPropulsionSystem > mPropulsionObjPtr
Definition WsfRigidBodySixDOF_Mover.hpp:629
size_t mHandleElevator
Definition WsfRigidBodySixDOF_Mover.hpp:660
double mLastWheelBrakeLeftPosition
Definition WsfRigidBodySixDOF_Mover.hpp:648
ut::CloneablePtr< RigidBodyFlightControlSystem > mFlightControlsPtr
Definition WsfRigidBodySixDOF_Mover.hpp:633
RigidBodyPropulsionSystem * GetRigidBodyPropulsionSystem()
Definition WsfRigidBodySixDOF_Mover.hpp:425
RigidBodyMoverTestObject * GetRigidBodyTestSupportObject() const
Definition WsfRigidBodySixDOF_Mover.hpp:264
size_t mHandleFlapLeft
Definition WsfRigidBodySixDOF_Mover.hpp:654
size_t mHandleSpeedBrake
Definition WsfRigidBodySixDOF_Mover.hpp:664
ut::CloneablePtr< RigidBodyPilotManager > mPilotManagerPtr
Definition WsfRigidBodySixDOF_Mover.hpp:634
RigidBodyMover(const WsfScenario &aScenario)
Constructor.
Definition WsfRigidBodySixDOF_Mover.cpp:55
RigidBodyLandingGear * GetLandingGear() const
Definition WsfRigidBodySixDOF_Mover.hpp:511
double mLastLandingGearLeverPosition
Definition WsfRigidBodySixDOF_Mover.hpp:642
WsfMover * Clone() const override
Definition WsfRigidBodySixDOF_Mover.cpp:139
bool mNWSEnabledAtStart
Definition WsfRigidBodySixDOF_Mover.hpp:640
Definition WsfRigidBodySixDOF_PilotManager.hpp:31
Definition WsfRigidBodySixDOF_PropulsionSystem.hpp:28
Definition WsfSA_Processor.hpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32