;
; Default car settings - fills in missing data from another cars' car.ini
; 04-08-00: Created!
; 10-03-01: Some Pacejka taken from Genta's book,
; 'Motor Vehicle Dynamics, Modeling and Simulation', appendix 1.2, example 3.
; NOTES:
; - Uses metrics (SI) everywhere. No American units (inches/pounds) are used in Racer.
; - For a full reference, see http://www.racer.nl/reference/carphys.htm
; (c) 2000-2009 Cruden B.V./Ruud van Gaal
;
car
{
  ; Car information
  name=MyCar
  year=19xx
  credits=Created by me
  comments=Some comments
  ; Give every car a unique ID
  id=unique_id
  ; Minimal version of Racer for which this can is known to work
  ; (i.e. '050b6'=v0.5.0 beta 6, '049f'=v0.4.9 final
  ;version=050b6
  ; Number of wheels
  wheels=4
  ; Skidding
  skid
  {
    ; Skid sound (obsolete method, use audio.skid.* instead)
    ;sample=skid.wav
  }
  shadow
  {
    ; Shadow texture and size
    ;texture=shadow.tga
    ;width=2.2
    ;length=4.5
    ; Z offset to align shadow with car
    ;offset_z=0.3
    ; Shadow intensity - when in the dark (inside the projected shadow)
    intensity_dark=0.7
    ; Shadow intensity when in a light area (outside the projected shadow)
    intensity_light=0.3
  }
  ; Center of gravity of car sprung mass
  ; Relative to the nullpoint
  cg
  {
    x=0
    y=0
    z=0
  }
  ; Force feedback factor to modify aligning moment effects
  ff_factor=1.0
}
graphics
{
  ; Car models used
  shadow
  {
    model
    {
      ; Projected shadow model
      ;file=myshadow.dof
      ; Use the shaders from the model?
      use_shaders=0
    }
    intensity=0.3
  }
}
animation
{
  ; Flash all lights? (ms for on period, off-period is the same, so total time is twice this value)
  flash_lights=0
}
lights
{
  ; Projected lights
  light0
  {
    ; Field of view (vertical)
    fov=20.0
	; Aspect (horizontal)
	aspect=5.0
	; Distance to car
	z=2.0
	; Pitching with respect to car (in degrees)
	pitch=7
	; Far plane (if not specified, uses entire visibility
	;far=200
	; Image to project
    ;texture=default_light.tga
  }
}
audio
{
  skid
  {
    sample=
  }
  horn
  {
    sample=horn.wav
  }
  shiftin
  {
    ;sample=shift_in.wav
  }
  shiftout
  {
    ;sample=shift_out.wav
  }
}
body
{
  ; Weight of the car's body (kg)
  ; This excludes wheels, driver and fuel
  mass=1450
  ; Inertia values; X/Y/Z=pitch, yaw (heading), roll
  inertia
  {
    x=1730
    y=1950
    z=590
  }
  ; Collision box
  width=2.03
  height=.8
  length=4.46
  ; Define bounding box manually?
  manual_box=0
  ; Moving bounding box around
  box_offset=0 0 0
  model
  {
    file=body.dof
    offset
    {
      x=0
      y=0
      z=0
    }
  }
}
steer
{
  ; Position
  x=0
  y=.7
  z=.2
  ; Rotation towards the driver
  xa=15
  ; Max angle of rotation (angle = -lock/2..lock/2)
  lock=110
  ; Steering linearity (added on top of controller linearity!)
  ; Values <0 mean exaggerate (-1=full linear again)
  linearity=1.0
  model
  {
    ; 3D model
  }
}
engine
{
  ; Position (stub gfx)
  x=0
  y=.2
  z=-1.0
  size=.25
  ; Weight of engine
  mass=10
  ; Maximum rpm (mostly lower than this default); above this the revlimiter kicks in
  max_rpm=30000
  ; Idle rpm
  idle_rpm=1000
  ; Idle method; 0=old method (<v0.8.1) which keeps throttle always open
  ; 1=new method, where throttle is applied ONLY when engine RPM drops below idle_rpm
  ; Throttle is then progressively applied upto stall_rpm
  ; Default is the old method (0) for compatibility, but method 1 is far more realistic.
  idle_method=0
  ; For idle_method=1, you can still supply an amount of throttle that is applied
  ; even when letting go of the pedal. Some fuel is then still applied while coasting
  ; full with a fully depressed pedal.
  ; Non-zero for carburator engines, 0 for diesels
  idle_throttle=0
  ; RPM at which to start disengaging the clutch (when autoclutch is active; see racer.ini).
  ; Automatically press clutch when below autoclutch_rpm?
  autoclutch=1
  ; The (auto)clutch will be fully disengaged when the rpm hits idle_rpm, and starts being pressed at autoclutch_rpm.
  autoclutch_rpm=1500
  ; Engine RPM -> maximum torque curve (normalized 0..1 curve)
  curve_torque=torque.crv
  ; Maximum torque (multiplier for the torque curve)
  max_torque=324
  ; Reaction of engine torque through body roll (0..1)
  torque_reaction=0.0
  ; Starter engine; present?
  starter=1
  ; Torque generated by starter engine (Nm) to get engine running
  starter_torque=25
  ; When starting the game, is the engine pre-started?
  start_stalled=0
  ; RPM at which to stall the engine
  stall_rpm=600
  ; Make sure start_rpm is larger than stall_rpm
  start_rpm=900
  ; Dash indications - gives a range for shifting warnings
  ; Only used with exotic proprietary controllers
  ; Not specified here, in which case defaults are used,
  ; based on max_rpm
  min_warn_rpm=0
  max_warn_rpm=0
  shifting
  {
    ; Automatic gearbox? May in the future be overruled by the user.
    automatic=0	
    ; Fast shifting? If 0, gearbox stays in neutral while ShiftUp is pressed.
    ; If 1, the entire shift process will proceed without waiting for ShiftUp release
    fast=0
    ; RPMs at which to shift; make sure shift_down_rpm>shift_up_rpm
    shift_up_rpm=3000
    shift_down_rpm=2000
    ; Automatic shifting duration
    time_to_declutch=200
    time_to_clutch=200
    ; Time spent in neutral halfway shift
    time_in_neutral=0
    ; Shifting down separate times
    time_to_declutch_down=200
    time_in_neutral_down=0
    time_to_clutch_down=200
    ; Blip throttle when shifting down? 0=no (uses actual throttle), >0=throttle amount during downshift
    blip_throttle=0
    ; Cut throttle when up/down-shifting? (throttle is held at 0)
    cut_throttle=1
  }
  ; Inertia of engine parts
  inertia
  {
    ; Rotational inertia of engine parts (kg*m^2)
    engine=0.09
  }
  ; Internal engine braking coefficient (0=low, >0=friction)
  ; The braking coefficient is linked to the rpm of the motor (linearly)
  ; in the following way:
  ; min_torque=-braking_coeff*rps    (rps = rpm/60)
  ; max_torque=torque
  ; Throttle moves the torque from min_torque..max_torque
  ; Example: Arrows F1 car @14.500 rpm => braking_coeff=0.74
  ; Then   : rps=14500/60 = 241, negative torque = -0.74*241 = -180 Nm
  braking_coeff=0.34
  ; Engine friction (NYI)
  friction=0
  ; Audio - obsolete for Racer v0.5.1+ (see 'audio' tree)
  sample=engine.wav
  sample_rpm=5200
  ; RPM jitter effect when shifting
  jitter
  {
    ; RPM variance is dependent on rpm and amplitude below
    amplitude=0
    ; Time to last (ms); randomly selected so totalTime=time_min+rand(time_var)
    time_min=100
    time_var=500
    ; Frequency; randomly selected so freq=frequency_min+rand(frequency_var)
    frequency_min=4
    frequency_var=9
  }
}
fuel
{
  ; Fuel type: 0=gasoline, 1=diesel. Determines efficiencies
  type=0
  ; Max storage in liters
  max=50.0
  ; Brake specific fuel consumption (gram/Joule); an idea of the efficiency of the engine
  bsfc=2.0e-5
  ;bsfc=6.944e-5
}
traction_control
{
  enable=0
  ; Allowed front/rear wheel speed ratio (1.1=10% difference allowed)
  max_velocity_ratio=1.1
  ; When to turn TC off
  min_velocity_ratio=1.0
  min_velocity=0
}
abs
{
  ; Anti-lock braking system
  enable=0
  ; Allowed front/rear wheel speed ratio
  max_velocity_ratio=1.1
  ; When to turn TC off
  min_velocity_ratio=1.0
  min_velocity=0.1
  ; Braking factor when ABS is applied
  braking_factor=1.0
}
gearbox
{
  ; Number of gears
  gears=6
  ; Gear ratios; note that negative ratios mean reverse gears
  ; You may have only 1 reverse gear
  gear0
  {
    ratio=-2.00
    inertia=0.9
    ; Linearity of throttle for this gear (useful for high-power cars to regulate
    ; throttle at low gears). Can be set per gear.
    engine_map=1.0
  }
  gear1
  {
    ratio=3.214
    inertia=0.13
    ; Linearity of throttle for this gear (useful for high-power cars to regulate
    ; throttle at low gears). Can be set per gear.
    engine_map=1.0
  }
  gear2
  {
    ratio=2.105
    inertia=0.09
    engine_map=1.0
  }
  gear3
  {
    ratio=1.458
    inertia=0.07
    engine_map=1.0
  }
  gear4
  {
    ratio=1.094
    inertia=0.05
    engine_map=1.0
  }
  gear5
  {
    ratio=0.861
    inertia=0.03
    engine_map=1.0
  }
  ; Final (differential) ratio, multiplies all gear ratios
  ; Use differential.diff<x>.ratio instead, this value is obsolete.
  end_ratio=4.051
}
clutch
{
  ; Maximum friction the clutch can generate (Nm)
  max_torque=500
}
handbrakes
{
  ; Apply to which wheels? (give indices starting at 0; mostly 23, the rears)
  wheels=23
}
differential
{
  ; Number of diffs (0=use global differential for backward compatibility)
  count=0
  diff0
  {
    ; Diff type; 0=free, 1=viscous, 2=salisbury, 3=lsd, 4=locked
    type=1
    ; Ratio of input vs. output
    ; This overrides gearbox.end_ratio if defined, to be more flexible
    ; in building drivelines with multiple differentials. gearbox.end_ratio
    ; is obsolete but still supported for backward compatibility.
    ;ratio=4.051
    ; Inertia of ring gear
    inertia=0.05
    ; LSD diff: preload torque (the defaults will give an open differential!)
    preload=0
    ; LSD diff: power-on coefficient
    power_coeff=2.5
    ; LSD diff; power-off coefficient. For a 1-way LSD, coast_coeff=0, for a 2-way LSD
    ; coast_coeff=1 and for a 1.5 way coast_coeff is somewhere inbetween 0 and 1
    coast_coeff=2.5
    ; Viscous diff: rpm difference coefficient
    locking_coeff=100
    ; Which wheels? Mostly wheels 2 & 3 are placed at the rear.
    output0=2
    output1=3
    ; Friction (Nm)
    friction=0
  }
  ;
  ; Global differential parameters; is actually obsolete, but still
  ; loaded in case no diffs are defined (count=0)
  ;
  ; Diff type; 0=free, 1=viscous, 2=salisbury
  type=1
  ; Ratio of input vs. output (default=1)
  ;ratio=4.051
  ; Inertia of ring gear
  inertia=0.05
  ; Viscous rpm difference coefficient
  locking_coeff=100
  ; Which wheels? Mostly wheels 2 & 3 are placed at the rear.
  output0=2
  output1=3
}
aero
{
  draft
  {
    ; Drafting/slipstreaming - scaling in meters of the area behind the car, based on velocity
	; Use gfx.show_aero=1 in racer.ini to visualize the draft areas
	scale_lat_rear=0.4
	scale_lon_rear=1
	; Air bubble in front
	scale_lat_front=0.08
	scale_lon_front=0.2
  }
  body
  {
    ; Application center relative to the CG
    center=0 -0.1 0
    ; Longitudinal drag coefficient (Cx, X-axis is SAE's car longitudinal)
    cx=0.335
    ; Frontal area in m^2
    area=1.824
  }
  wings=1
  wing0
  {
    name=Front wing
    span=1.2
    cord=0.2
    coeff_drag=0.2
    coeff_down=0.3
    center=0 0.2 2.1
    ; Angle in degrees
    angle=10
    ; Angle offset; a zero degree wing still gives downforce often
    angle_offset=0
  }
}
antirollbar
{
  count=0
  ; The anti-roll bars add forces to the suspension as follows:
  ; diff=compression_left-compression_right
  ; force=diff*k
  ; So it's linearly related to the difference in suspension compression
  arb0
  {
    susp_left=0
    susp_right=1
    k=100
  }
}
; Suspension defaults
susp_default
{
  ; Relative location (to body)
  ;x=.7
  y=0.4
  z=1.3
  ; Size of spring when in rest (used as size of suspension actually)
  restlen=.5
  minlen=.3
  maxlen=.7
  ; Bumpstops (length of 0.07 is normal; default is no bumpstops)
  bumpstop_len=0
  ; Bumpstop maximum rate (N/m at full compression)
  bumpstop_k=100000
  ; Bumpstop damping (N/m/s, for k=100000 a value of perhaps 10000 is a nice start)
  bumpstop_damping=0
  ; Reboundstop to keep wheel from going through maxlen when jumping for example (default is a no-length reboundstop,
  ; although it extends below maxlen, so it really extends indefinetly)
  reboundstop_len=0.01
  ; Reboundstop maximum rate (N/m at full compression)
  reboundstop_k=170000
  ; Reboundstop damping (N/m/s, for k=100000 a value of perhaps 10000 is a nice start)
  reboundstop_damping=0
  ; Spring coefficient (N/m); determines force when spring is pulled/pushed
  k=17400
  ; Damper bump function; 0=linear, 1=exp, 2=digressive, 3=sqrt
  bump_function=0
  ; Damper bump rate (F_damp=bump_rate*bump_function(wheelVerticalVelocitY))
  bump_rate=2600
  ; Damper max value (only used if bump_function=digressive)
  bump_max=3000
  ; Rebound rate (N/m/s)
  rebound_rate=2850
  ; Gfx (nyi)
  model
  {
    file=
  }
  ; Geometrical effects
  ; Bump steer; toe change in radians per meter of suspension deflection
  toe_change_per_m=0
  ; Camber change in radians per meter deflection
  camber_change_per_m=0
  ; Camber change ratio; degrees of camber / degrees of wheel rotation
  camber_change_steering=0
  ; Mechanical trail; adds to force feedback directly when steering and driving.
  caster_offset=0
  ; NYI
  caster_angle=0
  kingpin_offset=0
  kingpin_angle=0
}
; Suspension front defaults (where different from susp_default)
susp_front~susp_default
{
  z=1.3
  ; Roll center (lateral forces are applied here; relative to suspension)
  roll_center
  {
    x=0
    y=0
    z=0
  }
}
susp_rear~susp_default
{
  z=-1.3
  k=19600
  bump_rate=3100
  rebound_rate=3350
  ; Roll center (lateral forces are applied here; relative to suspension)
  roll_center
  {
    x=0
    y=0
    z=0
  }
}
susp0~susp_front
{
  x=0.7
}
susp1~susp_front
{
  x=-.7
}
susp2~susp_rear
{
  x=.7
}
susp3~susp_rear
{
  x=-.7
}
;
; Wheels/tires
;
tire_model
{
  ; SAE 950311 low-speed tire implementation
  ; Relaxation length laterally (in m)
  relaxation_length_lat=0.91
  ; Relaxation length longitudinally (in m)
  relaxation_length_long=.091
  ; Damping lat/long speed (in m/s, same for longitudinal and lateral)
  damping_speed=0.15
  ; Strength of damping; too little and the car keeps vibrating (low freq.)
  damping_coefficient_lat=35
  damping_coefficient_long=1
}
pacejka_default
{
  ; Pacejka constants for all tires
  ; Use per-wheel though!
  ; Lateral force
  a0=1.799
  a1=0
  a2=1688
  a3=4140
  a4=6.026
  a5=0
  a6=-0.3589
  a7=1
  a8=0
  a9=-0.006111
  a10=-0.03224
  a111=0
  a112=0
  a12=0
  a13=0
  ; Longitudinal force
  b0=1.65
  b1=0
  b2=1688
  b3=0
  b4=229
  b5=0
  b6=0
  b7=0
  b8=-10
  b9=0
  b10=0
  ; Aligning moment
  c0=2.068
  c1=-6.49
  c2=-21.85
  c3=0.416
  c4=-21.31
  c5=0.02942
  c6=0
  c7=-1.197
  c8=5.228
  c9=-14.84
  c10=0
  c11=0
  c12=-0.003736
  c13=0.03891
  c14=0
  c15=0
  c16=0.639
  c17=1.693
  ; Optimal values (used in Gregor Veble's slip combination method)
  optimal_slipratio=0.2
  ; Optimal slip angle in radians (=degrees/52.29578)
  optimal_slipangle=0.139626
}
wheel_common
{
  ; Position of contact patch center wrt suspension
  x=0
  y=0
  z=0
  ; Mass in kilograms; add car body
  mass=20
  ; Rotational inertia (along spin axis)
  inertia=2.3
  radius=.34
  width=.3
  ; Tire damping (N/m/s), damping tire_rate, start with 0.01*tire_rate as a nice value (~1400?)
  tire_damping=0
  ; Camber in degrees; negative is lean inward (to the car)
  camber=0
  ; Brakes
  inboard_brakes=0
  ; Ackerman factor (default=1); exaggerates steering in one direction
  ackerman=1
  ; Reverse steering (toe remains unchanged, ackerman is reversed as well)
  reverse_steering=0
  ; Brakedisc temperature
  brake_heating=0.0003
  brake_dissipation=0.0005
  brake_max_temp=1000
}
wheel0~wheel_common
{
  ; Rotates when steering?
  steering=1
  ; Max wheel rotation (90 means from 45 degrees left to 45 degrees right)
  lock=40
  ; Toe in degrees
  toe=0
  ; Rolling resistance
  rolling_coeff=0.015
  ; Braking capability in Nm (torque)
  max_braking=4000
  ; Brake factor (determines brake balance)
  braking_factor=.68
  ; Hand braking capability in Nm (torque)
  max_handbrake_torque=400
  ; Friction with different surfaces; default is 1.0
  friction_road=1.7
  ; Vertical tire spring rate (when the wheel is loaded, it acts as a spring)
  ; In N/m (! not N/cm)
  tire_rate=140000
  OBSOLETE_skidding
  {
    ; Slip ratio
    long_start=0.2
    long_max=1.0
    ; Negative slip ratio
    long_start_n=0.2
    long_max_n=1.0
    ; Lateral; slip velocity
    lat_start=0.2
    lat_max=2.0
  }
  model
  {
    ; Use a 3D model instead of stub graphics
    file=tire_lf.dof
  }
  pacejka~pacejka_default
  {
  }
}
wheel1~wheel_common
{
  ; Rotates when steering?
  steering=1
  ; Max wheel rotation
  lock=40
  ; Toe in degrees
  toe=0
  friction_road=1.7
  ; Rolling resistance
  rolling_coeff=0.015
  tire_rate=140000
  ; Braking capability in Nm (torque)
  max_braking=4000
  ; Brake factor (determines brake balance)
  braking_factor=.68
  ; Hand braking capability in Nm (torque)
  max_handbrake_torque=400
  skidding
  {
    ; Slip ratio
    long_start=0.2
    long_max=1.0
    ; Negative slip ratio
    long_start_n=0.2
    long_max_n=1.0
    ; Lateral; slip velocity
    lat_start=0.2
    lat_max=2.0
  }
  model
  {
    file=tire_rf.dof
  }
  pacejka~pacejka_default
}
wheel2~wheel_common
{
  steering=0
  ; Toe in degrees
  toe=0
  ; Rolling resistance
  rolling_coeff=0.015
  friction_road=1.7
  tire_rate=140000
  ; Braking capability in Nm (torque)
  max_braking=4000
  ; Brake factor (determines brake balance)
  braking_factor=.32
  ; Hand braking capability in Nm (torque)
  max_handbrake_torque=400
  skidding
  {
    ; Slip ratio
    long_start=0.2
    long_max=1.0
    ; Negative slip ratio
    long_start_n=0.2
    long_max_n=1.0
    ; Lateral; slip velocity
    lat_start=0.2
    lat_max=2.0
  }
  model
  {
    ; Use a 3D model instead of stub graphics
    file=tire_lr.dof
  }
  pacejka~pacejka_default
}
wheel3~wheel_common
{
  steering=0
  ; Toe in degrees
  toe=0
  ; Rolling resistance
  rolling_coeff=0.015
  friction_road=1.7
  tire_rate=140000
  ; Braking capability in Nm (torque)
  max_braking=4000
  ; Brake factor (determines brake balance)
  braking_factor=.32
  ; Hand braking capability in Nm (torque)
  max_handbrake_torque=400
  skidding
  {
    ; Slip ratio
    long_start=0.2
    long_max=1.0
    ; Negative slip ratio
    long_start_n=0.2
    long_max_n=1.0
    ; Lateral; slip velocity
    lat_start=0.2
    lat_max=2.0
  }
  model
  {
    file=tire_rr.dof
  }
  pacejka~pacejka_default
}
camera0
{
  offset
  {
    x=0.001563
    y=-0.406250
    z=-4.755003
  }
  angle
  {
    x=15.138849
    y=180.173615
    z=0.000000
  }
  name=Behind
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
}
camera1
{
  offset
  {
    x=0.415624
    y=-0.150000
    z=-3.335001
  }
  angle
  {
    x=12.916677
    y=-27.430536
    z=0.000000
  }
  name=Side view
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
}
camera2
{
  offset
  {
    x=-0.589064
    y=-1.162499
    z=-1.080001
  }
  angle
  {
    x=1.527779
    y=-207.291458
    z=12.934029
  }
  follow
  {
    pitch=0
    yaw=1
    roll=1
  }
}
camera3
{
  follow
  {
    pitch=
    yaw=1
    roll=
  }
  offset
  {
    x=0.342190
    y=-0.170833
    z=-2.409997
  }
  angle
  {
    x=-0.694461
    y=36.632000
    z=-2.083333
  }
  name=Wheels
}
camera4
{
  offset
  {
    x=-0.493750
    y=-2.308333
    z=-8.135000
  }
  angle
  {
    x=2.361111
    y=-110.763885
    z=0.000000
  }
}
camera6
{
  follow
  {
    pitch=1
    yaw=1
    roll=0
  }
  offset
  {
    x=0.003125
    y=-0.227084
    z=-2.569997
  }
  angle
  {
    x=0.416667
    y=-150.520996
    z=-0.434030
  }
}
camera7
{
  offset
  {
    x=-0.029688
    y=-1.083335
    z=-2.739993
  }
  angle
  {
    x=-29.166676
    y=-180.034927
    z=0.000000
  }
  follow
  {
    pitch=0
    yaw=1
    roll=1
  }
}
camera9
{
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0.010938
    y=-0.758326
    z=0.320004
  }
  angle
  {
    x=0.000000
    y=-180.000000
    z=0.000000
  }
}
camera8
{
  offset
  {
    x=-1.079692
    y=-0.562500
    z=-1.005000
  }
  angle
  {
    x=16.111115
    y=99.999863
    z=0.000000
  }
  follow
  {
    pitch=0
    yaw=1
    roll=1
  }
}
camera5
{
  follow
  {
    pitch=
    yaw=1
    roll=
  }
  offset
  {
    x=0.000000
    y=-1.000000
    z=-8.185002
  }
  angle
  {
    x=21.666662
    y=-105.555519
    z=2.430554
  }
  name=High
}
