1
0
Fork 0

Rename the getBumpHeight function to getGroundDisplacement

This commit is contained in:
Erik Hofman 2023-04-09 09:46:36 +02:00
parent cd40ef872c
commit c3cf916af6
4 changed files with 8 additions and 6 deletions

View file

@ -1408,10 +1408,10 @@ FGJSBsim::get_agl_ft(double t, const FGColumnVector3& loc, double alt_off,
if (updateGroundReactions(material)) { if (updateGroundReactions(material)) {
setPosition(pt); setPosition(pt);
setHeading(Propagate->GetEuler(FGJSBBase::ePsi)); setHeading(Propagate->GetEuler(FGJSBBase::ePsi));
GroundReactions->SetBumpHeight(getBumpHeight());
GroundReactions->SetRollingFFactor(getRolingFrictionFactor()); GroundReactions->SetRollingFFactor(getRolingFrictionFactor());
GroundReactions->SetStaticFFactor(getStaticFrictionFactor()); GroundReactions->SetStaticFFactor(getStaticFrictionFactor());
GroundReactions->SetMaximumForce(getPressure()*0.00014503773800721815); GroundReactions->SetMaximumForce(getPressure()*0.00014503773800721815);
GroundReactions->SetBumpiness(getBumpiness());
GroundReactions->SetSolid(getSolid()); GroundReactions->SetSolid(getSolid());
GroundReactions->SetPosition(pt); GroundReactions->SetPosition(pt);
material_valid = true; material_valid = true;
@ -1425,7 +1425,8 @@ FGJSBsim::get_agl_ft(double t, const FGColumnVector3& loc, double alt_off,
#else #else
terrain->setBoolValue("valid", false); terrain->setBoolValue("valid", false);
#endif #endif
return dot(hlToEc.rotate(SGVec3d(0, 0, 1)), SGVec3d(contact) - SGVec3d(pt)); return dot(hlToEc.rotate(SGVec3d(0, 0, 1)), SGVec3d(contact) - SGVec3d(pt)) +
getGroundDisplacement();
} }
inline static double sqr(double x) inline static double sqr(double x)

View file

@ -774,7 +774,9 @@ public:
} }
inline float getPressure() { return _groundReactions.getPressure(); } inline float getPressure() { return _groundReactions.getPressure(); }
inline float getBumpiness() { return _groundReactions.getBumpiness(); } inline float getBumpiness() { return _groundReactions.getBumpiness(); }
inline float getBumpHeight() { return _groundReactions.getBumpHeight();} inline float getGroundDisplacement() {
return _groundReactions.getGroundDisplacement();
}
inline float getStaticFrictionFactor() { inline float getStaticFrictionFactor() {
return _groundReactions.getStaticFrictionFactor(); return _groundReactions.getStaticFrictionFactor();
} }

View file

@ -91,7 +91,7 @@ GroundReactions::setPosition(const double pt[3])
} }
float float
GroundReactions::getBumpHeight() GroundReactions::getGroundDisplacement()
{ {
static const float maxGroundBumpAmplitude = 0.4; static const float maxGroundBumpAmplitude = 0.4;

View file

@ -29,8 +29,7 @@ public:
inline void setHeading(float h) { heading = h; }; inline void setHeading(float h) { heading = h; };
// then get the bum height at that position // then get the bum height at that position
float getBumpHeight(); float getGroundDisplacement();
inline float getPressure() { return pressure; } inline float getPressure() { return pressure; }
inline float getBumpiness() { return bumpiness; } inline float getBumpiness() { return bumpiness; }