|
|
Line 1: |
Line 1: |
− | Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]]
| + | Example carparts/tire/touring |
− | | |
− | The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman.
| |
− | For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site''].
| |
− | | |
− | The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000.
| |
− | | |
− | ==Coordinate system==
| |
− | A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description.
| |
− | | |
− | ==Top level parameters==
| |
| <pre> | | <pre> |
− | drive = RWD
| + | restitution = 0.1 |
− | </pre>
| + | tread = 0.25 |
− | The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively.
| |
− | | |
− | <pre>
| |
− | version = 2
| |
− | </pre>
| |
− | The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2.
| |
− | | |
− | ==Steering==
| |
− | <pre>
| |
− | max-angle = 33.19
| |
− | </pre>
| |
− | This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees.
| |
− | | |
− | ==Engine==
| |
− | <pre>
| |
− | [engine]
| |
− | position = 0.86, 0.0, -0.21
| |
− | mass = 140.0
| |
− | max-power = 1.79e5
| |
− | peak-engine-rpm = 7800.0
| |
− | rpm-limit = 9000.0
| |
− | inertia = 0.25
| |
− | idle = 0.02
| |
− | start-rpm = 1000
| |
− | stall-rpm = 350
| |
− | fuel-consumption = 1e-9
| |
− | torque-friction = 0.0003
| |
− | torque-curve-00 = 1000, 140.0
| |
− | torque-curve-01 = 2000, 149.14
| |
− | torque-curve-02 = 2200, 145.07
| |
− | torque-curve-03 = 2500, 147.78
| |
− | torque-curve-04 = 3000, 169.50
| |
− | torque-curve-05 = 3300, 172.19
| |
− | torque-curve-06 = 4000, 169.50
| |
− | torque-curve-07 = 4500, 166.77
| |
− | torque-curve-08 = 5600, 172.19
| |
− | torque-curve-09 = 5800, 170.83
| |
− | torque-curve-10 = 6000, 168.12
| |
− | torque-curve-11 = 6100, 177.61
| |
− | torque-curve-12 = 6200, 186.42
| |
− | torque-curve-13 = 6300, 192.53
| |
− | torque-curve-14 = 6500, 195.92
| |
− | torque-curve-15 = 6700, 195.92
| |
− | torque-curve-16 = 7000, 195.24
| |
− | torque-curve-17 = 7600, 190.49
| |
− | torque-curve-18 = 8000, 184.39
| |
− | torque-curve-19 = 8200, 183.04
| |
− | torque-curve-20 = 8300, 146.43
| |
− | torque-curve-21 = 9500, 146.43
| |
− | </pre>
| |
− | The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle).
| |
− | | |
− | ==Clutch==
| |
− | <pre>
| |
− | [clutch]
| |
− | sliding = 0.27
| |
− | radius = 0.15
| |
− | area = 0.75
| |
− | max-pressure = 11079.26
| |
− | </pre>
| |
− | The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value.
| |
− | | |
− | ==Transmission==
| |
− | <pre>
| |
− | [transmission]
| |
− | gears = 6
| |
− | gear-ratio-r = -2.8
| |
− | gear-ratio-1 = 3.133
| |
− | gear-ratio-2 = 2.045
| |
− | gear-ratio-3 = 1.481
| |
− | gear-ratio-4 = 1.161
| |
− | gear-ratio-5 = 0.943
| |
− | gear-ratio-6 = 0.763
| |
− | shift-time = 0.2
| |
− | </pre>
| |
− | The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison.
| |
− | | |
− | ==Differential==
| |
− | <pre>
| |
− | [differential]
| |
− | final-drive = 4.100
| |
− | anti-slip = 600.0
| |
− | anti-slip-torque = 1
| |
− | anti-slip-torque-deceleration-factor = 0
| |
− | </pre>
| |
− | The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0.
| |
− | | |
− | ==Fuel tank==
| |
− | <pre>
| |
− | [fuel-tank]
| |
− | position = 0.0, -1.0, -0.26
| |
− | capacity = 0.0492
| |
− | volume = 0.0492
| |
− | fuel-density = 730.0
| |
− | </pre>
| |
− | The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density.
| |
− | | |
− | ==Driver==
| |
− | <pre>
| |
− | [driver]
| |
− | position = -0.35, -0.57, 0.0
| |
− | view-position = -0.35, -0.64, 0.30
| |
− | hood-mounted-view-position = 0, 0.55, 0.17
| |
− | view-stiffness = 0.0
| |
− | </pre>
| |
− | The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish.
| |
− | | |
− | ==Aerodevice==
| |
− | <pre>
| |
− | [aerodevice-2]
| |
− | position = 0.0, -2.14, 0.37
| |
− | frontal-area = 0.05
| |
− | drag-coefficient = 0.0
| |
− | surface-area = 0.5
| |
− | lift-coefficient = -0.7
| |
− | efficiency = 0.95
| |
− | </pre>
| |
− | An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force.
| |
− | | |
− | Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation.
| |
− | | |
− | ==Coilover==
| |
− | <pre>
| |
− | [coilover-front]
| |
− | spring-constant = 49131.9
| |
− | spring-factor-1 = 0.052, 1.0
| |
− | spring-factor-2 = 0.055, 1.2
| |
− | bounce = 2600
| |
− | rebound = 7900
| |
− | damper-factor-1 = 0.08,1.0
| |
− | damper-factor-2 = 0.1, 0.7
| |
− | travel = 0.19
| |
− | anti-roll = 800.0
| |
− | </pre>
| |
− | The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points.
| |
− | | |
− | The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point).
| |
− | | |
− | | |
− | ==Suspension==
| |
− | Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters.
| |
− | <pre>
| |
− | [ suspension-front ]
| |
− | spring-constant = 49131.9
| |
− | spring-factor-1 = 0.052, 1.0
| |
− | spring-factor-2 = 0.055, 1.2
| |
− | bounce = 2588
| |
− | rebound = 2612
| |
− | damper-factor-1 = 0.08,1.0
| |
− | damper-factor-2 = 0.1, 0.7
| |
− | travel = 0.19
| |
− | camber = -1.33
| |
− | caster = 6.12
| |
− | toe = 0.0
| |
− | anti-roll = 8000.0
| |
− | </pre>
| |
− | <pre>
| |
− | [ suspension-FL ]
| |
− | hinge = 0,0,0
| |
− | </pre>
| |
− | The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself.
| |
− | Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees.
| |
− | | |
− | ==Tire==
| |
− | Front/rear parameters are broken into two fields. In the example below the front tire section is shown.
| |
− | <pre>
| |
− | radius = 0.29
| |
| rolling-resistance = 1.3e-2, 6.5e-6 | | rolling-resistance = 1.3e-2, 6.5e-6 |
− | rotational-inertia = 10.0
| |
− | tread = 0.0
| |
| # Lateral force | | # Lateral force |
− | a0=1.6 | + | a0=1.55 |
− | a1=-38 | + | a1=-55 |
− | a2=1201 | + | a2=1750 |
− | a3=1914 | + | a3=1900 |
− | a4=8.7 | + | a4=7.2 |
| a5=0.014 | | a5=0.014 |
| a6=-0.24 | | a6=-0.24 |
Line 200: |
Line 21: |
| a13=-2.4 | | a13=-2.4 |
| # Longitudinal force | | # Longitudinal force |
− | b0=1.7 | + | b0=1.65 |
− | b1=-80 | + | b1=-110 |
− | b2=1571 | + | b2=1800 |
| b3=23.3 | | b3=23.3 |
− | b4=300 | + | b4=410 |
− | b5=0 | + | b5=0.075 |
− | b6=0.0068 | + | b6=0 |
| b7=0.055 | | b7=0.055 |
| b8=-0.024 | | b8=-0.024 |
| b9=0.014 | | b9=0.014 |
| b10=0.26 | | b10=0.26 |
− | b11=-86
| |
− | b12=350
| |
| # Aligning moment | | # Aligning moment |
− | c0=2.3 | + | c0=2.2 |
− | c1=-3.8 | + | c1=-4.3 |
− | c2=-3.14 | + | c2=-4.4 |
− | c3=-1.16 | + | c3=-1.9 |
− | c4=-7.2 | + | c4=-9.6 |
− | c5=0.0 | + | c5=0.0225 |
− | c6=0.0 | + | c6=0 |
| c7=0.044 | | c7=0.044 |
| c8=-0.58 | | c8=-0.58 |
Line 233: |
Line 52: |
| c17=-1.1 | | c17=-1.1 |
| </pre> | | </pre> |
− | The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below:
| + | |
| + | Restitution defines tire restitution(not implemented atm). The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: |
| <pre> | | <pre> |
| Shape factor ........................................... A0 | | Shape factor ........................................... A0 |
Line 286: |
Line 106: |
| More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm | | More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm |
| | | |
− | ==Brakes==
| + | There is a graphical tire parameters editor to adjust/review the parameters: http://svn.vdrift.net/viewvc.cgi |
− | Front/rear parameters are broken into two fields. In the example below the front section is shown.
| |
− | <pre>
| |
− | friction = 0.73
| |
− | max-pressure = 4.0e6
| |
− | bias = 0.60
| |
− | radius = 0.14
| |
− | area = 0.015
| |
− | </pre>
| |
− | The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal.
| |
− | | |
− | ==Wheel==
| |
− | <pre>
| |
− | position = 1.14, 0.76, -0.47
| |
− | roll-height = 0.29
| |
− | mass = 18.14
| |
− | restitution = 0.1
| |
− | </pre>
| |
− | Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown.
| |
− | | |
− | ==Particle==
| |
− | <pre>
| |
− | [particle-00]
| |
− | mass = 30.0
| |
− | position = 0.0, -1.28, -0.36
| |
− | </pre>
| |
− | These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10.
| |