Better antislipping system in EStED

This commit is contained in:
Królik Uszasty
2019-04-02 21:12:46 +02:00
parent 37086a120b
commit 913cfc8ae8
4 changed files with 13 additions and 7 deletions

View File

@@ -1130,6 +1130,7 @@ public:
double AccN = 0.0; // przyspieszenie normalne w [m/s^2]
double AccVert = 0.0; // vertical acceleration
double nrot = 0.0;
double nrot_eps = 0.0; //przyspieszenie kątowe kół (bez kierunku)
double WheelFlat = 0.0;
bool TruckHunting { true }; // enable/disable truck hunting calculation
/*! rotacja kol [obr/s]*/

View File

@@ -3708,7 +3708,7 @@ void TMoverParameters::UpdatePipePressure(double dt)
Pipe->Flow( temp * Hamulec->GetPF( temp * PipePress, dt, Vel ) + GetDVc( dt ) );
if (ASBType == 128)
Hamulec->ASB(int(SlippingWheels));
Hamulec->ASB(int(SlippingWheels && (Vel>1))*(1+2*int(nrot_eps<-0.01)));
dpPipe = 0;
@@ -3956,6 +3956,7 @@ void TMoverParameters::ComputeTotalForce(double dt) {
// juz zoptymalizowane:
FStand = FrictionForce(RunningShape.R, RunningTrack.DamageFlag); // siła oporów ruchu
double old_nrot = abs(nrot);
nrot = v2n(); // przeliczenie prędkości liniowej na obrotową
if( ( true == TestFlag( BrakeMethod, bp_MHS ) )
@@ -4028,8 +4029,9 @@ void TMoverParameters::ComputeTotalForce(double dt) {
}
else
{
Fb = -Fwheels*Sign(V);
FTrain = 0;
double factor = (FTrain - Fb * Sign(V) != 0 ? Fwheels/(FTrain - Fb * Sign(V)) : 1.0);
Fb *= factor;
FTrain *= factor;
}
if (nrot < 0.1)
{
@@ -4038,6 +4040,7 @@ void TMoverParameters::ComputeTotalForce(double dt) {
nrot = temp_nrot;
}
nrot_eps = (abs(nrot) - (old_nrot))/dt;
// doliczenie sił z innych pojazdów
for( int end = end::front; end <= end::rear; ++end ) {
if( Neighbours[ end ].vehicle != nullptr ) {

View File

@@ -391,7 +391,8 @@ void TBrake::SetEPS( double const nEPS )
void TBrake::ASB( int const state )
{ // 255-b_asb(32)
BrakeStatus = (BrakeStatus & ~b_asb) | ( state * b_asb );
BrakeStatus = (BrakeStatus & ~b_asb) | ( (state / 2) * b_asb );
BrakeStatus = (BrakeStatus & ~b_asb_unbrake) | ( (state % 2) * b_asb_unbrake);
}
int TBrake::GetStatus()
@@ -1551,7 +1552,7 @@ double TEStED::GetPF( double const PP, double const dt, double const Vel )
// powtarzacz — podwojny zawor zwrotny
temp = Max0R(LoadC * BCP / temp * Min0R(Max0R(1 - EDFlag, 0), 1), LBP);
double speed = 1;
if ((ASBP < 0.1) && ((BrakeStatus & b_asb) == b_asb))
if ((ASBP < 0.1) && ((BrakeStatus & b_asb_unbrake) == b_asb_unbrake))
{
temp = 0;
speed = 3;
@@ -1559,7 +1560,7 @@ double TEStED::GetPF( double const PP, double const dt, double const Vel )
if ((BrakeCyl->P() > temp))
dv = -PFVd(BrakeCyl->P(), 0, 0.02 * SizeBC * speed, temp) * dt;
else if ((BrakeCyl->P() < temp))
else if ((BrakeCyl->P() < temp) && ((BrakeStatus & b_asb) == 0))
dv = PFVa(BVP, BrakeCyl->P(), 0.02 * SizeBC, temp) * dt;
else
dv = 0;

View File

@@ -53,7 +53,8 @@ static int const b_on = 2; //napelnianie
static int const b_rfl = 4; //uzupelnianie
static int const b_rls = 8; //odluzniacz
static int const b_ep = 16; //elektropneumatyczny
static int const b_asb = 32; //elektropneumatyczny
static int const b_asb = 32; //przeciwposlizg-wstrzymanie
static int const b_asb_unbrake = 64; //przeciwposlizg-luzowanie
static int const b_dmg = 128; //wylaczony z dzialania
/*uszkodzenia hamulca*/