18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 16:14:58 +01:00

fix: the inspector cuts brakes out only in a train at a standstill, R+Mg keeps the rapid stage (review of #282)

- §19.9 cut-outs only when the AI runs the consist as a train (Obey_train); in shunting a wagon without G brakes on P,
  which also puts back a brake the inspector cut out before
- no new cut-out while the consist moves: left to the next inspection at a standstill (putting back still happens)
- ESt4R, LSt and EStED test the bit of R, so R+Mg keeps the high-speed stage of R as on the KE and Oerlikon valves
This commit is contained in:
jerrrrycho
2026-11-08 18:03:13 +01:00
parent 81f10e4d90
commit 7db67c3ce7
5 changed files with 148 additions and 39 deletions

View File

@@ -1449,7 +1449,7 @@ double TESt4R::GetPF(double const PP, double const dt, double const Vel)
result = dv - dV1;
RapidStatus = BrakeDelayFlag == bdelay_R && ((Vel > 55 && RapidStatus == true) || Vel > 70);
RapidStatus = (BrakeDelayFlag & bdelay_R) == bdelay_R && ((Vel > 55 && RapidStatus == true) || Vel > 70);
RapidTemp = RapidTemp + (0.9 * int(RapidStatus) - RapidTemp) * dt / 2;
temp = 1.9 - RapidTemp;
@@ -1752,7 +1752,7 @@ double TLSt::GetPF(double const PP, double const dt, double const Vel)
// if Vel>55 then temp:=0.72 else
// temp:=1;{R}
// cisnienie PP
RapidTemp = RapidTemp + (RM * int(Vel > 55 && BrakeDelayFlag == bdelay_R) - RapidTemp) * dt / 2;
RapidTemp = RapidTemp + (RM * int(Vel > 55 && (BrakeDelayFlag & bdelay_R) == bdelay_R) - RapidTemp) * dt / 2;
temp = 1 - RapidTemp;
if (EDFlag > 0.2)
temp = 10000;
@@ -1971,7 +1971,7 @@ double TEStED::GetPF(double const PP, double const dt, double const Vel)
dv = dv + PF(MPP, VVP, 0.02);
Miedzypoj->Flow(dv * dt * 0.15);
RapidTemp = RapidTemp + (RM * int(Vel > RV && BrakeDelayFlag == bdelay_R) - RapidTemp) * dt / 2;
RapidTemp = RapidTemp + (RM * int(Vel > RV && (BrakeDelayFlag & bdelay_R) == bdelay_R) - RapidTemp) * dt / 2;
temp = std::max(1 - RapidTemp, 0.001);
// if EDFlag then temp:=1000;
// temp:=temp/(1-);