![]() |
JSBSim Flight Dynamics Model 1.0 (23 February 2013)
An Open Source Flight Dynamics and Control Software Library in C++
|
Manages ground reactions modeling. More...
#include <FGGroundReactions.h>
Inheritance diagram for FGGroundReactions:
Collaboration diagram for FGGroundReactions:Public Member Functions | |
| FGGroundReactions (FGFDMExec *) | |
| const FGColumnVector3 & | GetForces (void) const |
| double | GetForces (int idx) const |
| FGLGear * | GetGearUnit (int gear) const |
| Gets a gear instance. | |
| string | GetGroundReactionStrings (string delimeter) const |
| string | GetGroundReactionValues (string delimeter) const |
| const FGColumnVector3 & | GetMoments (void) const |
| double | GetMoments (int idx) const |
| vector< LagrangeMultiplier * > * | GetMultipliersList (void) |
| int | GetNumGearUnits (void) const |
| bool | GetWOW (void) const |
| bool | InitModel (void) |
| bool | Load (Element *el) |
| Loads this model. | |
| void | RegisterLagrangeMultiplier (LagrangeMultiplier *lmult) |
| bool | Run (bool Holding) |
| Runs the Ground Reactions model; called by the Executive Can pass in a value indicating if the executive is directing the simulation to Hold. | |
Public Attributes | |
| FGLGear::Inputs | in |
Maintains a list of landing gear and ground contact points, all instances of FGLGear. Sums their forces and moments so that these may be provided to FGPropagate. Parses the <ground_reactions> section of the aircraft configuration file.
<ground_reactions>
<contact>
... {see FGLGear for specifics of this format}
</contact>
... {more contacts}
</ground_reactions>
Definition at line 82 of file FGGroundReactions.h.
| FGLGear* GetGearUnit | ( | int | gear | ) | const [inline] |
| gear | index of gear instance |
Definition at line 111 of file FGGroundReactions.h.
Referenced by FGTrimAnalysisControl::initTheta(), FGFCS::Run(), FGTrimAnalysisControl::SetPhiOnGround(), and FGTrimAnalysisControl::SetThetaOnGround().
{ return lGear[gear]; }
Here is the caller graph for this function:| bool Load | ( | Element * | el | ) | [virtual] |
| el | a pointer to the element |
Reimplemented from FGModel.
Definition at line 128 of file FGGroundReactions.cpp.
References Element::FindElement(), Element::FindNextElement(), Element::GetAttributeValue(), FGFDMExec::GetFullAircraftPath(), and Element::GetNumElements().
{
int num=0;
string fname="", file="";
string separator = "/";
fname = elem->GetAttributeValue("file");
if (!fname.empty()) {
file = FDMExec->GetFullAircraftPath() + separator + fname;
document = LoadXMLDocument(file);
if (document == 0L) return false;
} else {
document = elem;
}
Debug(2);
unsigned int numContacts = document->GetNumElements("contact");
lGear.resize(numContacts);
Element* contact_element = document->FindElement("contact");
for (unsigned int idx=0; idx<numContacts; idx++) {
lGear[idx] = new FGLGear(contact_element, FDMExec, num++, in);
contact_element = document->FindNextElement("contact");
}
FGModel::Load(document); // Perform base class Load
for (unsigned int i=0; i<lGear.size();i++) lGear[i]->bind();
PostLoad(document, PropertyManager);
return true;
}
Here is the call graph for this function:| bool Run | ( | bool | Holding | ) | [virtual] |
| Holding | if true, the executive has been directed to hold the sim from advancing time. Some models may ignore this flag, such as the Input model, which may need to be active to listen on a socket for the "Resume" command to be given. |
Reimplemented from FGModel.
Definition at line 85 of file FGGroundReactions.cpp.
References FGModel::Run().
{
if (FGModel::Run(Holding)) return true;
if (Holding) return false;
RunPreFunctions();
vForces.InitMatrix();
vMoments.InitMatrix();
multipliers.clear();
// Sum forces and moments for all gear, here.
// Some optimizations may be made here - or rather in the gear code itself.
// The gear ::Run() method is called several times - once for each gear.
// Perhaps there is some commonality for things which only need to be
// calculated once.
for (unsigned int i=0; i<lGear.size(); i++) {
vForces += lGear[i]->GetBodyForces();
vMoments += lGear[i]->GetMoments();
}
RunPostFunctions();
return false;
}
Here is the call graph for this function: