; 2000 RX-7 Fd Type RZ
; dexadrin2000@yahoo.com
; 
; ; stats
; wheelbase 2425mm
; curb weight 1250kg
; 265ps @ 6500
; 30kg-m @ 5000
; 235/45ZR17 front 
; 255/40ZR17 rear
car
{
  name=Mazda RX-7 Type RZ
  year=2000
  wheels=4
  credits=Modeling&Textures: Stereo  Ini: Kallahim
  comments=Shaders&Audio: Stereo  Driver: Stecki
  id=rx7fdrz
  version=090
  skid
  {
    sample=skid.wav
  }
  shadow
  {
    texture=shadow.tga
    width=1.75
    length=4.4
  }
  ; note that old model has cg at y=-.2, z=0.055
  ; new model has it at 0,0,0 - 17 inches 
  cg
  {
    x=0	
    y=0.0
    z=0.0 ;0.06
  }
}
graphics
{
  shadow
  {
    model
    {
      file=shadow.dof
      use_shaders=0
    }
  }
}
body
{
  mass=1081
  ;restitution_coeff=0.15
  inertia
  {
    x=1300
    y=1600
    z=300
  }
  model
  {
    file=body_2012.dof
  }
  model_collide
  {
    ; 3D collision model (Newton only)
    file=collision_2012.dof
  }
  model_incar
  {
    file=interior_2012.dof
  }
  model_braking_l
  {
    file=brakelight.dof 
    ;file=brklights.dof
  }
  model_light_l
  {
    file=headlight_l.dof
  }
   ; model_light_r
  model_light_r
  {
    file=headlight_r.dof
  }
  width=1.761
  height=1.102
  length=4.286
  manual_box=0
  x=0.0
  y=0.0
  z=0.04
}
steer
{
  x=-0.380
  y=0.28
  z=0.16
  radius=10
  xa=14
  lock=250
  linearity=0.96
  model
  {
    file=strwheel.dof
  }
}
engine
{
  mass=100
  max_rpm=9000
  idle_rpm=900
  stall_rpm=350
  start_rpm=900
  autoclutch_rpm=1000
  starter=1
  starter_torque=40
  curve_torque=torque.crv
  ;314 NM - 15% drive loss
  max_torque=267
  reaction=1
  shifting
  {
    automatic=0
    shift_up_rpm=6500
    shift_down_rpm=1800
    ;zmiana
    time_to_declutch=150
    time_to_clutch=150
  }
  inertia
  {
    engine=0.17
    final_drive=0.1
  }
  braking_coeff=1.6
  rolling_friction_coeff=0.6
  sample=engine.wav
  sample_rpm=15000
}
gearbox
{
  gears=6
  gear0
  {
    ratio=-3.288
    inertia=0.9
  }
  gear1
  {
    ratio=3.483
    inertia=0.07
  }
  gear2
  {
    ratio=2.015
    inertia=0.05
  }
  gear3
  {
    ratio=1.391
    inertia=0.04
  }
  gear4
  {
    ratio=1
    inertia=0.03
  }
  gear5
  {
    ratio=0.719
    inertia=0.02
  }
  end_ratio=3.37
}
clutch
{
  max_torque=350
}
handbrakes
{
  wheels=23
}
differential
{
  type=1
  ratio=4.1
  inertia=0.02
  locking_coeff=65
}
differentials
{
  count=1
  diff0
  {
    type=1
    ratio=4.1
    inertia=0.02
    locking_coeff=65
    output0=2
    output1=3
  }
}
aero
{
  body
  {
    center=0 0 0
    cx=0.36
    area=1.69
  }
  wings=3
  wing0
  {
    name=BodyLift
    span=1
    cord=1
    coeff_drag=0
    coeff_down=-6
    center=0 0 0
    angle=0
    angle_offset=1
  }
  wing1
  {
     name=FrontDiffuser
     span=1.5
     cord=0.11
     coeff_drag=1 
     coeff_down=4
     center=0.0 -0.5 1.5
     angle=0
     angle_offset=10
  }
  wing2
  {
    name=Rearspoiler
    span=1.5
    cord=0.16
    coeff_drag=1   
    coeff_down=3.2
    center=0 0.3 -2.0
    angle=10
    angle_offset=10
  }
}
antirollbar
{
   count=2
   arb0
   {
      susp_left=0
      susp_right=1
      k=16000 ; 16000
   }
   arb1
   {
      susp_left=2
      susp_right=3
      k=13000
   }
}
;Mazda FD3S 1992 Stock Spring Rates 4.8 (268) 3.6 (201)
; an online source says these are a bit high - 263/195 lb/in. more accurate
susp_front
{
  y=0.13
  z=1.207
  restlen=.31
  minlen=.1
  maxlen=.45
  k=47040
  bump_rate=4601 ;7668 crit * .6
  rebound_rate=6901 ;7668 crit * .9
  roll_center
  {
    x=0
    y=-0.75
    z=0
  }
}
susp_rear
{
  y=0.10
  z=-1.217
  restlen=.31
  minlen=.1
  maxlen=.45
  k=35280
  bump_rate=3984 ;6640 crit * .6
  rebound_rate=5076 ; 6640 crit * .9
  roll_center
  {
    x=0
    y=-0.72
    z=0
  }
}
; 1460mm track
susp0~susp_front
{
  x=0.73
}
susp1~susp_front
{
  x=-0.73
}
susp2~susp_rear
{
  x=0.73
}
susp3~susp_rear
{
  x=-0.73
}
tire_model
{
  relaxation_length_lat=0.91
  relaxation_length_long=.091
  damping_speed=99.15
  damping_coefficient_lat=9.066
  damping_coefficient_long=3.5
}
pacejka
{
; Lateral force
a0=1.350
a1=-46.000
a2=1345.000
a3=1675.000
a4=11.000
a5=0.013
a6=-0.140
a7=0.140
a8=0.019
a9=-0.019
a10=-0.180
a111=-11.000
a112=-0.021
a12=0.480
a13=10.200
a13=-2.400
; Longitudinal force
b0=1.350
;b0=1.01
b1=-90.000
b2=1425.000
b3=23.300
b4=400.000
b5=0.05
b6=0
b7=0.055
b8=-0.024
b9=0
b10=0
b11=0
b12=0
; Aligning moment
c0=2.10
c1=-3.900
c2=-3.900
c3=-1.260
c4=-8.200
c5=0.025
c6=0.000
c7=0.044
c8=-0.580
c9=0.180
c10=0.043
c11=0.048
c12=-0.003
c13=-0.180
c14=0.140
c15=-1.029
c16=0.270
c17=-1.100
optimal_slipratio=0.14
optimal_slipangle=0.16
}
wheel_brakes
{
  brake_heating=0.003
  brake_dissipation=0.0008
  brake_max_temp=900
}
wheel_front~wheel_brakes
{
  y=0
  z=0
  steering=1
  powered=0
  camber=0.1
  lock=70
  ackerman=1.1
  mass=20
  inertia=1.3
  radius=.32
  rolling_coeff=0.015
  max_braking=2650
  braking_factor=0.7
  tire_rate=300000
  pacejka~pacejka
  {
  }
}
wheel_rear~wheel_brakes
{
  y=0
  z=0
  steering=0
  powered=1
  camber=-1.3
  mass=20
  inertia=1.3
  radius=.32
  rolling_coeff=0.015
  max_braking=2650
  braking_factor=0.3
  tire_rate=300000
  pacejka~pacejka
  {
  }
}
wheel0~wheel_front
{
  toe=0
  model
  {
    file=lfwheel_2012.dof
    ;file=noblurleft.dof
	lod0_z=30
	lod1_z=80
  lod_out=800
  }
  ;model2
  ;{
  ;  file=blurleft2.dof
  ;  velocity=5
  ;}
  model_brake
  {
    file=caliperright.dof
    offset
    {
      x=0.06
    }
  }
}
wheel1~wheel_front
{
  toe=0
  model
  {
    file=rfwheel_2012.dof
		lod0_z=30
		lod1_z=80
		;lod2_z=300
  lod_out=800
  }
  model_brake
  {
    file=caliperleft.dof
    offset
    {
      x=-.01
    }
  }
}
wheel2~wheel_rear
{
  toe=0
  model
  {
    file=lrwheel_2012.dof
    ;file=noblurleft.dof
   ; file=blurleft2.dof
	lod0_z=30
	lod1_z=80
	;lod2_z=300
  lod_out=800
  }
  ;model2
  ;{
  ;  file=blurleft2.dof
  ;  velocity=5
  ;}
  model_brake
  {
    file=caliperright.dof
    offset
    {
      x=-.01
    }
  }
}
wheel3~wheel_rear
{
  toe=0
  model
  {
    file=rrwheel_2012.dof
	lod0_z=30
	lod1_z=80
	;lod2_z=300
  lod_out=800
  }
  model_brake
  {
    file=caliperleft.dof
    offset
    {
      x=0.01
    }
  }
}

lights
{
  ; Projected lights
  light0
  {
    texture=light.tga
    ; Field of view (vertical)
    fov=45
    ; Aspect (horizontal)
    aspect=5
    ; Distance to car
    z=1.1
    ; Pitching with respect to car (in degrees)
    pitch=0
    ; Fall-off distance
    far=60
    color=50 50 50
  }
}
flares
{
  ; Front lights
  flare0
  {
    pos=-0.59 0.25 1.80
	;normal=0 0 1
	normal=-0.05 -0.02 0.6
	z_offset=-3000
	size_factor=2
  }
  flare1
  {
    pos=0.59 0.25 1.80
	normal=0.05 -0.02 0.6
	z_offset=-3000
	size_factor=2
  }
  ; Rear lights
  flare2
  {
    pos=-0.565 0.285 -2.067
	normal=-0.05 0 -0.5
	color=40 3 2
	size_factor=0.6
	z_offset=-1000
  }
  flare3
  {
    pos=0.565 0.285 -2.067
	normal=0.05 0 -0.5
	color=40 3 2
	size_factor=0.6
	z_offset=-1000
  }
  ; Brake lights
  flare4
  {
    rule=brake
    pos=-0.485 0.29 -2.087
	normal=-0.05 0 -0.5
	color=40 3 2
	size_factor=0.7
	z_offset=-1000
  }
  flare5
  {
    rule=brake
    pos=0.485 0.29 -2.087
	normal=0.05 0 -0.5
	color=40 3 2
	size_factor=0.7
	z_offset=-1000
  }
  ; middle brake light: 3 flares
  flare6
  {
    rule=brake
    pos=0.0 0.39 -2.13
    normal=0 0 -0.5
    color=30 2 1
    size_factor=0.2
    hor_scale=3
    billboard=1
  }
  flare7
  {
    rule=brake
    pos=-0.084 0.39 -2.13
    normal=0 0 -0.5
    color=30 2 1
    size_factor=0.2
    hor_scale=3
    billboard=1
  }
  flare8
  {
    rule=brake
    pos=0.084 0.39 -2.13
    normal=0 0 -0.5
    color=30 2 1
    size_factor=0.2
    hor_scale=3
    billboard=1
  }
}
------------------------------------------------
camera0
{
  follow
  {
    pitch=1   ;0
    yaw=1   ;0
    roll=1   ;0
  }
  offset
  {
    x=-0.38   ;-0.36         ;+left/-right
    y=-0.52    ;0.25  ;-up/+down
    z=-0.26    ;0.20  ;+fwd/-back
  }
  angle
  {
    x=0         ; tilt camera +down/-up
    y=-180.0    ;rotate camera +left/-right
    z=-1.000     ;tilt camera +clockwise/-ccw
  }
  fov=75
  ; Type of model to use; 0=outside, 1=inside, 2=none
  model=1
  wheels=0
  view=1
  name=Inside
    ; Source/target inertia
}

camera1
{
  offset
  {
    x=0.059375
    y=-0.96001
    z=-4.250005
  }
  angle
  {
    x=6.666651
    y=-180.729126
    z=0.000000
  }
  name=Side view
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  fov=50
}

camera2
{
  offset
  {
    x=0
    y=-1.06249
    z=0.23
  }
  angle
  {
    x=9.444441
    y=179.340210
    z=0.000000
  }
  follow
  {
    pitch=0
    yaw=1
    roll=1
  }
}

camera3
{
  follow
  {
    pitch=
    yaw=
    roll=
  }
  offset
  {
    x=0.475003
    y=0.376667
    z=-3.385010
  }
  angle
  {
    x=37.361118
    y=-64.062294
    z=2.430566
  }
  name=Wheels
  fov=65
}

camera4
{
  offset
  {
    x=-0.043751
    y=0.322918
    z=-5.219995
  }
  angle
  {
    x=14.444427
    y=128.645737
    z=0.260415
  }
}

camera5
{
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  offset
  {
    x=-0.087501
    y=0.089167
    z=-5.359999
  }
  angle
  {
    x=7.360988
    y=-269.792023
    z=0.086801
  }
  name=High
  fov=30
}

camera6
{
  follow
  {
    pitch=1
    yaw=1
    roll=0
  }
  offset
  {
    x=-0.273437
    y=0.599583
    z=-3.720010
  }
  angle
  {
    x=23.194437
    y=-357.986633
    z=19.357632
  }
  fov=60
}

camera7
{
  offset
  {
    x=1.267185
    y=-0.029164
    z=0.030008
  }
  angle
  {
    x=12.361085
    y=-165.972626
    z=3.298599
  }
  follow
  {
    pitch=0
    yaw=1
    roll=1
  }
  fov=60
}

camera8
{
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=-0.021873
    y=-0.579575
    z=-0.045004
  }
  angle
  {
    x=6.944441
    y=-361.249451
    z=0.000000
  }
  fov=75
}

camera9
{
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=-0.38
    y=0.08
    z=-0.277
  }
  angle
  {
    y=180
  }
  head_physics
  {
    lateral
    {
      k=180
      damp=120
      max=0.05
    }
    vertical
    {
      k=2000
      damp=200
      max=0.01
    }
    longitudinal
    {
      k=360
      damp=200
      max=0.06
    }
  }
  fov=65
  ; Type of model to use; 0=outside, 1=inside, 2=none
  model=1
  wheels=0
  view=2
  name=Inside Driver
}

audio
{
  skid
  {
    ; Old style
    ;sample=skid.wav
    ;sample2=skid_lon.wav
    ; New style (multiple samples mixed)
    ; Master volume for this set
    volume=1
    ; Acceleration; outside of the car
    smp0
    {
      volume=1.0
      sample=skid.wav
      min=0.1
      max=0.6
      attack=0.09
      decay=1.0
    }
    smp1
    {
      volume=1.0
      sample=skid_lon.wav
      min=0.3
      max=20
      attack=0.2
      decay=0
    }
  }
  acc_all
  {
    attack=1300
    decay=1300
  }
  accelerate_out
  {
    smp0~audio.acc_all
    {
      sample=engine_lo2.wav
      min=500
      max=1001
      natural=1312
      volume=0.6
    }
    smp1~audio.acc_all
    {
      sample=engine_accel0.wav
      min=1500
      max=2501
      natural=1582
      volume=1
    }
    smp2~audio.acc_all
    {
      sample=engine_accel1.wav
      min=2500
      max=4001
      natural=6405
      volume=1.5
    }
    smp3~audio.acc_all
    {
      sample=engine_accel2.wav
      min=4000
      max=5501
      natural=6391
      volume=1.5
    }
    smp4~audio.acc_all
    {
      sample=engine_accel3.wav
      min=5500
      max=8001
      natural=7404
      volume=1.6
    }
  }
  decelerate_out
  {
    smp0~audio.acc_all
    {
      sample=engine_decel1.wav
      min=500
      max=7001
      natural=3060
      volume=2.5
    }
    ;smp1
    {
      sample=engine_lo2.wav
      min=500
      max=1001
      natural=1312
      volume=0.4
      attack=1300
      decay=800
    }
  }
  wind
  {
    volume=15
    pitch_scale=1
    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
    }
  }
}