1
0
Fork 0

Syn.c w. JSBSim.

This commit is contained in:
ehofman 2006-02-27 08:41:24 +00:00
parent e89194b42a
commit 9b33107551
5 changed files with 20 additions and 18 deletions

View 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);
};

View 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();

View 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) {

View 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;

View 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;