58 HTailArea = VTailArea = 0.0;
59 HTailArm = VTailArm = 0.0;
83 vMoments.InitMatrix();
93 if (Holding)
return false;
97 vForces =
in.AeroForce;
98 vForces +=
in.PropForce;
99 vForces +=
in.GroundForce;
100 vForces +=
in.ExternalForce;
101 vForces +=
in.BuoyantForce;
103 vMoments =
in.AeroMoment;
104 vMoments +=
in.PropMoment;
105 vMoments +=
in.GroundMoment;
106 vMoments +=
in.ExternalMoment;
107 vMoments +=
in.BuoyantMoment;
156 lbarh = HTailArm/cbar;
157 lbarv = VTailArm/cbar;
158 if (WingArea != 0.0) {
159 vbarh = HTailArm*HTailArea / (cbar*WingArea);
160 vbarv = VTailArm*VTailArea / (WingSpan*WingArea);
173void FGAircraft::bind(
void)
219void FGAircraft::Debug(
int from)
225 cout << endl <<
" Aircraft Metrics:" << endl;
226 cout <<
" WingArea: " << WingArea << endl;
227 cout <<
" WingSpan: " << WingSpan << endl;
228 cout <<
" Incidence: " << WingIncidence << endl;
229 cout <<
" Chord: " << cbar << endl;
230 cout <<
" H. Tail Area: " << HTailArea << endl;
231 cout <<
" H. Tail Arm: " << HTailArm << endl;
232 cout <<
" V. Tail Area: " << VTailArea << endl;
233 cout <<
" V. Tail Arm: " << VTailArm << endl;
234 cout <<
" Eyepoint (x, y, z): " << vXYZep << endl;
235 cout <<
" Ref Pt (x, y, z): " << vXYZrp << endl;
236 cout <<
" Visual Ref Pt (x, y, z): " << vXYZvrp << endl;
240 if (from == 0) cout <<
"Instantiated: FGAircraft" << endl;
241 if (from == 1) cout <<
"Destroyed: FGAircraft" << endl;
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.
FGColumnVector3 FindElementTripletConvertTo(const std::string &target_units)
Composes a 3-element column vector for the supplied location or orientation.
std::string GetAttributeValue(const std::string &key)
Retrieves an attribute.
Element * FindElement(const std::string &el="")
Searches for a specified element.
Element * FindNextElement(const std::string &el="")
Searches for the next element as specified.
Encapsulates an Aircraft and its systems.
bool Run(bool Holding) override
Runs the Aircraft model; called by the Executive Can pass in a value indicating if the executive is d...
double Getcbar(void) const
Gets the average wing chord.
const FGColumnVector3 & GetXYZrp(void) const
Gets the the aero reference point (RP) coordinates.
double GetHTailArea(void) const
const FGColumnVector3 & GetXYZep(void) const
double GetVTailArm(void) const
FGAircraft(FGFDMExec *Executive)
Constructor.
~FGAircraft() override
Destructor.
void SetWingArea(double S)
double GetWingIncidence(void) const
double GetVTailArea(void) const
struct JSBSim::FGAircraft::Inputs in
double GetWingArea(void) const
Gets the wing area.
bool Load(Element *el) override
Loads the aircraft.
void SetXYZrp(int idx, double value)
double GetWingIncidenceDeg(void) const
bool InitModel(void) override
double Getlbarh(void) const
double Getvbarv(void) const
double GetHTailArm(void) const
double Getlbarv(void) const
const FGColumnVector3 & GetXYZvrp(void) const
double Getvbarh(void) const
double GetWingSpan(void) const
Gets the wing span.
void RunPostFunctions(void)
void PostLoad(Element *el, FGFDMExec *fdmex, std::string prefix="")
void RunPreFunctions(void)
FGPropertyManager * PropertyManager
bool InitModel(void) override
FGModel(FGFDMExec *)
Constructor.
bool Upload(Element *el, bool preLoad)
Uploads this model in memory.
virtual bool Run(bool Holding)
Runs the model; called by the Executive.
void Tie(const std::string &name, T *pointer)
Tie a property to an external variable.