mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
Improved battery charging and control circuits current computing; also added more correct BPSN overload protection code
This commit is contained in:
@@ -57,8 +57,6 @@ function TRAIN_SYSTEM:SolveAllInternalCircuits(Train,dT,firstIter)
|
||||
local P = Train.PositionSwitch
|
||||
local RheostatController = Train.RheostatController
|
||||
local RK = RheostatController.SelectedPosition
|
||||
--local B = (Train.Battery.Voltage >= 60) and 1 or (Train.Battery.Voltage >= Train.Battery.CutoffVoltage) and 0.5 or 0
|
||||
--local B = math.min(1,linearity*(Train.Battery.Voltage - Train.Battery.CutoffVoltage)/(Train.Battery.StartVoltage - Train.Battery.CutoffVoltage))
|
||||
local B = Train.Battery.Voltage > Train.Battery.CutoffVoltage and 1 or 0
|
||||
local BO = B*Train.VB.Value*(1-Train.PA1.Value)
|
||||
local BO2 = B*Train.VB.Value*(1-Train.PA2.Value)
|
||||
|
||||
Reference in New Issue
Block a user