Add the option to (properly) revert the propellers moment of inertia calculation
This commit is contained in:
parent
99ea9c9583
commit
752b8d0acc
2 changed files with 11 additions and 5 deletions
|
@ -45,7 +45,7 @@ using namespace std;
|
|||
|
||||
namespace JSBSim {
|
||||
|
||||
IDENT(IdSrc,"$Id: FGPropeller.cpp,v 1.49 2014/12/27 14:37:37 dpculp Exp $");
|
||||
IDENT(IdSrc,"$Id: FGPropeller.cpp,v 1.51 2015/04/20 12:12:49 ehofman Exp $");
|
||||
IDENT(IdHdr,ID_PROPELLER);
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
@ -79,6 +79,12 @@ FGPropeller::FGPropeller(FGFDMExec* exec, Element* prop_element, int num)
|
|||
|
||||
if (prop_element->FindElement("ixx"))
|
||||
Ixx = prop_element->FindElementValueAsNumberConvertTo("ixx", "SLUG*FT2");
|
||||
|
||||
Sense_multiplier = 1.0;
|
||||
if (prop_element->HasAttribute("version"))
|
||||
if (prop_element->GetAttributeValueAsNumber("version") > 1.0)
|
||||
Sense_multiplier = -1.0;
|
||||
|
||||
if (prop_element->FindElement("diameter"))
|
||||
Diameter = prop_element->FindElementValueAsNumberConvertTo("diameter", "FT");
|
||||
if (prop_element->FindElement("numblades"))
|
||||
|
@ -273,7 +279,7 @@ double FGPropeller::Calculate(double EnginePower)
|
|||
// natural axis of the engine. The transform takes place in the base class
|
||||
// FGForce::GetBodyForces() function.
|
||||
|
||||
vH(eX) = Ixx*omega*Sense;
|
||||
vH(eX) = Ixx*omega*Sense*Sense_multiplier;
|
||||
vH(eY) = 0.0;
|
||||
vH(eZ) = 0.0;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ INCLUDES
|
|||
DEFINITIONS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||
|
||||
#define ID_PROPELLER "$Id: FGPropeller.h,v 1.20 2011/10/31 14:54:41 bcoconni Exp $"
|
||||
#define ID_PROPELLER "$Id: FGPropeller.h,v 1.22 2015/04/20 11:40:45 ehofman Exp $"
|
||||
|
||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
FORWARD DECLARATIONS
|
||||
|
@ -142,7 +142,7 @@ CLASS DOCUMENTATION
|
|||
<li>Various NACA Technical Notes and Reports</li>
|
||||
</ul>
|
||||
@author Jon S. Berndt
|
||||
@version $Id: FGPropeller.h,v 1.20 2011/10/31 14:54:41 bcoconni Exp $
|
||||
@version $Id: FGPropeller.h,v 1.22 2015/04/20 11:40:45 ehofman Exp $
|
||||
@see FGEngine
|
||||
@see FGThruster
|
||||
*/
|
||||
|
@ -283,7 +283,7 @@ private:
|
|||
double MaxRPM;
|
||||
double Pitch;
|
||||
double P_Factor;
|
||||
double Sense;
|
||||
double Sense, Sense_multiplier;
|
||||
double Advance;
|
||||
double ExcessTorque;
|
||||
double D4;
|
||||
|
|
Loading…
Add table
Reference in a new issue