WSF
WsfPointMassSixDOF_PropulsionSystem.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2020 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFPOINTMASSSIXDOFPROPULSIONSYSTEM_HPP
13#define WSFPOINTMASSSIXDOFPROPULSIONSYSTEM_HPP
14
17
18namespace wsf
19{
20namespace six_dof
21{
24
25class WSF_SIX_DOF_EXPORT PointMassPropulsionSystem : public PropulsionSystem
26{
27public:
29
31
33
34 void SetParentVehicle(Mover* aParentVehicle) override;
35
36 // ProcessInput reads initialization data
37 bool ProcessInput(UtInput& aInput, const TypeManager* aTypeManager);
38 bool Initialize(int64_t aSimTime_nanosec) override;
39 void LinkControls(PointMassFlightControlSystem* aFlightControls);
40
41 // GetThrustProduceList returns the list of engines in this propulsion object
42 const std::vector<std::unique_ptr<PointMassThrustProducerObject>>& GetThrustProducerList() const
43 {
44 return mEngineList;
45 }
46
47 // The CalculatePropulsionFM function is called to calculate the propulsion
48 // forces and moments. It does not change the state of the propulsion object.
49 // To change the state, call UpdatePropulsionFM instead. This version
50 // uses the thrust producer's internal throttle values.
51 void CalculatePropulsionFM(double aDeltaT_sec,
52 double aAlt_ft,
53 double aDynPress_lbsqft,
54 double aStatPress_lbssqft,
55 double aSpeed_fps,
56 double aMach,
57 double aAlpha_rad,
58 double aBeta_rad,
59 ForceAndRotationObject& aForceAndMoment,
60 double& aFuelBurnRate_pps,
61 double& aFuelBurned_lbs);
62
63 // The UpdatePropulsionFM function is called to calculate the propulsion
64 // forces and moments and update the state of the propulsion object.
65 // To perform F&M calculations without changing the state, call the
66 // CalculatePropulsionFM function instead. This version
67 // uses the thrust producer's internal throttle values.
68 void UpdatePropulsionFM(double aDeltaT_sec,
69 double aAlt_ft,
70 double aDynPress_lbsqft,
71 double aStatPress_lbssqft,
72 double aSpeed_fps,
73 double aMach,
74 double aAlpha_rad,
75 double aBeta_rad,
76 ForceAndRotationObject& aForceAndMoment,
77 double& aFuelBurnRate_pps,
78 double& aFuelBurned_lbs);
79
80 // .....................................................................................................
81
82 // GetThrustProducerObjectByName returns the engine with the specified name
83 ThrustProducerObject* GetThrustProducerObjectByName(const std::string& aName) const override;
84
85 // GetThrustProduceByIndex returns the engine with the specified index
86 ThrustProducerObject* GetThrustProducerByIndex(size_t aIndex) const override;
87
88 // SetThrottleLeverPosition sets the throttles on all engines of this object
89 void SetThrottleLeverPosition(double aThrottleLeverPosition) override;
90
91 // EnableThrustVectoring enables/disable thrust vectoring
92 void EnableThrustVectoring(bool aEnableThrustVectoring) override;
93
94 // Returns true if an afterburner is present on any engine
95 bool AfterburnerIsPresent() const override;
96
97 // GetNumThrustProducers returns the number of engines in this propulsion object
98 size_t GetNumThrustProducers() const override;
99
100 // Ignite ignites/starts all engines of this object
101 void Ignite(int64_t aIgniteTimeInFrame_nanosec) override;
102
103 // Shutdown terminates thrust for all engines of this object
104 // aTerminateTime_sec is the time termination occurs
105 void Shutdown(int64_t aTerminateTime_nanosec = 0) override;
106
107 // This returns true is at least one thrust producer is producing thrust
108 bool IsProducingThrust() const override;
109
110 // This specifies the fuel feed (input tank name) for the specified engine.
111 // It returns true if the assignment is successful.
112 bool SetFuelFeed(std::string& aEngineName, std::string aFuelTankName) override;
113
114 // This specifies the fuel feed (input tank name) for all engines.
115 // It returns true if the assignment is successful.
116 bool SetFuelFeed(std::string aFuelTankName) override;
117
118 // .....................................................................................................
119
120 // Appearance Parameters. These will determine if any engine has the specified condition.
121 // After using this function, individual engines can be consulted for their conditions.
122
123 // Return true if at least one engine is operating.
124 // If aTestSubobjects (optional) is true, if will test subobjects. Otherwise, it
125 // will only test its own propulsion objects (the default).
126 bool AnEngineIsOperating(bool aTestSubobjects = false) const override;
127
128 // Return true if at least one engine is operating
129 // If aTestSubobjects (optional) is true, if will test subobjects. Otherwise, it
130 // will only test its own propulsion objects (the default).
131 bool AnEngineIsSmoking(bool aTestSubobjects = false) const override;
132
133 // Return true if at least one engine is operating
134 // If aTestSubobjects (optional) is true, if will test subobjects. Otherwise, it
135 // will only test its own propulsion objects (the default).
136 bool AnEngineHasAfterburnerOn(bool aTestSubobjects = false) const override;
137
138 // Return true if at least one engine is contrailing
139 // If aTestSubobjects (optional) is true, if will test subobjects. Otherwise, it
140 // will only test its own propulsion objects (the default).
141 bool AnEngineIsContrailing(bool aTestSubobjects = false) const override;
142
143 // Return true if at least one engine has a smoke trailing effect
144 // If aTestSubobjects (optional) is true, if will test subobjects. Otherwise, it
145 // will only test its own propulsion objects (the default).
146 bool AnEngineIsEmittingSmokeTrail(bool aTestSubobjects = false) const override;
147
148 // This will make an engine smoke. If an index of zero is used, all engines will smoke.
149 void MakeAnEngineSmoke(int aEngineIndex) override;
150
151 // .....................................................................................................
152
153protected:
155
156 void PropulsionCalculationsFM(double aDeltaT_sec,
157 double aAlt_ft,
158 double aDynPress_lbsqft,
159 double aStatPress_lbssqft,
160 double aSpeed_fps,
161 double aMach,
162 double aAlpha_rad,
163 double aBeta_rad,
164 ForceAndRotationObject& aForceAndMoment,
165 double& aFuelBurnRate_pps,
166 double& aFuelBurned_lbs,
167 bool aUpdateData);
168
169 std::vector<std::unique_ptr<PointMassThrustProducerObject>> mEngineList;
170
171 const double* mThrottleSettingMilPtr = nullptr;
172 const double* mThrottleSettingAbPtr = nullptr;
173};
174} // namespace six_dof
175} // namespace wsf
176
177#endif
Definition WsfSixDOF_ForceAndRotationObject.hpp:30
This is a base class for detailed air movers. This umbrella can cover RB6 or PM6 models.
Definition WsfSixDOF_Mover.hpp:58
Definition WsfPointMassSixDOF_FlightControlSystem.hpp:44
Definition WsfPointMassSixDOF_PropulsionSystem.hpp:26
PointMassPropulsionSystem & operator=(const PointMassPropulsionSystem &other)=delete
const double * mThrottleSettingAbPtr
Definition WsfPointMassSixDOF_PropulsionSystem.hpp:172
const std::vector< std::unique_ptr< PointMassThrustProducerObject > > & GetThrustProducerList() const
Definition WsfPointMassSixDOF_PropulsionSystem.hpp:42
bool Initialize(int64_t aSimTime_nanosec) override
Definition WsfPointMassSixDOF_PropulsionSystem.cpp:66
void LinkControls(PointMassFlightControlSystem *aFlightControls)
Definition WsfPointMassSixDOF_PropulsionSystem.cpp:140
PointMassPropulsionSystem * Clone() const
Definition WsfPointMassSixDOF_PropulsionSystem.cpp:28
bool ProcessInput(UtInput &aInput, const TypeManager *aTypeManager)
Definition WsfPointMassSixDOF_PropulsionSystem.cpp:149
void SetParentVehicle(Mover *aParentVehicle) override
Definition WsfPointMassSixDOF_PropulsionSystem.cpp:33
const double * mThrottleSettingMilPtr
Definition WsfPointMassSixDOF_PropulsionSystem.hpp:171
std::vector< std::unique_ptr< PointMassThrustProducerObject > > mEngineList
Definition WsfPointMassSixDOF_PropulsionSystem.hpp:169
Definition WsfSixDOF_ThrustProducerObject.hpp:35
Definition WsfSixDOF_TypeManager.hpp:32
Definition WsfSA_Processor.hpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved