speedsims
| Basics | Performance | Handling | Suspensions | Final tuning | Example |
NHeat physics tutorial
table Chassis
	mass			3500		;mass of car including driver weight (lbs)
	mx			64000		;inertia on x axis (height);  (1/2000) * (mass)*(length^2 + width^2)
	my			64000		;inertia on y axis (width);   (1/2000) * (mass)*(height^2 + length^2)
	mz			10000		;inertia on z axis (length);  (1/2000) * (mass)*(width^2 + height^2)
						;but since NH doesn't use exact physics on this, some "guesstimation" may do as well ;)

	width			75.0		;width (inch)
	height			51.0		;height (inch)
	ftrack			60.5		;distance from left to right front wheel (inch)
	rtrack			60.5		;distance from left to right rear wheel (inch)
	wheelbase		110.0		;distance from from front to rear axis (inch)
	cm_height		10.0		;height of center of mass of car body; important to adjust with rc_heights
	wheel_lock		0, 35.0		;front wheel turning angle range, to be adjusted in garage

	fuel_capacity		22.0		;gallons of fuel

	frontal_area		19.0		;goes with drag = how much accelerating will be slowed down with increasing speed
						;sideeffect is how big the car's slipstream will be
	drag			0.30		;body drag, see above
	cp_height		18.0		;center of pressure height; aerodynamics
	cp_long			51.0		;center of pressure position on car's length axis; aerodynamics
	lat_drag		.90		;sideways drag; only noticeable on speedways, if ever
	vert_drag		2.0		;drag from top; only noticeable on speedways, if ever

	front_lift		 -0.025		;body front lift; positive values on lift will cause the car to lift 
						;and thus wouldn't make any sense
	rear_lift		 -0.1		;body rear lift

	fspoiler_lift		-.31, -.36	;front spoiler lift range; adjustment range will always be 0 to 100% in garage
	fspoiler_drag		 .075, 0.06	;front spoiler drag range; goes with front spoiler lift
	rspoiler_lift		-.19, -.40	;rear spoiler lift range
	rspoiler_drag		 .038, .080	;rear spoiler drag range

	rspoiler_angle		40.0, 70.0	;rear spoiler adjustment range; if set 0.0,95.0 you'll get a range from 16% to 95%

	model_offset		0.0, 1.0, 0.0	;the car's mesh position in the game in relationship to wheels

	head_pos		-14.2, 38.378, -8.154	;driver's head x,y,z-position 
	head_pitch		0.0			;driver's view angle; negative value= looking down, pos value = up

	shifter_throw		10.0, 15.0, 0.0		;shifter mesh x,y,z-position
	
	tachometer		65, 64		;center of needle on tachometer gauge texture, which has total size of 128x128
	tachometer1		0000  21,93	;x,y pos on gauge texture where needle points to when displaying 0 rpm
	tachometer2		3000  26,28	;x,y pos on gauge texture where needle points to when displaying 3000 rpm
	tachometer3		5000  65,10	;x,y pos on gauge texture where needle points to when displaying 5000 rpm
	tachometer4		8000  114,46	;x,y pos on gauge texture where needle points to when displaying 8000 rpm
	tachometer5		10000 109,89	;x,y pos on gauge texture where needle points to when displaying 10000 rpm

	oil_pressure_gauge	52,132
	oil_pressure_gauge1	0  30,149
	oil_pressure_gauge2	20 26,132
	oil_pressure_gauge3	60 62,108
	oil_pressure_gauge4	100 73,149

	oil_temp_gauge		137,133
	oil_temp_gauge1		0  117,149
	oil_temp_gauge2		140 115,146
	oil_temp_gauge3		180 111,129
	oil_temp_gauge4		200 117,117
	oil_temp_gauge5		240 147,108
	oil_temp_gauge6		260 158,150

	water_temp_gauge	80, 133
	water_temp_gauge1	0  59,150
	water_temp_gauge2	140 57,147
	water_temp_gauge3	180 52,129
	water_temp_gauge4	200 57,117
	water_temp_gauge5	240 89,108
	water_temp_gauge6	260 106,123
	water_temp_gauge7	280 101,149

	fuel_gauge		123,199
	fuel_gauge1		0  103,215
	fuel_gauge2		3  95,199
	fuel_gauge3		6  107,177
	fuel_gauge4		12 149,190
	fuel_gauge5		20 144,214

	volt_gauge		166,146
	volt_gauge1		0  144,131
	volt_gauge2		10 153,123
	volt_gauge3		16 181,122
	volt_gauge4		18 183,126

;	speedometer		0, 160  -145, 0.00, 145 ;should work same way as all other gauge definitions


end

table BodySpeedway				;used for restrictor plate racing at superspeedways
	frontal_area		19.0
	drag			0.26
	cp_height		18.0
	cp_long			51.0
	lat_drag		.90
	vert_drag		2.0
	front_lift		0.0
	rear_lift		0.1
	fspoiler_lift		-.17, -.19
	fspoiler_drag		 .030, 0.025
	rspoiler_lift		-.19, -.40
	rspoiler_drag		 .038, .080
end

table EngineNormal
	power_max		 720		;max hp... 
	power_rpm		8000		;at this rpm
	torque_max		 600		;max torque...
	torque_rpm		4800		;at this rpm
	redline			8600		;max rpm (shift light)
	idle_speed		 800		;idle rpm
	inertia			15		;engine's inertia
	drag			.045		;if set lower than 0.03, there will be no engine overheating
	fuel_consumption .	.04		;just what it says
	mass			360		; engine mass (not used?)
	displacement		8.0		;not used; total engine cylinder volume
	sound			eng1		;what sound files to use; 
						;here: eng1i.sfx = idle sound, 
						;      eng10.sfx = external sound
						;      eng11.sfx = internal sound low rpm
						;      eng12.sfx = internal sound high rpm
						;      eng1e.ens = definition file
						;need to be located in part.res

	cold_idle_speed		1500		;idle rpm for cold engine
	engine_temp		180		;temperature when engine starts overheating
	oil_pressure		15, 10, 60	;oil pressure normal,min,max values, as displayed on gauge
end

table EngineRestrictor				;used for restrictor plate racing at superspeedways
	power_max		 364
	power_rpm		6800
	torque_max		 420
	torque_rpm		4500
	redline			8600
	idle_speed		 800
	inertia			  15
	drag			.045
	fuel_consumption .	04
	mass			360
	displacement		8.0
	sound			eng1
	cold_idle_speed		1500
	engine_temp		180
	oil_pressure		15, 10, 60
end

table Transmission
	num_gears		4		;number of gears
	inertia			5		;how free tranny is
	drag			.0001		;

	torque_balance		1.0		;1 = rear wheel driven
						;0 = front wheel driven
						;01-0.9 = 4 wheel driven
	fstiff			0.0		;differential coupling force (front) 
	rstiff			10.0		;differential coupling force (rear)
	cstiff			0.0		;differential coupling force (all)
	ratio			3.73		;final gear ratio preset, to be adjusted in garage

	clutch_torque		1600		;torque when releasing clutch
	clutch_rpm		400		;rpm on releasing clutch
end

table Front
	camber			-10, 10		;front camber range
	toe			-4, 4		;front wheels' toe
	ride			5, 9		;front wheels' ride height range; will be set by track physics
	caster			6.0		;front caster; the higher, the less directly/nervous will the car react to steering manouevres
	anti_pitch		.10		;dunno
	rc_height		0		;front roll center height; 
						;if higher than rear roll center, the car will tend to understeer
						;if lower than rear roll center, the car will tend to oversteer
						;     imagine an axis from front to rear roll center: 
						;     the center of mass will roll around this axis, so it's important
						;     to adjust center of mass height to this roll center axis, otherwise
						;     the car may either feel like dead or easily tip over in turns
						
	bump_camber		-.20		;camber of shocks
	bump_toe		-.40		;toe on shocks
	compliance_steer	.09		;determination of front wheel steering (?)
	compliance_camber	.60		;flexibility on camber (?)
	torque_steer		1.0		;degree of flex per 1000lbs of force 
	solid_axle		no		;just what is says
	damage_impulse		.5		;how easily the car's front suspension gets damaged 
	removal_impulse		.6		;how easily the car loses front wheels on crashes

	rate			200,600		;front spring rate range divided by 2 (on rear NOT divided by 2!)
	sway			0,800		;front sway bar range
	bump			60,840		;front bump range
	rebound			60,840		;front rebound range
	rubber_rate		400		;front bump stop rate; should be set 0 on cars that don't have such rubber stops
	rubber_height		1.0		;should be set 0 on road racing cars; height of bump stop rubber

	resistance		.110		;front tire resistance to longitudinal movement
	friction		10		;actually this defines how fast/much front tires heat up on speed = tire wear rate

	diameter		17		;not used; same as tire_diameter
	tire_diameter		28		;just what is says
	aspect			35		;front tire/rim diameter ratio; goes with lateral stiffness/grip
	width			305		;front tire width

	mass			20		;front tire mass; tire_diameter^2*PI*(tire_width/30000)
	moment			350		;front tire inertia; 1/40 * tire_diameter^2 * tire_mass  
	model			rtire		;front tire mesh model

	ref_width		305		;not used; same as width

	magic_b			.714		;magic numbers, define tire compund attributes
	magic_c			1.40		;
	magic_d			1.0		;
	magic_e			-.20		

						;lateral stiffness and friction are defined by linear functions:
	frict_k1		1.46		;front tire lateral grip at load1/slow turns
	frict_load1		800		
	frict_k2		1.25		;front tire lateral grip at load2/fast turns
	frict_load2		2000		
	stiff_c1		410		;front tire lateral stiffness at load1/slow turns
	stiff_load1		800		
	stiff_c2		633		;front tire lateral stiffness at load2/fast turns
	stiff_load2		2000		

	camber_stiff		.05		;front tire stiffness at camber peak 
	camber_grip		.09		;front tires grip at camber peak 
	camber_peak		 5		;camber peak
	long_stiff		1.1		;front tires' stiffness for longitudinal movement as multiple of lateral
	long_frict		1.4		;front tires' friction for longitudinal movement as multiple of lateral 

	brake_force 0,3000			;front brake force range
end

table Rear					;same as on front tire definitions
	camber			-1.5, 1.5
	toe			-.5, .5
	ride			5, 9
	caster			0.0
	anti_pitch		.30
	rc_height		4
	bump_camber		-1.0
	bump_toe		.05
	compliance_steer	.09
	compliance_camber	.01
	torque_steer		0.2
	solid_axle		yes
	damage_impulse		.5
	removal_impulse		.6
	rate			200,600
	sway			0,50
	bump			60,840
	rebound			60,840
	rubber_rate		400
	rubber_height		1.0 
	resistance		.110
	friction	 	10
	diameter		17
	tire_diameter		28
	aspect			35
	width			305
	mass		  	24
	moment		 	350
	model	   		rtire
	ref_width		305
	magic_b			.714
	magic_c			1.40
	magic_d			1.0
	magic_e			-.20
	frict_load1  		800
	frict_k1		1.46
	frict_load2 		2000
	frict_k2		1.25
	stiff_load1  		800
	stiff_c1	 	418.2
	stiff_load2  		2000
	stiff_c2	 	645.7
	camber_stiff		.05
	camber_grip		.09
	camber_peak		5
	long_stiff		1.1
	long_frict		1.4
	brake_force 0,3000
end

end