car
{
  name=Aviva Pekoe Test
  year=2012
  credits=
  id=City
  version=090
  comments=???
  wheels=4
  skid
  {
    sample=skid.wav
  }
  shadow
  {
    texture=shadow.tga
    width=2.2
    length=4.8
    offset_z=0
    offset=0
  }
  cg
  {
    x=0
    y=0.33
    z=0.26	;59/41% (61/39% empty)
  }
  ff_factor=0.8
	ff_gain=0
}
body
{
  mass=920
  inertia
  {
      x=1900
      y=2100
      z=460
  }
  width=1.986	;1986 mm
  height=1.33	;1332 mm
  length=4.10	;4118 mm
  manual_box=0
  model
  {
    file=pekoi.dof
  }
  model_incar
  {
    file=pekoi.dof
  }
  model_braking_l
  {
    file=brakes.dof
  }
  model_light_l
  {
    file=lights.dof
  }
  model_reverse_l
  {
    ; Reverse gear indicators
    file=re.dof
  }
  model_reverse_r
  {
    file=re.dof
}
  model_collide
  {
    file=export.dof
}
}
steer
{
  x=0.38
  y=0.52
  z=0.75
  xa=15
  lock=1152		;3.2 turns lock-to-lock, 10.50 m turning circle
  linearity=0.78
  model
  {
    file=swheel.dof
  }
}
lights
{
  ; Projected lights
  light0
  {
    texture=light.tga
    ; Field of view (vertical)
    fov=25
    ; Aspect (horizontal)
    aspect=6
    ; Distance to car
    z=1
    ; Pitching with respect to car (in degrees)
    pitch=0
    ; Fall-off distance
    far=100
  }
  light1
  {
    texture=light.tga
    ; Field of view (vertical)
    fov=25.0
    ; Aspect (horizontal)
    aspect=3.3
    ; Distance to car
    z=1
    ; Pitching with respect to car (in degrees)
    pitch=10
  }
  light2
  {
    texture=light0.tga
    ; Field of view (vertical)
    fov=35.0
    ; Aspect (horizontal)
    aspect=2.8
    ; Distance to car
    z=1
    ; Pitching with respect to car (in degrees)
    pitch=100
  }
}
flares
{
  ; Front lights
  flare0
  {
    pos=-0.60 0.51 1.29
    color=1.2 1.9 1.5
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.7
	intensity=0.7
        hor_scale=0.7
  }
  flare1
  {
    pos=0.60 0.51 1.29
    color=1.2 1.9 1.5
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.7
	intensity=0.7
        hor_scale=0.7
  }
  flare2
  {
    pos=-0.60 0.51 1.29
    color=1.2 1.9 1.5
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.7
	intensity=0.7
        hor_scale=0.7
  }
  flare3
  {
    pos=0.60 0.51 1.29
    color=1.2 1.9 1.5
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.7
	intensity=0.7
        hor_scale=0.7
  }
  ; Brake lights
  flare4
  {
    rule=brake
    pos=-0.6 0.51 -1.39
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.7
	intensity=0.5
	z_offset=-1000
  }
  flare5
  {
    rule=brake
    pos=0.6 0.51 -1.39
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.7
	intensity=0.5
	z_offset=-1000
  }
  flare6
  {
    rule=brake
    pos=-0.6 0.51 -1.39
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.7
	intensity=0.5
	z_offset=-1000
  }
  flare7
  {
    rule=brake
    pos=0.6 0.51 -1.39
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.7
	intensity=0.5
	z_offset=-1000
  }
  ;3rd Brake lights
  flare8
  {
    rule=brake
    pos=0 0.83 -1.46
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.2
	intensity=0.2
	z_offset=-1000
        hor_scale=0.4
  }
  flare9
  {
    rule=brake
    pos=0 0.83 -1.46
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.2
	intensity=0.2
	z_offset=-1000
        hor_scale=0.4
  }
}
engine
{
	mass=0
	idle_rpm=830
	max_rpm=7000
	stall_rpm=500
	start_rpm=1200
	start_stalled=0
	min_warn_rpm=1200
                max_warn_rpm=7000
       	reaction=0.45
        	starter=1
	starter_torque=75
	autoclutch_rpm=840
	curve_torque=19.crv
	max_torque=259
	shifting
	{
		automatic=0
		shift_up_rpm=4200 ; Maximum power rpm
		shift_down_rpm=2100
		time_to_declutch=100
		time_to_clutch=80
		time_in_neutral=100
		time_to_declutch_down=135
		time_to_clutch_down=135
		time_in_neutral_down=135
	}
	inertia
	{
		engine=0.295
		final_drive=0.1
	}
	braking_coeff=3.1
	rolling_friction_coeff=0.1
	;sample=
	;sample_rpm=
}
  jitter
  {
    amplitude=1.05
    time_min=300
    time_var=400
    frequency_min=4
    frequency_var=7
  }

clutch
{
  max_torque=350
}
gearbox
{
   gears=7
   gear0
   {
      ratio=-3.78
      inertia=0.2
   }
   gear1
   {
      ratio=3.54
      inertia=0.29
   }
   gear2
   {
      ratio=2.31
      inertia=0.12
   }
   gear3
   {

      ratio=1.60
      inertia=0.06
   }
   gear4
   {
      ratio=1
      inertia=0.04
   }
   gear5
   {
      ratio=0.85
      inertia=0.04
   }
   gear6
   {
      ratio=0.75
      inertia=0.02
   }
}



handbrakes
{
  wheels=23
}
differential
{
  type=0
  ratio=3.80
  inertia=0.1
  locking_coeff=250
  output0=0
  output1=1
}
traction_control
{
  enable=1
  max_velocity_ratio=1.13
  min_velocity_ratio=1.09
  min_velocity=2.5	;250 km/h speed limiter
}
abs
{
  enable=1
  max_velocity_ratio=1.1
  min_velocity_ratio= 1.04
  min_velocity=19
 braking_factor=0.7
}
aero
{
   body
   {
      center=0 0 0
      cx=0.30
      area=2.22		;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=6000
  }
  arb1
  {
    susp_left=2
    susp_right=3
    k=6980
  }
}
susp_front
{
  y=0.12
  z=1.11
restlen=0.193 ;0.325 ;0.17
  maxlen=0.145 ;0.25  ;0.2
  minlen=0.008 ;0.11  ;-0.05
  warplen=0.2100
  k=26500
damper_curve=damperfront.crv
  bumpstop_len=0.01
  bumpstop_k=112000
  bumpstop_damping=1600
  reboundstop_len=0.01
  reboundstop_k=28000
  reboundstop_damping=1600
  anti_pitch=0.0
  roll_center
  {
    x=0
    y=-0.01		
    z=0
  }
}
susp_rear
{
  y=0.04
  z=-1.32
restlen=0.15 ;0.325 ;0.17
  maxlen=0.159 ;0.25  ;0.2
  minlen=0.008 ;0.11  ;-0.05
  warplen=0.2100
  k=18000
damper_curve=damperrear.crv
  bumpstop_len=0.01
  bumpstop_k=112000
  bumpstop_damping=1600
  reboundstop_len=0.005
  reboundstop_k=28000
  reboundstop_damping=1600
  anti_pitch=0.1
  roll_center
  {
    x=0
    y=0.08	
    z=0
  }
}
susp0~susp_front
{
  x=0.746
}
susp1~susp_front
{
  x=-0.746
}
susp2~susp_rear
{
  x=0.746
}
susp3~susp_rear
{
  x=-0.746
}

pacejka
{
  a0=1.4	
  a1=-60
  a2=1330
  a3=2000
  a4=11
  a5=0.015
  a6=-0.25
  a7=1.0
  a8=-0.03
  a9=-0.001
  a10=-0.15
  a111=-5
  a112=-0.29
  a12=17.8
  a13=-2.4

  b0=1.5
  b1=-90
  b2=1300
  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.25
}


wheel_front
{
  x=0		;
  y=0
  z=0
  steering=1
  ackerman=0
  powered=1
  camber=-1.85
  lock=72
  mass=32
  inertia=1
  width=0.185
  radius=0.3
  max_braking=4000
  braking_factor=1
  tire_rate=210000
  pacejka~pacejka
  {
  }
}
wheel_rear
{
  x=0
  y=0
  z=0
  steering=0
  reverse_steering=0
  lock=0
  powered=0
  camber=-0.53
  mass=23
  inertia=1
  width=0.185
  radius=0.3
  max_braking=950
  max_handbrake_torque=9000
  braking_factor=1
  tire_rate=210000
  pacejka~pacejka
  {
  }
}
wheel0~wheel_front
{
  toe=0
  model
  {
    file=left.dof
  }
}
wheel1~wheel_front
{
  toe=0
  model
  {
    file=right.dof    
  }
}
wheel2~wheel_rear
{
  toe=0
  model
  {
    file=left.dof    
  }
}

wheel3~wheel_rear
{
  toe=0
  model
  {
    file=right.dof    
  }
}

camera0
{
  name=Driver
  fov=55
  model=1
  view=0
  wheels=0
  offset
  {
    x=0.42
    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=1
    k=0
    damping=0
    maxdist=0
  }
}
camera1
{
  name=Driver, left
  fov=55
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.4
    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=1
    k=0
    damping=0
    maxdist=0
  }
}
camera2
{
  name=Driver, right
  fov=55
  model=1
  wheels=0
  view=1
  offset
  {
   x=0.4
    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=1
    k=0
    damping=0
    maxdist=0
  }
}
camera3
{
  name=Driver, rear
  fov=-65
  model=1
  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=1
    k=0
    damping=0
    maxdist=0
  }
}
camera4
{
  name=Rear chase
  fov=60
  model=0
  view=0
  wheels=0
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  offset
  {
    x=0
    y=-0.8
    z=-6
  }
  angle
  {
    x=10
    y=180
    z=0
  }
}
camera5
{
  name=Exterior
  fov=60
  model=0
  view=0
  wheels=0
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=0
    y=-0.5
    z=-5
  }
  angle
  {
    x=10
    y=130
    z=0
  }
}
camera6
{
  name=Rear chase
  fov=60
  model=0
  view=0
  wheels=0
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  offset
  {
    x=0
    y=-0.8
    z=-6
  }
  angle
  {
    x=10
    y=0
    z=0
  }
}
camera7
{
  name=centerconsole
  fov=40
  model=1
  wheels=0
  view=1
  offset
  {
   x=0.0
    y=0.55
    z=-0.1
  }
  offset_to
  {
    x=0
    y=-0.55
    z=8
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.2
  }
  dst
  {
    mass=1
    k=0
    damping=0
    maxdist=0
  }
}
camera8
{
  name=Far
  fov=20
  model=0
  view=0
  wheels=0
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=0
    y=-0.5
    z=-20
  }
  angle
  {
    x=10
    y=50
    z=0
  }
}
camera9
{
  name=Hood
  fov=60
  model=0
  wheels=0
  view=0
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0
    y=-1.1
    z=0.3
  }
  angle
  {
    x=5
    y=180
    z=0
  }
}


audio
{
  skid
  {
    sample=audio/skid.wav
  }
  horn
  {
    sample=horn.wav
  }
  shiftout
  {
    sample=audio/shiftout.wav
  }
  shiftin
  {
    sample=audio/shiftin.wav
  }
  acc_all
  {
    attack=1350
    decay=1350
    volume=1
  }
  accelerate_out
  {
    smp0~audio.acc_all
    {
      sample=audio\moteur\1000.wav
      min=1000
      max=1001
      natural=1100
      volume=1
    }
    smp1~audio.acc_all
    {
      sample=audio\moteur\2000.wav
      min=2000
      max=2001
      natural=2100
    }
    smp2~audio.acc_all
    {
      sample=audio\moteur\3000.wav
      min=3000
      max=3001
      natural=3100
    }
    smp3~audio.acc_all
    {
      sample=audio\moteur\4000.wav
      min=4000
      max=4001
      natural=3750
    }
    smp4~audio.acc_all
    {
      sample=audio\moteur\5000.wav
      min=5000
      max=5001
      natural=4750
    }
    smp5~audio.acc_all
    {
      sample=audio\moteur\6000.wav
      min=6000
      max=6001
      natural=5750
    }
    smp6~audio.acc_all
    {
      sample=audio\moteur\7000.wav
      min=7000
      max=7001
      natural=6750
    }
  }
  accelerate_in
  {
    smp0~audio.acc_all
    {
      sample=audio\moteur\1000_in.wav
      min=1000
      max=1001
      natural=1100
      volume=1
    }
    smp1~audio.acc_all
    {
      sample=audio\moteur\2000_in.wav
      min=2000
      max=2001
      natural=2100
      volume=0.5
    }
    smp2~audio.acc_all
    {
      sample=audio\moteur\3000_in.wav
      min=3000
      max=3001
      natural=3100
      volume=0.6
    }
    smp3~audio.acc_all
    {
      sample=audio\moteur\4000_in.wav
      min=4000
      max=4001
      natural=3750
      volume=0.8
    }
    smp4~audio.acc_all
    {
      sample=audio\moteur\5000_in.wav
      min=5000
      max=5001
      natural=4750
      volume=1
    }
    smp5~audio.acc_all
    {
      sample=audio\moteur\6000_in.wav
      min=6000
      max=6001
      natural=5750
      volume=1.1
    }
    smp6~audio.acc_all
    {
      sample=audio\moteur\7000_in.wav
      min=7000
      max=7001
      natural=6750
      volume=1.2
    }
  }
  decelerate_out
  {
    smp0~audio.acc_all
    {
      sample=audio\moteur\1000.wav
      min=1000
      max=1001
      natural=1000
      volume=1
    }
    smp1~audio.acc_all
    {
      sample=audio\moteur\2000.wav
      min=2000
      max=2001
      natural=2000
    }
    smp2~audio.acc_all
    {
      sample=audio\moteur\3000.wav
      min=3000
      max=3001
      natural=3000
    }
    smp3~audio.acc_all
    {
      sample=audio\moteur\4000.wav
      min=4000
      max=4001
      natural=3650
    }
    smp4~audio.acc_all
    {
      sample=audio\moteur\5000.wav
      min=5000
      max=5001
      natural=4650
    }
    smp5~audio.acc_all
    {
      sample=audio\moteur\6000.wav
      min=6000
      max=6001
      natural=5650
    }
    smp6~audio.acc_all
    {
      sample=audio\moteur\7000.wav
      min=7000
      max=7001
      natural=6650
    }
  }
  decelerate_in
  {
    smp0~audio.acc_all
    {
      sample=audio\moteur\1000_in.wav
      min=1000
      max=1001
      natural=1000
      volume=1
    }
    smp1~audio.acc_all
    {
      sample=audio\moteur\2000_in.wav
      min=2000
      max=2001
      natural=2000
      volume=0.5
    }
    smp2~audio.acc_all
    {
      sample=audio\moteur\3000_in.wav
      min=3000
      max=3001
      natural=3000
      volume=0.6
    }
    smp3~audio.acc_all
    {
      sample=audio\moteur\4000_in.wav
      min=4000
      max=4001
      natural=3650
      volume=0.8
    }
    smp4~audio.acc_all
    {
      sample=audio\moteur\5000_in.wav
      min=5000
      max=5001
      natural=4650
      volume=1
    }
    smp5~audio.acc_all
    {
      sample=audio\moteur\6000_in.wav
      min=6000
      max=6001
      natural=5650
      volume=1.1
    }
    smp6~audio.acc_all
    {
      sample=audio\moteur\7000_in.wav
      min=7000
      max=7001
      natural=6650
      volume=1.2
    }
  }
  gearwhine
  {
    smp0
    {
      sample=audio/tw-extonhigh.wav
      volume=0.05
      min=1
      max=2
      decay=1000
      natural=500
    }
  }
  wind
  {
    volume=15
    pitch_scale=1.25
    pitch_offset=0
    smp0
    {
      sample=audio/wind1.wav
      min=25
      max=26
      attack=33
      decay=33
      natural=80
    }
    smp1
    {
      sample=audio/wind2.wav
      min=50
      max=51
      attack=33
      decay=33
      natural=80
    }
    smp2
    {
      sample=audio/wind3.wav
      min=75
      max=76
      attack=33
      decay=33
      natural=80
    }
  }
}
