car
{
  name=Renault Megane II phase 2 2.0 dCi
  year=2006
  credits=
  id=renaultmeganedci
  version=090
  comments=
  wheels=4
  ff_factor=0.8
  skid
  {
    sample=skid.wav
  }
  shadow
  {
    texture=shadow.tga
    width=2.1
    length=5.0
  }
  cg
  {
    x=0
    y=0.25	;55 cm (~38%)
    z=0.25	;59/41% (61/39% empty)
  }
}
graphics
{
  shadow
  {
    model
    {
      file=body.dof
      use_shaders=0
    }
  }
}
body
{
  mass=1145	;+120 kg unsprung = 1245
		;1175 kg curb weight +70 kg driver =1245 kg total
  inertia
  {
      x=2000
      y=2200
      z=460
  }
  width=1.78	;1777 mm, 1518/1514 mm track
  height=1.4	;1457 mm, 120 mm ground clearance
  length=4.2	;4209 mm, 2625 mm wheelbase
  manual_box=0
  model
  {
    file=body.dof
  }
  model_incar
  {
    file=int.dof
  }
  model_braking_l
  {
    file=bls.dof
  }
  model_lightroad_l
  {
    file=lum.dof
  }
}
steer
{
  x=0.37
  y=0.6
  z=0.46
  xa=26
  lock=1152		;3.2 turns lock-to-lock, 10.50 m turning circle
  linearity=0.8	        ;900/1152
  model
  {
    file=volant.dof
  }
}
engine
{
  mass=0
  idle_rpm=850
  curve_torque=couple.crv
  max_torque=1.0
  max_rpm=5300
  rev_limiter_time=3
  torque_reaction=0
  autoclutch_rpm=0
  starter=1
  starter_torque=180
  stall_rpm=500
  start_rpm=800
  start_stalled=1
  shifting
  {
    automatic=0
    shift_up_rpm=4000
    shift_down_rpm=2000
    time_to_declutch=180
    time_in_neutral=100
    time_to_clutch=180
    time_to_declutch_down=180
    time_in_neutral_down=100
    time_to_clutch_down=180
  }
  inertia
  {
    engine=0.20
  }
  braking_coeff=3.7
}

clutch
{
  max_torque=380
}

gearbox
{
  gears=7
  gear0
  {
    ratio=-3.55
    inertia=0.2
  }
  gear1
  {
    ratio=3.537
    inertia=0.02
  }
  gear2
  {
    ratio=1.8985
    inertia=0.04
  }
  gear3
  {
    ratio=1.246
    inertia=0.06
  }
  gear4
  {
    ratio=0.9159
    inertia=0.08
  }
  gear5
  {
    ratio=0.728
    inertia=0.10
  }
  gear6
  {
    ratio=0.605
    inertia=0.12
  }
}

handbrakes
{
  wheels=23
}
differential
{
  type=1
  ratio=3.94
  friction=58
  inertia=0.1
  locking_coeff=0
  output0=0
  output1=1
}
abs
{
  enable=1
  max_velocity_ratio=1.06
  min_velocity_ratio=1.05
  min_velocity=6
}
traction_control
{
  max_velocity_ratio=1.06
   min_velocity_ratio=1.055
   min_velocity=3
   enable=1

}
aero
{
   body
   {
      center=0 0 0
      cx=0.31
      area=2.16		;measured from model
   }
   wings=2
   wing0
   {
      name=Front axle lift
      span=1
      cord=1
      coeff_drag=0
      coeff_down=-5
      center=0 0 1.3125
      angle=0
      angle_offset=1
   }
   wing1
   {
      name=Rear axle lift
      span=1
      cord=1
      coeff_drag=0
      coeff_down=-5
      center=0 0 -1.3125
      angle=0
      angle_offset=1
   }
}
antirollbar
{
  count=2
  arb0
  {
    susp_left=0
    susp_right=1
    k=15000
  }
  arb1
  {
    susp_left=2
    susp_right=3
    k=15000
  }
}
susp_front
{
  y=0.12
  z=1.3125		;2625 mm wheelbase
  restlen=0.25
  minlen=0.0
  maxlen=0.26		
  k=22000		;1.30 Hz (1125 kg sprung weight, 59/41)
  bump_rate=1800	;
  bump_function=0
  rebound_rate=3600	;
  rebound_function=0
  anti_pitch=0.4
  roll_center
  {
    x=0
    y=-0.18		;~12 cm
    z=0
  }
}
susp_rear
{
  y=0.12
  z=-1.3125
  restlen=0.21
  minlen=0.0
  maxlen=0.22
  k=20000		;1.49 Hz
  bump_rate=1200	;
  bump_function=0
  rebound_rate=3200	;
  rebound_function=0
  anti_pitch=0.2
  roll_center
  {
    x=0
    y=-0.1		;~20 cm
    z=0
  }
}
susp0~susp_front
{
  x=0.759	;1518 mm front track
}
susp1~susp_front
{
  x=-0.759
}
susp2~susp_rear
{
  x=0.757	;1514 mm rear track
}
susp3~susp_rear
{
  x=-0.757
}

pacejka
{
  a0=1.4	
  a1=-46	;ps (from pacejkaseries.txt, 205/55 R16)
  a2=1300
  a3=2000
  a4=11
  a5=0.015
  a6=-0.25
  a7=1.0
  a8=-0.03
  a9=-0.001
  a10=-0.15
  a111=-4.32	;ps
  a112=-0.29
  a12=17.8
  a13=-2.4

  b0=1.5
  b1=-92	;ps doubled
  b2=1280
  b3=23.3
  b4=325
  b5=0.08
  b6=0.0
  b7=0.05
  b8=-0.024
  b9=0.015
  b10=0.25
  b11=-86
  b12=0.0
  
  c0=2.3
  c1=-3.8
  c2=-3.14
  c3=-1.0
  c4=-7.2
  c5=0.0
  c6=0.0
  c7=0.044
  c8=-0.58
  c9=0.18
  c10=0.043
  c11=0.048
  c12=-0.0035
  c13=-0.18
  c14=-0.04
  c15=-1.029
  c16=0.27
  c17=-1.1

  optimal_slipratio=0.12
  optimal_slipangle=0.22
}


wheel_front
{
  x=0		;205/55 R16
  y=0
  z=0
  steering=1
  powered=1
  camber=0
  lock=65
  mass=25
  inertia=1
  width=0.205
  radius=0.3262
  max_braking=2400
  braking_factor=0.65
  tire_rate=140000
  pacejka~pacejka
  {
  }
}
wheel_rear
{
  x=0
  y=0
  z=0
  steering=0
  powered=0
  camber=0
  mass=25
  inertia=1
  width=0.205
  radius=0.3262
  max_braking=1350
  max_handbrake_torque=4000
  braking_factor=0.4
  tire_rate=140000
  pacejka~pacejka
  {
  }
}
wheel0~wheel_front
{
  toe=-0.1
  model
  {
    file=rg.dof
  }
  model_brake
  {
    file=f_g.dof
  }
}
wheel1~wheel_front
{
  toe=0.1
  model
  {
    file=rd.dof
  }
  model_brake
  {
    file=f_d.dof
  }
}
wheel2~wheel_rear
{
  toe=-0.1
  model
  {
    file=rg.dof
  }
  model_brake
  {
    file=f_g.dof
  }
}

wheel3~wheel_rear
{
  toe=0.1
  model
  {
    file=rd.dof
  }
  model_brake
  {
    file=f_d.dof
  }
}

camera0
{
  name=Driver
  fov=55
  model=1
  view=0
  wheels=0
  offset
  {
    x=0.37
    y=0.89
    z=-0.1
  }
  offset_to
  {
    x=0.37
    y=-0.2
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.2
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera1
{
  name=Driver, left
  fov=55
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.37
    y=0.89
    z=-0.1
  }
  offset_to
  {
    x=10
    y=0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.2
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera2
{
  name=Driver, right
  fov=55
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.37
    y=0.89
    z=-0.1
  }
  offset_to
  {
    x=-10
    y=0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.2
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera3
{
  name=Driver, rear
  fov=-65
  model=0
  wheels=0
  view=0
  offset
  {
    x=0.1
    y=0.89
    z=-0.2
  }
  offset_to
  {
    x=-1
    y=0.5
    z=-10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.1
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera4
{
  name=Chase
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.5
    z=-4
  }
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  angle
  {
    x=15
    y=180
    z=0
  }
}
camera5
{
  name=Free exterior
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.5
    z=-5
  }
  follow
  {
    pitch=1
    yaw=0
    roll=1
  }
  angle
  {
    x=15
    y=270
    z=0
  }
}
camera6
{
  name=Chase rear
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.5
    z=-7
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  angle
  {
    x=15
    y=0
    z=0
  }
}
camera7
{
	name=Side
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=1.2
		y=-0.3
		z=-2.6
	}
	angle
	{
		x=0
		y=-170
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}

}
camera8
{
	name=Bumper
	fov=60
	model=2
	wheels=0
	view=0
	offset
	{
		x=0
		y=-0.70
		z=2.4
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=5
		y=180
		z=0
	}
}
camera9
{
	name=Bonnet
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=0
		y=-0.85
		z=0.83
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=5
		y=180
		z=0
	}
}

audio
{
  skid
  {
    sample=skid.wav
  }
  shiftout
  {
    sample=shiftout.wav
  }
  shiftin
  {
    sample=shiftin.wav
  }
  throttle_off
  {
  smp0
     {
      sample=thr-off.wav
      min=5275
      max=5301
     }
  }
  accelerate_out
  {
    smp0
    {
      sample=idle.wav
      volume=0.9
      min=300
      max=2000
      decay=2000
      natural=1700
    }
    smp1
    {
      sample=low.wav
      min=1500
      max=2400
      attack=1000
      decay=1000
      natural=2900
      volume=1.3
    }
    smp2
    {
      sample=mid.wav
      min=2400
      max=2700
      attack=2200
      decay=2700
      natural=2700
      volume=0.5
    }
    smp3
    {
      sample=mid.wav
      min=2700
      max=3000
      attack=2600
      decay=3000
      natural=2700
      volume=0.7
    }
    smp4
    {
      sample=mid.wav
      min=3000
      max=3200
      attack=2900
      decay=3200
      natural=2700
      volume=0.9
    }
    smp5
    {
      sample=mid.wav
      min=3200
      max=3200
      attack=3100
      decay=3200
      natural=2700
      volume=1.1
    }
    smp6
    {
      sample=hi.wav
      min=3500
      max=4000
      attack=3750
      decay=4000
      natural=3000
      volume=0.8
    }
    smp7
    {
      sample=hi4000.wav
      min=3900
      max=4500
      attack=3900
      decay=4500
      natural=4200
      volume=0.5
    }
    smp8
    {
      sample=hi4000.wav
      min=4400
      max=7500
      attack=4400
      decay=6000
      natural=4200
      volume=0.65
    }
   smp9
      {
	   volume=0.2
         sample=turbo.wav
         min=1100
         max=7000
         natural=290
	   attack=5
          decay=3000
      }
  }
  decelerate_out
  {
    smp0
    {
      sample=idle.wav
      volume=0.9
      min=300
      max=1000
      decay=100
      natural=1700
    }
    smp1
    {
      sample=midoff.wav
      volume=1.1
      min=1000
      max=2000
      decay=10000
      natural=5200
    }
    smp2
    {
      sample=highoff.wav
      volume=1.2
      min=8000
      max=10000
      attack=8000
      natural=6000
    }
   smp3
      {
	 volume=3
         sample=thr-off2.wav
         min=5190
         max=5210
         natural=5200
      }
    smp4
    {
      sample=mid.wav
      min=3000
      max=3200
      attack=2900
      decay=3200
      natural=2500
      volume=1
    }
    smp5
    {
      sample=mid.wav
      min=3200
      max=3200
      attack=3100
      decay=3200
      natural=2500
      volume=1.2
    }
    smp6
    {
      sample=hi.wav
      min=3500
      max=4000
      attack=3750
      decay=4000
      natural=2800
      volume=0.9
    }
    smp7
    {
      sample=hi4000.wav
      min=3900
      max=4500
      attack=3900
      decay=4500
      natural=4000
      volume=0.6
    }
    smp8
    {
      sample=hi4000.wav
      min=4400
      max=7500
      attack=4400
      decay=6000
      natural=4000
      volume=0.75
    }
  }
  accelerate_in
  {
    smp0
    {
      sample=idle-int.wav
      volume=2.5
      min=300
      max=1000
      decay=700
      natural=1700
    }
    smp1
    {
      sample=mid-int.wav
      min=1500
      max=3700
      attack=3000
      decay=4000
      natural=2700
      volume=6
    }
    smp2
    {
      sample=hi2-int.wav
      min=3700
      max=7500
      attack=3000
      decay=1000
      natural=4100
      volume=8
    }
     smp3
    {
      sample=mid.wav
      min=1100
      max=3800
      attack=4400
      decay=4400
      natural=2500
      volume=0.3
    }
   smp4
      {
	   volume=0.09
         sample=turbo.wav
         min=1100
         max=7000
         natural=290
	   attack=5
          decay=3000
      }
  }
  decelerate_in
  {
    smp0
    {
      sample=idle-int.wav
      volume=2.5
      min=300
      max=1000
      decay=700
      natural=1700
    }
    smp1
    {
      sample=midoff.wav
      volume=0.5
      min=1000
      max=2000
      decay=10000
      natural=5200
    }
    smp2
    {
      sample=highoff.wav
      volume=0.7
      min=1900
      max=10000
      attack=8000
      natural=6000
    }
   smp3
      {
	 volume=1.5
         sample=thr-off2.wav
         min=5190
         max=5210
         natural=5200
      }
  }
  wind
  {
    smp0
    {
      sample=wind_ext.wav
      volume=0.9
      ; Speeds in m/s
      min=0
      max=19.44
      natural=40
    }
    smp1
    {
      sample=wind_ext.wav
      volume=5
      ; Speeds in m/s
      min=19.4
      max=25
      natural=40
    }
    smp2
    {
      sample=wind_ext.wav
      volume=10
      ; Speeds in m/s
      min=25
      max=36.11
      natural=40
    }
    smp3
    {
      sample=wind_ext.wav
      volume=60
      ; Speeds in m/s
      min=36.11
      max=100.11
      natural=35
    }
  }
}