mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-02 01:32:43 +01:00
refactor(physics): the low voltage, the train heating and the electrodynamic brake as components
The rest of the electrics of physics::Vehicle beside the traction motors
becomes components, with English names:
lowVoltage (LowVoltageSupply, Battery batteryOn, BatteryVoltage,
physics/components/lowvoltage.h) NominalBatteryVoltage, BatteryStart,
Power110vIsAvailable / Power24vIsAvailable /
Power24vVoltage power110vAvailable /
power24vAvailable / power24vVoltage, the
battery button of the cab: batteryButtonFired,
batteryButtonImpulse, batteryButtonHeld,
batteryButtonHoldTime
trainHeating (TrainHeating) Heating on, HeatingAllow allow,
HeatingSwitchImpulse switchImpulse,
HeatingPower power, EngineHeatingRPM engineRpm
brakes.electrodynamic the DynamicBrake* fields: type, ammeters,
(ElectrodynamicBrake, controllerPositions, controllerPosition,
physics/components/braking.h) resistance(1, 2), on, emuWorking;
SplitEDPneumaticBrake splitFromPneumatic;
the fans of the braking resistor (BRVentilators,
BRVto, BRVtimer, Imaxrpc): resistorFansRunning,
resistorFansSustain, resistorFansTimer,
resistorPassiveMaxCurrent
The diesel-electric dynamic brake (DEDynamicBrake) and the currents of the
traction circuit (Im, Itot, EngineVoltage ...) stay for the traction stage.
No string literal changed (checked over all the changed files).
No change in behaviour: 1149/1149 tests, golden traces exact against staging
62f7a29b.
This commit is contained in:
@@ -167,7 +167,7 @@ bool physics::Vehicle::IncMainCtrlSeriesMotor(int const CtrlSpeed)
|
||||
//}
|
||||
}
|
||||
|
||||
if (TrainType == train_type::et42 && true == DynamicBrakeFlag && MainCtrlPos > 20)
|
||||
if (TrainType == train_type::et42 && true == brakes.electrodynamic.on && MainCtrlPos > 20)
|
||||
{
|
||||
MainCtrlPos = 20;
|
||||
OK = false;
|
||||
@@ -350,11 +350,11 @@ bool physics::Vehicle::IncScndCtrl(int CtrlSpeed)
|
||||
{
|
||||
bool OK = false;
|
||||
|
||||
if (DynamicBrakeFlag && TrainType == train_type::et42 && CabActive != 0 && IsMainCtrlNoPowerPos() && ScndCtrlPos == 0)
|
||||
if (brakes.electrodynamic.on && TrainType == train_type::et42 && CabActive != 0 && IsMainCtrlNoPowerPos() && ScndCtrlPos == 0)
|
||||
{
|
||||
OK = DynamicBrakeSwitch(false);
|
||||
}
|
||||
else if (ScndCtrlPosNo > 0 && CabActive != 0 && !(TrainType == train_type::et42 && (Imax == ImaxHi || (DynamicBrakeFlag && MainCtrlPowerPos() > 0))))
|
||||
else if (ScndCtrlPosNo > 0 && CabActive != 0 && !(TrainType == train_type::et42 && (Imax == ImaxHi || (brakes.electrodynamic.on && MainCtrlPowerPos() > 0))))
|
||||
{
|
||||
// if (RList[MainCtrlPos].R=0) and (MainCtrlPos>0) and (ScndCtrlPos<ScndCtrlPosNo) and
|
||||
// (not CoupledCtrl) then
|
||||
@@ -423,7 +423,7 @@ bool physics::Vehicle::DecScndCtrl(int CtrlSpeed)
|
||||
{
|
||||
bool OK = false;
|
||||
|
||||
if (IsMainCtrlNoPowerPos() && CabActive != 0 && TrainType == train_type::et42 && ScndCtrlPos == 0 && !DynamicBrakeFlag && CtrlSpeed == 1)
|
||||
if (IsMainCtrlNoPowerPos() && CabActive != 0 && TrainType == train_type::et42 && ScndCtrlPos == 0 && !brakes.electrodynamic.on && CtrlSpeed == 1)
|
||||
{
|
||||
// Ra: AI wywołuje z CtrlSpeed=2 albo gdy ScndCtrlPos>0
|
||||
OK = DynamicBrakeSwitch(true);
|
||||
@@ -498,7 +498,7 @@ void physics::Vehicle::ScndCtrlResistiveLockCheck()
|
||||
|
||||
int physics::Vehicle::GetVirtualScndPos() const
|
||||
{
|
||||
if (TrainType == train_type::et42 && DynamicBrakeFlag && !ScndCtrlPos)
|
||||
if (TrainType == train_type::et42 && brakes.electrodynamic.on && !ScndCtrlPos)
|
||||
return -1;
|
||||
return ScndCtrlPos;
|
||||
}
|
||||
@@ -550,7 +550,7 @@ bool physics::Vehicle::AutoRelayCheck(void)
|
||||
if (motorconnectorsoff || (HasCamshaft ? IsMainCtrlActualNoPowerPos() : IsMainCtrlNoPowerPos()))
|
||||
{
|
||||
lineContactors.closed = false;
|
||||
if (false == DynamicBrakeFlag)
|
||||
if (false == brakes.electrodynamic.on)
|
||||
{
|
||||
Im = 0;
|
||||
Itot = 0;
|
||||
@@ -999,8 +999,8 @@ void physics::Vehicle::CheckEIMIC(double dt)
|
||||
// Dodatkowo zapotrzebowanie ED jest ograniczone przez strefe Vh0..Vh1: powyzej Vh1 - pelny ED,
|
||||
// pomiedzy Vh1 a Vh0 - liniowe zanikanie, ponizej Vh0 - zerowe (brak hamowania pneumatycznego
|
||||
// jako uzupelnienia, poniewaz LocalBrake jest oddzielny i operuje wylacznie pneumatyka).
|
||||
double brakeDemand = SplitEDPneumaticBrake ? DynamicBrakeRatio() : LocalBrakeRatio();
|
||||
if (SplitEDPneumaticBrake)
|
||||
double brakeDemand = brakes.electrodynamic.splitFromPneumatic ? DynamicBrakeRatio() : LocalBrakeRatio();
|
||||
if (brakes.electrodynamic.splitFromPneumatic)
|
||||
{
|
||||
double const vh0 = inductionMotor.braking.offSpeed;
|
||||
double const vh1 = inductionMotor.braking.fullSpeed;
|
||||
|
||||
Reference in New Issue
Block a user