; BMW M GmbH M3 E46
; Created by David Crabtree aka Mr Whippy
car
{
  name=BMW M E46 M3
  year=2004
  credits=Created by Mr Whippy V1.2
  comments=The Ultimate Driving Machine
  wheels=4
  id=whippym3v12
  version=050f
  skid
  {
    sample=skid.wav
  }
  shadow
  {
    texture=shadow.tga
    width=2.31
    length=5.06
    offset_z=-0.06
    ;model
    ;{
      ; Projected shadow model
      ;file=shadow.dof
      ;use_shaders=0
    ;}
  }
  cg
  {
    x=0
    y=0		;515mm
    z=0
  }
  ff_factor=0.45
}
body
{
  mass=1429	;(1549 gross)
  restitution_coeff=0.1
  inertia
  {
    x=2450
    y=2500
    z=470
  }
  model
  {
    file=body.dof
  }
  model_incar
  {
    ;file=interior.dof
  }
 model_light_l
  {
    ;file=headlights.dof
  }
  model_braking_l
  {
    file=brakelights.dof
  }
  width=1.96
  height=0.75
  length=4.46
  manual_box=1
}
steer
{
  x=0.35
  y=0.56
  z=-0.5
  radius=10
  xa=15
  lock=1080
  linearity=1	;0.325	;3 turns lock to lock = 1080 degrees 15.4:1 steering ratio
  model
  {
    ;  file=s_wheel.dof
  }
}
engine
{
  mass=0
  idle_rpm=850
  max_rpm=8100
  max_torque=536	;365 * ~8% power loss
  curve_torque=torque.crv
  autoclutch_rpm=1050	;1050 normal, 3400 launch control
  starter=1
  starter_torque=90
  start_stalled=1
  stall_rpm=550
  start_rpm=1050
  torque_reaction=0.5
  shifting
  {
    automatic=0
    shift_up_rpm=8000
    shift_down_rpm=3500
    time_to_declutch=375
    time_to_clutch=25
    time_in_neutral=0
    time_to_declutch_down=375
    time_to_clutch_down=25
    time_in_neutral_down=0
  }
  inertia
  {
    engine=0.26
    final_drive=0.1
  }
  braking_coeff=3.6
  sample=a6000.wav
  sample_rpm=6000
}
gearbox
{
  gears=7
  gear0
  {
    ratio=-3.45
    inertia=0.02;0.08	;0.02
    linearity=1
  }
  gear1
  {
    ratio=4.227
    inertia=0.02;0.08	;0.02
    linearity=1
  }
  gear2
  {
    ratio=2.528
    inertia=0.034;0.07	;0.034
    linearity=1.2
  }
  gear3
  {
    ratio=1.669
    inertia=0.05;0.06	;0.05
    linearity=1.4
  }
  gear4
  {
    ratio=1.226
    inertia=0.07;0.05	;0.07
    linearity=1.6
  }
  gear5
  {
    ratio=1
    inertia=0.09;0.04	;0.09
    linearity=1.8
  }
  gear6
  {
    ratio=0.828
    inertia=0.11;0.03	;0.11
    linearity=2
  }
}
clutch
{
  max_torque=640
}
handbrakes
{
  wheels=23
}
differential
{
  type=1
  ratio=3.62
  inertia=0.1
  locking_coeff=135
  output0=2
  output1=3
}
aero
{
  body
  {
    center=0 0 0
    cx=0.33		;sourced
    area=2.06		;measured
  }
  wings=1
  wing0
  {
    name=overall body lift
    span=1
    cord=1
    coeff_drag=0
    coeff_down=-5.3	;18kg lift @ 200 km/h
    center=0 0 0.0
    angle=0
    angle_offset=1
  }
}
antirollbar
{
  count=2
  arb0
  {
    susp_left=0
    susp_right=1
    k=38500
  }
  arb1
  {
    susp_left=2
    susp_right=3
    k=27500
  }
}
susp_front
{
  y=0
  z=1.393
  restlen=0.308		;3433N load, 168mm Restlength + 331mm wheel rad ~ 498mm		143 lb/in * 175.5 ~ 25,097 N/m
  minlen=0.1		;								
  maxlen=0.31		;
  k=24598		;Motion Ratio = 0.99, Wheel Rate = 0.9801 * Spring Rate
  bump_rate=1750	;1718 static critical damping ratio * 1.0			sachs dampers
  rebound_rate=4250	;5868 static critical damping ratio * 0.7
  bump_function=0
  bump_max=1750
  rebound_function=0
  anti_pitch=0.14
  camber_change_per_m=0
  roll_center
  {
    x=0
    y=-0.448		;50mm RC -- 498mm - 50mm ~ 448mm RC>SuspXYZ
    z=0
  }
}
susp_rear
{
  y=0
  z=-1.338
  restlen=0.302		;3573N load, 200mm Restlength + 331mm wheel rad ~ 531mm		345>685 lb/in * 175.5 ~ 60548>120218 N/m
  minlen=0.1		;								190mm spring travel. Quite linear until high
  maxlen=0.31		;								deflection. Assume rate of 1/3rd of range.
  k=35039		;Motion Ratio = 0.66, Wheel Rate = 0.4356 * Spring Rate		((120218-60548)/3)+60548 = 80438
  bump_rate=2250	;2190 static critical damping ratio * 1.0			Wheel rate = 35039
  rebound_rate=5000	;7146 static critical damping ratio * 0.7
  bump_function=0
  bump_max=2250
  rebound_function=0
  anti_pitch=0.08
  camber_change_per_m=0.05	;0.25 degrees per 0.1m deflection!
  roll_center
  {
    x=0
    y=-0.421		;110mm RC -- 531mm - 110mm ~ 402mm RC>SuspXYZ
    z=0
  }
}
susp0~susp_front
  {
    x=0.754
    toe_change_per_m=0.029		;-0.23 static toe. 0.13 degrees change with 0.078m travel. Bump out to ~0.1 toe.!
    camber_change_steering=0.1062	;using caster angle 5.78 degrees @ max_lock, outside wheel camber wrt y axis = 3.54 degrees!
    caster_offset=-0.017		;5.78 degrees static caster -0.017!
    
  }
susp1~susp_front
  {
    x=-0.754
    toe_change_per_m=-0.029		;-0.23 static toe. 0.13 degrees change with 0.078m travel. Bump out to ~0.1 toe.!
    camber_change_steering=-0.1062	;using caster angle 5.78 degrees @ max_lock, outside wheel camber wrt y axis = 3.54 degrees!
    caster_offset=-0.017		;5.78 degrees static caster -0.017!
  }
susp2~susp_rear
  {
    x=0.7625
    toe_change_per_m=0.019		;-0.27 static toe. 0.1 degrees change with 0.09m travel. Bump out to ~0.2 toe.!
  }
susp3~susp_rear
  {
    x=-0.7625
    toe_change_per_m=-0.019		;-0.27 static toe. 0.1 degrees change with 0.09m travel. Bump out to ~0.2 toe.!
  }
tire_model_front
{
  damping_predict_lat=0
  damping_predict_long=0
}
tire_model_rear
{
  damping_predict_lat=0
  damping_predict_long=0
}
pacejka
{
    a0=1.5
    a1=-35
    a2=1375
    a3=2000
    a4=9
    a5=0.015
    a6=-0.25
    a7=1.0
    a8=-0.03
    a9=-0.001
    a10=-0.15
    a111=-8.5
    a112=-0.29
    a12=17.8
    a13=-2.4
    b0=1.6
    b1=-70
    b2=1600
    b3=20
    b4=325
    b5=0.08
    b6=0
    b7=0.05
    b8=-0.025
    b9=0.015
    b10=0.25
    b11=-80
    b12=350
    c0=2.3
    c1=-3.8
    c2=-3.14
    c3=-1.16
    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.14
    c15=-1.029
    c16=0.27
    c17=-1.1
    optimal_slipratio=0.11
    optimal_slipangle=0.159
}
wheel_front
{
  y=0
  z=0
  steering=1
  lock=71.2
  mass=30
  inertia=1.5
  radius=0.331	;225/40 R19
  rolling_coeff=0.0180
  friction_road=1
  max_braking=2000
  braking_factor=1
  tire_rate=265000
  pacejka~pacejka
  {
  }
}
wheel_rear
{
  y=0
  z=0
  steering=0
  mass=30
  inertia=1.5
  radius=0.331	;255/35 R19
  rolling_coeff=0.0205
  friction_road=1
  max_braking=750
  max_handbrake_torque=750
  braking_factor=1
  tire_rate=265000
  pacejka~pacejka
  {
  a2=1500
  a3=2100
  a4=9.5
  b2=1550
  b4=350
  optimal_slipratio=0.1
  optimal_slipangle=0.171
  }
}
wheel0~wheel_front
{
  x=0
  ackerman=1.2247
  toe=-0.36
  camber=-0.33	;-0.72
  model
  {
    file=pfl.dof
  }
  model_brake
  {
    file=flb.dof
  }
}
wheel1~wheel_front
{
  x=0
  ackerman=-1.2247
  toe=0.36
  camber=-0.33	;-0.72
  model
  {
    file=pfr.dof
  }
  model_brake
  {
    file=frb.dof
  }
}
wheel2~wheel_rear
{
  x=0
  toe=-0.37
  camber=-1.25	;-1.82
  model
  {
    file=prl.dof
    offset
    {
    x=-0.014
    }
  }
  model_brake
  {
    file=rlb.dof
  }
}
wheel3~wheel_rear
{
  x=0
  toe=0.37
  camber=-1.25	;-1.82
  model
  {
    file=prr.dof
    offset
    {
    x=0.014
    }
  }
  model_brake
  {
    file=rrb.dof
  }
}
camera0
{
  offset
  {
    x=-0.006250
    y=-1.252083
    z=-6.795010
  }
  angle
  {
    x=3
    y=180
    z=0.000000
  }
  name=CloseBehind
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
}
camera1
{
  name=Driver
  fov=65
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=-0.358
    y=0.65
    z=0.6
  }
  offset_to
  {
    x=0
    y=0
    z=10
  }
  angle
  {
    x=1.000000
    y=180.000000
    z=0.000000
  }
  src
  {
    mass=5
    k=750
    damping=75
    maxdist=0.2
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera2
{
  name=BonnetView
  fov=65
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0.000000
    y=0.65
    z=0.65
  }
  offset_to
  {
    x=0
    y=0
    z=10
  }
  angle
  {
    x=1.000000
    y=180.000000
    z=0.000000
  }
  src
  {
    mass=5
    k=750
    damping=75
    maxdist=0.2
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera3
{
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0.000000
    y=-0.500000
    z=2.300000
  }
  angle
  {
    x=8.000000
    y=180.000000
    z=0.000000
  }
  name=Bumper
  model=2
  wheels=2
  view=2
  fov=75
}
camera4
{
  offset
  {
    x=-0.381252
    y=0.439585
    z=-6
  }
  angle
  {
    x=16.5
    y=130
    z=0.25
  }
  name=GeneralLooseExterior
  fov=60
}
camera5
{
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  offset
  {
    x=-0.206250
    y=-0.066667
    z=-4.759998
  }
  angle
  {
    x=5.000000
    y=35.000000
    z=0.000000
  }
  name=LowFrontAngle
  fov=65
}
camera6
{
  follow
  {
    pitch=1
    yaw=1
    roll=0
  }
  offset
  {
    x=0.000000
    y=0.600000
    z=-4.500000
  }
  angle
  {
    x=15.000000
    y=-360.000000
    z=0.000000
  }
  fov=65
  name=FrontView
}
camera7
{
  offset
  {
    x=1.476562
    y=-0.004583
    z=-2.080001
  }
  angle
  {
    x=5.000000
    y=-90.000000
    z=0.000000
  }
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  fov=60
  name=FrontWheel
}
camera8
{
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0.114063
    y=-0.295833
    z=-3.765000
  }
  angle
  {
    x=6.000000
    y=5.000000
    z=0.000000
  }
  name=RearSeatBack
  fov=85
}
camera9
{
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=0.353437
    y=0.291666
    z=-3.880007
  }
  angle
  {
    x=14.000000
    y=9.500000
    z=7.500000
  }
  name=RearWheel
  fov=65
}

;	------------------ 5.1 ALPHA AUDIO COMPATABILTY -----------------

audio
{
  skid
  {
    sample=skid.wav
  }
  acc_all
  {
    attack=2600
    decay=2600
    min_vol=0
    max_vol=5
  }
  accelerate_out
  {
    smp0~audio.acc_all
    {
      sample=a1000.wav
      min=1000
      max=1001
      attack=1300
      decay=1300
      natural=1000
      volume=1.6
    }
    smp1~audio.acc_all
    {
      sample=a2000.wav
      min=2000
      max=2001
      attack=1300
      natural=2000
      volume=1.1
    }
    smp2~audio.acc_all
    {
      sample=a4000.wav
      min=4000
      max=4001
      natural=4000
      volume=1.3
    }
    smp3~audio.acc_all
    {
      sample=a6000.wav
      min=6000
      max=6001
      natural=6000
      volume=1.6
    }
    smp4~audio.acc_all
    {
      sample=a8000.wav
      min=8000
      max=9000
      natural=8000
      volume=1.6
    }
  }
  decelerate_out
  {
    smp0~audio.acc_all
    {
      sample=d1000.wav
      min=1000
      max=1001
      attack=1300
      decay=1300
      natural=1000
      volume=1.6
    }
    smp1~audio.acc_all
    {
      sample=d2000.wav
      min=2000
      max=2001
      attack=1300
      natural=2000
      volume=1.1
    }
    smp2~audio.acc_all
    {
      sample=d4000.wav
      min=4000
      max=4001
      natural=4000
      volume=1.3
    }
    smp3~audio.acc_all
    {
      sample=d6000.wav
      min=6000
      max=6001
      natural=6000
      volume=1.6
    }
    smp4~audio.acc_all
    {
      sample=d8000.wav
      min=8000
      max=9000
      natural=8000
      volume=1.6
    }
  }
  wind
  {
    volume=2
    pitch_scale=0
    pitch_offset=50
    smp0
    {
      sample=wind1.wav
      min=25
      max=26
      attack=33
      decay=33
      natural=80
    }
    smp1
    {
      sample=wind2.wav
      min=50
      max=51
      attack=33
      decay=33
      natural=80
    }
    smp2
    {
      sample=wind3.wav
      min=75
      max=76
      attack=33
      decay=33
      natural=80
    }
  }
}

traction_control
{
  max_velocity_ratio=1.1
  min_velocity_ratio=1.09
  enable=0
}

abs
{
  max_velocity_ratio=1.2
  min_velocity_ratio=1.1
  enable=1
}