car
{
	name=Citroën BX TRD
	year=1990
	credits=
	comments=
	id=bxtrdmod
	version=053b6
	wheels=4
	ff_factor=0.15
	;skid
	{
		sample=Sounds/Skid.wav
	}
	shadow
	{
		texture=shadow.tga
		width=2.5
		length=4.6
	}
	cg
	{
		x=0	
		y=0.10	;about 55 cm
		z=0.13	;54 / 46 ?
	}
}
graphics
{
	shadow
	{
		model
		{
			;file=body.dof
			use_shaders=0
		}
	}
}
body
{
	mass=1005	;Unloaded (full diesel tank): 1025kg -120kg unsprung +80kg driver =985kg
	inertia
	{
		x=2500
		y=2700
		z=500
	}
	width=1.7	;1680 mm
	height=1.10	;1360 mm, 1350 for GTI (16 Valve?)
	length=4.15	;4230 mm, 2655 mm wheelbase
	manual_box=1
	model
	{
		file=bxbody_trd.dof
		scale
		{
			x=1
			y=1
			z=1
		}
	}
	model_incar
	{
		file=bxinterior.dof
	}
	model_light_l
	{
		file=bxlights.dof
	}
	model_lightroad_l
	{
		file=bxinlights.dof
	}
	model_braking_l
	{
		file=bxblights.dof
	}
}
steer
{
	x=0.3750
	y=0.385
	z=0.4150
  radius=10
  linearity=0.2
  xa=23
  lock=400
	model
	{
		file=bxstw.dof
	}
}
engine
{
	mass=0
	max_rpm=4850
	idle_rpm=850
	starter=1
        starter_torque=65
        start_stalled=1
        stall_rpm=550
        start_rpm=800
	autoclutch_rpm=2200
	curve_torque=trdtorq.crv
	max_torque=0.95	;219 nm @ 2200rpm
			;max hp @ 4300rpm
			;10% loss
	torque_reaction=0.1
	shifting
	{
		automatic=0
		shift_up_rpm=3755
		shift_down_rpm=2205
		time_to_declutch=150
    		time_in_neutral=5
    		time_to_clutch=250

    		time_to_declutch_down=150
    		time_in_neutral_down=5
    		time_to_clutch_down=150
	}
	inertia
	{
		engine=0.30
	}
	braking_coeff=2.6
}
clutch
{
	max_torque=210
}
gearbox
{
	gears=7
	gear0
	{
		ratio=-3.333
		inertia=0.10
	}
	gear1
	{
		ratio=3.1
		inertia=0.015
	}
	gear2
	{
		ratio=1.75
		inertia=0.005
	}
	gear3
	{
		ratio=1.21
		inertia=0.004
	}
	gear4
	{
		ratio=0.825
		inertia=0.002
	}
	gear5
	{
		ratio=0.655
		inertia=0.0001
	}
        gear6
	{
		ratio=-3.333
		inertia=0.10
	}
}
differential
{
	type=1
	locking_coeff=55
	ratio=3.938
	inertia=0.1
	output0=0
	output1=1
}
abs
{
  enable=1
  max_velocity_ratio=1.21
  min_velocity_ratio=1.20
  min_velocity=1
}
handbrakes
{
	wheels=23
}
aero
{
	body
	{
		center=0 0 0
		;cx sourced, should be real.
		cx=0.38
		;area measured by counting the small squares in zmod.
		area=1.86
	}
	wings=0
}
antirollbar
{
	count=3
	arb0
	{
		susp_left=0
		susp_right=2
		k=-11000
	}
	arb1
	{
		susp_left=1
		susp_right=3
		k=-11000
	}
	arb2
	{
		susp_left=0
		susp_right=1
		k=15000
	}
}
susp_front
{
	y=0.17		;
	z=1.305
	restlen=0.45	;0.48
	minlen=0.185	;0.21
	maxlen=0.48
	k=14000		;
	bump_rate=2000
	rebound_rate=3000
	bump_function=0
	rebound_function=0
	anti_pitch=0.5
	camber_change_per_m=0.2
	roll_center
	{
		x=0
		y=-0.4
		z=0
	}
}
susp_rear
{
	y=0.14		;
	z=-1.35
	restlen=0.35	;0.38
	minlen=0.15
	maxlen=0.5
	k=24000		;
	bump_rate=2000
	rebound_rate=4000
	bump_function=0
	rebound_function=0
	anti_pitch=1.3
	;camber_change_per_m=0.05
	roll_center
	{
		x=0
		y=-0.4
		z=0
	}
}
susp0~susp_front
{
	x=0.717
	camber_change_steering=0.1
}
susp1~susp_front
{
	x=-0.717
	camber_change_steering=-0.1
}
susp2~susp_rear
{
	x=0.69
}
susp3~susp_rear
{
	x=-0.69
}

tire_model
{
	relaxation_length_lat=0.91
	relaxation_length_long=.091
	damping_speed=0.15
	damping_coefficient_lat=0.75
	damping_coefficient_long=1.5
}
pacejka
{
	; Lateral force
	a0=1.4
	a1=-40
	a2=1250
	a3=2100
	a4=10
	a5=0.01
	a6=-0.15
	a7=-0.4
	a8=0.003
	a9=-0.002
	a10=0.16
	a111=-11
	a112=0.045
	a12=0.17
	a13=-23.5

	; Longitudinal force
	b0=1.55
	b1=-70
	b2=1350
	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.15
	optimal_slipangle=0.2
}
wheel_front
{
	x=0
	y=0
	z=0
	steering=1
	powered=1
	camber=1
	lock=60
	mass=30
	inertia=1.0
	;Whole tire radius is 26.80 inches = 0.68072 meters / 2 = 0.34036
	radius=.2948
	rolling_coeff=0.017
	max_braking=1800		;0.91 g max, 0.74 g locked (http://www.citroenz.com/BX/rt16.html)
	braking_factor=0.75
	tire_rate=150000
	pacejka~pacejka
	{
	}
}
wheel_rear
{
	x=0
	y=0
	z=0
	steering=0
	powered=0
	camber=0
	mass=30
	inertia=1.0
	radius=.2948
	rolling_coeff=0.017
	max_braking=1800
	braking_factor=0.25
        max_handbrake_torque=1300
	tire_rate=130000
	pacejka~pacejka
	{
	}
}
wheel0~wheel_front
{
	toe=-.25
	ackerman=1.2
	model
	{
		file=lwheel.dof
		
	}
}
wheel1~wheel_front
{
	toe=.25
	ackerman=-1.2
	model
	{
		file=rwheel.dof
		
	}
}
wheel2~wheel_rear
{
	toe=-0.1
	model
	{
		file=lwheel.dof
		
	}
}
wheel3~wheel_rear
{
	toe=0.1
	model
	{
		file=rwheel.dof
		
	}
}

camera0
{
  name=Driver
  fov=55
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.35
    y=0.7
    z=-0.24
  }
  offset_to
  {
    x=0.35
    y=0
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera1
{
  name=Driver, left
  fov=60
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.35
    y=0.7
    z=-0.24
  }
  offset_to
  {
    x=10
    y=0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera2
{
  name=Driver, right
  fov=60
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.35
    y=0.7
    z=-0.24
  }
  offset_to
  {
    x=-10
    y=0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera3
{
  name=Driver, rear
  fov=-65
  model=1
  wheels=0
  view=0
  offset
  {
    x=0.2
    y=0.7
    z=-0.24
  }
  offset_to
  {
    x=-1
    y=0.5
    z=-10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera4
{
  name=Chase
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.5
    z=-7
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  angle
  {
    x=15
    y=180
    z=0
  }
}
camera5
{
  name=Chase rear
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.5
    z=-7
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  angle
  {
    x=15
    y=0
    z=0
  }
}
camera6
{
  name=Free exterior
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.5
    z=-7
  }
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  angle
  {
    x=15
    y=270
    z=0
  }
}
camera7
{
	name=Side
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=1.2
		y=-0.3
		z=-2.6
	}
	angle
	{
		x=0
		y=-170
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}

}
camera8
{
	name=Bumper
	fov=60
	model=2
	wheels=0
	view=0
	offset
	{
		x=0
		y=-0.70
		z=2.4
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=5
		y=180
		z=0
	}
}
camera9
{
	name=Bonnet
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=0
		y=-0.85
		z=0.83
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=5
		y=180
		z=0
	}
}
audio
{
  skid
  {
    sample=skid.wav
  }
  accelerate_out
  {
    smp0
    {
      sample=idle.wav
      volume=1.1
      min=300
      max=1000
      decay=900
      natural=2300
    }
    smp1
    {
      sample=mid.wav
      volume=2
      min=300
      max=600
      decay=2000
      natural=16000
    }
    smp2
    {
      sample=lo.wav
      volume=2
      min=600
      max=2000
      attack=300
      decay=4000
      natural=11500
    }
    smp3
    {
      sample=hi.wav
      volume=1.5
      min=4000
      max=10000
      attack=3000
      natural=26000
    }
    smp4
    {
      sample=hi2.wav
      volume=0.5
      min=4000
      max=10000
      attack=3000
      natural=26000
    }
    smp5
    {
      sample=gearwhine.wav
      volume=0.06
      min=2600
      max=4000
      attack=2000
      decay=1000
      natural=500
    }
  }
 decelerate_out
  {
    volume=1.0
     smp0
    {
      sample=idle.wav
      volume=1.1
      min=300
      max=1000
      decay=900
      natural=2200
    }
    smp1
    {
      sample=low.wav
      min=500
      max=2400
      attack=1000
      decay=1000
      natural=2900
      volume=1.3
    }
    smp2
    {
      sample=d1.wav
      min=2400
      max=3100
      attack=1000
      decay=1000
      natural=3200
    }
    smp3
    {
      sample=d2.wav
      min=3100
      max=7500
      attack=1000
      decay=1000
      natural=4100
    }
    smp5
    {
      sample=gearwhine.wav
      volume=0.07
      min=2600
      max=4000
      attack=2000
      decay=1000
      natural=470
    }
  }


	wind
	{
		smp0
		{
			sample=wind.wav
			volume=1
			min=1
			max=100
			natural=50
		}
	}
}
