mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-21 23:44:58 +01:00
Merge branch 'master' into feat/renderers-cleanup
This commit is contained in:
@@ -678,6 +678,13 @@ struct TTractionParam
|
||||
};
|
||||
/*powyzsze parametry zwiazane sa z torem po ktorym aktualnie pojazd jedzie*/
|
||||
|
||||
// what a horn needs to sound: air from the main reservoir, or the low voltage
|
||||
enum class horn_supply
|
||||
{
|
||||
air,
|
||||
electric
|
||||
};
|
||||
|
||||
/// <summary>High-level brake-system family.</summary>
|
||||
enum class TBrakeSystem
|
||||
{
|
||||
@@ -1712,6 +1719,10 @@ class TMoverParameters
|
||||
float DistanceCounterDoublePressPeriod = {1.f}; // czas w jakim nalezy podwojnie wcisnac przycisk, aby rozpoczac pomiar odleglosci
|
||||
TSecuritySystem SecuritySystem;
|
||||
int EmergencyBrakeWarningSignal{0}; // combined with basic WarningSignal when manual emergency brake is active
|
||||
horn_supply HornSupply{horn_supply::air}; // of the low and high tone horns (WarningSignal 1 and 2)
|
||||
horn_supply Horn3Supply{horn_supply::air}; // of the third horn (WarningSignal 4)
|
||||
// main reservoir pressure [bar, as MinCP and MaxCP] below which a pneumatic horn stays silent
|
||||
static constexpr double HornMinPressure{2.0};
|
||||
TUniversalCtrlTable UniCtrlList; /*lista pozycji uniwersalnego nastawnika*/
|
||||
int UniCtrlListSize = 0; /*wielkosc listy pozycji uniwersalnego nastawnika*/
|
||||
bool UniCtrlIntegratedBrakePNCtrl = false; /*zintegrowany nastawnik JH obsluguje hamulec PN*/
|
||||
@@ -2003,6 +2014,8 @@ class TMoverParameters
|
||||
bool CompressorAllow = false; /*! zezwolenie na uruchomienie sprezarki NBMX*/
|
||||
bool CompressorAllowLocal{true}; // local device state override (most units don't have this fitted so it's set to true not to intefere)
|
||||
bool CompressorGovernorLock{false}; // indicates whether compressor pressure switch was activated due to reaching cut-out pressure
|
||||
double CompressorStartDelay{0.0}; // time [s] the compressor waits after getting its power before it can start, after the engine starts say
|
||||
double CompressorPowerTime{0.0}; // time [s] since the compressor got its power
|
||||
bool CompressorTankValve{false}; // indicates excessive pressure is vented from compressor tank directly and instantly
|
||||
start_t CompressorStart{start_t::manual}; // whether the compressor is started manually, or another way
|
||||
start_t PantographCompressorStart{start_t::manual};
|
||||
@@ -2230,6 +2243,7 @@ class TMoverParameters
|
||||
// TODO: move these switch types where they belong, cabin definition
|
||||
std::string PantSwitchType;
|
||||
std::string ConvSwitchType;
|
||||
bool HeatingSwitchImpulse{false}; // the train heating switch springs back to its middle position
|
||||
std::string StLinSwitchType;
|
||||
|
||||
bool Heating = false; // ogrzewanie 'Winger 020304
|
||||
@@ -2441,11 +2455,47 @@ class TMoverParameters
|
||||
double Adhesive(double staticfriction) const;
|
||||
double TractionForce(double dt);
|
||||
double FrictionForce() const;
|
||||
double BrakeForceR(double ratio, double velocity);
|
||||
double BrakeForceR(double ratio, double velocity) const;
|
||||
double BrakeForceP(double press, double velocity) const;
|
||||
double BrakeForce(const TTrackParam &Track);
|
||||
double CouplerForce(int const End, double dt);
|
||||
void CollisionDetect(int const End, double const dt);
|
||||
// closing speed of a collision [km/h] above which the vehicles involved may derail, adjusted for their mass ratio
|
||||
static constexpr double SafeCollisionVelocity{15.0};
|
||||
// closing speed [km/h] of the End of this vehicle and the OtherEnd of the other vehicle it touches, along the coupler
|
||||
// axis: the sum of the speeds in a head-on collision, the difference in a rear-end one, negative when they part
|
||||
double CollisionVelocity(int const End, TMoverParameters const &Other, int const OtherEnd) const;
|
||||
// velocity [m/s] of this vehicle relative to the other vehicle it touches with its End and the OtherEnd of the
|
||||
// other one, along this vehicle's axis
|
||||
double CouplerVelocityDifference(int const End, TMoverParameters const &Other, int const OtherEnd) const;
|
||||
// whether the automatic couplers at the End of this vehicle and the OtherEnd of the other one can catch each other on
|
||||
// contact, rather than the vehicles colliding (with crash damage enabled, only at a closing speed which doesn't derail them)
|
||||
bool AutomaticCouplingSafe(int const End, TMoverParameters const &Other, int const OtherEnd) const;
|
||||
// the horns of the Signal (WarningSignal bits) which have the air or the voltage they need to sound
|
||||
int SoundingHorns(int const Signal) const;
|
||||
// whether the signal lamps of the main circuit (line contactors, ground relay, motor overload relays) can light:
|
||||
// the pressure switch, when fitted, cuts the start off and puts them out, otherwise they go out once the brakes are applied
|
||||
bool MainCircuitLampsEnabled() const
|
||||
{
|
||||
return false == ControlPressureSwitch && (HasControlPressureSwitch || BrakePress < 1.0);
|
||||
}
|
||||
// whether the lamp of the open line contactors is lit, telling the start can be made
|
||||
bool LineContactorsLampLit() const
|
||||
{
|
||||
return false == StLinFlag && MainCircuitLampsEnabled();
|
||||
}
|
||||
// whether the pumps a joint oil and fuel pump switch works, those not started automatically, are all switched on
|
||||
bool OilFuelPumpsEnabled() const
|
||||
{
|
||||
auto const fuelmanual{FuelPump.start_type != start_t::automatic};
|
||||
auto const oilmanual{OilPump.start_type != start_t::automatic};
|
||||
return (fuelmanual || oilmanual) && (false == fuelmanual || FuelPump.is_enabled) && (false == oilmanual || OilPump.is_enabled);
|
||||
}
|
||||
// whether the radio is switched on and has the low voltage to work
|
||||
bool RadioPowered() const
|
||||
{
|
||||
return Radio && (Power24vIsAvailable || Power110vIsAvailable);
|
||||
}
|
||||
/*obrot kol uwzgledniajacy poslizg*/
|
||||
double ComputeRotatingWheel(double WForce, double dt, double n) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user