;
; 2003 MINI Cooper S by Stecki
; stecki@quakerally.com
; car.ini and Pacejka by Alex Forbin
;  
car
{
  name=BMW MINI Cooper S (special edition)
  year=2004
  credits=X-tReMe tUnInG bY OneTTo tUniNg
  comments=NOS Equipped! 
  id=mcsbrg
  version=050b7
  ; Number of wheels
  wheels=4
  ; Skidding
  skid
  {
    sample=skid.wav
  }
  shadow
  {
    texture=shadow.tga
    width=2.3
    length=4
  }
  ; Center of gravity of car sprung mass
  cg
  {
    x=0
    y=-0.13
    z=.25
  }
}
body
{
  ; Weight of the car's body (kg)
  ; This excludes wheels, driver and fuel
  mass=950
  ; Inertia values; X/Y/Z=pitch, yaw (heading), roll
  inertia
  {
    x=897 ;648
    y=986 ;986
    z=427  ;427
  }
  width=1.725  ;1.688
  height=1.306 ;1.208
  length=3.625  ;3.626
  manual_box=1
  ; Stub graphics (will be overruled if a model is present)
  cockpit_start=1
  cockpit_length=1
  model
  {
    file=body.dof
  }
  model_incar
  {
    file=body.dof
  }
  model_braking_l
  {
    file=brakelights.dof
  }
}
steer
{
  ; Position (stub gfx)
  x=0.35
  y=.3
  z=.32
  radius=10
  ; Rotation towards the driver
  xa=17.5
  ; Max angle of rotation (angle = -lock/2..lock/2)
  lock=450
  model_low
  {
    file=steerwhl_lo.dof
  }
  model
  {
    file=steerwhl_hi.dof
  }
}
engine
{
  ; Position (stub gfx)
  x=0
  y=.05
  z=-0.5
  size=.25
  mass=80
  max_rpm=8500
  idle_rpm=950
  stall_rpm=650
  start_rpm=800
  autoclutch_rpm=2000
  starter=1
  starter_torque=100
  start_stalled=0
  curve_torque=torque.crv
  max_torque=410
  shifting
  {
    automatic=1
    shift_up_rpm=6950
    shift_down_rpm=2800
    time_to_declutch=200
    time_to_clutch=200
  }
  ; Inertia of engine parts
  inertia
  {
    ; Rotational inertia of engine parts (kg*m^2)
    engine=0.22
    final_drive=0.12
  }
  braking_coeff=1.05
  rolling_friction_coeff=0.6
  friction=0
  sample=engine.wav
  sample_rpm=8000
}
gearbox
{
  gears=7
  gear0
  {
    ratio=-4.58
    inertia=0.11
  }
  gear1
  {
    ratio=4.17 
    inertia=0.13
  }
  gear2
  {
    ratio=2.62 
    inertia=0.09
  }
  gear3
  {
    ratio=1.97 
    inertia=0.07
  }
  gear4
  {
    ratio=1.61 
    inertia=0.05
  }
  gear5
  {
    ratio=1.33 
    inertia=0.03
  }
  gear6
  {
    ratio=1.09 
    inertia=0.03
  }
  end_ratio=2.98
}
aero
{
  body
  {
    ; Application center relative to the CG
    center=0 .25 0
    ; Longitudinal drag coefficient (Cx, X-axis is SAE's car longitudinal)
    cx=0.28
    ; Frontal area in m^2
    area=1.97
  }
}
clutch
{
  max_torque=1000
}
handbrakes
{
  wheels=23
}
antirollbar
{
  count=2
  arb0
  {
    susp_left=2
    susp_right=3
    k=3500
  }
  arb1
  {
    susp_left=0
    susp_right=1
    k=3500
  }
}
; Suspension
; FRONT WHEELS
susp2
{
  x=-0.72
  y=0.27
  z=1.18
  restlen=.45
  minlen=.37
  maxlen=.52
  k=45000
  bump_rate=4500
  rebound_rate=4500
  roll_center
  {
    x=0
    y=-0.45
    z=0
  }
  radius=.04
  slices=5
  model
  {
    file=
    scale
    {
      x=1
      y=1
      z=1
    }
  }
}
susp3
{
  x=0.72
  y=0.27
  z=1.18
  restlen=.45
  minlen=.37
  maxlen=.52
  radius=.04
  slices=5
  k=45000
  bump_rate=4500
  rebound_rate=4500
  roll_center
  {
    x=0
    y=-0.45
    z=0
  }
}
; REAR WHEELS
susp0
{
  x=-.72
  y=0.27
  z=-1.28
  restlen=.43
  minlen=.37
  maxlen=.52
  radius=.04
  slices=5
  k=45000
  bump_rate=4500
  rebound_rate=4500
  roll_center
  {
    x=0
    y=-0.45
    z=0
  }
}
susp1
{
  x=.72
  y=0.27
  z=-1.28
  restlen=.43
  minlen=.37
  maxlen=.52
  radius=.04
  slices=5
  k=45000
  ; Damper bump rate (N/m/s)
  bump_rate=4500
  ; Rebound rate (N/m/s)
  rebound_rate=4500
  ; Roll center
  roll_center
  {
    x=0
    y=-.45
    z=0
  }
}
;
; Wheels
;
tire_model
{
  relaxation_length_lat=0.91
  relaxation_length_long=.091
  damping_speed=8.45
  damping_coefficient_lat=1
  damping_coefficient_long=1
}
pacejka
{
  ; Pacejka constants for all tires
  ; Lateral force
  a0=1.332
  a1=-45 
  a2=2300
  a3=1100
  a4=1 
  a5=0.1
  a6=-0.6589
  a7=0.0565
  a8=0
  a9=0
  a10=0
  a111=0
  a112=0
  a12=0
  a13=0
  b0=1.28
  b1=-98 
  b2=1900 ;1200 
  b3=30
  b4=166
  b5=-0.2
  b6=0
  b7=0
  b8=0.252
  b9=0
  b10=0
  c0=2.46
  c1=-2.77
  c2=-2.9
  c3=-0
  c4=-3.6
  c5=0.1460 ;-0.1
  c6=0.0004
  c7=0.22
  c8=-2.31
  c9=3.87
  c10=0.0007
  c11=-0.05
  c12=-0.006
  c13=0.33
  c14=-0.04 
  c15=-0.4
  c16=0.092
  c17=0.0114
  optimal_slipratio=0.15 
  optimal_slipangle=0.18 
}
wheel0
{
  x=0
  y=0
  z=0
  steering=0
  powered=1
  mass=18
  inertia=0.84
  radius=.3
  rolling_coeff=0.043
  width=.28
  slices=20
  max_braking=1300
  braking_factor=.56
  tire_rate=350000
  pacejka~pacejka
  {
  }
  model
  {
    file=r_wheel.dof
  }
  model_brake
  {
    file=brake_br.dof
  }
}
wheel1
{
  ; Position
  x=0
  y=0
  z=0
  steering=0
  powered=1
  mass=18
  inertia=0.84
  radius=.3
  rolling_coeff=0.043
  width=.28
  slices=20
  tire_rate=350000
  pacejka~pacejka
  {
  }
  max_braking=1300
  braking_factor=.56
  model
  {
    file=l_wheel.dof
  }
  model_brake
  {
    file=brake_bl.dof
  }
}
wheel2
{
  ; Position
  x=0
  y=0
  z=0
  steering=1
  lock=48
  powered=1
  mass=18
  inertia=0.84
  radius=.3
  rolling_coeff=0.043
  width=.28
  slices=20
  tire_rate=390000
  pacejka~pacejka
  {
  }
  max_braking=4000
  max_handbrake_torque=-1350
  braking_factor=.56
  model
  {
    file=r_wheel.dof
  }
  model_brake
  {
    file=brake_fr.dof
  }
}
wheel3
{
  ; Position
  x=0
  y=0
  z=0
  steering=1
  lock=48
  powered=1
  mass=18
  inertia=0.84
  radius=.3
  rolling_coeff=0.043
  width=.28
  slices=20
  tire_rate=390000
  pacejka~pacejka
  {
  }
  max_braking=4000
  max_handbrake_torque=-1350
  braking_factor=.56
  model
  {
    file=l_wheel.dof
  }
  model_brake
  {
    file=brake_fl.dof
  }
}
camera0
{
  offset
  {
    x=-0.106250
    y=-1.252083
    z=-6.795010
  }
  angle
  {
    x=15.138849
    y=180.173615
    z=0.000000
  }
  name=Behind
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
}
camera1
{
  offset
  {
    x=0.042188
    y=-0.343750
    z=-3.480002
  }
  angle
  {
    x=16.527784
    y=-180.729126
    z=0.000000
  }
  name=Side view
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  fov=65
}
camera2
{
  offset
  {
    x=-0.010938
    y=-0.737499
    z=0.539999
  }
  angle
  {
    x=9.444441
    y=179.340210
    z=0.000000
  }
  follow
  {
    pitch=0
    yaw=1
    roll=1
  }
}
camera3
{
  follow
  {
    pitch=
    yaw=1
    roll=
  }
  offset
  {
    x=-0.129684
    y=0.291667
    z=-4.195009
  }
  angle
  {
    x=11.388874
    y=31.076487
    z=2.256955
  }
  name=Wheels
}
camera4
{
  offset
  {
    x=0.307810
    y=0.406252
    z=-4.794994
  }
  angle
  {
    x=31.666660
    y=121.874908
    z=3.645833
  }
}
camera6
{
  follow
  {
    pitch=1
    yaw=1
    roll=0
  }
  offset
  {
    x=-0.095312
    y=0.297916
    z=-3.030005
  }
  angle
  {
    x=14.861120
    y=-357.813049
    z=19.357632
  }
  fov=60
}
camera7
{
  offset
  {
    x=1.135937
    y=0.622915
    z=-5.964993
  }
  angle
  {
    x=12.222219
    y=-157.465439
    z=21.180538
  }
  follow
  {
    pitch=0
    yaw=1
    roll=1
  }
}
camera9
{
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0.376249
    y=-0.599992
    z=-0.350000
  }
  angle
  {
    x=3.194444
    y=-183.993134
    z=0.000000
  }
  fov=65
  model=1
  wheels=0
  view=2
  name=Inside Driver
}
camera8
{
  offset
  {
    x=0.634371
    y=0.483333
    z=-4.820003
  }
  angle
  {
    x=90.416481
    y=249.652649
    z=-0.347222
  }
  follow
  {
    pitch=0
    yaw=1
    roll=1
  }
}
camera5
{
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  offset
  {
    x=-0.007813
    y=0.179167
    z=-3.814991
  }
  angle
  {
    x=10.555405
    y=-72.222183
    z=2.777774
  }
  name=High
  fov=60
}

audio
{
   skid
   {
      sample=skid.wav
   }
   shiftout
   {
      sample=shift.wav
   }
  acc_all
  {
    attack=1300
    decay=1300
  }

  accelerate_out
  {
   volume=2
   smp0~audio.acc_all
   {
   sample=engine.wav
   min=0
   max=7000
   natural=9200
   attack=2000
   decay=2000
   }
  }

  decelerate_out
  {
   volume=1
   smp0~audio.acc_all
   {
   sample=engine.wav
   min=0
   max=7000
   natural=9000
   attack=2000
   decay=2000
   }
  } 

  accelerate_in
  {
   volume=1
   smp0~audio.acc_all
   {
   sample=engine.wav
   min=0
   max=7000
   natural=9200
   attack=2000
   decay=2000
   } 
  }

  decelerate_in
  {
   volume=0.75
   smp0~audio.acc_all
   {
   sample=engine.wav
   min=0
   max=7000
   natural=9000
   attack=2000
   decay=2000
   }
  }
}