JSBSim Flight Dynamics Model 1.3.3 (16 Oct 2026)
An Open Source Flight Dynamics and Control Software Library in C++
Loading...
Searching...
No Matches
FGPropeller.cpp
1/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3 Module: FGPropeller.cpp
4 Author: Jon S. Berndt
5 Date started: 08/24/00
6 Purpose: Encapsulates the propeller object
7
8 ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
9
10 This program is free software; you can redistribute it and/or modify it under
11 the terms of the GNU Lesser General Public License as published by the Free Software
12 Foundation; either version 2 of the License, or (at your option) any later
13 version.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
18 details.
19
20 You should have received a copy of the GNU Lesser General Public License along with
21 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22 Place - Suite 330, Boston, MA 02111-1307, USA.
23
24 Further information about the GNU Lesser General Public License can also be found on
25 the world wide web at http://www.gnu.org.
26
27FUNCTIONAL DESCRIPTION
28--------------------------------------------------------------------------------
29
30HISTORY
31--------------------------------------------------------------------------------
3208/24/00 JSB Created
33
34%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35INCLUDES
36%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
37
38#include "FGFDMExec.h"
39#include "FGPropeller.h"
40#include "input_output/FGXMLElement.h"
41#include "input_output/FGLog.h"
42
43using namespace std;
44
45namespace JSBSim {
46
47/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48CLASS IMPLEMENTATION
49%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
50
51FGPropeller::FGPropeller(FGFDMExec* exec, Element* prop_element, int num)
52 : FGThruster(exec, prop_element, num)
53{
54 Element *table_element, *local_element;
55 string name="";
56 auto PropertyManager = exec->GetPropertyManager();
57
58 MaxPitch = MinPitch = P_Factor = Advance = MinRPM = MaxRPM = 0.0;
59 Sense = 1; // default clockwise rotation
60 ReversePitch = 0.0;
61 Reversed = false;
62 Feathered = false;
63 Reverse_coef = 0.0;
64 GearRatio = 1.0;
65 CtFactor = CpFactor = 1.0;
66 ConstantSpeed = 0;
67 cThrust = cPower = CtMach = CpMach = cThrustRPM = cPowerRPM = 0;
68
69 if (prop_element->FindElement("ixx"))
70 Ixx = max(prop_element->FindElementValueAsNumberConvertTo("ixx", "SLUG*FT2"), 1e-06);
71
72 Sense_multiplier = 1.0;
73 if (prop_element->HasAttribute("version")
74 && prop_element->GetAttributeValueAsNumber("version") > 1.0)
75 Sense_multiplier = -1.0;
76
77 if (prop_element->FindElement("diameter"))
78 Diameter = max(prop_element->FindElementValueAsNumberConvertTo("diameter", "FT"), 0.001);
79 if (prop_element->FindElement("numblades"))
80 numBlades = (int)prop_element->FindElementValueAsNumber("numblades");
81 if (prop_element->FindElement("gearratio"))
82 GearRatio = max(prop_element->FindElementValueAsNumber("gearratio"), 0.001);
83 if (prop_element->FindElement("minpitch"))
84 MinPitch = prop_element->FindElementValueAsNumber("minpitch");
85 if (prop_element->FindElement("maxpitch"))
86 MaxPitch = prop_element->FindElementValueAsNumber("maxpitch");
87 if (prop_element->FindElement("minrpm"))
88 MinRPM = prop_element->FindElementValueAsNumber("minrpm");
89 if (prop_element->FindElement("maxrpm")) {
90 MaxRPM = prop_element->FindElementValueAsNumber("maxrpm");
91 ConstantSpeed = 1;
92 }
93 if (prop_element->FindElement("constspeed"))
94 ConstantSpeed = (int)prop_element->FindElementValueAsNumber("constspeed");
95 if (prop_element->FindElement("reversepitch"))
96 ReversePitch = prop_element->FindElementValueAsNumber("reversepitch");
97 while((table_element = prop_element->FindNextElement("table")) != 0) {
98 name = table_element->GetAttributeValue("name");
99 try {
100 if (name == "C_THRUST") {
101 cThrust = new FGTable(PropertyManager, table_element);
102 } else if (name == "C_POWER") {
103 cPower = new FGTable(PropertyManager, table_element);
104 } else if (name == "CT_MACH") {
105 CtMach = new FGTable(PropertyManager, table_element);
106 } else if (name == "CP_MACH") {
107 CpMach = new FGTable(PropertyManager, table_element);
108 } else if (name == "CT_RPM_FACTOR") {
109 cThrustRPM = new FGTable(PropertyManager, table_element);
110 } else if (name == "CP_RPM_FACTOR") {
111 cPowerRPM = new FGTable(PropertyManager, table_element);
112 } else {
113 FGXMLLogging log(table_element, LogLevel::ERROR);
114 log << "Unknown table type: " << name << " in propeller definition.\n";
115 }
116 } catch (BaseException& e) {
117 XMLLogException err(table_element);
118 err << "Error loading propeller table:" << name << ". " << e.what() << "\n";
119 throw err;
120 }
121 }
122 if( (cPower == nullptr) || (cThrust == nullptr)){
123 XMLLogException err(prop_element);
124 err << "Propeller configuration must contain C_THRUST and C_POWER tables!\n";
125 throw err;
126 }
127
128 local_element = prop_element->GetParent()->FindElement("sense");
129 if (local_element) {
130 double Sense = local_element->GetDataAsNumber();
131 SetSense(Sense >= 0.0 ? 1.0 : -1.0);
132 }
133 local_element = prop_element->GetParent()->FindElement("p_factor");
134 if (local_element) {
135 P_Factor = local_element->GetDataAsNumber();
136 }
137 if (P_Factor < 0) {
138 XMLLogException err(local_element);
139 err << "P-Factor value in propeller configuration file must be greater than zero\n";
140 throw err;
141 }
142 if (prop_element->FindElement("ct_factor"))
143 SetCtFactor( prop_element->FindElementValueAsNumber("ct_factor") );
144 if (prop_element->FindElement("cp_factor"))
145 SetCpFactor( prop_element->FindElementValueAsNumber("cp_factor") );
146
147 Type = ttPropeller;
148 vTorque.InitMatrix();
149 D4 = Diameter*Diameter*Diameter*Diameter;
150 D5 = D4*Diameter;
151 InitDynamics();
152
153 string property_name, base_property_name;
154 base_property_name = CreateIndexedPropertyName("propulsion/engine", EngineNum);
155 property_name = base_property_name + "/engine-rpm";
156 PropertyManager->Tie( property_name.c_str(), this, &FGPropeller::GetEngineRPM );
157 property_name = base_property_name + "/advance-ratio";
158 PropertyManager->Tie( property_name.c_str(), &J );
159 property_name = base_property_name + "/blade-angle";
160 PropertyManager->Tie( property_name.c_str(), &Pitch );
161 property_name = base_property_name + "/thrust-coefficient";
162 PropertyManager->Tie( property_name.c_str(), this, &FGPropeller::GetThrustCoefficient );
163 property_name = base_property_name + "/propeller-rpm";
164 PropertyManager->Tie( property_name.c_str(), this, &FGPropeller::GetRPM );
165 property_name = base_property_name + "/helical-tip-Mach";
166 PropertyManager->Tie( property_name.c_str(), this, &FGPropeller::GetHelicalTipMach );
167 property_name = base_property_name + "/constant-speed-mode";
168 PropertyManager->Tie( property_name.c_str(), this, &FGPropeller::GetConstantSpeed,
170 property_name = base_property_name + "/prop-induced-velocity_fps"; // [ft/sec]
171 PropertyManager->Tie( property_name.c_str(), this, &FGPropeller::GetInducedVelocity,
173 property_name = base_property_name + "/propeller-power-ftlbps"; // [ft-lbs/sec]
174 PropertyManager->Tie( property_name.c_str(), &PowerRequired );
175 property_name = base_property_name + "/propeller-torque-ftlb"; // [ft-lbs]
176 PropertyManager->Tie( property_name.c_str(), this, &FGPropeller::GetTorque);
177 property_name = base_property_name + "/propeller-sense";
178 PropertyManager->Tie( property_name.c_str(), &Sense );
179
180 Debug(0);
181}
182
183//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
184
186{
187 delete cThrust;
188 delete cPower;
189 delete CtMach;
190 delete CpMach;
191 delete cThrustRPM;
192 delete cPowerRPM;
193
194 Debug(1);
195}
196
197//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
198
200{
201 FGThruster::ResetToIC();
202 InitDynamics();
203}
204
205//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
206
207void FGPropeller::InitDynamics(void)
208{
209 RPM = 0.0;
210 Pitch = MinPitch;
211 Vinduced = 0.0;
212}
213
214//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
215//
216// We must be getting the aerodynamic velocity here, NOT the inertial velocity.
217// We need the velocity with respect to the wind.
218//
219// Remembering that Torque * omega = Power, we can derive the torque on the
220// propeller and its acceleration to give a new RPM. The current RPM will be
221// used to calculate thrust.
222//
223// Because RPM could be zero, we need to be creative about what RPM is stated as.
224
225double FGPropeller::Calculate(double EnginePower)
226{
227 FGColumnVector3 vDXYZ = MassBalance->StructuralToBody(vXYZn);
228 const FGMatrix33& mT = Transform();
229 // Local air velocity is obtained from Stevens & Lewis' "Aircraft Control and
230 // Simualtion (3rd edition)" eqn 8.2-1
231 // Variables in.AeroUVW and in.AeroPQR include the wind and turbulence effects
232 // as computed by FGAuxiliary.
233 FGColumnVector3 localAeroVel = mT.Transposed() * (in.AeroUVW + in.AeroPQR*vDXYZ);
234 double omega, PowerAvailable;
235
236 double Vel = localAeroVel(eU);
237 double rho = in.Density;
238 double RPS = RPM/60.0;
239
240 // Calculate helical tip Mach
241 double Area = 0.25*Diameter*Diameter*M_PI;
242 double Vtip = RPS * Diameter * M_PI;
243 HelicalTipMach = sqrt(Vtip*Vtip + Vel*Vel) / in.Soundspeed;
244
245 if (RPS > 0.01) J = Vel / (Diameter * RPS); // Calculate J normally
246 else J = Vel / Diameter;
247
248 PowerAvailable = EnginePower - GetPowerRequired();
249
250 if (MaxPitch == MinPitch) { // Fixed pitch prop
251 ThrustCoeff = cThrust->GetValue(J);
252 } else { // Variable pitch prop
253 ThrustCoeff = cThrust->GetValue(J, Pitch);
254 }
255
256 // Apply optional scaling factor to Ct (default value = 1)
257 ThrustCoeff *= CtFactor;
258
259 // Apply optional Mach effects from CT_MACH table
260 if (CtMach) ThrustCoeff *= CtMach->GetValue(HelicalTipMach);
261
262 // Apply optional Reynolds-number correction indexed by RPM
263 if (cThrustRPM) ThrustCoeff *= cThrustRPM->GetValue(RPM);
264
265 Thrust = ThrustCoeff*RPS*RPS*D4*rho;
266
267 // Induced velocity in the propeller disk area. This formula is obtained
268 // from momentum theory - see B. W. McCormick, "Aerodynamics, Aeronautics,
269 // and Flight Mechanics" 1st edition, eqn. 6.15 (propeller analysis chapter).
270 // Since Thrust and Vel can both be negative we need to adjust this formula
271 // To handle sign (direction) separately from magnitude.
272 double Vel2sum = Vel*abs(Vel) + 2.0*Thrust/(rho*Area);
273
274 if( Vel2sum > 0.0)
275 Vinduced = 0.5 * (-Vel + sqrt(Vel2sum));
276 else
277 Vinduced = 0.5 * (-Vel - sqrt(-Vel2sum));
278
279 // P-factor is simulated by a shift of the acting location of the thrust.
280 // The shift is a multiple of the angle between the propeller shaft axis
281 // and the relative wind that goes through the propeller disk.
282 if (P_Factor > 0.0001) {
283 double tangentialVel = localAeroVel.Magnitude(eV, eW);
284
285 if (tangentialVel > 0.0001) {
286 // The angle made locally by the air flow with respect to the propeller
287 // axis is influenced by the induced velocity. This attenuates the
288 // influence of a string cross wind and gives a more realistic behavior.
289 double angle = atan2(tangentialVel, Vel+Vinduced);
290 double factor = Sense * P_Factor * angle / tangentialVel;
291 SetActingLocationY( GetLocationY() + factor * localAeroVel(eW));
292 SetActingLocationZ( GetLocationZ() + factor * localAeroVel(eV));
293 }
294 }
295
296 omega = RPS*2.0*M_PI;
297
298 vFn(eX) = Thrust;
299 vTorque(eX) = -Sense*EnginePower / max(0.01, omega);
300
301 // The Ixx value and rotation speed given below are for rotation about the
302 // natural axis of the engine. The transform takes place in the base class
303 // FGForce::GetBodyForces() function.
304
305 FGColumnVector3 vH(Ixx*omega*Sense*Sense_multiplier, 0.0, 0.0);
306
307 if (omega > 0.01) ExcessTorque = PowerAvailable / omega;
308 else ExcessTorque = PowerAvailable / 1.0;
309
310 RPM = (RPS + ((ExcessTorque / Ixx) / (2.0 * M_PI)) * in.TotalDeltaT) * 60.0;
311
312 if (RPM < 0.0) RPM = 0.0; // Engine won't turn backwards
313
314 // Transform Torque and momentum first, as PQR is used in this
315 // equation and cannot be transformed itself.
316 vMn = in.PQRi*(mT*vH) + mT*vTorque;
317
318 return Thrust; // return thrust in pounds
319}
320
321//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322
324{
325 double cPReq;
326
327 if (MaxPitch == MinPitch) { // Fixed pitch prop
328 cPReq = cPower->GetValue(J);
329
330 } else { // Variable pitch prop
331
332 if (ConstantSpeed != 0) { // Constant Speed Mode
333
334 // do normal calculation when propeller is neither feathered nor reversed
335 // Note: This method of feathering and reversing was added to support the
336 // turboprop model. It's left here for backward compatiblity, but
337 // now feathering and reversing should be done in Manual Pitch Mode.
338 if (!Feathered) {
339 if (!Reversed) {
340
341 double rpmReq = MinRPM + (MaxRPM - MinRPM) * Advance;
342 double dRPM = rpmReq - RPM;
343 // The pitch of a variable propeller cannot be changed when the RPMs are
344 // too low - the oil pump does not work.
345 if (RPM > 200) Pitch -= dRPM * in.TotalDeltaT;
346 if (Pitch < MinPitch) Pitch = MinPitch;
347 else if (Pitch > MaxPitch) Pitch = MaxPitch;
348
349 } else { // Reversed propeller
350
351 // when reversed calculate propeller pitch depending on throttle lever position
352 // (beta range for taxing full reverse for braking)
353 double PitchReq = MinPitch - ( MinPitch - ReversePitch ) * Reverse_coef;
354 // The pitch of a variable propeller cannot be changed when the RPMs are
355 // too low - the oil pump does not work.
356 if (RPM > 200) Pitch += (PitchReq - Pitch) / 200;
357 if (RPM > MaxRPM) {
358 Pitch += (MaxRPM - RPM) / 50;
359 if (Pitch < ReversePitch) Pitch = ReversePitch;
360 else if (Pitch > MaxPitch) Pitch = MaxPitch;
361 }
362 }
363
364 } else { // Feathered propeller
365 // ToDo: Make feathered and reverse settings done via FGKinemat
366 Pitch += (MaxPitch - Pitch) / 300; // just a guess (about 5 sec to fully feathered)
367 }
368
369 } else { // Manual Pitch Mode, pitch is controlled externally
370
371 }
372
373 cPReq = cPower->GetValue(J, Pitch);
374 }
375
376 // Apply optional scaling factor to Cp (default value = 1)
377 cPReq *= CpFactor;
378
379 // Apply optional Mach effects from CP_MACH table
380 if (CpMach) cPReq *= CpMach->GetValue(HelicalTipMach);
381
382 // Apply optional Reynolds-number correction indexed by RPM
383 if (cPowerRPM) cPReq *= cPowerRPM->GetValue(RPM);
384
385 double RPS = RPM / 60.0;
386 double local_RPS = RPS < 0.01 ? 0.01 : RPS;
387
388 PowerRequired = cPReq*local_RPS*local_RPS*local_RPS*D5*in.Density;
389
390 return PowerRequired;
391}
392
393//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
394
396{
397 // These are moments in lbf per ft : the lever arm along Z generates a moment
398 // along the pitch direction.
399 double p_pitch = Thrust * Sense * (GetActingLocationZ() - GetLocationZ()) / 12.0;
400 // The lever arm along Y generates a moment along the yaw direction.
401 double p_yaw = Thrust * Sense * (GetActingLocationY() - GetLocationY()) / 12.0;
402
403 return FGColumnVector3(0.0, p_pitch, p_yaw);
404}
405
406//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
407
408string FGPropeller::GetThrusterLabels(int id, const string& delimeter)
409{
410 std::ostringstream buf;
411
412 buf << Name << " Torque (engine " << id << ")" << delimeter
413 << Name << " PFactor Pitch (engine " << id << ")" << delimeter
414 << Name << " PFactor Yaw (engine " << id << ")" << delimeter
415 << Name << " Thrust (engine " << id << " in lbs)" << delimeter;
416 if (IsVPitch())
417 buf << Name << " Pitch (engine " << id << ")" << delimeter;
418 buf << Name << " RPM (engine " << id << ")";
419
420 return buf.str();
421}
422
423//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
424
425string FGPropeller::GetThrusterValues(int id, const string& delimeter)
426{
427 std::ostringstream buf;
428
429 FGColumnVector3 vPFactor = GetPFactor();
430 buf << vTorque(eX) << delimeter
431 << vPFactor(ePitch) << delimeter
432 << vPFactor(eYaw) << delimeter
433 << Thrust << delimeter;
434 if (IsVPitch())
435 buf << Pitch << delimeter;
436 buf << RPM;
437
438 return buf.str();
439}
440
441//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
442// The bitmasked value choices are as follows:
443// unset: In this case (the default) JSBSim would only print
444// out the normally expected messages, essentially echoing
445// the config files as they are read. If the environment
446// variable is not set, debug_lvl is set to 1 internally
447// 0: This requests JSBSim not to output any messages
448// whatsoever.
449// 1: This value explicity requests the normal JSBSim
450// startup messages
451// 2: This value asks for a message to be printed out when
452// a class is instantiated
453// 4: When this value is set, a message is displayed when a
454// FGModel object executes its Run() method
455// 8: When this value is set, various runtime state variables
456// are printed out periodically
457// 16: When set various parameters are sanity checked and
458// a message is printed out when they go out of bounds
459
460void FGPropeller::Debug(int from)
461{
462 if (debug_lvl <= 0) return;
463
464 if (debug_lvl & 1) { // Standard console startup message output
465 if (from == 0) { // Constructor
466 FGLogging log(LogLevel::DEBUG);
467 log << "\n Propeller Name: " << Name << "\n";
468 log << " IXX = " << Ixx << "\n";
469 log << " Diameter = " << Diameter << " ft." << "\n";
470 log << " Number of Blades = " << numBlades << "\n";
471 log << " Gear Ratio = " << GearRatio << "\n";
472 log << " Minimum Pitch = " << MinPitch << "\n";
473 log << " Maximum Pitch = " << MaxPitch << "\n";
474 log << " Minimum RPM = " << MinRPM << "\n";
475 log << " Maximum RPM = " << MaxRPM << "\n";
476 }
477 }
478 if (debug_lvl & 2 ) { // Instantiation/Destruction notification
479 FGLogging log(LogLevel::DEBUG);
480 if (from == 0) log << "Instantiated: FGPropeller\n";
481 if (from == 1) log << "Destroyed: FGPropeller\n";
482 }
483 if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
484 }
485 if (debug_lvl & 8 ) { // Runtime state variables
486 }
487 if (debug_lvl & 16) { // Sanity checking
488 }
489 if (debug_lvl & 64) {
490 if (from == 0) { // Constructor
491 }
492 }
493}
494}
Element * FindElement(const std::string &el="")
Searches for a specified element.
double GetAttributeValueAsNumber(const std::string &key)
Retrieves an attribute value as a double precision real number.
std::string GetAttributeValue(const std::string &key)
Retrieves an attribute.
Element * GetParent(void)
Returns a pointer to the parent of an element.
double FindElementValueAsNumberConvertTo(const std::string &el, const std::string &target_units)
Searches for the named element and converts and returns the data belonging to it.
Element * FindNextElement(const std::string &el="")
Searches for the next element as specified.
double GetDataAsNumber(void)
Converts the element data to a number.
bool HasAttribute(const std::string &key)
Determines if an element has the supplied attribute.
double FindElementValueAsNumber(const std::string &el="")
Searches for the named element and returns the data belonging to it as a number.
This class implements a 3 element column vector.
double Magnitude(void) const
Length of the vector.
Encapsulates the JSBSim simulation executive.
Definition FGFDMExec.h:185
std::shared_ptr< FGPropertyManager > GetPropertyManager(void) const
Returns a pointer to the property manager object.
Definition FGFDMExec.h:422
Handles matrix math operations.
Definition FGMatrix33.h:70
FGMatrix33 Transposed(void) const
Transposed matrix.
Definition FGMatrix33.h:221
void SetInducedVelocity(double Vi)
Set the propeller induced velocity.
~FGPropeller()
Destructor for FGPropeller - deletes the FGTable objects.
double Calculate(double EnginePower)
Calculates and returns the thrust produced by this propeller.
double GetPowerRequired(void)
Retrieves the power required (or "absorbed") by the propeller - i.e.
int GetConstantSpeed(void) const
Returns a non-zero value if the propeller is constant speed.
double GetRPM(void) const
Retrieves the RPMs of the propeller.
std::string GetThrusterValues(int id, const std::string &delimeter)
Generate the values for the thruster standard CSV output.
void ResetToIC(void)
Reset the initial conditions.
void SetCtFactor(double ctf)
Sets coefficient of thrust multiplier.
void SetConstantSpeed(int mode)
Sets propeller into constant speed mode, or manual pitch mode.
FGColumnVector3 GetPFactor(void) const
Retrieves the P-Factor constant.
void SetCpFactor(double cpf)
Sets coefficient of power multiplier.
double GetInducedVelocity(void) const
Get the propeller induced velocity.
void SetSense(double s)
Sets the rotation sense of the propeller.
double GetHelicalTipMach(void) const
Retrieves the Mach number at the propeller tips.
std::string GetThrusterLabels(int id, const std::string &delimeter)
Generate the labels for the thruster standard CSV output.
double GetTorque(void) const
Retrieves the Torque in foot-pounds (Don't you love the English system?)
double GetEngineRPM(void) const
Calculates the RPMs of the engine based on gear ratio.
FGPropeller(FGFDMExec *exec, Element *el, int num=0)
Constructor for FGPropeller.
bool IsVPitch(void) const
Returns true of this propeller is variable pitch.
double GetThrustCoefficient(void) const
Retrieves the thrust coefficient.
Lookup table class.
Definition FGTable.h:331
double GetValue(void) const
Get the current table value.
Definition FGTable.cpp:552
Base class for specific thrusting devices such as propellers, nozzles, etc.
Definition FGThruster.h:77
Main namespace for the JSBSim Flight Dynamics Model.
Definition FGFDMExec.cpp:73