From 582c079d9779793a05631702778ae28c049364cb Mon Sep 17 00:00:00 2001 From: milek7 Date: Sun, 6 Oct 2019 14:41:24 +0200 Subject: [PATCH] display drag instead of track adhesion in debug window --- McZapkie/MOVER.h | 2 +- McZapkie/Mover.cpp | 4 ++-- driveruipanels.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/McZapkie/MOVER.h b/McZapkie/MOVER.h index 1895af62..238c677d 100644 --- a/McZapkie/MOVER.h +++ b/McZapkie/MOVER.h @@ -1583,7 +1583,7 @@ public: void ComputeTotalForce(double dt); double Adhesive(double staticfriction) const; double TractionForce(double dt); - double FrictionForce(double R, int TDamage); + double FrictionForce() const; double BrakeForceR(double ratio, double velocity); double BrakeForceP(double press, double velocity); double BrakeForce(const TTrackParam &Track); diff --git a/McZapkie/Mover.cpp b/McZapkie/Mover.cpp index d93878a9..4490a2f9 100644 --- a/McZapkie/Mover.cpp +++ b/McZapkie/Mover.cpp @@ -4407,7 +4407,7 @@ void TMoverParameters::ComputeTotalForce(double dt) { if( false == PhysicActivation ) { return; } // juz zoptymalizowane: - FStand = FrictionForce(RunningShape.R, RunningTrack.DamageFlag); // siła oporów ruchu + FStand = FrictionForce(); // siła oporów ruchu if( true == TestFlag( DamageFlag, dtrain_out ) ) { // HACK: crude way to reduce speed after derailment // TBD, TODO: more accurate approach? @@ -4624,7 +4624,7 @@ double TMoverParameters::BrakeForce( TTrackParam const &Track ) { // Q: 20160713 // Obliczanie siły tarcia // ************************************************************************************************* -double TMoverParameters::FrictionForce(double R, int TDamage) +double TMoverParameters::FrictionForce() const { double FF = 0; // ABu 240205: chyba juz ekstremalnie zoptymalizowana funkcja liczaca sily tarcia diff --git a/driveruipanels.cpp b/driveruipanels.cpp index aa5522c8..75d451a8 100644 --- a/driveruipanels.cpp +++ b/driveruipanels.cpp @@ -692,11 +692,11 @@ debug_panel::update_section_vehicle( std::vector &Output ) { std::snprintf( m_buffer.data(), m_buffer.size(), - STR_C("Forces:\n tractive: %.1f, brake: %.1f, friction: %.2f%s\nAcceleration:\n tangential: %.2f, normal: %.2f (path radius: %s)\nVelocity: %.2f, distance traveled: %.2f\nPosition: [%.2f, %.2f, %.2f]"), + STR_C("Forces:\n tractive: %.1f, brake: %.1f, drag: %.2f%s\nAcceleration:\n tangential: %.2f, normal: %.2f (path radius: %s)\nVelocity: %.2f, distance traveled: %.2f\nPosition: [%.2f, %.2f, %.2f]"), // forces mover.Ft * 0.001f * ( mover.ActiveCab ? mover.ActiveCab : vehicle.ctOwner ? vehicle.ctOwner->Controlling()->ActiveCab : 1 ) + 0.001f, mover.Fb * 0.001f, - mover.Adhesive( mover.RunningTrack.friction ), + mover.FrictionForce() * 0.001f, ( mover.SlippingWheels ? " (!)" : "" ), // acceleration mover.AccSVBased,