;
;
; 2000 RX-7 Fd Type RZ
; stereogod@gmail.com
;
car
{
	name=Mazda RX-7 Type RZ
	year=2000
	credits=Modeling&Textures: Stereo, performance by Cosmo°
	comments=Shaders&Audio: Stereo  Driver: Stecki
	id=mazda_fd_rz
	version=090
	wheels=4
	acc_factor=1
	shadow
	{
		texture=textures\shadow.tga
		length=4.4
		width=1.75
		offset_z=0
		intensity_dark=0.7
		intensity_light=0.3
	}
	cg
	{
		x=0
		; ~0.445m
		y=0
		; total mass based distribution with driver ~49% front
		z=0
	}
	ff_factor=0.75
	ff_gain=1
	ff_damping=0
	ff_friction=0.3
	ff_inertia=0.3
	ff_stickfriction=0.5
}

; script controlled instead
abs
{
	enable=0
	braking_factor=1
	max_velocity_ratio=1.15
	min_velocity_ratio=1.05
	min_velocity=2
}

traction_control
{
	enable=0
	max_velocity_ratio=1.070000
	min_velocity_ratio=1.069999
	min_velocity=2
}

ai
{
	cg_factor=0
	grip_factor=1
	max_velocity=1000
	rc_factor=0
	spring_lat_factor=0
	spring_dir_factor=0
	oversteer_correct=10
	understeer_correct=10
}

body
{
	; 1270kg including fuel + 75kg driver - 160kg unsprung mass
	mass=1185
	inertia
	{
		x=2107
		y=2286
		z=457
	}
	model
	{
		file=body_2012.dof
		offset
		{
			x=0
			y=0
			z=0.035
		}
		scale
		{
			x=0.992668
			y=1
			z=1
		}
	}
	model_braking_l
	{
		file=brakelight.dof
		offset
		{
			x=0
			y=0
			z=0.035
		}
	}
	model_collide
	{
		file=collision_2012.dof
	}
	model_incar
	{
		file=interior_2012.dof
	}
	model_light_l
	{
		file=headlight_l.dof
		offset
		{
			x=0
			y=0
			z=0.035
		}
	}
	model_light_r
	{
		file=headlight_r.dof
		offset
		{
			x=0
			y=0
			z=0.035
		}
	}
	length=4.285
	width=1.760
	height=1.095
	manual_box=1
	box_offset=0 -0.065 0
}

steer
{
	x=-0.38
	y=0.28
	z=0.16
	radius=10
	xa=14
	; 2.9 turns lock-to-lock
	lock=1044
	linearity=0.862
	model
	{
		file=strwheel.dof
	}
}

engine
{
	x=0
	y=0
	z=0
	size=0
	mass=0
	idle_method=1
	idle_throttle=0
	idle_rpm=750
	min_warn_rpm=7500
	max_warn_rpm=8000
	max_rpm=8500
	rev_limiter_time=50
	start_rpm=1000
	stall_rpm=500
	autoclutch=0
	autoclutch_rpm=0
	launch_control=0
	starter=1
	starter_torque=50
	start_stalled=1
	enable_stall=1
	curve_torque=crv/engine_torque.crv
	max_torque=1
	braking_coeff=
	braking_offset=0
	braking_torque_curve=crv/engine_braking.crv
	torque_reaction=0
	friction=0
	cylinders=2
	cylinder_angle=0
	rumble_amplitude=0
	rumble_maxrpm=8500
	inertia
	{
		engine=0.22
	}
	jitter
	{
		amplitude=0
		frequency_min=0
		frequency_var=10
		time_min=0
		time_var=500
	}
	shifting
	{
		automatic=0
		blip_throttle=0
		cut_ignition=0
		cut_throttle=0
		fast=1
		shift_up_rpm=8000
		shift_down_rpm=3000
		time_to_declutch=0
		time_in_neutral=0
		time_to_clutch=400
		time_to_declutch_down=0
		time_in_neutral_down=0
		time_to_clutch_down=400
	}
	speedlimiter
	{
		time=50
		velocity=69.444
	}
}

fuel
{
	bsfc=6.4e-5
	max=76
	type=0
}

clutch
{
	max_torque=450
}

gearbox
{
	gears=6
	gear0
	{
		ratio=-3.288
		inertia=0.14
		engine_map=1.1
	}
	gear1
	{
		ratio=3.483
		inertia=0.14
		engine_map=1.1
		warning_sound
		{
			duration=0
			freq=0
			rpm=0
		}
	}
	gear2
	{
		ratio=2.015
		inertia=0.10
		engine_map=1.1
		warning_sound
		{
			duration=0
			freq=0
			rpm=0
		}
	}
	gear3
	{
		ratio=1.391
		inertia=0.08
		engine_map=1.1
		warning_sound
		{
			duration=0
			freq=0
			rpm=0
		}
	}
	gear4
	{
		ratio=1.000
		inertia=0.04
		engine_map=1.1
		warning_sound
		{
			duration=0
			freq=0
			rpm=0
		}
	}
	gear5
	{
		ratio=0.762
		inertia=0.02
		engine_map=1.1
	}
}

differentials
{
	count=1
	diff0
	{
		type=3
		ratio=4.300
		inertia=0.05
		friction=75
		coast_ratio=3.0
		power_ratio=3.0
		preload=0
		output0=2
		output1=3
	}
}

handbrakes
{
	wheels=23
}

aero
{
	body
	{
		center=0 0 0
		cx=0.31
		area=1.784
	}
	draft
	{
		scale_lat_front=0.08
		scale_lat_rear=0.4
		scale_lon_front=0.2
		scale_lon_rear=1.0
	}
	;
	;				c_lift
	; rear wing AoA		front		rear
	;
	; 1°			0.045		0.000
	; 5°			0.047		-0.025
	; 10°			0.051		-0.058
	; 14.5°			0.053		-0.075
	;
	wings=2
	wing0
	{
		name=front
		span=1.784
		cord=1
		coeff_drag=0
		coeff_down=-0.053
		center=0 0 1.240
		angle=0
		angle_offset=1
	}
	wing1
	{
		name=rear
		span=1.784
		cord=1
		coeff_drag=0
		coeff_down=0.075
		center=0 0 -1.185
		angle=0
		angle_offset=1
	}
}

antirollbar
{
	; 3.5°/g?
	; 53.0% front bias?
	count=2
	arb0
	{
		susp_left=0
		susp_right=1
		k=23195
	}
	arb1
	{
		susp_left=2
		susp_right=3
		k=12890
	}
}

;
; 106lb/in wheelrates?
;
susp_front
{
	y=0
	z=1.240
	restlen=0.288
	minlen=0.065
	maxlen=0.225
	warplen=0.135
	;
	; sprung corner mass			290kg
	; natural ride frequency		1.23Hz
	; critical damping			4637N/m/s
	;
	k=18563
	damper_curve=crv/suspension_damper_front.crv
	bumpstop_len=0.040
	bumpstop_k=100000
	bumpstop_damping=5000
	reboundstop_len=0.010
	reboundstop_k=100000
	reboundstop_damping=5000
	anti_pitch=0.20
	roll_center
	{
		x=0
		; 0.080m?
		y=-0.376
		z=0
	}
}

susp0~susp_front
{
	x=0.730
	camber_change_per_m=0.218
	camber_change_steering=0.068
	; 6.083°
	caster_angle=-0.106
	caster_offset=-0.034
	; 13.917°
	kingpin_angle=-0.243
	kingpin_offset=-0.005
	susp_y_change_per_rad=0
	toe_change_per_m=-0.055
	model
	{
		file=
	}
}

susp1~susp_front
{
	x=-0.730
	camber_change_per_m=0.218
	camber_change_steering=-0.068
	; 6.083°
	caster_angle=-0.106
	caster_offset=-0.034
	; 13.917°
	kingpin_angle=-0.243
	kingpin_offset=0.005
	susp_y_change_per_rad=0
	toe_change_per_m=0.055
	model
	{
		file=
	}
}

susp_rear
{
	y=0
	z=-1.185
	restlen=0.295
	minlen=0.065
	maxlen=0.225
	warplen=0.135
	;
	; sprung corner mass			303kg
	; natural ride frequency		1.21Hz
	; critical damping			4743N/m/s
	;
	k=18563
	damper_curve=crv/suspension_damper_rear.crv
	bumpstop_len=0.040
	bumpstop_k=100000
	bumpstop_damping=5000
	reboundstop_len=0.010
	reboundstop_k=100000
	reboundstop_damping=5000
	anti_pitch=0.20
	roll_center
	{
		x=0
		; 0.120m?
		y=-0.333
		z=0
	}
}

susp2~susp_rear
{
	x=0.730
	camber_change_per_m=0.436
	camber_change_steering=0
	caster_angle=0
	caster_offset=0
	kingpin_angle=0
	kingpin_offset=0
	susp_y_change_per_rad=0
	toe_change_per_m=-0.055
	model
	{
		file=
	}
}

susp3~susp_rear
{
	x=-0.730
	camber_change_per_m=0.436
	camber_change_steering=0
	caster_angle=0
	caster_offset=0
	kingpin_angle=0
	kingpin_offset=0
	susp_y_change_per_rad=0
	toe_change_per_m=0.055
	model
	{
		file=
	}
}

;
; 235/45 R17
; 255/40 R17
;
; lateral acceleration @ 200ft skidpad		~0.94g
; longitudinal acceleration			~1.06g
;
pacejka
{
	a0=1.3
	a1=-35
	a2=1180
	a3=1770
	a4=10
	a5=0.015
	a6=-0.25
	a7=0.1
	a8=0
	a9=0
	a10=0
	a111=0
	a112=0
	a12=0
	a13=0
	b0=1.5
	b1=-35
	b2=1180
	b3=7
	b4=300
	b5=0.08
	b6=0
	b7=0.05
	b8=-0.025
	b9=0
	b10=0
	b11=0
	b12=0
	c0=2.6
	c1=-3
	c2=-3
	c3=-0.1
	c4=-6
	c5=0
	c6=0
	c7=0.044
	c8=-0.58
	c9=0.18
	c10=0.043
	c11=0.05
	c12=-0.0035
	c13=-0.18
	c14=0.14
	c15=-1.029
	c16=0.27
	c17=-1.1
	; 3232N
	optimal_slipratio=0.12
	optimal_slipangle=0.15
	lxal=1.0
	lyka=1.0
	camber_min=-99
	camber_max=99
	fz_min=0
	fz_max=1e6
	negate_camber=0
	slipangle_min=-99
	slipangle_max=99
	slipratio_min=-99
	slipratio_max=99
}

wheel_front
{
	y=0
	z=0
	steering=1
	reverse_steering=0
	;
	; turning circle radius			5.1m
	;
	lock=64.0
	ackerman=1.125
	mass=40
	inertia=1.361
	radius=0.32165
	width=0.235
	rolling_coeff=0.011
	max_braking=2580
	max_handbrake_torque=0
	braking_factor=0.665
	inboard_brakes=0
	brake_dissipation=0.0005
	brake_heating=0.0004
	brake_max_temp=1000
	tire_rate=260000
	tire_damping=100
	tire_damping_lowspeed=2500
	tire_damping_threshold=5
	load_filter_frequency=0
	noise_filter_damping=0
	noise_filter_frequency=0
	surface_height_filter_damping=0
	surface_height_filter_frequency=0
	pacejka~pacejka
	{
	}
	tire_model
	{
		damping_coefficient_lat=0.7
		damping_coefficient_long=0.7
		damping_predict_lat=0
		damping_predict_long=0
		damping_speed=0
		relaxation_length_lat=0.5
		relaxation_length_long=0.05
	}
}

;
; alignment unladen
;
wheel0~wheel_front
{
	x=0
	; 0.083°
	camber=1.893
	; -0.050°
	toe=0.404
	model
	{
		file=lfwheel_2012.dof
	}
	model_brake
	{
		file=lf_caliper.dof
		offset
		{
			;x=0.05
		}
	}
}

wheel1~wheel_front
{
	x=0
	; 0.083°
	camber=1.893
	; 0.050°
	toe=-0.404
	model
	{
		file=rfwheel_2012.dof
	}
	model_brake
	{
		file=rf_caliper.dof
		offset
		{
			;x=-0.01
		}
	}
}

wheel_rear
{
	y=0
	z=0
	steering=0
	reverse_steering=0
	lock=0
	ackerman=0
	mass=40
	inertia=1.496
	radius=0.3179
	width=0.255
	rolling_coeff=0.011
	max_braking=2580
	max_handbrake_torque=6000
	braking_factor=0.335
	inboard_brakes=0
	brake_dissipation=0.0005
	brake_heating=0.0004
	brake_max_temp=1000
	tire_rate=280000
	tire_damping=100
	tire_damping_lowspeed=2500
	tire_damping_threshold=5
	load_filter_frequency=0
	noise_filter_damping=0
	noise_filter_frequency=0
	surface_height_filter_damping=0
	surface_height_filter_frequency=0
	pacejka~pacejka
	{
		a0=1.35
		a2=1280
		a3=1920
		b2=1280
		; 3363N
		optimal_slipratio=0.12
		optimal_slipangle=0.14
	}
	tire_model
	{
		damping_coefficient_lat=0.7
		damping_coefficient_long=0.7
		damping_predict_lat=0
		damping_predict_long=0
		damping_speed=0
		relaxation_length_lat=0.5
		relaxation_length_long=0.05
	}
}

wheel2~wheel_rear
{
	x=0
	; -1.217°
	camber=2.568
	; -0.083°
	toe=0.394
	model
	{
		file=lrwheel_2012.dof
	}
	model_brake
	{
		file=lr_caliper.dof
		offset
		{
			;x=0.05
		}
	}
}

wheel3~wheel_rear
{
	x=0
	; -1.217°
	camber=2.568
	; 0.083°
	toe=-0.394
	model
	{
		file=rrwheel_2012.dof
	}
	model_brake
	{
		file=rr_caliper.dof
		offset
		{
			;x=-0.01
		}
	}
}

graphics
{
	shadow
	{
		intensity=
	}
}

animation
{
	flash_lights=0
}

damage
{
	chassis
	{
		damage=0
		damage_engine_factor=0.5
		damage_engine_from=1
		damage_engine_to=0
		damage_engine_time=5000
		damage_factor=0
		fade=0
		speed_factor=5e-5
		force_factor=2e-8
		texture_damage
		{
			enable=1
			dent_factor=1
			dent_linearity=2
			radius_factor=15
			radius_min=1
			ray_lod=0
			uv_randomness=0.2f
		}
	}
}

flares
{
	flare0
	{
		billboard=0
		color=32 40 38
		hor_scale=1
		intensity=1
		normal=0.050 -0.020 0.600
		pos=0.590 0.250 1.800
		rule=
		size_factor=2
		z_offset=-3000
	}
	flare1
	{
		billboard=0
		color=32 40 38
		hor_scale=1
		intensity=1
		normal=-0.050 -0.020 0.600
		pos=-0.590 0.250 1.800
		rule=
		size_factor=2
		z_offset=-3000
	}
	flare2
	{
		billboard=0
		color=40 3 2
		hor_scale=1
		intensity=1
		normal=0.050 0.000 -0.500
		pos=0.565 0.285 -2.067
		rule=
		size_factor=0.6
		z_offset=-1000
	}
	flare3
	{
		billboard=0
		color=40 3 2
		hor_scale=1
		intensity=1
		normal=-0.050 0.000 -0.500
		pos=-0.565 0.285 -2.067
		rule=
		size_factor=0.6
		z_offset=-1000
	}
	flare4
	{
		billboard=0
		color=40 3 2
		hor_scale=1
		intensity=1
		normal=0.050 0.000 -0.500
		pos=0.485 0.290 -2.087
		rule=brake
		size_factor=0.7
		z_offset=-1000
	}
	flare5
	{
		billboard=0
		color=40 3 2
		hor_scale=1
		intensity=1
		normal=-0.050 0.000 -0.500
		pos=-0.485 0.290 -2.087
		rule=brake
		size_factor=0.7
		z_offset=-1000
	}
	flare6
	{
		billboard=1
		color=30 2 1
		hor_scale=3
		intensity=1
		normal=0.000 0.000 -0.500
		pos=0.084 0.390 -2.130
		rule=brake
		size_factor=0.2
		z_offset=-1000
	}
	flare7
	{
		billboard=1
		color=30 2 1
		hor_scale=3
		intensity=1
		normal=0.000 0.000 -0.500
		pos=0.000 0.390 -2.130
		rule=brake
		size_factor=0.2
		z_offset=-1000
	}
	flare8
	{
		billboard=1
		color=30 2 1
		hor_scale=3
		intensity=1
		normal=0.000 0.000 -0.500
		pos=-0.084 0.390 -2.130
		rule=brake
		size_factor=0.2
		z_offset=-1000
	}
}

lights
{
	light0
	{
		aspect=5
		color=50 50 50
		far=60
		fov=45
		pitch=0
		texture=textures\light.tga
		z=1.1
	}
}

particles
{ 
	backfire
	{
		; "disabled" for stock version
		min_rpm=60
		max_rpm=85
		type=backfire
		exhaust0
		{
			pos=-0.482 -0.178 -2.080
			normal=0 0 -1
		}
		exhaust1
		{
			pos=-0.569 -0.178 -2.080
			normal=0 0 -1
		}
	}
}

wipers
{
	count=0
	;wiper0
	;{
	;	x=
	;	y=
	;	z=
	;	xa=
	;	min_angle=
	;	max_angle=
	;	model
	;	{
	;		file=
	;		scale
	;		{
	;			x=
	;			y=
	;			z=
	;		}
	;	}
	;}
}

camera0
{
	fov=75
	model=1
	name=driver
	steering_wheel=1
	wheels=0
	angle
	{
		x=10
		y=0
		z=0
	}
	follow
	{
		pitch=1
		roll=1
		yaw=1
	}
	offset
	{
		x=-0.38
		y=0.55
		z=-0.26
	}
	head_physics
	{
		lateral
		{
			k=8500
			damp=350
			max=10
		}
		longitudinal
		{
			k=1700
			damp=380
			max=10
		}
		vertical
		{
			k=700
			damp=225
			max=10
		}
		pitch
		{
			k=7000
			damp=350
			max=10
		}
		roll
		{
			k=1700
			damp=380
			max=10
		}
		yaw
		{
			k=1700
			damp=380
			max=10
		}
	}
}

camera1
{
	fov=65
	model=0
	name=bonnet
	wheels=0
	angle
	{
		x=10
		y=180
		z=0
	}
	follow
	{
		pitch=1
		roll=1
		yaw=1
	}
	offset
	{
		x=0
		y=-0.8
		z=0.5
	}
}

camera2
{
	fov=65
	model=2
	name=bumper
	wheels=0
	angle
	{
		x=0
		y=180
		z=0
	}
	follow
	{
		pitch=1
		roll=1
		yaw=1
	}
	offset
	{
		x=0
		y=0.1
		z=2
	}
}

camera3
{
	fov=50
	model=0
	name=chase
	wheels=1
	angle
	{
		x=0
		y=0
		z=0
	}
	follow
	{
		pitch=1
		roll=1
		yaw=1
	}
	offset
	{
		x=0
		y=1.4
		z=-5
	}
	offset_to
	{
		x=0
		y=0
		z=4
	}
	src
	{
		mass=6
		k=500
		damping=125
		maxdist=4
	}
	dst
	{
		mass=6
		k=500
		damping=125
		maxdist=4
	}
}

camera4
{
  	fov=45
  	model=1
  	name=reverse
  	wheels=1
  	angle
  	{
    		x=5
    		y=0
    		z=0
  	}
  	follow
  	{
    		pitch=1
    		roll=1
    		yaw=1
  	}
  	offset
  	{
    		x=0
    		y=-0.6
    		z=-0.2
  	}
}

camera5
{
	fov=15
	model=0
	name=side
	wheels=1
	angle
	{
		x=0
		y=270
		z=0
	}
	follow
	{
		pitch=1
		roll=1
		yaw=1
	}
	offset
	{
		x=-0.05
		y=0
		z=-15
	}
}

camera6
{
	fov=50
	model=0
	name=wheel
	wheels=1
	angle
	{
		x=8
		y=175
		z=0
	}
	follow
	{
		pitch=1
		roll=1
		yaw=1
	}
	offset
	{
		x=-1.4
		y=0.2
		z=-2.8
	}
}

camera7
{
	fov=20
	model=0
	name=far
	wheels=1
	angle
	{
		x=-4
		y=0
		z=0
	}
	follow
	{
		pitch=1
		roll=1
		yaw=0
	}
	offset
	{
		x=-1
		y=-0.8
		z=-15
	}
}

camera8
{
	fov=50
	model=0
	name=front
	wheels=1
	angle
	{
		x=5
		y=215
		z=0
	}
	follow
	{
		pitch=1
		roll=1
		yaw=1
	}
	offset
	{
		x=-0.3
		y=-0.1
		z=-6.5
	}
}

camera9
{
	fov=30
	model=0
	name=above
	wheels=1
	angle
	{
		x=30
		y=45
		z=0
	}
	follow
	{
		pitch=1
		roll=1
		yaw=1
	}
	offset
	{
		x=0
		y=0
		z=-8
	}
}

audio
{
	horn
	{
		sample=horn.wav
	}
	skid
	{
		volume=1
		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~audio.acc_all
		{
			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
		}
	}
}