43 #include "models/propulsion/FGForce.h" 44 #include "math/FGColumnVector3.h" 45 #include "math/LagrangeMultiplier.h" 46 #include "FGSurface.h" 52 #define ID_LGEAR "$Id: FGLGear.h,v 1.65 2016/05/16 18:19:57 bcoconni Exp $" 62 class FGPropertyManager;
199 double VcalibratedKts;
204 bool TakeoffThrottle;
213 std::vector <double> BrakePos;
219 enum BrakeGroup {bgNone=0, bgLeft, bgRight, bgCenter, bgNose, bgTail, bgNumBrakeGroups };
246 return Ts2b * (vXYZn - in.vXYZcg);
250 return vWhlBodyVec(idx);
254 double GetLocalGear(
int idx)
const {
return vLocalGear(idx); }
257 const std::string&
GetName(
void)
const {
return name; }
276 double GetSteerNorm(
void)
const {
return radtodeg/maxSteerAngle*SteerAngle; }
277 void SetSteerCmd(
double cmd) { SetSteerAngleDeg(cmd * maxSteerAngle); }
278 double GetstaticFCoeff(
void)
const {
return staticFCoeff; }
280 int GetBrakeGroup(
void)
const {
return (
int)eBrakeGrp; }
281 int GetSteerType(
void)
const {
return (
int)eSteerType; }
283 bool GetSteerable(
void)
const {
return eSteerType != stFixed; }
284 bool GetRetractable(
void)
const {
return isRetractable; }
285 bool GetGearUnitUp(
void)
const {
return isRetractable ? (GetGearUnitPos() < 0.01) :
false; }
286 bool GetGearUnitDown(
void)
const {
return isRetractable ? (GetGearUnitPos() > 0.99) :
true; }
288 double GetWheelRollForce(
void) {
290 FGColumnVector3 vForce = mTGear.Transposed() * FGForce::GetBodyForces();
291 return vForce(eX)*cos(SteerAngle) + vForce(eY)*sin(SteerAngle); }
292 double GetWheelSideForce(
void) {
294 FGColumnVector3 vForce = mTGear.Transposed() * FGForce::GetBodyForces();
295 return vForce(eY)*cos(SteerAngle) - vForce(eX)*sin(SteerAngle); }
296 double GetBodyXForce(
void) {
298 return FGForce::GetBodyForces()(eX);
300 double GetBodyYForce(
void) {
302 return FGForce::GetBodyForces()(eY);
304 double GetBodyZForce(
void) {
306 return FGForce::GetBodyForces()(eZ);
308 double GetWheelRollVel(
void)
const {
return vWhlVelVec(eX)*cos(SteerAngle)
309 + vWhlVelVec(eY)*sin(SteerAngle); }
310 double GetWheelSideVel(
void)
const {
return vWhlVelVec(eY)*cos(SteerAngle)
311 - vWhlVelVec(eX)*sin(SteerAngle); }
312 double GetWheelSlipAngle(
void)
const {
return WheelSlip; }
313 double GetWheelVel(
int axis)
const {
return vWhlVelVec(axis);}
314 bool IsBogey(
void)
const {
return (eContactType == ctBOGEY);}
315 double GetGearUnitPos(
void)
const;
316 double GetSteerAngleDeg(
void)
const {
return radtodeg*SteerAngle; }
317 void SetSteerAngleDeg(
double angle) {
318 if (eSteerType != stFixed && !Castered)
319 SteerAngle = degtorad * angle;
324 void ResetToIC(
void);
340 double compressLength;
341 double compressSpeed;
342 double rollingFCoeff;
343 double Stiffness, Shape, Peak, Curvature;
348 double TakeoffDistanceTraveled;
349 double TakeoffDistanceTraveled50ft;
350 double LandingDistanceTraveled;
351 double MaximumStrutForce, StrutForce;
352 double MaximumStrutTravel;
359 bool StartedGroundRun;
360 bool LandingReported;
361 bool TakeoffReported;
373 double maxSteerAngle;
380 mutable bool useFCSGearPos;
382 void ComputeBrakeForceCoefficient(
void);
383 void ComputeSteeringAngle(
void);
384 void ComputeSlipAngle(
void);
385 void ComputeSideForceCoefficient(
void);
386 void ComputeVerticalStrutForce(
void);
387 void ComputeGroundFrame(
void);
389 void UpdateForces(
void);
390 void SetstaticFCoeff(
double coeff);
391 void CrashDetect(
void);
392 void InitializeReporting(
void);
393 void ResetReporting(
void);
394 void ReportTakeoffOrLanding(
void);
396 void Debug(
int from);
ReportType
Report type enumerators.
FGColumnVector3 GetBodyLocation(void) const
Gets the location of the gear in Body axes.
ContactType
Contact point type.
FGLGear(Element *el, FGFDMExec *Executive, int number, const struct Inputs &input)
Constructor.
double GetCompLen(void) const
Gets the current compressed length of the gear in feet.
BrakeGroup
Brake grouping enumerators.
FrictionType
Friction types.
double GetCompVel(void) const
Gets the current gear compression velocity in ft/sec.
FGLocation holds an arbitrary location in the Earth centered Earth fixed reference frame (ECEF)...
void SetWOW(bool wow)
Sets the weight-on-wheels flag.
const std::string & GetName(void) const
Gets the name of the gear.
bool GetReport(void) const
Get the console touchdown reporting feature.
Represents a mathematical function.
SteerType
Steering group membership enumerators.
This class implements a 3 element column vector.
Manages ground reactions modeling.
Handles matrix math operations.
double GetCompForce(void) const
Gets the gear compression force in pounds.
Base class for all surface properties.
Encapsulates the JSBSim simulation executive.
Utility class that aids in the conversion of forces between coordinate systems and calculation of mom...
void SetReport(bool flag)
Set the console touchdown reporting feature.
bool GetWOW(void) const
Gets the Weight On Wheels flag value.