57 Name =
"FGGroundReactions";
68 for (
unsigned int i=0;
i<lGear.size();
i++)
delete lGear[
i];
81 vMoments.InitMatrix();
86 for (
unsigned int i=0;
i<lGear.size();
i++)
87 lGear[
i]->ResetToIC();
97 if (Holding)
return false;
101 vForces.InitMatrix();
102 vMoments.InitMatrix();
111 for (
unsigned int i=0;
i<lGear.size();
i++) {
112 vForces += lGear[
i]->GetBodyForces(
this);
113 vMoments += lGear[
i]->GetMoments();
126 for (
unsigned int i=0;
i<lGear.size();
i++) {
127 if (lGear[
i]->IsBogey() && lGear[
i]->
GetWOW()) {
140 for (
unsigned int i=0;
i<lGear.size(); ++
i)
141 lGear[
i]->SetSteerCmd(cmd);
159 lGear.resize(numContacts);
161 for (
unsigned int idx=0; idx<numContacts; idx++) {
166 for (
unsigned int i=0;
i<lGear.size();
i++) lGear[
i]->bind();
177 std::ostringstream buf;
179 for (
unsigned int i=0;
i<lGear.size();
i++) {
180 if (lGear[
i]->IsBogey()) {
181 string name = lGear[
i]->GetName();
182 buf <<
name <<
" WOW" << delimeter
183 <<
name <<
" stroke (ft)" << delimeter
184 <<
name <<
" stroke velocity (ft/sec)" << delimeter
185 <<
name <<
" compress force (lbs)" << delimeter
186 <<
name <<
" wheel side force (lbs)" << delimeter
187 <<
name <<
" wheel roll force (lbs)" << delimeter
188 <<
name <<
" body X force (lbs)" << delimeter
189 <<
name <<
" body Y force (lbs)" << delimeter
190 <<
name <<
" wheel velocity vec X (ft/sec)" << delimeter
191 <<
name <<
" wheel velocity vec Y (ft/sec)" << delimeter
192 <<
name <<
" wheel rolling velocity (ft/sec)" << delimeter
193 <<
name <<
" wheel side velocity (ft/sec)" << delimeter
194 <<
name <<
" wheel slip (deg)" << delimeter;
196 string name = lGear[
i]->GetName();
197 buf <<
name <<
" WOW" << delimeter
198 <<
name <<
" stroke (ft)" << delimeter
199 <<
name <<
" stroke velocity (ft/sec)" << delimeter
200 <<
name <<
" compress force (lbs)" << delimeter;
204 buf <<
" Total Gear Force_X (lbs)" << delimeter
205 <<
" Total Gear Force_Y (lbs)" << delimeter
206 <<
" Total Gear Force_Z (lbs)" << delimeter
207 <<
" Total Gear Moment_L (ft-lbs)" << delimeter
208 <<
" Total Gear Moment_M (ft-lbs)" << delimeter
209 <<
" Total Gear Moment_N (ft-lbs)";
218 std::ostringstream buf;
220 for (
unsigned int i=0;
i<lGear.size();
i++) {
221 if (lGear[
i]->IsBogey()) {
223 buf << (gear->
GetWOW() ?
"1" :
"0") << delimeter
224 << setprecision(5) << gear->
GetCompLen() << delimeter
225 << setprecision(6) << gear->
GetCompVel() << delimeter
226 << setprecision(10) << gear->
GetCompForce() << delimeter
238 buf << (gear->
GetWOW() ?
"1" :
"0") << delimeter
239 << setprecision(5) << gear->
GetCompLen() << delimeter
240 << setprecision(6) << gear->
GetCompVel() << delimeter
241 << setprecision(10) << gear->
GetCompForce() << delimeter;
259void FGGroundReactions::bind(
void)
289void FGGroundReactions::Debug(
int from)
295 cout << endl <<
" Ground Reactions: " << endl;
299 if (from == 0) cout <<
"Instantiated: FGGroundReactions" << endl;
300 if (from == 1) cout <<
"Destroyed: FGGroundReactions" << endl;
std::string GetAttributeValue(const std::string &key)
Retrieves an attribute.
unsigned int GetNumElements(void)
Returns the number of child elements for this element.
Element * FindElement(const std::string &el="")
Searches for a specified element.
Element * FindNextElement(const std::string &el="")
Searches for the next element as specified.
double GetGroundMoments(int idx) const
Retrieves the ground moments applied on the body.
double GetGroundForces(int idx) const
Retrieves the ground forces applied on the body.
std::string GetGroundReactionValues(std::string delimeter) const
double GetDsCmd(void) const
Gets the steering command.
~FGGroundReactions(void) override
std::string GetGroundReactionStrings(std::string delimeter) const
bool Load(Element *el) override
FGGroundReactions(FGFDMExec *)
int GetNumGearUnits(void) const
Gets the number of gears.
bool InitModel(void) override
void SetDsCmd(double cmd)
Sets the steering command.
bool Run(bool Holding) override
Runs the Ground Reactions model; called by the Executive Can pass in a value indicating if the execut...
double GetWheelSlipAngle(void) const
double GetCompLen(void) const
Gets the current compressed length of the gear in feet.
double GetBodyYForce(void)
double GetWheelRollVel(void) const
double GetWheelSideForce(void)
double GetBodyXForce(void)
double GetCompVel(void) const
Gets the current gear compression velocity in ft/sec.
bool GetWOW(void) const
Gets the Weight On Wheels flag value.
double GetWheelSideVel(void) const
double GetWheelVel(int axis) const
double GetWheelRollForce(void)
double GetCompForce(void) const
Gets the gear compression force in pounds.
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.
FGSurface(FGFDMExec *fdmex, int number=-1)
Constructor.