Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wheel position and suspension travel
07-20-2009, 08:14 AM,
#12
 
Tried something with the damper effects to give a more realistic curve, carsuspension.h@207:
Code:
    ///compute the suspension force for the given time interval
    T GetForce(T dt) const
    {
        T damping = bounce;
        //note that displacement is defined opposite to the classical definition (positive values mean compressed instead of extended)
        velocity = (displacement - last_displacement)/dt;
        //velocity = (displacement - last_last_displacement)*0.5/dt;
        if (velocity < 0)
        {
            damping = rebound;
            damp_force = sqrt(-velocity) * damping;
            damp_force = -damp_force;
        }
        else
        {
            damp_force = sqrt(velocity) * damping;
        }
        spring_force = displacement * spring_constant; //when compressed, the spring force will push the car in the positive z direction
        //damp_force = velocity * damping; //when compression is increasing, the damp force will push the car in the positive z direction
        return spring_force + damp_force;
    }
Works a bit too well, I wish I could buy dampers that good Smile Doesn't seem too bad with the damper settings as they are in the .car file, if inertia could be added to the unsprung weight it could be quite realistic.
cheers
Reply


Messages In This Thread
[No subject] - by zimluura - 07-11-2008, 05:45 PM
[No subject] - by cologne - 07-15-2008, 11:04 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-15-2008, 08:23 PM
[No subject] - by cotharyus - 07-15-2008, 08:52 PM
[No subject] - by cologne - 07-16-2008, 07:36 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-25-2008, 08:42 PM
[No subject] - by cologne - 07-26-2008, 09:39 AM
[No subject] - by cologne - 09-07-2008, 06:26 PM
[No subject] - by joevenzon_phpbb2_import3 - 09-07-2008, 10:44 PM
[No subject] - by stan.distortion - 07-20-2009, 06:42 AM
[No subject] - by stan.distortion - 07-20-2009, 08:14 AM
[No subject] - by joevenzon_phpbb2_import3 - 07-22-2009, 11:02 PM
[No subject] - by joevenzon_phpbb2_import3 - 08-01-2009, 12:42 PM
[No subject] - by joevenzon_phpbb2_import3 - 08-01-2009, 01:57 PM
[No subject] - by trose - 09-17-2010, 12:40 AM
[No subject] - by cologne - 09-19-2010, 04:06 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)