mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 16:19:19 +02:00
Better antislipping system in EStED
This commit is contained in:
@@ -1130,6 +1130,7 @@ public:
|
|||||||
double AccN = 0.0; // przyspieszenie normalne w [m/s^2]
|
double AccN = 0.0; // przyspieszenie normalne w [m/s^2]
|
||||||
double AccVert = 0.0; // vertical acceleration
|
double AccVert = 0.0; // vertical acceleration
|
||||||
double nrot = 0.0;
|
double nrot = 0.0;
|
||||||
|
double nrot_eps = 0.0; //przyspieszenie kątowe kół (bez kierunku)
|
||||||
double WheelFlat = 0.0;
|
double WheelFlat = 0.0;
|
||||||
bool TruckHunting { true }; // enable/disable truck hunting calculation
|
bool TruckHunting { true }; // enable/disable truck hunting calculation
|
||||||
/*! rotacja kol [obr/s]*/
|
/*! rotacja kol [obr/s]*/
|
||||||
|
|||||||
@@ -3708,7 +3708,7 @@ void TMoverParameters::UpdatePipePressure(double dt)
|
|||||||
Pipe->Flow( temp * Hamulec->GetPF( temp * PipePress, dt, Vel ) + GetDVc( dt ) );
|
Pipe->Flow( temp * Hamulec->GetPF( temp * PipePress, dt, Vel ) + GetDVc( dt ) );
|
||||||
|
|
||||||
if (ASBType == 128)
|
if (ASBType == 128)
|
||||||
Hamulec->ASB(int(SlippingWheels));
|
Hamulec->ASB(int(SlippingWheels && (Vel>1))*(1+2*int(nrot_eps<-0.01)));
|
||||||
|
|
||||||
dpPipe = 0;
|
dpPipe = 0;
|
||||||
|
|
||||||
@@ -3956,6 +3956,7 @@ void TMoverParameters::ComputeTotalForce(double dt) {
|
|||||||
|
|
||||||
// juz zoptymalizowane:
|
// juz zoptymalizowane:
|
||||||
FStand = FrictionForce(RunningShape.R, RunningTrack.DamageFlag); // siła oporów ruchu
|
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ą
|
nrot = v2n(); // przeliczenie prędkości liniowej na obrotową
|
||||||
|
|
||||||
if( ( true == TestFlag( BrakeMethod, bp_MHS ) )
|
if( ( true == TestFlag( BrakeMethod, bp_MHS ) )
|
||||||
@@ -4028,8 +4029,9 @@ void TMoverParameters::ComputeTotalForce(double dt) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Fb = -Fwheels*Sign(V);
|
double factor = (FTrain - Fb * Sign(V) != 0 ? Fwheels/(FTrain - Fb * Sign(V)) : 1.0);
|
||||||
FTrain = 0;
|
Fb *= factor;
|
||||||
|
FTrain *= factor;
|
||||||
}
|
}
|
||||||
if (nrot < 0.1)
|
if (nrot < 0.1)
|
||||||
{
|
{
|
||||||
@@ -4038,6 +4040,7 @@ void TMoverParameters::ComputeTotalForce(double dt) {
|
|||||||
|
|
||||||
nrot = temp_nrot;
|
nrot = temp_nrot;
|
||||||
}
|
}
|
||||||
|
nrot_eps = (abs(nrot) - (old_nrot))/dt;
|
||||||
// doliczenie sił z innych pojazdów
|
// doliczenie sił z innych pojazdów
|
||||||
for( int end = end::front; end <= end::rear; ++end ) {
|
for( int end = end::front; end <= end::rear; ++end ) {
|
||||||
if( Neighbours[ end ].vehicle != nullptr ) {
|
if( Neighbours[ end ].vehicle != nullptr ) {
|
||||||
|
|||||||
@@ -391,7 +391,8 @@ void TBrake::SetEPS( double const nEPS )
|
|||||||
|
|
||||||
void TBrake::ASB( int const state )
|
void TBrake::ASB( int const state )
|
||||||
{ // 255-b_asb(32)
|
{ // 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()
|
int TBrake::GetStatus()
|
||||||
@@ -1551,7 +1552,7 @@ double TEStED::GetPF( double const PP, double const dt, double const Vel )
|
|||||||
// powtarzacz — podwojny zawor zwrotny
|
// powtarzacz — podwojny zawor zwrotny
|
||||||
temp = Max0R(LoadC * BCP / temp * Min0R(Max0R(1 - EDFlag, 0), 1), LBP);
|
temp = Max0R(LoadC * BCP / temp * Min0R(Max0R(1 - EDFlag, 0), 1), LBP);
|
||||||
double speed = 1;
|
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;
|
temp = 0;
|
||||||
speed = 3;
|
speed = 3;
|
||||||
@@ -1559,7 +1560,7 @@ double TEStED::GetPF( double const PP, double const dt, double const Vel )
|
|||||||
|
|
||||||
if ((BrakeCyl->P() > temp))
|
if ((BrakeCyl->P() > temp))
|
||||||
dv = -PFVd(BrakeCyl->P(), 0, 0.02 * SizeBC * speed, temp) * dt;
|
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;
|
dv = PFVa(BVP, BrakeCyl->P(), 0.02 * SizeBC, temp) * dt;
|
||||||
else
|
else
|
||||||
dv = 0;
|
dv = 0;
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ static int const b_on = 2; //napelnianie
|
|||||||
static int const b_rfl = 4; //uzupelnianie
|
static int const b_rfl = 4; //uzupelnianie
|
||||||
static int const b_rls = 8; //odluzniacz
|
static int const b_rls = 8; //odluzniacz
|
||||||
static int const b_ep = 16; //elektropneumatyczny
|
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
|
static int const b_dmg = 128; //wylaczony z dzialania
|
||||||
|
|
||||||
/*uszkodzenia hamulca*/
|
/*uszkodzenia hamulca*/
|
||||||
|
|||||||
Reference in New Issue
Block a user