From c3cf916af6b7f1a64d3b57fbaa673938dbf5c830 Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Sun, 9 Apr 2023 09:46:36 +0200 Subject: [PATCH] Rename the getBumpHeight function to getGroundDisplacement --- src/FDM/JSBSim/JSBSim.cxx | 5 +++-- src/FDM/flight.hxx | 4 +++- src/FDM/groundreactions.cxx | 2 +- src/FDM/groundreactions.hxx | 3 +-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/FDM/JSBSim/JSBSim.cxx b/src/FDM/JSBSim/JSBSim.cxx index 99db1f9f9..66dfdad40 100644 --- a/src/FDM/JSBSim/JSBSim.cxx +++ b/src/FDM/JSBSim/JSBSim.cxx @@ -1408,10 +1408,10 @@ FGJSBsim::get_agl_ft(double t, const FGColumnVector3& loc, double alt_off, if (updateGroundReactions(material)) { setPosition(pt); setHeading(Propagate->GetEuler(FGJSBBase::ePsi)); - GroundReactions->SetBumpHeight(getBumpHeight()); GroundReactions->SetRollingFFactor(getRolingFrictionFactor()); GroundReactions->SetStaticFFactor(getStaticFrictionFactor()); GroundReactions->SetMaximumForce(getPressure()*0.00014503773800721815); + GroundReactions->SetBumpiness(getBumpiness()); GroundReactions->SetSolid(getSolid()); GroundReactions->SetPosition(pt); material_valid = true; @@ -1425,7 +1425,8 @@ FGJSBsim::get_agl_ft(double t, const FGColumnVector3& loc, double alt_off, #else terrain->setBoolValue("valid", false); #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) diff --git a/src/FDM/flight.hxx b/src/FDM/flight.hxx index 7cdd13edb..6cf67a2e3 100644 --- a/src/FDM/flight.hxx +++ b/src/FDM/flight.hxx @@ -774,7 +774,9 @@ public: } inline float getPressure() { return _groundReactions.getPressure(); } inline float getBumpiness() { return _groundReactions.getBumpiness(); } - inline float getBumpHeight() { return _groundReactions.getBumpHeight();} + inline float getGroundDisplacement() { + return _groundReactions.getGroundDisplacement(); + } inline float getStaticFrictionFactor() { return _groundReactions.getStaticFrictionFactor(); } diff --git a/src/FDM/groundreactions.cxx b/src/FDM/groundreactions.cxx index ba11072fb..1ff1442bf 100644 --- a/src/FDM/groundreactions.cxx +++ b/src/FDM/groundreactions.cxx @@ -91,7 +91,7 @@ GroundReactions::setPosition(const double pt[3]) } float -GroundReactions::getBumpHeight() +GroundReactions::getGroundDisplacement() { static const float maxGroundBumpAmplitude = 0.4; diff --git a/src/FDM/groundreactions.hxx b/src/FDM/groundreactions.hxx index 4d90db990..e2932c2f6 100644 --- a/src/FDM/groundreactions.hxx +++ b/src/FDM/groundreactions.hxx @@ -29,8 +29,7 @@ public: inline void setHeading(float h) { heading = h; }; // then get the bum height at that position - float getBumpHeight(); - + float getGroundDisplacement(); inline float getPressure() { return pressure; } inline float getBumpiness() { return bumpiness; }