16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 06:49:19 +02:00

build 200112. vehicle level of detail selection tweak, track end detection logic tweak, minor bug fixes

This commit is contained in:
tmj-fstate
2020-01-13 15:59:13 +01:00
parent 70fba7df69
commit eb9304495a
11 changed files with 73 additions and 48 deletions

View File

@@ -121,8 +121,7 @@ double TTractionPowerSource::CurrentGet(double res)
return 0;
}
if ((res > 0) || ((res < 0) && (Recuperation || true)))
TotalAdmitance +=
1.0 / res; // połączenie równoległe rezystancji jest równoważne sumie admitancji
TotalAdmitance += 1.0 / res; // połączenie równoległe rezystancji jest równoważne sumie admitancji
float NomVolt = (TotalPreviousAdmitance < 0 ? NominalVoltage * 1.083 : NominalVoltage);
TotalCurrent = (TotalPreviousAdmitance != 0.0) ?
NomVolt / (InternalRes + 1.0 / TotalPreviousAdmitance) :