Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
some patches
01-08-2010, 01:05 PM,
#1
some patches
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?
Reply
01-09-2010, 06:27 PM,
#2
 
I've updated the TC and checked it in since it was a trivial change.

There's no way to post attachments on the forum. However since you've contributed a couple of useful things, send me a PM with your desired user/pass and your sourceforge.net account name and I'll set you up with access to the code repo and the data repo. That way you can check in the downshifting change yourself; it looks good to me. Originally I made it not downshift into first because I was worried about some of the cars losing traction during an abrupt downshift to first, but if you've driven with it and it works OK then I'm satisfied.
Reply
01-09-2010, 06:39 PM,
#3
 
Aah, I see. I haven't noticed it. But I am testing with a keyboard and haven't tried to drive a timed lap. :oops:

edit:
There is a chance to drive car into wall. If you close the throttle, but dont brake(clutch locked) and let the car downshift into the first gear. Lets call it extreme engine braking. Tried it with the AX2 on a straight line. :lol:
Reply
01-09-2010, 09:55 PM,
#4
 
NaN Wrote:Lets call it extreme engine braking.

Yeah, that's the effect I was worried about....
Reply
01-15-2010, 01:59 PM,
#5
 
Had a talk with someone who has some experience in "driving on a racetrack". My asumptions about early down-shifting(keep rpm high) have been totaly wrong. :oops:

Down-shifting happens as late as possible(small delta rpm / low load change on the driving wheels). While braking preload the gear lever an blip the throttle(to unload the transmission) to shift.

Up-shifting happens at redline(max power). You preload the gear lever then release and engage the throttle as fast as possible to shift the gear.

And the there is left foot braking. To brake during cornering you have to keep or right foot on the throttle and use your left to brake. At the same time use the throttle to control the car ballance(understeer/oversteer).

Will modify CAR::AutoShift() for late down shifts.

PS: Don't try this at home(as your car is going to have a synchromesh gearbox, you might kill your synchros)! Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)