mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 22:09:19 +02:00
Merge with TMJ
This commit is contained in:
@@ -3891,7 +3891,18 @@ void TMoverParameters::ComputeConstans(void)
|
||||
}
|
||||
Ff = TotalMassxg * (BearingF + RollF * V * V / 10.0) / 1000.0;
|
||||
// dorobic liczenie temperatury lozyska!
|
||||
FrictConst1 = ((TotalMassxg * RollF) / 10000.0) + (Cx * Dim.W * Dim.H);
|
||||
FrictConst1 = ( TotalMassxg * RollF ) / 10000.0;
|
||||
// drag calculation
|
||||
{
|
||||
// NOTE: draft effect of previous vehicle is simplified and doesn't have much to do with reality
|
||||
auto const *previousvehicle { Couplers[ ( V >= 0.0 ? end::front : end::rear ) ].Connected };
|
||||
auto dragarea { Dim.W * Dim.H };
|
||||
if( previousvehicle ) {
|
||||
dragarea = std::max( 0.0, dragarea - ( 0.85 * previousvehicle->Dim.W * previousvehicle->Dim.H ) );
|
||||
}
|
||||
FrictConst1 += Cx * dragarea;
|
||||
}
|
||||
|
||||
Curvature = abs(RunningShape.R); // zero oznacza nieskończony promień
|
||||
if (Curvature > 0.0)
|
||||
Curvature = 1.0 / Curvature;
|
||||
@@ -4406,7 +4417,7 @@ double TMoverParameters::TractionForce( double dt ) {
|
||||
|
||||
if( enrot != tmp ) {
|
||||
enrot = clamp(
|
||||
enrot + ( dt / 1.25 ) * ( // TODO: equivalent of dizel_aim instead of fixed inertia
|
||||
enrot + ( dt / dizel_AIM ) * (
|
||||
enrot < tmp ?
|
||||
1.0 :
|
||||
-2.0 ), // NOTE: revolutions drop faster than they rise, maybe? TBD: maybe not
|
||||
@@ -6080,7 +6091,11 @@ void TMoverParameters::CheckEIMIC(double dt)
|
||||
eimic += clamp(UniCtrlList[MainCtrlPos].SetCtrlVal - eimic, 0.0, dt * UniCtrlList[MainCtrlPos].SpeedUp); //dodawaj do X
|
||||
eimic = clamp(eimic, UniCtrlList[MainCtrlPos].MinCtrlVal, UniCtrlList[MainCtrlPos].MaxCtrlVal);
|
||||
}
|
||||
eimic = clamp(eimic, -1.0, Mains ? 1.0 : 0.0);
|
||||
auto const eimicpowerenabled {
|
||||
( ( true == Mains ) || ( Power == 0.0 ) )
|
||||
&& ( ( Doors.instances[ side::left ].open_permit == false )
|
||||
&& ( Doors.instances[ side::right ].open_permit == false ) ) };
|
||||
eimic = clamp(eimic, -1.0, eimicpowerenabled ? 1.0 : 0.0);
|
||||
}
|
||||
|
||||
void TMoverParameters::CheckSpeedCtrl()
|
||||
@@ -8945,6 +8960,7 @@ void TMoverParameters::LoadFIZ_Engine( std::string const &Input ) {
|
||||
ImaxLo = 1;
|
||||
}
|
||||
extract_value( EngineHeatingRPM, "HeatingRPM", Input, "" );
|
||||
extract_value( dizel_AIM, "AIM", Input, "1.25" );
|
||||
break;
|
||||
}
|
||||
case TEngineType::ElectricInductionMotor: {
|
||||
|
||||
Reference in New Issue
Block a user