17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 13:59:12 +01:00

Prevent overcharge by AI - count how long each vehicle is being under higher pressure

This commit is contained in:
maj00r
2026-09-08 19:53:06 +02:00
parent ac313f1f1d
commit a1e4e8d95b
4 changed files with 25 additions and 17 deletions

View File

@@ -23,6 +23,7 @@ auto const EU07_AI_ACCELERATION = 0.05;
auto const EU07_AI_NOACCELERATION = -0.05;
auto const EU07_AI_BRAKINGTESTACCELERATION = -0.06;
auto const EU07_AI_NOMOVEMENT = 0.05; // standstill velocity threshold
auto const EU07_AI_OVERCHARGETIME = 3.0; // [s]
auto const EU07_AI_MOVEMENT = 1.0; // deliberate movement velocity threshold
auto const EU07_AI_SECONDARYSCANINTERVAL = 5.0; // s - a secondary scans for a wake-up less often than the primary
auto const EU07_AI_SPEEDLIMITEXTENDSBEYONDSCANRANGE = 10000.0;
@@ -652,6 +653,7 @@ private:
bool IsCargoTrain{ false };
bool IsHeavyCargoTrain{ false };
double fReady = 0.0; // poziom odhamowania wagonów
bool IsAnyPipeOvercharged { false };
bool Ready = false; // ABu: stan gotowosci do odjazdu - sprawdzenie odhamowania wagonow
bool IsConsistBraked { false };
double ConsistShade{ 1.0 }; // averaged amount of sunlight received by the consist