mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 20:59:19 +02:00
reformat: remove redundant 'inline' specifier
This commit is contained in:
166
McZapkie/MOVER.h
166
McZapkie/MOVER.h
@@ -1027,7 +1027,7 @@ struct TPowerParameters
|
||||
TPowerType PowerType;
|
||||
};
|
||||
};
|
||||
inline TPowerParameters()
|
||||
TPowerParameters()
|
||||
{
|
||||
MaxVoltage = 0.0;
|
||||
MaxCurrent = 0.0;
|
||||
@@ -1236,11 +1236,11 @@ struct TCoupling
|
||||
bool Render = false; /*ABu: czy rysowac jak zaczepiony sprzeg*/
|
||||
std::string control_type; // abstraction of control coupling interface and communication standard
|
||||
|
||||
inline bool has_adapter() const
|
||||
bool has_adapter() const
|
||||
{
|
||||
return adapter_type != TCouplerType::NoCoupler;
|
||||
}
|
||||
inline TCouplerType const type() const
|
||||
TCouplerType const type() const
|
||||
{
|
||||
return adapter_type == TCouplerType::NoCoupler ? CouplerType : adapter_type;
|
||||
}
|
||||
@@ -2090,7 +2090,7 @@ class TMoverParameters
|
||||
int CabActive = 0; // numer kabiny, z której jest sterowanie: 1 lub -1; w przeciwnym razie brak sterowania - rozrzad
|
||||
int CabOccupied = 0; // numer kabiny, w ktorej jest obsada (zwykle jedna na skład) // TODO: move to TController
|
||||
bool CabMaster = false; // czy pojazd jest nadrzędny w składzie
|
||||
inline bool IsCabMaster()
|
||||
bool IsCabMaster()
|
||||
{
|
||||
return CabActive == CabOccupied && CabMaster;
|
||||
} // czy aktualna kabina jest na pewno tą, z której można sterować
|
||||
@@ -2293,12 +2293,12 @@ class TMoverParameters
|
||||
bool Attach(int ConnectNo, int ConnectToNr, TMoverParameters *ConnectTo, int CouplingType, bool Enforce = false, bool Audible = true);
|
||||
int DettachStatus(int ConnectNo);
|
||||
bool Dettach(int ConnectNo);
|
||||
void damage_coupler(int const End);
|
||||
void damage_coupler(int End);
|
||||
void Derail(DerailReason Reason);
|
||||
bool DirectionForward();
|
||||
bool DirectionBackward(void); /*! kierunek ruchu*/
|
||||
bool EIMDirectionChangeAllow(void) const;
|
||||
inline double IsVehicleEIMBrakingFactor()
|
||||
double IsVehicleEIMBrakingFactor()
|
||||
{
|
||||
return DynamicBrakeFlag && ResistorsFlag ? 0.0 : eimv[eimv_Ipoj] < 0 ? -1.0 : 1.0;
|
||||
}
|
||||
@@ -2307,19 +2307,19 @@ class TMoverParameters
|
||||
bool IncBrakeLevel(); // wersja na użytek AI
|
||||
bool DecBrakeLevel();
|
||||
bool ChangeCab(int direction);
|
||||
bool CurrentSwitch(bool const State);
|
||||
bool CurrentSwitch(bool State);
|
||||
bool IsMotorOverloadRelayHighThresholdOn() const;
|
||||
void UpdateBatteryVoltage(double dt);
|
||||
double ComputeMovement(double dt, double dt1, const TTrackShape &Shape, TTrackParam &Track, TTractionParam &ElectricTraction, TLocation const &NewLoc,
|
||||
TRotation const &NewRot); // oblicza przesuniecie pojazdu
|
||||
double FastComputeMovement(double dt, const TTrackShape &Shape, TTrackParam &Track, TLocation const &NewLoc, TRotation const &NewRot); // oblicza przesuniecie pojazdu - wersja zoptymalizowana
|
||||
void compute_movement_(double const Deltatime);
|
||||
void compute_movement_(double Deltatime);
|
||||
double ShowEngineRotation(int VehN);
|
||||
|
||||
// Q *******************************************************************************************
|
||||
double GetTrainsetVoltage(int const Coupling = heating | highvoltage) const;
|
||||
double GetTrainsetVoltage(int Coupling = heating | highvoltage) const;
|
||||
double GetTrainsetHighVoltage() const;
|
||||
bool switch_physics(bool const State);
|
||||
bool switch_physics(bool State);
|
||||
double LocalBrakeRatio(void);
|
||||
double ManualBrakeRatio(void);
|
||||
double PipeRatio(void); /*ile napelniac*/
|
||||
@@ -2330,16 +2330,16 @@ class TMoverParameters
|
||||
double EngineMaxRPM() const;
|
||||
|
||||
/*! przesylanie komend sterujacych*/
|
||||
bool SendCtrlToNext(std::string const CtrlCommand, double const ctrlvalue, double const dir, int const Couplertype = control);
|
||||
bool SetInternalCommand(std::string NewCommand, double NewValue1, double NewValue2, int const Couplertype = control);
|
||||
bool SendCtrlToNext(std::string CtrlCommand, double ctrlvalue, double dir, int Couplertype = control);
|
||||
bool SetInternalCommand(std::string NewCommand, double NewValue1, double NewValue2, int Couplertype = control);
|
||||
double GetExternalCommand(std::string &Command);
|
||||
bool RunCommand(std::string Command, double CValue1, double CValue2, int const Couplertype = control);
|
||||
bool RunCommand(std::string Command, double CValue1, double CValue2, int Couplertype = control);
|
||||
bool RunInternalCommand();
|
||||
void PutCommand(std::string NewCommand, double NewValue1, double NewValue2, const TLocation &NewLocation);
|
||||
bool CabActivisation(bool const Enforce = false);
|
||||
bool CabDeactivisation(bool const Enforce = false);
|
||||
bool CabActivisationAuto(bool const Enforce = false);
|
||||
bool CabDeactivisationAuto(bool const Enforce = false);
|
||||
bool CabActivisation(bool Enforce = false);
|
||||
bool CabDeactivisation(bool Enforce = false);
|
||||
bool CabActivisationAuto(bool Enforce = false);
|
||||
bool CabDeactivisationAuto(bool Enforce = false);
|
||||
|
||||
/*! funkcje zwiekszajace/zmniejszajace nastawniki*/
|
||||
/*! glowny nastawnik:*/
|
||||
@@ -2360,16 +2360,16 @@ class TMoverParameters
|
||||
|
||||
bool AddPulseForce(int Multipler); /*dla drezyny*/
|
||||
|
||||
bool SandboxManual(bool const State, range_t const Notify = range_t::consist); /*wlacza/wylacza reczne sypanie piasku*/
|
||||
bool SandboxAuto(bool const State, range_t const Notify = range_t::consist); /*wlacza/wylacza automatyczne sypanie piasku*/
|
||||
bool Sandbox(bool const State, range_t const Notify = range_t::consist); /*wlacza/wylacza sypanie piasku*/
|
||||
bool SandboxAutoAllow(bool const State); /*wlacza/wylacza zezwolenie na automatyczne sypanie piasku*/
|
||||
bool SandboxManual(bool State, range_t Notify = range_t::consist); /*wlacza/wylacza reczne sypanie piasku*/
|
||||
bool SandboxAuto(bool State, range_t Notify = range_t::consist); /*wlacza/wylacza automatyczne sypanie piasku*/
|
||||
bool Sandbox(bool State, range_t Notify = range_t::consist); /*wlacza/wylacza sypanie piasku*/
|
||||
bool SandboxAutoAllow(bool State); /*wlacza/wylacza zezwolenie na automatyczne sypanie piasku*/
|
||||
|
||||
/*! zbijanie czuwaka/SHP*/
|
||||
void SecuritySystemReset(void);
|
||||
void SecuritySystemCheck(double dt);
|
||||
|
||||
bool BatterySwitch(bool State, range_t const Notify = range_t::consist);
|
||||
bool BatterySwitch(bool State, range_t Notify = range_t::consist);
|
||||
bool EpFuseSwitch(bool State);
|
||||
bool SpringBrakeActivate(bool State);
|
||||
bool SpringBrakeShutOff(bool State);
|
||||
@@ -2378,20 +2378,20 @@ class TMoverParameters
|
||||
/*! stopnie hamowania - hamulec zasadniczy*/
|
||||
bool IncBrakeLevelOld(void);
|
||||
bool DecBrakeLevelOld(void);
|
||||
bool IncLocalBrakeLevel(float const CtrlSpeed);
|
||||
bool DecLocalBrakeLevel(float const CtrlSpeed);
|
||||
bool IncLocalBrakeLevel(float CtrlSpeed);
|
||||
bool DecLocalBrakeLevel(float CtrlSpeed);
|
||||
/*! ABu 010205: - skrajne polozenia ham. pomocniczego*/
|
||||
bool IncManualBrakeLevel(int CtrlSpeed);
|
||||
bool DecManualBrakeLevel(int CtrlSpeed);
|
||||
/*! oddzielny nastawnik hamulca elektrodynamicznego (gdy SplitEDPneumaticBrake)*/
|
||||
bool IncDynamicBrakeLevel(float const CtrlSpeed);
|
||||
bool DecDynamicBrakeLevel(float const CtrlSpeed);
|
||||
bool IncDynamicBrakeLevel(float CtrlSpeed);
|
||||
bool DecDynamicBrakeLevel(float CtrlSpeed);
|
||||
bool DynamicBrakeLevelSet(double Position);
|
||||
double DynamicBrakeRatio(void) const;
|
||||
bool DynamicBrakeAvailable(void) const; /*czy ED dostepny w aktualnym oknie predkosci Vh0..Vh1*/
|
||||
bool DynamicBrakeSwitch(bool Switch);
|
||||
bool RadiostopSwitch(bool Switch);
|
||||
bool AlarmChainSwitch(bool const State);
|
||||
bool AlarmChainSwitch(bool State);
|
||||
bool AntiSlippingBrake(void);
|
||||
bool BrakeReleaser(int state);
|
||||
bool UniversalBrakeButton(int button, int state); /*uniwersalny przycisk hamulca*/
|
||||
@@ -2423,54 +2423,54 @@ class TMoverParameters
|
||||
double BrakeForceR(double ratio, double velocity);
|
||||
double BrakeForceP(double press, double velocity);
|
||||
double BrakeForce(const TTrackParam &Track);
|
||||
double CouplerForce(int const End, double dt);
|
||||
void CollisionDetect(int const End, double const dt);
|
||||
double CouplerForce(int End, double dt);
|
||||
void CollisionDetect(int End, double dt);
|
||||
/*obrot kol uwzgledniajacy poslizg*/
|
||||
double ComputeRotatingWheel(double WForce, double dt, double n) const;
|
||||
|
||||
/*--funkcje dla lokomotyw*/
|
||||
bool WaterPumpBreakerSwitch(bool State, range_t const Notify = range_t::consist); // water pump breaker state toggle
|
||||
bool WaterPumpSwitch(bool State, range_t const Notify = range_t::consist); // water pump state toggle
|
||||
bool WaterPumpSwitchOff(bool State, range_t const Notify = range_t::consist); // water pump state toggle
|
||||
bool WaterHeaterBreakerSwitch(bool State, range_t const Notify = range_t::consist); // water heater breaker state toggle
|
||||
bool WaterHeaterSwitch(bool State, range_t const Notify = range_t::consist); // water heater state toggle
|
||||
bool WaterCircuitsLinkSwitch(bool State, range_t const Notify = range_t::consist); // water circuits link state toggle
|
||||
bool FuelPumpSwitch(bool State, range_t const Notify = range_t::consist); // fuel pump state toggle
|
||||
bool FuelPumpSwitchOff(bool State, range_t const Notify = range_t::consist); // fuel pump state toggle
|
||||
bool OilPumpSwitch(bool State, range_t const Notify = range_t::consist); // oil pump state toggle
|
||||
bool OilPumpSwitchOff(bool State, range_t const Notify = range_t::consist); // oil pump state toggle
|
||||
bool MotorBlowersSwitch(bool State, end const Side, range_t const Notify = range_t::consist); // traction motor fan state toggle
|
||||
bool MotorBlowersSwitchOff(bool State, end const Side, range_t const Notify = range_t::consist); // traction motor fan state toggle
|
||||
bool CompartmentLightsSwitch(bool State, range_t const Notify = range_t::consist); // compartment lights state toggle
|
||||
bool CompartmentLightsSwitchOff(bool State, range_t const Notify = range_t::consist); // compartment lights state toggle
|
||||
bool MainSwitch(bool const State, range_t const Notify = range_t::consist); /*! wylacznik glowny*/
|
||||
void MainSwitch_(bool const State);
|
||||
bool WaterPumpBreakerSwitch(bool State, range_t Notify = range_t::consist); // water pump breaker state toggle
|
||||
bool WaterPumpSwitch(bool State, range_t Notify = range_t::consist); // water pump state toggle
|
||||
bool WaterPumpSwitchOff(bool State, range_t Notify = range_t::consist); // water pump state toggle
|
||||
bool WaterHeaterBreakerSwitch(bool State, range_t Notify = range_t::consist); // water heater breaker state toggle
|
||||
bool WaterHeaterSwitch(bool State, range_t Notify = range_t::consist); // water heater state toggle
|
||||
bool WaterCircuitsLinkSwitch(bool State, range_t Notify = range_t::consist); // water circuits link state toggle
|
||||
bool FuelPumpSwitch(bool State, range_t Notify = range_t::consist); // fuel pump state toggle
|
||||
bool FuelPumpSwitchOff(bool State, range_t Notify = range_t::consist); // fuel pump state toggle
|
||||
bool OilPumpSwitch(bool State, range_t Notify = range_t::consist); // oil pump state toggle
|
||||
bool OilPumpSwitchOff(bool State, range_t Notify = range_t::consist); // oil pump state toggle
|
||||
bool MotorBlowersSwitch(bool State, end Side, range_t Notify = range_t::consist); // traction motor fan state toggle
|
||||
bool MotorBlowersSwitchOff(bool State, end Side, range_t Notify = range_t::consist); // traction motor fan state toggle
|
||||
bool CompartmentLightsSwitch(bool State, range_t Notify = range_t::consist); // compartment lights state toggle
|
||||
bool CompartmentLightsSwitchOff(bool State, range_t Notify = range_t::consist); // compartment lights state toggle
|
||||
bool MainSwitch(bool State, range_t Notify = range_t::consist); /*! wylacznik glowny*/
|
||||
void MainSwitch_(bool State);
|
||||
bool MainSwitchCheck() const; // checks conditions for closing the line breaker
|
||||
bool ConverterSwitch(bool State, range_t const Notify = range_t::consist); /*! wl/wyl przetwornicy*/
|
||||
bool CompressorSwitch(bool State, range_t const Notify = range_t::consist); /*! wl/wyl sprezarki*/
|
||||
bool ChangeCompressorPreset(int const Change, range_t const Notify = range_t::consist);
|
||||
bool HeatingSwitch(bool const State, range_t const Notify = range_t::consist);
|
||||
void HeatingSwitch_(bool const State);
|
||||
bool ConverterSwitch(bool State, range_t Notify = range_t::consist); /*! wl/wyl przetwornicy*/
|
||||
bool CompressorSwitch(bool State, range_t Notify = range_t::consist); /*! wl/wyl sprezarki*/
|
||||
bool ChangeCompressorPreset(int Change, range_t Notify = range_t::consist);
|
||||
bool HeatingSwitch(bool State, range_t Notify = range_t::consist);
|
||||
void HeatingSwitch_(bool State);
|
||||
double EnginePowerSourceVoltage() const; // returns voltage of defined main engine power source
|
||||
|
||||
/*-funkcje typowe dla lokomotywy elektrycznej*/
|
||||
void LowVoltagePowerCheck(double const Deltatime);
|
||||
void MainsCheck(double const Deltatime);
|
||||
void PowerCouplersCheck(double const Deltatime, coupling const Coupling);
|
||||
void ConverterCheck(double const Timestep); // przetwornica
|
||||
void HeatingCheck(double const Timestep);
|
||||
void WaterPumpCheck(double const Timestep);
|
||||
void WaterHeaterCheck(double const Timestep);
|
||||
void FuelPumpCheck(double const Timestep);
|
||||
void OilPumpCheck(double const Timestep);
|
||||
void MotorBlowersCheck(double const Timestep);
|
||||
void PantographsCheck(double const Timestep);
|
||||
void LightsCheck(double const Timestep);
|
||||
bool FuseOn(range_t const Notify = range_t::consist); // bezpiecznik nadamiary
|
||||
void LowVoltagePowerCheck(double Deltatime);
|
||||
void MainsCheck(double Deltatime);
|
||||
void PowerCouplersCheck(double Deltatime, coupling Coupling);
|
||||
void ConverterCheck(double Timestep); // przetwornica
|
||||
void HeatingCheck(double Timestep);
|
||||
void WaterPumpCheck(double Timestep);
|
||||
void WaterHeaterCheck(double Timestep);
|
||||
void FuelPumpCheck(double Timestep);
|
||||
void OilPumpCheck(double Timestep);
|
||||
void MotorBlowersCheck(double Timestep);
|
||||
void PantographsCheck(double Timestep);
|
||||
void LightsCheck(double Timestep);
|
||||
bool FuseOn(range_t Notify = range_t::consist); // bezpiecznik nadamiary
|
||||
bool FuseFlagCheck(void) const; // sprawdzanie flagi nadmiarowego
|
||||
void FuseOff(void); // wylaczenie nadmiarowego
|
||||
bool UniversalResetButton(int const Button, range_t const Notify = range_t::consist);
|
||||
bool RelayReset(int const Relays, range_t const Notify = range_t::consist); // resets specified relays
|
||||
bool UniversalResetButton(int Button, range_t Notify = range_t::consist);
|
||||
bool RelayReset(int Relays, range_t Notify = range_t::consist); // resets specified relays
|
||||
double ShowCurrent(int AmpN) const; // pokazuje bezwgl. wartosc pradu na wybranym amperomierzu
|
||||
double ShowCurrentP(int AmpN) const; // pokazuje bezwgl. wartosc pradu w wybranym pojezdzie //Q 20160722
|
||||
|
||||
@@ -2484,16 +2484,16 @@ class TMoverParameters
|
||||
|
||||
bool CutOffEngine(void); // odlaczenie udszkodzonych silnikow
|
||||
/*funkcje automatycznego rozruchu np EN57*/
|
||||
bool MaxCurrentSwitch(bool State, range_t const Notify = range_t::consist); // przelacznik pradu wysokiego rozruchu
|
||||
bool MaxCurrentSwitch(bool State, range_t Notify = range_t::consist); // przelacznik pradu wysokiego rozruchu
|
||||
bool MinCurrentSwitch(bool State); // przelacznik pradu automatycznego rozruchu
|
||||
bool AutoRelaySwitch(bool State); // przelacznik automatycznego rozruchu
|
||||
bool AutoRelayCheck(); // symulacja automatycznego rozruchu
|
||||
bool MotorConnectorsCheck();
|
||||
bool ResistorsFlagCheck(void) const; // sprawdzenie kontrolki oporow rozruchowych NBMX
|
||||
|
||||
bool OperatePantographsValve(operation_t const State, range_t const Notify = range_t::consist);
|
||||
bool OperatePantographValve(end const End, operation_t const State, range_t const Notify = range_t::consist);
|
||||
bool DropAllPantographs(bool const State, range_t const Notify = range_t::consist);
|
||||
bool OperatePantographsValve(operation_t State, range_t Notify = range_t::consist);
|
||||
bool OperatePantographValve(end End, operation_t State, range_t Notify = range_t::consist);
|
||||
bool DropAllPantographs(bool State, range_t Notify = range_t::consist);
|
||||
|
||||
void CheckEIMIC(double dt); // sprawdzenie i zmiana nastawy zintegrowanego nastawnika jazdy/hamowania
|
||||
void CheckSpeedCtrl(double dt);
|
||||
@@ -2510,23 +2510,23 @@ class TMoverParameters
|
||||
double dizel_fillcheck(int mcp, double dt);
|
||||
double dizel_Momentum(double dizel_fill, double n, double dt);
|
||||
double dizel_MomentumRetarder(double n, double dt); // moment hamowania retardera
|
||||
void dizel_HeatSet(float const Value);
|
||||
void dizel_Heat(double const dt);
|
||||
void dizel_HeatSet(float Value);
|
||||
void dizel_Heat(double dt);
|
||||
bool dizel_StartupCheck();
|
||||
bool dizel_Update(double dt);
|
||||
|
||||
/* funckje dla wagonow*/
|
||||
bool AssignLoad(std::string const &Name, float const Amount = 0.f);
|
||||
bool AssignLoad(std::string const &Name, float Amount = 0.f);
|
||||
bool LoadingDone(double LSpeed, std::string const &Loadname);
|
||||
bool PermitDoors(side const Door, bool const State = true, range_t const Notify = range_t::consist);
|
||||
void PermitDoors_(side const Door, bool const State = true);
|
||||
bool ChangeDoorPermitPreset(int const Change, range_t const Notify = range_t::consist);
|
||||
bool PermitDoorStep(bool const State, range_t const Notify = range_t::consist);
|
||||
bool ChangeDoorControlMode(bool const State, range_t const Notify = range_t::consist);
|
||||
bool OperateDoors(side const Door, bool const State, range_t const Notify = range_t::consist);
|
||||
bool LockDoors(bool const State, range_t const Notify = range_t::consist);
|
||||
bool signal_departure(bool const State, range_t const Notify = range_t::consist); // toggles departure warning
|
||||
void update_doors(double const Deltatime); // door controller update
|
||||
bool PermitDoors(side Door, bool State = true, range_t Notify = range_t::consist);
|
||||
void PermitDoors_(side Door, bool State = true);
|
||||
bool ChangeDoorPermitPreset(int Change, range_t Notify = range_t::consist);
|
||||
bool PermitDoorStep(bool State, range_t Notify = range_t::consist);
|
||||
bool ChangeDoorControlMode(bool State, range_t Notify = range_t::consist);
|
||||
bool OperateDoors(side Door, bool State, range_t Notify = range_t::consist);
|
||||
bool LockDoors(bool State, range_t Notify = range_t::consist);
|
||||
bool signal_departure(bool State, range_t Notify = range_t::consist); // toggles departure warning
|
||||
void update_doors(double Deltatime); // door controller update
|
||||
|
||||
/* funkcje dla samochodow*/
|
||||
bool ChangeOffsetH(double DeltaOffset);
|
||||
@@ -2543,7 +2543,7 @@ class TMoverParameters
|
||||
void LoadFIZ_Wheels(std::string const &line);
|
||||
void LoadFIZ_Brake(std::string const &line);
|
||||
void LoadFIZ_Doors(std::string const &line);
|
||||
void LoadFIZ_BuffCoupl(std::string const &line, int const Index);
|
||||
void LoadFIZ_BuffCoupl(std::string const &line, int Index);
|
||||
void LoadFIZ_TurboPos(std::string const &line);
|
||||
void LoadFIZ_Cntrl(std::string const &line);
|
||||
void LoadFIZ_Blending(std::string const &line);
|
||||
@@ -2568,7 +2568,7 @@ class TMoverParameters
|
||||
void LoadFIZ_LightsList(std::string const &Input);
|
||||
void LoadFIZ_DimmerList(std::string const &Input);
|
||||
void LoadFIZ_CompressorList(std::string const &Input);
|
||||
void LoadFIZ_PowerParamsDecode(TPowerParameters &Powerparameters, std::string const Prefix, std::string const &Input);
|
||||
void LoadFIZ_PowerParamsDecode(TPowerParameters &Powerparameters, std::string Prefix, std::string const &Input);
|
||||
TPowerType LoadFIZ_PowerDecode(std::string const &Power);
|
||||
TPowerSource LoadFIZ_SourceDecode(std::string const &Source);
|
||||
TEngineType LoadFIZ_EngineDecode(std::string const &Engine);
|
||||
|
||||
@@ -103,7 +103,7 @@ class TPrzeciwposlizg : public TRura // przy napelnianiu - rura, przy poslizgu -
|
||||
public:
|
||||
void SetPoslizg(bool flag);
|
||||
void Update(double dt) /*override*/;
|
||||
inline TPrzeciwposlizg() : TRura()
|
||||
TPrzeciwposlizg() : TRura()
|
||||
{
|
||||
Poslizg = false;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ class TRapid : public TPrzekladnik {
|
||||
void SetRapidParams(double mult, double size);
|
||||
void SetRapidStatus(bool rs);
|
||||
void Update(double dt) /*override*/;
|
||||
inline TRapid() :
|
||||
TRapid() :
|
||||
TPrzekladnik()
|
||||
{}
|
||||
};
|
||||
@@ -137,7 +137,7 @@ class TPrzekCiagly : public TPrzekladnik {
|
||||
public:
|
||||
void SetMult(double m);
|
||||
void Update(double dt) /*override*/;
|
||||
inline TPrzekCiagly() :
|
||||
TPrzekCiagly() :
|
||||
TPrzekladnik()
|
||||
{}
|
||||
};
|
||||
@@ -151,7 +151,7 @@ class TPrzek_PZZ : public TPrzekladnik {
|
||||
public:
|
||||
void SetLBP(double P);
|
||||
void Update(double dt) /*override*/;
|
||||
inline TPrzek_PZZ() :
|
||||
TPrzek_PZZ() :
|
||||
TPrzekladnik()
|
||||
{}
|
||||
};
|
||||
@@ -175,7 +175,7 @@ class TPrzekED : public TRura {
|
||||
public:
|
||||
void SetP(double P);
|
||||
void Update(double dt) /*override*/;
|
||||
inline TPrzekED() :
|
||||
TPrzekED() :
|
||||
TRura()
|
||||
{}
|
||||
};
|
||||
@@ -205,25 +205,25 @@ class TNESt3 : public TBrake {
|
||||
double LBP = 0.0; // cisnienie hamulca pomocniczego
|
||||
|
||||
public:
|
||||
inline TNESt3(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) :
|
||||
TNESt3(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) :
|
||||
TBrake( i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
{}
|
||||
void Init( double const PP, double const HPP, double const LPP, double const BP, int const BDF ) /*override*/;
|
||||
virtual double GetPF( double const PP, double const dt, double const Vel ) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
void Init( double PP, double HPP, double LPP, double BP, int BDF ) /*override*/;
|
||||
virtual double GetPF( double PP, double dt, double Vel ) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
void EStParams(double i_crc); // parametry charakterystyczne dla ESt
|
||||
virtual double GetCRP() /*override*/;
|
||||
void CheckState(double const BCP, double &dV1); // glowny przyrzad rozrzadczy
|
||||
void CheckReleaser(double const dt); // odluzniacz
|
||||
double CVs(double const BP); // napelniacz sterujacego
|
||||
double BVs(double const BCP); // napelniacz pomocniczego
|
||||
void SetSize( int const size, std::string const ¶ms ); // ustawianie dysz (rozmiaru ZR), przekladniki
|
||||
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej
|
||||
void CheckState(double BCP, double &dV1); // glowny przyrzad rozrzadczy
|
||||
void CheckReleaser(double dt); // odluzniacz
|
||||
double CVs(double BP); // napelniacz sterujacego
|
||||
double BVs(double BCP); // napelniacz pomocniczego
|
||||
void SetSize( int size, std::string const ¶ms ); // ustawianie dysz (rozmiaru ZR), przekladniki
|
||||
void PLC(double mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
void SetLP(double TM, double LM, double TBP); // parametry przystawki wazacej
|
||||
virtual void ForceEmptiness() /*override*/; // wymuszenie bycia pustym
|
||||
void SetLBP(double const P); // cisnienie z hamulca pomocniczego
|
||||
void SetLBP(double P); // cisnienie z hamulca pomocniczego
|
||||
};
|
||||
|
||||
extern double d2A( double const d );
|
||||
extern double d2A( double d );
|
||||
|
||||
#endif // INCLUDED_OERLIKON_EST_H
|
||||
// END
|
||||
|
||||
@@ -376,7 +376,7 @@ class TBrake
|
||||
/// <param name="LPP">Low pressure threshold [bar].</param>
|
||||
/// <param name="BP">Initial brake cylinder pressure [bar].</param>
|
||||
/// <param name="BDF">Initial brake delay flag.</param>
|
||||
virtual void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF); // inicjalizacja hamulca
|
||||
virtual void Init(double PP, double HPP, double LPP, double BP, int BDF); // inicjalizacja hamulca
|
||||
|
||||
/// <summary>
|
||||
/// Returns the current friction coefficient between blocks and the wheel/disc.
|
||||
@@ -385,7 +385,7 @@ class TBrake
|
||||
/// <param name="Vel">Current vehicle velocity [m/s or km/h depending on FM].</param>
|
||||
/// <param name="N">Normal force on the block [N].</param>
|
||||
/// <returns>Friction coefficient.</returns>
|
||||
double GetFC(double const Vel, double const N); // wspolczynnik tarcia - hamulec wie lepiej
|
||||
double GetFC(double Vel, double N); // wspolczynnik tarcia - hamulec wie lepiej
|
||||
/// <summary>
|
||||
/// Advances the brake distributor for one simulation step and returns the net
|
||||
/// volume exchanged with the brake pipe (positive = drawn from the brake pipe).
|
||||
@@ -394,7 +394,7 @@ class TBrake
|
||||
/// <param name="dt">Time step [s].</param>
|
||||
/// <param name="Vel">Vehicle velocity [m/s].</param>
|
||||
/// <returns>Volume exchanged between the valve pre-chamber and the brake pipe.</returns>
|
||||
virtual double GetPF(double const PP, double const dt, double const Vel); // przeplyw miedzy komora wstepna i PG
|
||||
virtual double GetPF(double PP, double dt, double Vel); // przeplyw miedzy komora wstepna i PG
|
||||
/// <summary>
|
||||
/// Returns the piston force produced by the brake cylinder pressure.
|
||||
/// </summary>
|
||||
@@ -406,7 +406,7 @@ class TBrake
|
||||
/// <param name="HP">High-pressure source pressure [bar].</param>
|
||||
/// <param name="dt">Time step [s].</param>
|
||||
/// <returns>Net flow from the high-pressure line.</returns>
|
||||
virtual double GetHPFlow(double const HP, double const dt); // przeplyw - 8 bar
|
||||
virtual double GetHPFlow(double HP, double dt); // przeplyw - 8 bar
|
||||
/// <summary>Returns brake cylinder gauge pressure [bar].</summary>
|
||||
double GetBCP(); // cisnienie cylindrow hamulcowych
|
||||
/// <summary>
|
||||
@@ -425,12 +425,12 @@ class TBrake
|
||||
/// </summary>
|
||||
/// <param name="nBDF">Requested delay flag (bdelay_*).</param>
|
||||
/// <returns>True if accepted (mode supported and changed); false otherwise.</returns>
|
||||
bool SetBDF(int const nBDF); // nastawiacz GPRM
|
||||
bool SetBDF(int nBDF); // nastawiacz GPRM
|
||||
/// <summary>
|
||||
/// Engages or disengages the releaser (odluzniacz), updating the brake state flags.
|
||||
/// </summary>
|
||||
/// <param name="state">1 to engage releaser, 0 to disengage.</param>
|
||||
void Releaser(int const state); // odluzniacz
|
||||
void Releaser(int state); // odluzniacz
|
||||
/// <summary>Returns true if the releaser is currently engaged.</summary>
|
||||
bool Releaser() const;
|
||||
/// <summary>
|
||||
@@ -438,7 +438,7 @@ class TBrake
|
||||
/// Default no-op; overridden by EP-capable distributors.
|
||||
/// </summary>
|
||||
/// <param name="nEPS">EP intensity (typically -1..1).</param>
|
||||
virtual void SetEPS(double const nEPS); // hamulec EP
|
||||
virtual void SetEPS(double nEPS); // hamulec EP
|
||||
/// <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
|
||||
@@ -471,14 +471,14 @@ class TBrake
|
||||
int GetStatus(); // flaga statusu, moze sie przydac do odglosow
|
||||
/// <summary>Sets the anti-slip target pressure.</summary>
|
||||
/// <param name="Press">Pressure [bar].</param>
|
||||
void SetASBP(double const Press); // ustalenie cisnienia pp
|
||||
void SetASBP(double Press); // ustalenie cisnienia pp
|
||||
/// <summary>Vents all reservoirs to zero pressure (used when the vehicle is decoupled or reset).</summary>
|
||||
virtual void ForceEmptiness();
|
||||
/// <summary>
|
||||
/// Removes a specified relative amount of air from the reservoirs to simulate leaks.
|
||||
/// </summary>
|
||||
/// <param name="Amount">Fraction of pressure to bleed (0..1) per call.</param>
|
||||
virtual void ForceLeak(double const Amount);
|
||||
virtual void ForceLeak(double Amount);
|
||||
/// <summary>Returns and clears the accumulated SoundFlag bitfield.</summary>
|
||||
int GetSoundFlag();
|
||||
/// <summary>Returns the current brake status flags.</summary>
|
||||
@@ -537,26 +537,26 @@ class TWest : public TBrake
|
||||
/// <param name="LPP">Low pressure.</param>
|
||||
/// <param name="BP">Initial cylinder pressure.</param>
|
||||
/// <param name="BDF">Initial brake delay flag.</param>
|
||||
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/;
|
||||
void Init(double PP, double HPP, double LPP, double BP, int BDF) /*override*/;
|
||||
/// <summary>Sets the auxiliary brake target pressure and engages the DCV when above cylinder.</summary>
|
||||
/// <param name="P">Pressure [bar].</param>
|
||||
void SetLBP(double const P); // cisnienie z hamulca pomocniczego
|
||||
void SetLBP(double P); // cisnienie z hamulca pomocniczego
|
||||
/// <summary>One-step distributor advance (Westinghouse logic).</summary>
|
||||
/// <returns>Net flow exchanged with the brake pipe.</returns>
|
||||
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
double GetPF(double PP, double dt, double Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
/// <summary>Returns the high-pressure flow drawn during the last GetPF step.</summary>
|
||||
double GetHPFlow(double const HP, double const dt) /*override*/;
|
||||
double GetHPFlow(double HP, double dt) /*override*/;
|
||||
/// <summary>Recomputes the load-weighing pressure coefficient for the current mass.</summary>
|
||||
/// <param name="mass">Vehicle mass.</param>
|
||||
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
void PLC(double mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
/// <summary>Sets the EP brake state and toggles the DCV / latches LBP from cylinder pressure on release.</summary>
|
||||
/// <param name="nEPS">New EP intensity.</param>
|
||||
void SetEPS(double const nEPS) /*override*/; // stan hamulca EP
|
||||
void SetEPS(double nEPS) /*override*/; // stan hamulca EP
|
||||
/// <summary>Stores the load-weighing parameters (TareM, LoadM, TareBP).</summary>
|
||||
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej
|
||||
void SetLP(double TM, double LM, double TBP); // parametry przystawki wazacej
|
||||
|
||||
/// <summary>Constructs the distributor by forwarding all parameters to TBrake.</summary>
|
||||
inline TWest(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {}
|
||||
TWest(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -576,10 +576,10 @@ class TESt : public TBrake
|
||||
|
||||
public:
|
||||
/// <summary>Initialises the ESt distributor; sizes the control reservoir (15 l) and computes BVM.</summary>
|
||||
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/;
|
||||
void Init(double PP, double HPP, double LPP, double BP, int BDF) /*override*/;
|
||||
/// <summary>One-step distributor advance for the ESt baseline.</summary>
|
||||
/// <returns>Net flow exchanged with the brake pipe.</returns>
|
||||
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
double GetPF(double PP, double dt, double Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
/// <summary>Sets ESt-specific characteristic parameters (placeholder; used by some variants).</summary>
|
||||
/// <param name="i_crc">Characteristic value.</param>
|
||||
void EStParams(double i_crc); // parametry charakterystyczne dla ESt
|
||||
@@ -614,7 +614,7 @@ class TESt : public TBrake
|
||||
void ForceEmptiness() /*override*/; // wymuszenie bycia pustym
|
||||
|
||||
/// <summary>Constructs the ESt distributor and creates the control reservoir.</summary>
|
||||
inline TESt(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
TESt(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
{
|
||||
CntrlRes = std::make_shared<TReservoir>();
|
||||
}
|
||||
@@ -633,10 +633,10 @@ class TESt3 : public TESt
|
||||
public:
|
||||
/// <summary>One-step distributor advance for ESt3 (G/P-dependent fill/release curves).</summary>
|
||||
/// <returns>Net flow exchanged with the brake pipe.</returns>
|
||||
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
double GetPF(double PP, double dt, double Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
|
||||
/// <summary>Constructs the ESt3 distributor.</summary>
|
||||
inline TESt3(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {}
|
||||
TESt3(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -660,16 +660,16 @@ class TESt3AL2 : public TESt3
|
||||
|
||||
public:
|
||||
/// <summary>Initialises the impulse chamber on top of the ESt initialisation.</summary>
|
||||
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/;
|
||||
void Init(double PP, double HPP, double LPP, double BP, int BDF) /*override*/;
|
||||
/// <summary>One-step distributor advance for ESt3/AL2 with load-weighing relay.</summary>
|
||||
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
double GetPF(double PP, double dt, double Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
/// <summary>Recomputes LoadC for the current vehicle mass.</summary>
|
||||
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
void PLC(double mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
/// <summary>Stores the load-weighing parameters.</summary>
|
||||
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej
|
||||
void SetLP(double TM, double LM, double TBP); // parametry przystawki wazacej
|
||||
|
||||
/// <summary>Constructs the distributor and creates the impulse chamber.</summary>
|
||||
inline TESt3AL2(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt3(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
TESt3AL2(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt3(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
{
|
||||
ImplsRes = std::make_shared<TReservoir>();
|
||||
}
|
||||
@@ -695,12 +695,12 @@ class TESt4R : public TESt
|
||||
|
||||
public:
|
||||
/// <summary>Initialises the ESt4R; sizes the impulse chamber and selects the R delay.</summary>
|
||||
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/;
|
||||
void Init(double PP, double HPP, double LPP, double BP, int BDF) /*override*/;
|
||||
/// <summary>One-step distributor advance for ESt4R (rapid step active above velocity threshold).</summary>
|
||||
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
double GetPF(double PP, double dt, double Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
|
||||
/// <summary>Constructs the distributor and creates the impulse chamber.</summary>
|
||||
inline TESt4R(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
TESt4R(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
{
|
||||
ImplsRes = std::make_shared<TReservoir>();
|
||||
}
|
||||
@@ -726,24 +726,24 @@ class TLSt : public TESt4R
|
||||
|
||||
public:
|
||||
/// <summary>Initialises the LSt; resizes the valve and impulse reservoirs and presets pressures.</summary>
|
||||
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/;
|
||||
void Init(double PP, double HPP, double LPP, double BP, int BDF) /*override*/;
|
||||
/// <summary>Sets the auxiliary brake target pressure for the DCV.</summary>
|
||||
void SetLBP(double const P); // cisnienie z hamulca pomocniczego
|
||||
void SetLBP(double P); // cisnienie z hamulca pomocniczego
|
||||
/// <summary>Sets the rapid step ratio (RM = 1 - RMR).</summary>
|
||||
/// <param name="RMR">Reduction ratio (0 disables rapid, > 0 enables).</param>
|
||||
void SetRM(double const RMR); // ustalenie przelozenia rapida
|
||||
void SetRM(double RMR); // ustalenie przelozenia rapida
|
||||
/// <summary>One-step distributor advance for LSt (DCV + rapid + ED release).</summary>
|
||||
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
double GetPF(double PP, double dt, double Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
/// <summary>Computes the high-pressure inflow (replenishes the auxiliary reservoir from the main line).</summary>
|
||||
double GetHPFlow(double const HP, double const dt) /*override*/; // przeplyw - 8 bar
|
||||
double GetHPFlow(double HP, double dt) /*override*/; // przeplyw - 8 bar
|
||||
/// <summary>Returns the brake-cylinder reference pressure used by the ED brake controller (CVP-BCP * BVM).</summary>
|
||||
virtual double GetEDBCP(); // cisnienie tylko z hamulca zasadniczego, uzywane do hamulca ED w EP09
|
||||
/// <summary>Sets the ED brake state used to relax the pneumatic brake.</summary>
|
||||
/// <param name="EDstate">ED intensity (0..1).</param>
|
||||
virtual void SetED(double const EDstate); // stan hamulca ED do luzowania
|
||||
virtual void SetED(double EDstate); // stan hamulca ED do luzowania
|
||||
|
||||
/// <summary>Constructs the LSt distributor.</summary>
|
||||
inline TLSt(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt4R(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {}
|
||||
TLSt(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt4R(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -774,18 +774,18 @@ class TEStED : public TLSt
|
||||
|
||||
public:
|
||||
/// <summary>Initialises the EStED — sets up Miedzypoj, ImplsRes and the nozzle characteristics.</summary>
|
||||
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/;
|
||||
void Init(double PP, double HPP, double LPP, double BP, int BDF) /*override*/;
|
||||
/// <summary>One-step distributor advance for EStED (full EP09 logic with intermediate reservoir).</summary>
|
||||
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
double GetPF(double PP, double dt, double Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
/// <summary>Returns ED-brake reference pressure (ImplsRes pressure scaled by load coefficient).</summary>
|
||||
double GetEDBCP() /*override*/; // cisnienie tylko z hamulca zasadniczego, uzywane do hamulca ED
|
||||
/// <summary>Recomputes LoadC for the current vehicle mass.</summary>
|
||||
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
void PLC(double mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
/// <summary>Stores the load-weighing parameters.</summary>
|
||||
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej
|
||||
void SetLP(double TM, double LM, double TBP); // parametry przystawki wazacej
|
||||
|
||||
/// <summary>Constructs the distributor and creates the intermediate reservoir.</summary>
|
||||
inline TEStED(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TLSt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
TEStED(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TLSt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
{
|
||||
Miedzypoj = std::make_shared<TReservoir>();
|
||||
}
|
||||
@@ -812,21 +812,21 @@ class TEStEP2 : public TLSt
|
||||
|
||||
public:
|
||||
/// <summary>Initialises the EP2-equipped distributor (impulse chamber, P delay).</summary>
|
||||
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/; // inicjalizacja
|
||||
void Init(double PP, double HPP, double LPP, double BP, int BDF) /*override*/; // inicjalizacja
|
||||
/// <summary>One-step distributor advance with EP2 EP brake logic.</summary>
|
||||
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
double GetPF(double PP, double dt, double Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
/// <summary>Recomputes LoadC for the current vehicle mass.</summary>
|
||||
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
void PLC(double mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
/// <summary>Sets EP intensity; if EP is active and LBP < cylinder pressure, latches LBP from cylinder.</summary>
|
||||
void SetEPS(double const nEPS) /*override*/; // stan hamulca EP
|
||||
void SetEPS(double nEPS) /*override*/; // stan hamulca EP
|
||||
/// <summary>Stores the load-weighing parameters.</summary>
|
||||
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej
|
||||
void SetLP(double TM, double LM, double TBP); // parametry przystawki wazacej
|
||||
/// <summary>EP brake flow integration step. Override in EP1 for proportional control.</summary>
|
||||
/// <param name="dt">Time step [s].</param>
|
||||
void virtual EPCalc(double dt);
|
||||
|
||||
/// <summary>Constructs the EP2 distributor.</summary>
|
||||
inline TEStEP2(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TLSt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {}
|
||||
TEStEP2(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TLSt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -842,10 +842,10 @@ class TEStEP1 : public TEStEP2
|
||||
void EPCalc(double dt);
|
||||
/// <summary>Stores the EP intensity.</summary>
|
||||
/// <param name="nEPS">Target EP value (integer part = direction, fractional part = magnitude).</param>
|
||||
void SetEPS(double const nEPS) override; // stan hamulca EP
|
||||
void SetEPS(double nEPS) override; // stan hamulca EP
|
||||
|
||||
/// <summary>Constructs the EP1 distributor.</summary>
|
||||
inline TEStEP1(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TEStEP2(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
TEStEP1(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TEStEP2(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
{
|
||||
}
|
||||
};
|
||||
@@ -867,24 +867,24 @@ class TCV1 : public TBrake
|
||||
|
||||
public:
|
||||
/// <summary>Initialises the CV1 distributor (sizes ZS, sets pressures, computes BVM).</summary>
|
||||
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/;
|
||||
void Init(double PP, double HPP, double LPP, double BP, int BDF) /*override*/;
|
||||
/// <summary>One-step distributor advance for the CV1 baseline.</summary>
|
||||
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
double GetPF(double PP, double dt, double Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
/// <summary>Returns the control reservoir (ZS) pressure.</summary>
|
||||
double GetCRP() /*override*/;
|
||||
/// <summary>Updates BrakeStatus based on pre-chamber/cylinder/control reservoir relations and the releaser.</summary>
|
||||
/// <param name="BCP">Cylinder (or impulse) pressure.</param>
|
||||
/// <param name="dV1">In/out brake pipe flow correction.</param>
|
||||
void CheckState(double const BCP, double &dV1);
|
||||
void CheckState(double BCP, double &dV1);
|
||||
/// <summary>Returns the ZS-filling slide valve opening factor for the given cylinder pressure.</summary>
|
||||
double CVs(double const BP);
|
||||
double CVs(double BP);
|
||||
/// <summary>Returns the ZP-filling slide valve opening factor for the given cylinder pressure.</summary>
|
||||
double BVs(double const BCP);
|
||||
double BVs(double BCP);
|
||||
/// <summary>Vents valve, brake and control reservoirs to zero.</summary>
|
||||
void ForceEmptiness() /*override*/; // wymuszenie bycia pustym
|
||||
|
||||
/// <summary>Constructs the CV1 distributor and creates the control reservoir.</summary>
|
||||
inline TCV1(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
TCV1(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
{
|
||||
CntrlRes = std::make_shared<TReservoir>();
|
||||
}
|
||||
@@ -922,16 +922,16 @@ class TCV1L_TR : public TCV1
|
||||
|
||||
public:
|
||||
/// <summary>Initialises the CV1-L-TR (sizes the impulse chamber on top of CV1::Init).</summary>
|
||||
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/;
|
||||
void Init(double PP, double HPP, double LPP, double BP, int BDF) /*override*/;
|
||||
/// <summary>One-step distributor advance for CV1-L-TR (impulse chamber + DCV).</summary>
|
||||
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
double GetPF(double PP, double dt, double Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
/// <summary>Sets the auxiliary brake target pressure for the DCV.</summary>
|
||||
void SetLBP(double const P); // cisnienie z hamulca pomocniczego
|
||||
void SetLBP(double P); // cisnienie z hamulca pomocniczego
|
||||
/// <summary>Computes the high-pressure (8 bar) inflow used to replenish the auxiliary reservoir.</summary>
|
||||
double GetHPFlow(double const HP, double const dt) /*override*/; // przeplyw - 8 bar
|
||||
double GetHPFlow(double HP, double dt) /*override*/; // przeplyw - 8 bar
|
||||
|
||||
/// <summary>Constructs the CV1-L-TR and creates the impulse chamber.</summary>
|
||||
inline TCV1L_TR(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TCV1(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
TCV1L_TR(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TCV1(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
{
|
||||
ImplsRes = std::make_shared<TReservoir>();
|
||||
}
|
||||
@@ -971,34 +971,34 @@ class TKE : public TBrake
|
||||
|
||||
public:
|
||||
/// <summary>Initialises the KE distributor (control / impulse / auxiliary reservoirs and BVM).</summary>
|
||||
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/;
|
||||
void Init(double PP, double HPP, double LPP, double BP, int BDF) /*override*/;
|
||||
/// <summary>Sets the rapid step ratio (RM = 1 - RMR).</summary>
|
||||
void SetRM(double const RMR); // ustalenie przelozenia rapida
|
||||
void SetRM(double RMR); // ustalenie przelozenia rapida
|
||||
/// <summary>One-step distributor advance for the KE distributor.</summary>
|
||||
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
double GetPF(double PP, double dt, double Vel) /*override*/; // przeplyw miedzy komora wstepna i PG
|
||||
/// <summary>Computes the high-pressure (8 bar) inflow used to replenish the auxiliary reservoir.</summary>
|
||||
double GetHPFlow(double const HP, double const dt) /*override*/; // przeplyw - 8 bar
|
||||
double GetHPFlow(double HP, double dt) /*override*/; // przeplyw - 8 bar
|
||||
/// <summary>Returns the control reservoir (ZS) pressure.</summary>
|
||||
double GetCRP() /*override*/;
|
||||
/// <summary>Updates BrakeStatus from cylinder/pre-chamber/control reservoir pressures (KE-specific thresholds).</summary>
|
||||
void CheckState(double const BCP, double &dV1);
|
||||
void CheckState(double BCP, double &dV1);
|
||||
/// <summary>Drives the releaser logic for KE — bleeds the control reservoir while engaged.</summary>
|
||||
void CheckReleaser(double const dt); // odluzniacz
|
||||
void CheckReleaser(double dt); // odluzniacz
|
||||
/// <summary>ZS-filling slide valve opening factor for the given cylinder pressure.</summary>
|
||||
double CVs(double const BP); // napelniacz sterujacego
|
||||
double CVs(double BP); // napelniacz sterujacego
|
||||
/// <summary>ZP-filling slide valve opening factor for the given cylinder pressure.</summary>
|
||||
double BVs(double const BCP); // napelniacz pomocniczego
|
||||
double BVs(double BCP); // napelniacz pomocniczego
|
||||
/// <summary>Recomputes LoadC for the current vehicle mass.</summary>
|
||||
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
void PLC(double mass); // wspolczynnik cisnienia przystawki wazacej
|
||||
/// <summary>Stores the load-weighing parameters.</summary>
|
||||
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej
|
||||
void SetLP(double TM, double LM, double TBP); // parametry przystawki wazacej
|
||||
/// <summary>Sets the auxiliary brake target pressure for the DCV.</summary>
|
||||
void SetLBP(double const P); // cisnienie z hamulca pomocniczego
|
||||
void SetLBP(double P); // cisnienie z hamulca pomocniczego
|
||||
/// <summary>Vents valve, brake, control, impulse and secondary auxiliary reservoirs to zero.</summary>
|
||||
void ForceEmptiness() /*override*/; // wymuszenie bycia pustym
|
||||
|
||||
/// <summary>Constructs the KE distributor and creates the control / impulse / secondary reservoirs.</summary>
|
||||
inline TKE(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
TKE(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
|
||||
{
|
||||
ImplsRes = std::make_shared<TReservoir>();
|
||||
CntrlRes = std::make_shared<TReservoir>();
|
||||
@@ -1085,7 +1085,7 @@ class TDriverHandle
|
||||
/// <param name="flag">Combined ub_* flags.</param>
|
||||
virtual void SetUniversalFlag(int flag); // przycisk uniwersalny
|
||||
/// <summary>Default constructor — clears the Sounds[] array.</summary>
|
||||
inline TDriverHandle()
|
||||
TDriverHandle()
|
||||
{
|
||||
memset(Sounds, 0, sizeof(Sounds));
|
||||
}
|
||||
@@ -1112,7 +1112,7 @@ class TFV4a : public TDriverHandle
|
||||
void Init(double Press) /*override*/;
|
||||
|
||||
/// <summary>Default constructor.</summary>
|
||||
inline TFV4a() : TDriverHandle() {}
|
||||
TFV4a() : TDriverHandle() {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -1163,7 +1163,7 @@ class TFV4aM : public TDriverHandle
|
||||
/// <summary>Returns the regulator pressure (5 + TP*0.08 + RedAdj).</summary>
|
||||
double GetRP();
|
||||
/// <summary>Default constructor.</summary>
|
||||
inline TFV4aM() : TDriverHandle() {}
|
||||
TFV4aM() : TDriverHandle() {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -1217,7 +1217,7 @@ class TMHZ_EN57 : public TDriverHandle
|
||||
/// <summary>Configures handle parameters (auto/manual overcharge, over-pressure, overcharge dynamics).</summary>
|
||||
void SetParams(bool AO, bool MO, double OverP, double, double OMP, double OPD);
|
||||
/// <summary>Default constructor.</summary>
|
||||
inline TMHZ_EN57(void) : TDriverHandle() {}
|
||||
TMHZ_EN57(void) : TDriverHandle() {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -1270,7 +1270,7 @@ class TMHZ_K5P : public TDriverHandle
|
||||
void SetParams(bool AO, bool MO, double, double, double OMP, double OPD); /*ovveride*/
|
||||
|
||||
/// <summary>Default constructor.</summary>
|
||||
inline TMHZ_K5P(void) : TDriverHandle() {}
|
||||
TMHZ_K5P(void) : TDriverHandle() {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -1323,7 +1323,7 @@ class TMHZ_6P : public TDriverHandle
|
||||
void SetParams(bool AO, bool MO, double, double, double OMP, double OPD); /*ovveride*/
|
||||
|
||||
/// <summary>Default constructor.</summary>
|
||||
inline TMHZ_6P(void) : TDriverHandle() {}
|
||||
TMHZ_6P(void) : TDriverHandle() {}
|
||||
};
|
||||
|
||||
/* FBS2= class(TTDriverHandle)
|
||||
@@ -1385,7 +1385,7 @@ class TM394 : public TDriverHandle
|
||||
double GetPos(int i) /*override*/;
|
||||
|
||||
/// <summary>Default constructor — sets the maximum handle position to 5.</summary>
|
||||
inline TM394(void) : TDriverHandle()
|
||||
TM394(void) : TDriverHandle()
|
||||
{
|
||||
i_bcpno = 5;
|
||||
}
|
||||
@@ -1424,7 +1424,7 @@ class TH14K1 : public TDriverHandle
|
||||
double GetPos(int i) /*override*/;
|
||||
|
||||
/// <summary>Default constructor — sets the maximum handle position to 4.</summary>
|
||||
inline TH14K1(void) : TDriverHandle()
|
||||
TH14K1(void) : TDriverHandle()
|
||||
{
|
||||
i_bcpno = 4;
|
||||
}
|
||||
@@ -1463,7 +1463,7 @@ class TSt113 : public TH14K1
|
||||
void Init(double Press) /*override*/;
|
||||
|
||||
/// <summary>Default constructor.</summary>
|
||||
inline TSt113(void) : TH14K1() {}
|
||||
TSt113(void) : TH14K1() {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -1484,7 +1484,7 @@ class Ttest : public TDriverHandle
|
||||
void Init(double Press) /*override*/;
|
||||
|
||||
/// <summary>Default constructor.</summary>
|
||||
inline Ttest(void) : TDriverHandle() {}
|
||||
Ttest(void) : TDriverHandle() {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -1515,7 +1515,7 @@ class TFD1 : public TDriverHandle
|
||||
// procedure Init(press: real; MaxBP: real); overload;
|
||||
|
||||
/// <summary>Default constructor.</summary>
|
||||
inline TFD1(void) : TDriverHandle() {}
|
||||
TFD1(void) : TDriverHandle() {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -1540,7 +1540,7 @@ class TH1405 : public TDriverHandle
|
||||
// procedure Init(press: real; MaxBP: real); overload;
|
||||
|
||||
/// <summary>Default constructor.</summary>
|
||||
inline TH1405(void) : TDriverHandle() {}
|
||||
TH1405(void) : TDriverHandle() {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -1574,7 +1574,7 @@ class TFVel6 : public TDriverHandle
|
||||
void Init(double Press) /*override*/;
|
||||
|
||||
/// <summary>Default constructor.</summary>
|
||||
inline TFVel6(void) : TDriverHandle() {}
|
||||
TFVel6(void) : TDriverHandle() {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -1609,7 +1609,7 @@ class TFVE408 : public TDriverHandle
|
||||
void Init(double Press) /*override*/;
|
||||
|
||||
/// <summary>Default constructor.</summary>
|
||||
inline TFVE408(void) : TDriverHandle() {}
|
||||
TFVE408(void) : TDriverHandle() {}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -1622,7 +1622,7 @@ class TFVE408 : public TDriverHandle
|
||||
/// <param name="S">Effective orifice cross-section.</param>
|
||||
/// <param name="DP">Soft-clip pressure delta — softens flow for tiny PH-PL differences (default 0.25).</param>
|
||||
/// <returns>Volumetric flow rate (signed; positive = P1->P2 direction).</returns>
|
||||
extern double PF(double const P1, double const P2, double const S, double const DP = 0.25);
|
||||
extern double PF(double P1, double P2, double S, double DP = 0.25);
|
||||
/// <summary>
|
||||
/// Variant of <see cref="PF"/> that uses the dimensionless pressure ratio (sg)
|
||||
/// for the soft-clip threshold instead of an absolute pressure delta.
|
||||
@@ -1631,7 +1631,7 @@ extern double PF(double const P1, double const P2, double const S, double const
|
||||
/// <param name="P2">Destination pressure [bar].</param>
|
||||
/// <param name="S">Effective orifice cross-section.</param>
|
||||
/// <returns>Volumetric flow rate.</returns>
|
||||
extern double PF1(double const P1, double const P2, double const S);
|
||||
extern double PF1(double P1, double P2, double S);
|
||||
|
||||
/// <summary>
|
||||
/// Filling valve flow: flows from PH to PL until PL reaches LIM. The valve
|
||||
@@ -1644,7 +1644,7 @@ extern double PF1(double const P1, double const P2, double const S);
|
||||
/// <param name="LIM">Target pressure for PL [bar].</param>
|
||||
/// <param name="DP">Throttling distance from LIM (default 0.1).</param>
|
||||
/// <returns>Flow rate from PH to PL (positive into PL).</returns>
|
||||
extern double PFVa(double PH, double PL, double const S, double LIM, double const DP = 0.1); // zawor napelniajacy z PH do PL, PL do LIM
|
||||
extern double PFVa(double PH, double PL, double S, double LIM, double DP = 0.1); // zawor napelniajacy z PH do PL, PL do LIM
|
||||
/// <summary>
|
||||
/// Venting valve flow: flows from PH to PL until PH falls to LIM. The valve
|
||||
/// throttles smoothly as PH approaches LIM. Returns 0 once PH <= LIM.
|
||||
@@ -1655,4 +1655,4 @@ extern double PFVa(double PH, double PL, double const S, double LIM, double cons
|
||||
/// <param name="LIM">Lower bound for PH [bar].</param>
|
||||
/// <param name="DP">Throttling distance from LIM (default 0.1).</param>
|
||||
/// <returns>Flow rate from PH to PL.</returns>
|
||||
extern double PFVd(double PH, double PL, double const S, double LIM, double const DP = 0.1); // zawor wypuszczajacy z PH do PL, PH do LIM
|
||||
extern double PFVd(double PH, double PL, double S, double LIM, double DP = 0.1); // zawor wypuszczajacy z PH do PL, PH do LIM
|
||||
|
||||
Reference in New Issue
Block a user