mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-12 00:38:12 +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:
@@ -5166,8 +5166,8 @@ double TMoverParameters::BrakeForceR(double ratio, double velocity)
|
||||
press = MaxBrakePress[3];
|
||||
if (DynamicBrakeType == dbrake_automatic)
|
||||
ratio = ratio + (1.5 - ratio) * std::min(1.0, Vel * 0.02);
|
||||
if (BrakeDelayFlag & bdelay_R && BrakeMethod % 128 != bp_Cosid && BrakeMethod % 128 != bp_D1 && BrakeMethod % 128 != bp_D2 && Power < 1 && velocity < 40)
|
||||
ratio = ratio / 2;
|
||||
if (BrakeDelayFlag & bdelay_R && BrakeMethod % 128 != bp_Cosid && BrakeMethod % 128 != bp_D1 && BrakeMethod % 128 != bp_D2 && Power < 1)
|
||||
ratio *= Hamulec->GetRapidRatio(velocity);
|
||||
if (TrainType == dt_DMU && velocity < 30.0)
|
||||
{
|
||||
ratio -= 0.3;
|
||||
|
||||
Reference in New Issue
Block a user