#include "FGMassBalance.h"
#include "math/FGTable.h"
#include <cstdlib>
+#include <cstring>
using namespace std;
GLOBAL DATA
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-static const char *IdSrc = "$Id: FGLGear.cpp,v 1.76 2010/07/30 11:50:01 jberndt Exp $";
+static const char *IdSrc = "$Id: FGLGear.cpp,v 1.79 2010/11/28 13:20:47 bcoconni Exp $";
static const char *IdHdr = ID_LGEAR;
// Body To Structural (body frame is rotated 180 deg about Y and lengths are given in
FGForce(fdmex),
GearNumber(number),
SteerAngle(0.0),
- Castered(false)
+ Castered(false),
+ StaticFriction(false)
{
Element *force_table=0;
Element *dampCoeff=0;
Curvature = 1.03;
// Initialize Lagrange multipliers
- LMultiplier[ftRoll].value = 0.;
- LMultiplier[ftSide].value = 0.;
- LMultiplier[ftRoll].value = 0.;
+ memset(LMultiplier, 0, sizeof(LMultiplier));
Debug(0);
}
if (isRetractable) ComputeRetractionState();
if (GearDown) {
+ FGColumnVector3 angularVel;
+
vWhlBodyVec = MassBalance->StructuralToBody(vXYZn); // Get wheel in body frame
vLocalGear = Propagate->GetTb2l() * vWhlBodyVec; // Get local frame wheel location
gearLoc = Propagate->GetLocation().LocalToLocation(vLocalGear);
// Compute the height of the theoretical location of the wheel (if strut is
// not compressed) with respect to the ground level
- double height = fdmex->GetGroundCallback()->GetAGLevel(t, gearLoc, contact, normal, cvel);
+ double height = fdmex->GetGroundCallback()->GetAGLevel(t, gearLoc, contact, normal, cvel, angularVel);
vGroundNormal = Propagate->GetTec2b() * normal;
// The height returned above is the AGL and is expressed in the Z direction
property_name = base_property_name + "/static_friction_coeff";
fdmex->GetPropertyManager()->Tie( property_name.c_str(), &staticFCoeff );
+ property_name = base_property_name + "/rolling_friction_coeff";
+ fdmex->GetPropertyManager()->Tie( property_name.c_str(), &rollingFCoeff );
+ property_name = base_property_name + "/dynamic_friction_coeff";
+ fdmex->GetPropertyManager()->Tie( property_name.c_str(), &dynamicFCoeff );
if (eSteerType == stCaster) {
property_name = base_property_name + "/steering-angle-deg";