;McLaren F1 roadcar (WIP release 1)

;WORK IN PROGRESS - Public test release for feedback on INI only.

;Currently released as an update to Dawid Kulesz' original for <0.5.00 betas of RACER.  Brand new model in the pipeline.

;Data sourced from -

;Nye, D., Dennis, R., & Murray, G. (1999). 'Driving ambition: The official inside story of the McLaren F1'.  Virgin Books.

;Robinson, P., Howard, K., Frankel, A., & Cropley, S. (1994). 'F1: McLaren's road car'. Haymarket Motoring Publications.


car
{
  name=BMW McLaren F1 GTR Race Car '97
  year=1993-1998
  credits=INI, dials, & skin update by u31st. Thanks to Dawid Kulesz for loaning the temporary body model, newest ini changes by EngineOfDarkness.
  comments=
  id=mclarenf1wip
  version=050f
  wheels=4

  skid
  {
    sample=skid.wav
  }

  shadow
  {
    texture=shadow.tga
    width=2.10
    length=4.80
    offset_z=0.60
  }

  cg
  {
    x=0
    y=-0.299  
;(C. of G. height measured from Gordon Murray sketch in Robinson et al.(1994))
    z=-0.5430  
;(Weight distribution 41.2/58.8 %front/rear)
  }
}


;========== BODY =========

body
{
  mass=1038  ;(Total sprung mass, including driver (60kg), engine (266kg) & fuel (1/2 tank=32kg))
  restitution_coeff=0.25
  inertia
  {
    x=2175
    y=2765
    z=445
;(calculated with Justin Martin's Car Inertia Calculator v1.0 - go to http://pitstop.totalnfs.net/)
  }

  model
  {
    file=body.dof
    offset
    {
    x=0
    y=0
    z=0.0
    }
  }
  ;model_incar
  ;{
    ;file=
  ;}
  ;model_light_l
  ;{
    ;file=
    ;offset
    ;{
    ;x=
    ;y=
    ;z=
    ;}
  ;}
  model_braking_l
  {
    file=brake.dof
    offset
    {
    x=0.0
    y=-0.095
    z=-0.036
    }
  }
  width=2.010
  height=1.100
  length=4.410
  manual_box=1
}


;========== STEERING ==========

steer
{
  x=
  y=
  z=
  radius=
  xa=
  lock=480
  linearity=0.9
  model
  {
    file=
  }
}


;========== ENGINE ==========

engine
{
  mass=0
  idle_rpm=1050
  max_rpm=7500
  max_torque=586  ;(586 ,651 - 10% driveline loss)
  
  sample=acchigh.wav  ;(For benefit of those driving with version 050f)
  sample_rpm=6000

  curve_torque=torque.crv
  autoclutch_rpm=1200
  starter=1
  starter_torque=50
  start_stalled=1
  stall_rpm=600
  start_rpm=800
  torque_reaction=0.7

  shifting
  {
    fast=0
    automatic=0
    shift_up_rpm=7400
    shift_down_rpm=4500
    time_to_declutch=125
    time_to_clutch=90
    time_in_neutral=125
    time_to_declutch_down=110
    time_in_neutral_down=80
    time_to_clutch_down=110
  }

  inertia
  {
    engine=0.2  ;(Virtually no flywheel effect)
    ;final_drive=0.1
  }

  braking_coeff=2.25
}


;========== AUDIO ==========

audio
{
  acc_all
  {
    attack=1000
    decay=1000
  }
  
  accelerate_out
  {
    smp0~audio.acc_all
    {
      sample=acclow.wav
      min=1
      max=8000
      natural=3500
      volume=1.0
    }

    smp1~audio.acc_all
    {
      sample=accmed.wav
      min=1
      max=4000
      natural=12000
      volume=0.3
    }

    smp2~audio.acc_all
    {
      sample=accmed.wav
      min=3500 ;(rpm)
      max=8000
      natural=12000
      volume=0.5
    }

    smp3~audio.acc_all
    {
      sample=acchigh.wav
      min=6000
      max=8000
      natural=8500
      volume=1.0
    }
  }

  decelerate_out
  {
    smp0~audio.acc_all
    {
      sample=deacc.wav
      min=1
      max=8000
      natural=5500
      volume=1.0
    }
  }

  wind
  {
    pitch_scale=0.2
    pitch_offset=20

    smp0
    {
      sample=wind.wav
      volume=0.5
      min=0  
      max=200  
      natural=50  
    }
  }
}


;========== TRANSMISSION ==========

gearbox
{
  gears=7

  gear0
  {
    ratio=-6.500
    inertia=0.9
  }

  gear1
  {
    ratio=3.23
    inertia=0.25
  }

  gear2
  {
    ratio=2.19
    inertia=0.20
  }

  gear3
  {
    ratio=1.71
    inertia=0.16
  }

  gear4
  {
    ratio=1.39
    inertia=0.13
  }

  gear5
  {
    ratio=1.16
    inertia=0.11
  }

  gear6
  {
    ratio=0.93
    inertia=0.10
  }
}

clutch
{
  max_torque=750
}


differential
{
     type=1
     inertia=0.05
     ratio=2.87
     ;locking_coeff=40  (40% lock-up LSD)
     output0=2
     output1=3
}

;========== HANDBRAKE ==========

handbrakes
{
  wheels=23
}


;========= AERODYNAMICS =========

aero
{
  body
  {
    center=0 0 0  ;(Aerodynamic centre of pressure coincident with C. of G.)
    cx=0.32
    area=1.79
  }
   wings=2
   wing0
   {
    name=rearwing
    span=1.79
    cord=1
    coeff_drag=0.02
    coeff_down=0.10
    center=0 0.433 -2.0
    angle=3.5
    angle_offset=1
  }
 wing1
  {
    name=frontwing
    span=1.79
    cord=4
    coeff_drag=0.0055
    coeff_down=0.098
    center=0 -0.33 2.0
    angle=8.5
    angle_offset=1
  }
}


;========== SUSPENSION SETUP ==========

antirollbar 
{
  count=1  
;(front antirollbar only, DESPITE what most unofficial sources may say!)
  arb0
  {
    susp_left=0
    susp_right=1
    k=20000
  }
}


susp_front   
{
  x=-0.784 
  y=0.0
  z=0.07 
  restlen=0.42
  minlen=0.27 
  maxlen=0.62 
  k=40921
  bump_rate=2500
  rebound_rate=4500
  bump_function=1
  rebound_function=0
  anti_pitch=0
  roll_center
  {
    x=0
    y=-0.561
    z=0
  }
}

susp0~susp_front
{
  x=0.784 
; 0.784
  z=1.07 
;1.61
  camber_change_steering=0.0953
  caster_offset=-0.015	
}

susp1~susp_front
{
  x=-0.784 
; 0.784
  z=1.07 
;1.61
  camber_change_steering=0.0953
  caster_offset=-0.015	
}


susp_rear  
{
  x=-0.736
  y=0.0
  z=-0.658 
  restlen=0.41 
  minlen=0.24 
  maxlen=0.58
  k=45102
  bump_rate=4900
  rebound_rate=9800
  bump_function=1
  rebound_function=0
  anti_pitch=0
  
  roll_center
  {
    x=0
    y=-0.587
    z=0
  }
}

susp2~susp_rear
{
  x=0.736
  z=-1.658 
;1.108
}

susp3~susp_rear
{
  x=-0.736
  z=-1.658 
;1.108
}


;==========TYRES==========

tire_model_front
{
  damping_predict_lat=0.672
  damping_predict_long=0.028
  damping_speed=0.15 
  relaxation_length_lat=0.91 
  relaxation_length_long=.091 
  damping_coefficient_lat=35 
  damping_coefficient_long=1 
}
tire_model_rear
{
  damping_predict_lat=0.734
  damping_predict_long=0.031
  damping_speed=0.15 
  relaxation_length_lat=0.91 
  relaxation_length_long=0.091 
  damping_coefficient_lat=35 
  damping_coefficient_long=1 
}
pacejka
{
   a0=1.60
   a1=-40
   a2=1700 
   a3=3200
   a4=7.2
   a5=0.014
   a6=-0.24
   a7=1.0
   a8=-0.03
   a9=-0.0013
   a10=-0.15
   a111=-8.5
   a112=-0.29
   a12=17.8
   a13=-2.4
   b0=1.75
   b1=-80
   b2=1800
   b3=23.3
   b4=390
   b5=0.05
   b6=0
   b7=0.055
   b8=-0.024
   b9=0.014
   b10=0.26
   c0=2.2
   c1=-4.1
   c2=-4.2
   c3=-1.8
   c4=-9.1
   c5=0.0225
   c6=0
   c7=0.044
   c8=-0.58
   c9=0.18
   c10=0.043
   c11=0.048
   c12=-0.0035
   c13=-0.18
   c14=0.14
   c15=-1.029
   c16=0.27
   c17=-1.1
   optimal_slipratio=0.1
   optimal_slipangle=0.11
}



;========== WHEELS ==========

wheel_front
{
  x=0
  y=0
  z=0
  camber=-0.45
  steering=1
  powered=0
  lock=65
  ackerman=1.1
  mass=42
  inertia=0.3
  width=0.235
  radius=0.35765
  rolling_coeff=0.012
  friction_road=1.0
  max_braking=1600
  braking_factor=1
  tire_rate=290000
  pacejka~pacejka
  { 
  }
}

wheel0~wheel_front
{
  x=0
  toe=1
  model
  {
    file=wheel_front_left.dof
  }
  model_brake
  {
    file=
  }
  pacejka~pacejka
  {
    a1=-40
    a2=1450
    b1=-80
    b2=1400
    b4=390
    b5=0.05
    c1=-4.1
    c2=-4.2
    c3=-1.8
    c4=-9.1
    optimal_slipratio=0.1
    optimal_slipangle=0.11
  }
}

wheel1~wheel_front
{
  x=0
  toe=-1
  model
  {
    file=wheel_front_right.dof
  }
  model_brake
  {
    file=
  }
  pacejka~pacejka
  {
    a1=-40
    a2=1450
    b1=-80
    b2=1400
    b4=390
    b5=0.05
    c1=-4.1
    c2=-4.2
    c3=-1.8
    c4=-9.1
    optimal_slipratio=0.1
    optimal_slipangle=0.11
  }
}


wheel_rear
{
  x=0
  y=0
  z=0
  camber=-0.45
  steering=0
  powered=0
  mass=55
  inertia=0.45
  radius=0.35765
  width=0.315
  rolling_coeff=0.015
  friction_road=1
  braking_factor=1
  max_braking=450
  max_handbrake_torque=2000
  tire_rate=290000
  pacejka~pacejka
  {
  }
}

wheel2~wheel_rear
{
  x=0
  toe=0
  model
  {
    file=wheel_rear_left.dof
  }
  model_brake
  {
    file=
  }
  pacejka~pacejka
  {
    a1=-40
    a2=1700
    b1=-80
    b2=1750
    b4=390
    b5=0.05
    c1=-4.1
    c2=-4.2
    c3=-1.8
    c4=-9.1
    optimal_slipratio=0.2
    optimal_slipangle=0.135
  }
}

wheel3~wheel_rear
{
  x=0
  toe=0
  model
  {
    file=wheel_rear_right.dof
  }
  model_brake
  {
    file=
  }
  pacejka~pacejka
  {
    a1=-40
    a2=1700
    b1=-80
    b2=1750
    b4=390
    b5=0.05
    c1=-4.1
    c2=-4.2
    c3=-1.8
    c4=-9.1
    optimal_slipratio=0.2
    optimal_slipangle=0.135
  }
}

;========== CAR CAMERAS ==========

camera0
{
  name=Follow High (centreline, facing forwards)
  offset
  {
    x=0
    y=-1
    z=-7
  }
  angle
  {
    x=7
    y=180
    z=0
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  fov=50
}

camera1
{
  name=Follow Low (centreline, facing forwards)
  offset
  {
    x=0
    y=-0.5
    z=-4.7
  }
  angle
  {
    x=7
    y=180
    z=0
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  fov=50
}

camera2
{
  name=Over Bonnet (centreline, facing forwards)
  offset
  {
    x=0.0
    y=-0.8
    z=0.75
  }
  angle
  {
    x=10
    y=180
    z=0
  }
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  fov=75
}

camera3
{
  name=Cockpit View (centreline, facing forwards)
  offset
  {
    x=0
    y=-0.4
    z=0.750000
  }
  angle
  {
    x=10
    y=180
    z=0
  }
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  fov=80
}

camera4
{
  name=Bumper Cam (centreline, facing forwards)
  offset
  {
    x=0
    y=0.2
    z=2.4
  }
  angle
  {
    x=0
    y=180
    z=0
  }
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  fov=75
}

camera5
{
  name=Wing Cam (offset left, facing forwards)
  offset
  {
    x=1.3
    y=0.2
    z=0
  }
  angle
  {
    x=0
    y=180
    z=0
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  fov=50
}

camera6
{
  name=Rear Quarter (offset left, facing forwards)
  offset
  {
    x=0.5
    y=-0.5
    z=-4
  }
  angle
  {
    x=0
    y=210
    z=0
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  fov=60
}

camera7
{
  name=Rotate-O-Cam
  offset
  {
    x=0
    y=0
    z=-5
  }
  angle
  {
    x=0
    y=90
    z=0
  }
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  fov=65
}

camera8
{
  name=Front Quarter (offset right, facing rearwards)
  offset
  {
    x=0.2
    y=0.5
    z=-6
  }
  angle
  {
    x=7
    y=30
    z=0
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  fov=60
}

camera9
{
  name=Rearview low (Centreline, Facing Rearwards)
  offset
  {
    x=0
    y=-0.5
    z=-1
  }
  angle
  {
    x=7
    y=0
    z=0
  }
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  fov=65
}

;========== DRIVER AIDS ==========

traction_control
{
	max_velocity_ratio=1.11
	min_velocity_ratio=1.1
        
        min_velocity=1
	enable=1
}

abs
{
  max_velocity_ratio=1.11
  min_velocity_ratio=1.1
  enable=1
}
ai 
{
  understeer_correct=250
  oversteer_correct=250
  grip_factor=1.0
}
