mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-24 13:09:16 +01:00
Brake force table: take the rapid step threshold from the distributor
TMoverParameters::BrakeForceR() halves the force of a vehicle set to R below 40 km/h. That is one approximation for every distributor, but a NESt3/ESt4 distributor with a rapid relay engages the step above 70 km/h and keeps it down to 50 km/h (TNESt3::GetPF, RapidStatus), and below that its cylinder pressure is divided by the relay's own multiplier (TRapid, RapidMult). For a vehicle braking from speed the full force therefore lasts down to 50 km/h, not 40. The AI builds its consist brake table (fBrake_a0/a1) from BrakeForceR(), so between 40 and 50 km/h it expected twice the force the wagons actually deliver. Add TBrake::GetRapidRatio(), which keeps the old approximation as the default, and override it in TNESt3 with the relay's threshold and multiplier. The brake itself is unchanged; only the prediction is.
This commit is contained in:
@@ -442,6 +442,11 @@ class TBrake
|
||||
/// <summary>Sets the rapid step ratio. Default no-op; overridden where supported.</summary>
|
||||
/// <param name="RMR">Rapid ratio.</param>
|
||||
virtual void SetRM(double const RMR) {}; // ustalenie przelozenia rapida
|
||||
/// <summary>Share of the full cylinder pressure the distributor delivers at the given speed
|
||||
/// while the vehicle is slowing down through it, for a vehicle set to R. Used only to predict
|
||||
/// the brake force; the default is the approximation BrakeForceR() has always used.</summary>
|
||||
/// <param name="Vel">Vehicle velocity [km/h].</param>
|
||||
virtual double GetRapidRatio(double const Vel) const { return Vel < 40.0 ? 0.5 : 1.0; }
|
||||
/// <summary>Sets the velocity threshold for the rapid step.</summary>
|
||||
/// <param name="RVR">Velocity threshold (same unit as Vel passed to GetPF).</param>
|
||||
virtual void SetRV(double const RVR)
|
||||
|
||||
Reference in New Issue
Block a user