;Leyland Leopard PSU 3C-2L ini file
;All possible technical data was taken from Leyland Leopard users manual.
;All possible technical data was taken from MCI - MC9 and Allison T525 users manual.
;To see the performance look this: http://youtu.be/8i-aXiOCEJQ

car
{
  name=MCI - MC9 Detroit Diesel 8V-71T / 8V-92 BETA 1.07
  id=mc9
  version=090
  comments=1,250 lb·ft (1,690 N·m) @ 1300 rpm; 392-550 horsepower governed at 1800-2100 rpm, Allison HT754CR with REAR TANDEM AXLE ART-44.0-4. 
  credits=Please see readme for full Credits.
  year=1986
  wheels=6
  skid
  {
    sample=skid.wav
  }
  shadow
  {
    texture=shadow.tga
    width=3.316
    length=12.2
    intensity_dark=0.7
    intensity_light=0.3
  }
  cg
  {
    x=0
    y=-0.12	;~97 cm
    z=0.245	;40/60 % ? not sure about this...
  }
  ff_factor=0.65
  ff_gain=0.65
  ff_damping=0
  ff_friction=1
  ff_inertia=1
  ff_stickfriction=1
}
ai
{
  understeer_correct=9999
  oversteer_correct=9999
  grip_factor=1.0
  cg_factor=0
  rc_factor=0
  spring_lat_factor=0
  spring_dir_factor=0
  max_velocity=50.0
}
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.01
  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
}
graphics
{
  shadow
  {
    model
    {
      file=shadow.dof
      use_shaders=0
    }
    intensity=0.3
  }
  generic
  {
    ;model0 ; Driver.  No offset.
    {
      file=driver.dof
      from_offset=1 1 1
    }
    model0 ; front axle.
    {
      file=front_axle.dof
      from=wheelpos0
      to=wheelpos1
      fit=1
      scale=0.4395
    }
    ;model2 ; rear leaf spring, left
    {
      file=rear_spring.001.dof
      from=0.50 -0.27 -1.07
      to=wheelpos2
      to_offset=-0.12 -0.1 0
      fit=1
      scale=7.7
    }
    ;model3 ; rear leaf spring, right
    {
      file=rear_spring.002.dof
      from=-0.50 -0.27 -1.07
      to=wheelpos3
      to_offset=0.12 -0.1 0
      fit=1
      scale=7.7
    }
    ;model4 ; front lower susp arm, left
    {
      file=front_lower_arm.001.dof
      from=0.24 -0.33 1.36
      to=wheelpos0
      to_offset=-0.06 -0.08 0
      fit=1
      scale=2.78
    }
    ;model5 ; front lower susp arm, right
    {
      file=front_lower_arm.002.dof
      from=-0.24 -0.33 1.36
      to=wheelpos1
      to_offset=0.06 -0.08 0
      fit=1
      scale=2.78
    }
   ; model6 ; front upper susp arm, left
    {
      file=front_upper_arm.001.dof
      from=0.40 -0.16 1.36
      to=wheelpos0
      to_offset=-0.06 0.10 0
      fit=1
      scale=4.7
    }
    ;model7 ; front upper susp arm, right
    {
      file=front_upper_arm.002.dof
      from=-0.40 -0.16 1.36
      to=wheelpos1
      to_offset=0.06 0.10 0
      fit=1
      scale=4.7
    }
    ;model8
    {
      file=trunk.dof
      ;offset=0 -0.93 0.73 ; what is the syntax? this doesn't work
    }
  }
}

animation
{
  flash_lights=0
}

lights
{
  ; Projected lights
  light0
  {
    texture=light.tga
    ; Field of view (vertical)
    fov=45
    ; Aspect (horizontal)
    aspect=5
    ; Distance to car
    z=2
    ; Pitching with respect to car (in degrees)
    pitch=0
    ; Fall-off distance
    far=150
    color=4 4 4
  }
}

flares
{
  ; Front lights
  flare0
  {
    pos=-1.085 -0.14 6.28
	;normal=0 0 1
	normal=-0.05 0.1 0.6
	z_offset=-3000
	size_factor=3
  }
  flare1
  {
    pos=1.085 -0.14 6.28
	normal=0.05 0.1 0.6
	z_offset=-3000
	size_factor=3
  }
  flare2
  {
    pos=-0.86 -0.14 6.28
	;normal=0 0 1
	normal=-0.05 0.1 0.6
	z_offset=-3000
	size_factor=3
  }
  flare3
  {
    pos=0.86 -0.14 6.28
	normal=0.05 0.1 0.6
	z_offset=-3000
	size_factor=3
  }
  ; Rear lights
  flare4
  {
    pos=-1.03 -0.053 -6.02
	normal=0.05 0 -0.5
	color=238 0 0
	size_factor=2
	z_offset=-1000
  }
  flare5
  {
    pos=1.03 -0.053 -6.02
	normal=-0.05 0 -0.5
	color=238 0 0
	size_factor=2
	z_offset=-1000
  }
  ; Brake lights
  flare6
  {
    rule=brake
    pos=-1.03 -0.053 -6.02
	normal=0.05 0 -0.5
	color=238 0 0
	size_factor=3
	z_offset=-1000
  }
  flare7
  {
    rule=brake
    pos=1.03 -0.053 -6.02
	normal=-0.05 0 -0.5
	color=238 0 0
	size_factor=3
	z_offset=-1000
  }
}

body
{
  mass=17256	;16556kg+700kg unsprung =17256 kg,  
  inertia
  {
    x=331773
    y=307721
    z=34651
    ;x=120000	;331773	 
    ;y=100000	;307721	
    ;z=15000	;34651	;hmm...used IH8Cops inertia calculator
  }
  model
  {
    file=chassis.dof
    offset
    {
      x=0
      y=0
      z=0
    }
  }
  model_collision
  {
    file=chassis.dof
    offset
    {
      x=0
      y=0
      z=0
    }
  }
  model_incar
  {
    file=interior.dof
    offset
    {
      x=0
      y=0
      z=0
    }
  }
  model_braking_l
  {
    file=b_light.dof
    offset
    {
     x=0
     y=0
     z=-0.001
    }
  }
  model_light_l
  {
    file=h_light.dof
    offset
    {
      x=0
      y=0
      z=0
    }
  }
  model_reverse_l
  {
    ; Reverse gear indicators
    file=reverse_light.dof
    offset
    {
      x=0
      y=0
      z=0
    }
  }
  width=2.438
  height=3.3528	;+ ground clearance
  length=12.192
  manual_box=0
  box_offset=0 0 0
}

steer
{
  x=0.7650
  y=0.9000
  z=5.7800
  radius=10
  lock=900;1620
  linearity=0.833
  xa=67.19
  model
  {
    file=stw.dof
  }
  ; Non-linear curves (active steering systems)
  power_steering
  {
    ; Curves are multiplied (total=curve_vel*curve_steer)
    ;assist_curve_vel=assist_vs_vel.crv
    ;assist_curve_steer=assist_vs_steer.crv
    ;friction_curve_vel=friction_vs_vel.crv
    ;friction_curve_steer=friction_vs_steer.crv
    ;damping_curve_vel=damping_vs_vel.crv
    ;damping_curve_steer=damping_vs_steer.crv
    ;spring_curve_vel=spring_vs_vel.crv
    ;spring_curve_steer=spring_vs_steer.crv
  }
}

engine
{
  x=0
  y=.2
  z=-10.0
  size=.25
  mass=450		;Included in the body mass
  max_rpm=2500		;not sure, but i think he can rev so high.
  idle_rpm=500		;Info from HT754CR manual, idle from 500-800rpm
  idle_method=1
  ; Non-zero for carburator engines, 0 for diesels
  idle_throttle=0
  rev_limiter_time=50
  stall_rpm=390
  start_rpm=520
  autoclutch=1
  autoclutch_rpm=1300
  launch_control=1
  starter=1
  starter_torque=220
  start_stalled=1
  enable_stall=1
  rumble_amplitude=0
  rumble_maxrpm=4000
  cylinders=8
  cylinder_angle=90
  min_warn_rpm=0
  max_warn_rpm=0
  curve_torque=torque8V_92.crv
  max_torque=0.50	;1690 nm @ 1300 rpm
			;10% drivetrain loss for now, to high?->not longer used...see friction in diff....
  torque_reaction=3
  shifting
  {
    automatic=1
    fast=0
    cut_throttle=0
    blip_throttle=0.5
    shift_up_rpm=2300
    shift_down_rpm=1050
    time_to_declutch=550
    time_in_neutral=300
    time_to_clutch=550
    time_to_declutch_down=550
    time_in_neutral_down=300
    time_to_clutch_down=550
  }
  inertia
  {
    engine=3.5
  }
  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
  }
  ; Speed limiter - velocity at which limiter kicks in (m/s)
  speedlimiter
  {
    ; 80 km/h
    velocity=22.22
    ; Time (ms) to keep throttle cut when going above the limiter velocity
    time=10
  }
  braking_coeff=10
}

fuel
{
  ; Fuel type: 0=gasoline, 1=diesel. Determines efficiencies
  type=1
  max=370.0
  ; Brake specific fuel consumption (gram/Joule)
  ; an idea of the efficiency of the engine
  bsfc=10.95e-5
}

gearbox
{
  gears=6
  gear0
  {
    ratio=-4.300
    inertia=0.620
    engine_map=1.0
  }
  gear1
  {
    ratio=3.690
    inertia=0.450
    engine_map=1.0
  }
  gear2
  {
    ratio=2.000
    inertia=0.350
    engine_map=1.0
  }
  gear3
  {
    ratio=1.580
    inertia=0.250
    engine_map=1.0
  }
  gear4
  {
    ratio=1.250
    inertia=0.150
    engine_map=1.0
  }
  gear5
  {
    ratio=1.000
    inertia=0.050
    engine_map=1.0
  }
}

clutch
{
  max_torque=2460
}

handbrakes
{
  wheels=23
}

differential
{
  type=3
  inertia=1.00
  friction=100
  ratio=3.583
		;Many different ratios were used (listed below)
		;2.846	;ON Highway
		;3.077  ;ON Highway
		;3.231  ;ON Highway
		;3.308  ;ON Highway
		;3.417  ;ON Highway
		;3.583  ;ON Highway/City
		;3.727  ;OFF Highway, City
		;3.909  ;OFF Highway, City
		;4.110  ;OFF Highway, City
		;4.300  ;OFF Highway, City
		;4.560  ;OFF Highway, City
		;5.140  ;OFF Highway, City/Hills
		;5.290  ;OFF Highway, City/Hills
  power_ratio=7.000;->75% Sperre;4.000;->60% 
  coast_ratio=1.667;->25% Sperre
  output0=3
  output1=4
}

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.6
	scale_lon_rear=1.1
	; Air bubble in front
	scale_lat_front=0.09
	scale_lon_front=0.3
  }
  body
  {
    center=0 0 0
    cx=0.8
    area=8.5785;+ 5% for wheels=8,17+0,4085=8,5785
  }
  wings=0
  wing0
  {
    name=lift
    span=1
    cord=1
    coeff_drag=0
    coeff_down=-10
    center=0 0 0
    angle=0
    angle_offset=0
  }
}

antirollbar
{
  count=3
  arb0
  {
    susp_left=0
    susp_right=1
    k=0			;do these have anti-roll bars?
  }
  arb1
  {
    susp_left=2
    susp_right=3
    k=80000
  }
  arb2
  {
    susp_left=4		
    susp_right=5
    k=80000
  }
}
susp_front
{
  y=-0.23
  z=4.42
  restlen=0.47		
  minlen=0.19
  maxlen=0.57
  bumpstop_len=0.10
  bumpstop_k=300000
  k=310000		
  bump_function=2
  bump_rate=13000
  bump_max=3000
  reboundstop_len=0.10
  reboundstop_k=290000
  rebound_function=0
  rebound_rate=29000
  damper_curve=damper/BilsteinDamperLevel_5.crv
  anti_dive=0.2
  anti_lift=0
  anti_pitch=0
  roll_center
  {
    x=0
    y=-0.653	;~50 cm
    z=0
  }
}
susp_rear
{
  y=-0.23
  restlen=0.48		
  minlen=0.19
  maxlen=0.58
  bumpstop_len=0.10
  bumpstop_k=200000
  k=230000		
  bump_function=2
  bump_rate=6500
  bump_max=3000
  reboundstop_len=0.10
  reboundstop_k=190000
  rebound_function=0
  rebound_rate=14500
  damper_curve=damper/BilsteinDamperLevel_4.crv
  anti_rise=0.15
  anti_squat=0.25
  anti_pitch=0
  roll_center
  {
    x=0
    y=-0.6095	;~60 cm
    z=0
  }
}
susp0~susp_front
{
  x=1.18
}
susp1~susp_front
{
  x=-1.18
}
susp2~susp_rear
{
  x=0.995
  z=-2.6
}
susp3~susp_rear
{
  x=-0.995
  z=-2.6
}
susp4~susp_rear
{
  x=1.135
  z=-3.76
}
susp5~susp_rear
{
  x=-1.135
  z=-3.76
}
tire_model
{
  relaxation_length_lat=0.91
  relaxation_length_long=.091
  damping_speed=0.15
  damping_coefficient_lat=75
  damping_coefficient_long=1.5
}
pacejka
{
  ; Lateral force
  a0=1.5
  a1=-10
  a2=1300
  a3=30000
  a4=200
  a5=0.05
  a6=-0.2
  a7=-1
  a8=0
  a9=0
  a10=0
  a111=0
  a112=0 
  a12=0
  a13=0
  ; Longitudinal force
  b0=1.6
  b1=-20
  b2=1300
  b3=1
  b4=100
  b5=0
  b6=0
  b7=0
  b8=0
  b9=0.1
  b10=0
  b11=0
  b12=0
  ; Aligning moment
  c0=3
  c1=-1
  c2=1
  c3=-1
  c4=-3.6
  c5=0.2260
  c6=0.0004
  c7=0.22
  c8=-2.31
  c9=0
  c10=0
  c11=-0
  c12=-0
  c13=0
  c14=-0
  c15=-0
  c16=0
  c17=0
  optimal_slipratio=0.2
  optimal_slipangle=0.2
}
skidding_default
{
	long_start=0.6
	long_max=1.0
	long_start_n=0.6
	long_max_n=1.0
	lat_start=0.6
	lat_max=1.0
}
wheel_front
{
  x=0		;GOODYEAR UNISTEEL G 391-22.5
  y=0
  z=0
  steering=1
  powered=0
  camber=0
  lock=62	;Original 56° but turning cirkle = 15,55m
  mass=100
  inertia=4
  radius=0.5225
  rolling_coeff=0.015
  max_braking=8000
  braking_factor=0.6
  tire_rate=990000	;7 bar
  pacejka~pacejka
  {
  }
}
wheel_rear
{
  x=0		
  y=0		;w3 and w4 are powered via diff
  z=0		;Note to Miura: Powered the wheels 2/5 as well, 
		;via power_gearing, it was too weak.
  steering=0
  camber=0
  mass=150
  inertia=4
  radius=0.5225
  rolling_coeff=0.015
  max_handbrake_torque=16000	
  tire_rate=880000	;6 bar
  pacejka~pacejka
  {
   ;a2=1600
  }
}
wheel0~wheel_front
{
  toe=-0.7
  powered=0
  ackerman=1.8
  model
  {
    file=wheel0.dof
  }
  model_brake
  {
    file=trommel0.dof
    offset
    {
     x=-0.03
    }
  }
}
wheel1~wheel_front
{
  toe=0.7
  powered=0
  ackerman=1.8
  model
  {
    file=wheel1.dof
  }
  model_brake
  {
    file=trommel1.dof
    offset
    {
     x=0.03
    }
  }
}
wheel2~wheel_rear
{
  toe=-0
  powered=1
  power_gearing=1.7915	;second rear axle
  mass=200
  max_braking=10000
  braking_factor=0.4
  model
  {
    file=wheel_lm2.dof
  }
  model_brake
  {
    file=trommel0.dof
    offset
    {
     x=0.3
    }
  }
}
wheel3~wheel_rear
{
  toe=0
  powered=0	;powered via differential!
  mass=200
  max_braking=10000
  braking_factor=0.4
  model
  {
    file=wheel_lm3.dof
  }
  model_brake
  {
    file=trommel1.dof
    offset
    {
     x=-0.3
    }
  }
}
wheel4~wheel_rear
{
  toe=-0
  powered=0	;powered via differential!
  mass=100
  max_braking=10000
  braking_factor=0.4
  model
  {
    file=wheel0.dof
  }
  model_brake
  {
    file=trommel0.dof
    offset
    {
     x=-0.04
    }
  }
}
wheel5~wheel_rear
{
  toe=0
  powered=1
  power_gearing=1.7915	;second rear axle
  mass=100
  max_braking=10000
  braking_factor=0.4
  model
  {
    file=wheel1.dof
  }
  model_brake
  {
    file=trommel1.dof
    offset
    {
     x=0.04
    }
  }
}

camera0
{
  name=Driver
  fov=60
  model=1
  wheels=0
  view=2
  offset
  {
    x=0.70
    y=1.4
    z=4.98
  }
  offset_to
  {
    x=0.8
    y=-0.5
    z=15
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=1
  }
  dst
  {
    mass=1
    k=1
    damping=1
    maxdist=1
  }
}
camera1
{
  offset
  {
    x=0
    y=-1
    z=-14
  }
  angle
  {
    x=15
    y=180
    z=0
  }
  name=Behind
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
}
camera2
{
  offset
  {
    x=-0.515626
    y=-1.20
    z=0.55
  }
  angle
  {
    x=2
    y=210
    z=0.000000
  }
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
}
camera3
{
  follow
  {
    pitch=
    yaw=1
    roll=
  }
  offset
  {
    x=0.221878
    y=0.508334
    z=-10.635028
  }
  angle
  {
    x=16.388876
    y=-56.944256
    z=1.302094
  }
  name=Wheels
  fov=40
}
camera4
{
  offset
  {
    x=0.014061
    y=0.493751
    z=-15.585001
  }
  angle
  {
    x=18.055532
    y=728.819153
    z=0.260415
  }
}
camera5
{
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  offset
  {
    x=0.198437
    y=0.464583
    z=-16.320009
  }
  angle
  {
    x=9.444325
    y=-268.750336
    z=0.086801
  }
  name=High
  fov=40
}
camera6
{
  follow
  {
    pitch=1
    yaw=1
    roll=0
  }
  offset
  {
    x=-0.037500
    y=0.489584
    z=-34.555015
  }
  angle
  {
    x=86.527802
    y=-308.854156
    z=11.718752
  }
  fov=60
}
camera7
{
  offset
  {
    x=-1.751565
    y=0.489580
    z=-0.495005
  }
  angle
  {
    x=0.083300
    y=-180.576736
    z=0.298599
  }
  follow
  {
    pitch=0
    yaw=1
    roll=1
  }
  fov=35
}
camera8
{
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0.000002
    y=-1.318743
    z=0.430004
  }
  angle
  {
    x=6.944441
    y=-360.0
    z=0.000000
  }
  fov=75
}
camera9
{
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  offset
  {
    x=-0.030
    y=-0.68410
    z=4.489996
  }
  angle
  {
    x=-4.166675
    y=-179.652771
    z=0.000000
  }
  fov=65
  ; Type of model to use; 0=outside, 1=inside, 2=none
  model=0
  wheels=0
  view=2
  name=Inside Driver
}

audio
{
   skid
   {
   ; Master volume for this set
   volume=1
   ; Acceleration; outside of the car
    smp0
    {
    volume=2.0
    ; All engine samples depend on engine RPM
    sample=skid2.wav
    min=0.2
    max=0.8
    attack=0.09
    decay=1.0
    }
     smp1
     {
     volume=2.0
     ; All engine samples depend on engine RPM
     sample=skid.wav
     min=0.4
     max=20
     attack=0.2
     decay=0
     }
  }
  horn
  {
    sample=audio/horn.wav
  }
  shiftout
  {
    volume=3
    sample=audio/shift.wav
  }
  shiftin
  {
    volume=3
    sample=audio/shiftin.wav
  }
   acc_all
   {
      attack=2000
      decay=2000
   }
   gearwhine
   {
    volume=6
    smp0
    {
     sample=audio/gear.wav
     min=0
     max=1
     decay=500
     natural=700
    }
   }
   accelerate_out
   {
      Volume=1.0
      smp0~audio.acc_all
      {
         sample=audio/Leerlauf_8V-92.wav
         min=150
         max=700
         natural=730
      }
      smp1~audio.acc_all
      {
         sample=audio/8V-92.wav
         min=700
         max=2500
         natural=2500
      }
   }
   decelerate_out
   {
      volume=0.9
      Max_bass=0.5
      smp0~audio.acc_all
      {
         sample=audio/Leerlauf_8V-92.wav
         min=150
         max=700
         natural=730
      }
      smp1~audio.acc_all
      {
         sample=audio/8V-92.wav
         min=700
         max=2500
         natural=2500
      }
   }
   accelerate_in
   {
      Volume=0.9
      smp0~audio.acc_all
      {
         sample=audio/Leerlauf_8V-92_in.wav
         min=150
         max=700
         natural=730
      }
      smp1~audio.acc_all
      {
         sample=audio/8V-92_in.wav
         min=700
         max=2500
         natural=2500
      }
   }
   decelerate_in
   {
      volume=0.7
      Max_bass=0.5
      smp0~audio.acc_all
      {
         sample=audio/Leerlauf_8V-92_in.wav
         min=150
         max=700
         natural=730
      }
      smp1~audio.acc_all
      {
         sample=audio/8V-92_in.wav
         min=700
         max=2500
         natural=2500
      }
   }
}

traction_control
{
  max_velocity_ratio=0.1
   min_velocity_ratio=0.1
   min_velocity=36
   enable=0

}