1. Allow atomatic downshifting into 1st gear.
Here the diff:
Code:
Index: src/car.cpp
===================================================================
--- src/car.cpp (revision 2550)
+++ src/car.cpp (working copy)
@@ -1702,8 +1702,7 @@
{
if (current_gear > 0 && GetClutch() == 1.0)
{
- //float rpm = GetEngineRPM();
- float rpm = dynamics.CalculateDriveshaftRPM();
+ float rpm = GetEngineRPM();
// shift up when engine speed exceeds peak speed
if (rpm > GetEngineRedline() &&
@@ -1714,7 +1713,7 @@
// shift down when engine speed below shift_down_point
// however, we do not auto shift down from 1st gear to neutral
- if (current_gear > 1 && rpm < DownshiftPoint(current_gear))
+ if (rpm < DownshiftPoint(current_gear))
{
return -1;
}
@@ -1728,14 +1727,14 @@
float CAR::DownshiftPoint(int gear) const
{
- float shift_down_point = 1200.0;
- if (gear > 2)
+ float shift_down_point = 0.0;
+ if (gear > 1)
{
double current_gear_ratio = dynamics.GetTransmission().GetGearRatio(gear);
- double lower_gear_ratio = dynamics.GetTransmission().GetGearRatio(gear - 2);
+ double lower_gear_ratio = dynamics.GetTransmission().GetGearRatio(gear - 1);
float peak_engine_speed = GetEngineRedline();
- shift_down_point = peak_engine_speed / lower_gear_ratio * current_gear_ratio;
- //shift_down_point -= (1200.0 / gear);
+ // set shift down point to keep rpm as high as posible => 0.95 * redline
+ shift_down_point = 0.95 * peak_engine_speed / lower_gear_ratio * current_gear_ratio;
//assert(0);
}
2. Fixed Toyota Celica GT-Four ST185 rpm-limit.
With rpm-limit == peak-engine-rpm it was running into limiter, not being able to shift up.
The 7250rpm limit is from the Toyota 3S-GTE engine used in MR2 and Celica GT-Four.
Here the diff:
Code:
Index: cars/TC/TC.car
===================================================================
--- cars/TC/TC.car (revision 473)
+++ cars/TC/TC.car (working copy)
@@ -9,7 +9,7 @@
mass = 180.0
max-power = 222964
peak-engine-rpm = 6000.0
-rpm-limit = 6000.0
+rpm-limit = 7250.0
inertia = 0.50
idle = 0.02
start-rpm = 1000
ps: is there a way to post attachments?