]> git.mxchange.org Git - flightgear.git/commitdiff
Syn.c w. JSBSim.
authorehofman <ehofman>
Mon, 27 Feb 2006 08:41:24 +0000 (08:41 +0000)
committerehofman <ehofman>
Mon, 27 Feb 2006 08:41:24 +0000 (08:41 +0000)
src/FDM/JSBSim/models/FGAerodynamics.h
src/FDM/JSBSim/models/propulsion/FGPiston.cpp
src/FDM/JSBSim/models/propulsion/FGPropeller.cpp
src/FDM/JSBSim/models/propulsion/FGPropeller.h
src/FDM/JSBSim/models/propulsion/FGThruster.h

index 39713a0708ea00d720e97049e356e1c38c3a6d87..2874461616fa4150f55b9cbd48b8ea0e4060b492 100644 (file)
@@ -73,20 +73,21 @@ CLASS DOCUMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 /** Encapsulates the aerodynamic calculations.
-    This class owns and contains the list of coefficients that define the
-    aerodynamic properties of this aircraft. Here also, such unique phenomena
+    This class owns and contains the list of force/coefficients that define the
+    aerodynamic properties of an aircraft. Here also, such unique phenomena
     as ground effect and maximum lift curve tailoff are handled.
-    @config
-    <pre>
-    \<AERODYNAMICS>
-       \<AXIS NAME="{LIFT|DRAG|SIDE|ROLL|PITCH|YAW}">
-         {Coefficient definitions}
-       \</AXIS>
-       {Additional axis definitions}
-    \</AERODYNAMICS> </pre>
+
+    @code
+    <aerodynamics>
+       <axis name="{LIFT|DRAG|SIDE|ROLL|PITCH|YAW}">
+         {force coefficient definitions}
+       </axis>
+       {additional axis definitions}
+    </aerodynamics>
+    @endcode
 
     @author Jon S. Berndt, Tony Peden
-    $Id$
+    @Id $Revision$
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -108,7 +109,7 @@ public:
 
   /** Loads the Aerodynamics model.
       The Load function for this class expects the XML parser to
-      have found the AERODYNAMICS keyword in the configuration file.
+      have found the aerodynamics keyword in the configuration file.
       @param element pointer to the current XML element for aerodynamics parameters.
       @return true if successful */
   bool Load(Element* element);
@@ -164,9 +165,6 @@ public:
       coefficients */
   string GetCoefficientValues(string delimeter);
 
-  void bind(void);
-  void unbind(void);
-
 private:
   typedef map<string,int> AxisIndex;
   AxisIndex AxisIdx;
@@ -185,6 +183,8 @@ private:
   double clsq, lod, qbar_area;
 
   typedef double (FGAerodynamics::*PMF)(int) const;
+  void bind(void);
+  void unbind(void);
 
   void Debug(int from);
 };
index e40a01736cceb760c6436e793d7a84077c1a4d6e..d090e291350bc22ac6da2cc8f035f859ca544fc1 100644 (file)
@@ -298,6 +298,7 @@ double FGPiston::Calculate(void)
 
   if (Thruster->GetType() == FGThruster::ttPropeller) {
     ((FGPropeller*)Thruster)->SetAdvance(FCS->GetPropAdvance(EngineNumber));
+    ((FGPropeller*)Thruster)->SetFeather(FCS->GetPropFeather(EngineNumber));
   }
 
   PowerAvailable = (HP * hptoftlbssec) - Thruster->GetPowerRequired();
index af7fb564c1099c9b07c286a862943978304c40e2..a223b64fe85f169acbbc12ac2e1773fab5bc7f6a 100644 (file)
@@ -127,6 +127,8 @@ FGPropeller::FGPropeller(FGFDMExec* exec, Element* prop_element, int num)
   PropertyManager->Tie( property_name, &J );
   snprintf(property_name, 80, "propulsion/engine[%d]/blade-angle", EngineNum);
   PropertyManager->Tie( property_name, &Pitch );
+  snprintf(property_name, 80, "propulsion/engine[%d]/thrust-coefficient", EngineNum);
+  PropertyManager->Tie( property_name, this, &FGPropeller::GetThrustCoefficient );
 
   Debug(0);
 }
@@ -223,7 +225,7 @@ double FGPropeller::GetPowerRequired(void)
     cPReq = cPower->GetValue(J);
   } else {                      // Variable pitch prop
 
-    if (MaxRPM != MinRPM) {   // constant speed prop
+    if (MaxRPM != MinRPM) {   // fixed-speed prop
 
       // do normal calculation when propeller is neither feathered nor reversed
       if (!Feathered) {
index c0ddcde123822dde3c7bc282483b4832b8d2717b..a268b583d225a7d76924390036987b1da351b3b0 100644 (file)
@@ -161,6 +161,7 @@ public:
   bool   GetReverse (void) { return Reversed; }
   void   SetFeather (bool f) { Feathered = f; }
   bool   GetFeather (void) { return Feathered; }
+  double GetThrustCoefficient(void) const {return ThrustCoeff;}  
 
 private:
   int   numBlades;
index 8c6e6da5ccad3952de72397294e23f1c36c65728..776ab17127ffd5dcb16afa3f8700f23b654ee4c4 100644 (file)
@@ -96,8 +96,6 @@ public:
   virtual string GetThrusterLabels(int id, string delimeter);
   virtual string GetThrusterValues(int id, string delimeter);
 
-  inline void SetThrustCoefficient(double ct) { ThrustCoeff = ct; }
-
 protected:
   eType Type;
   string Name;