| 
				 
					11-18-2010, 12:59 AM,  
				 
				
			 | 
		 
		
			
				
					
						| 
							
						 | 
						
							fudje 
 
 
							
								Member 
								    
								
							
						 | 
						
							
	Posts: 87 
	Threads: 6 
	Joined: Dec 2007
	
						 | 
					 
				 
			 | 
		 
		
			
				Suspension subclassing; CARSUSPENSIONINFO struct. 
				
					As hinted to in the Car graphics config thread (  http://vdrift.net/Forum/viewtopic.php?p=11414#11414 ),  I have been working expanding the scope of suspension types simulation.  Of particular interest to me is double wishbone suspension which some of you may realise cannot properly be simulated with a single hinge point, being described by an offset pair of additive sine curves (or, in other words, two circles, as opposed to the one that is available right now.
 
Anyway.  For various reasons relating to doing things the "right" way, I'm trying to put this together with some supposedly straightforward polymorphism. 
It now makes sense for CARDYNAMICS to contain not a vector of CARSUSPENSION but pointers there to (because you need pointers or references in C++ and you can't uses references like that).  Easy to deal with â except that it buggers up the joeserialize stuff.  I'm not entirely sure what joeserialize is supposed to achieve, but simpling preventing the suspension for being serialized doesn't seem to cause any problems....  Someone tell me if this is bad and will leak memory or something? 
Moving on, I'm also interested in what the point of having a CARSUSPENSIONINFO struct is?  In the interest of reducing the number of data types that need to be derived, is there a problem with storing that data directly in the CARSUSPENSION class (and derivates)?
				  
				
				
				
				
				 
			 | 
		 
		
			| 
				
				
			 | 
		 
	
 
	
		
			| 
				 
					11-18-2010, 07:11 PM,  
				 
				
			 | 
		 
		
			
				
					
						| 
							
						 | 
						
							fudje 
 
 
							
								Member 
								    
								
							
						 | 
						
							
	Posts: 87 
	Threads: 6 
	Joined: Dec 2007
	
						 | 
					 
				 
			 | 
		 
		
			
				  
				
					Currently the configuration looks something like 
Quote:[wheel/fl] 
texture = oem_wheel.png, oem_wheel-misc1.png 
mesh = oem_wheel.joe 
orientation = left 
position = -0.69, 1.27, -0.49 
suspension = double-wishbone 
upper-chassis-rear = -0.35, 1.27, -0.07 
upper-chassis-front = -0.35, 1.33, -0.07 
lower-chassis-rear = -0.28, 1.22, -0.44 
lower-chassis-front = -0.28, 1.32, -0.44 
upper-hub = -0.64, 1.28, -0.37 
lower-hub = -0.64, 1.27, -0.56 
camber = -1.27 
caster = 4.9 
toe = 1.2 
ackermann = 7.9 
steering = 32.8 
This would only apply to double wishbone suspension, I intend to implement further suspension types also (I started with DW because it's the most complex independent suspension system, and should give a good idea of what needs to be present).  Currently this is all done in LoadSuspension, which I've moved to a static member function of CARSUSPENSION so that CARDYNAMICS doesn't have to know anything about different suspension types.  A different scheme similar to what zim suggested with the info about hinge points in a separate config block might make sense also, eg.
 Quote:[wheel/fl/wishbone-hinges] 
upper-chassis-rear = -0.35, 1.27, -0.07 
upper-chassis-front = -0.35, 1.33, -0.07 
lower-chassis-rear = -0.28, 1.22, -0.44 
lower-chassis-front = -0.28, 1.32, -0.44 
upper-hub = -0.64, 1.28, -0.37 
lower-hub = -0.64, 1.27, -0.56 
 
[wheel/fl] 
texture = oem_wheel.png, oem_wheel-misc1.png 
mesh = oem_wheel.joe 
orientation = left 
position = -0.69, 1.27, -0.49 
suspension = double-wishbone 
camber = -1.27 
caster = 4.9 
toe = 1.2 
ackermann = 7.9 
steering = 32.8 
My prelim implementation virtualises GetWheelPosition (pure virtual), SetSteering (rotational travel offset), and Init.  At the moment I have moved the hinge from the CARSUSPENSIONINFO struct directly into CARSUSPENSION.  Unless you're expecting to one day have a thousand of the same type of car in a particular game instance, I'm not convinced about the data sharing    â but that's just my opinion, of course. 
EDIT: Actually it doesn't make Init virtual so much as admit it takes overloading now.  I might change the access to protected.
				  
				
				
				
				
				 
			 | 
		 
		
			| 
				
				
			 | 
		 
	
 
	
		
			| 
				 
					11-18-2010, 08:02 PM,  
				 
				
			 | 
		 
		
			
				
					
						| 
							
						 | 
						
							fudje 
 
 
							
								Member 
								    
								
							
						 | 
						
							
	Posts: 87 
	Threads: 6 
	Joined: Dec 2007
	
						 | 
					 
				 
			 | 
		 
		
			
				  
				
					On the subject, I've been thinking on how to implement codepedent suspension, and my current theory is the best option goes in configuration with something like: 
Code: [suspensionlink/rear] 
# Funky link frame parameters go here 
 
[wheel/rl] 
suspension = linked 
suspensionlink = rear 
# Wheel specific parameters 
 
[wheel/rr] 
suspension = linked 
suspensionlink = rear 
# Wheel specific parameters
 
Codewise, the suspension links themselves could be stored for loading purposes in a string map that is initially empty, the first wheel to look up a mapping creates it, every subsequent look up will reference the same map â during the actual simulation each wheel position refers to its relevant link directly, avoiding the STL overhead.  The caveat is that CARDYNAMICS Load routine would need to know a little about linked suspension (at the least provide a map), but I guess that's not so bad.  Additionally all wheels linked together would need to update their positions before force is applied to any of them.
				  
				
				
				
				
				 
			 | 
		 
		
			| 
				
				
			 | 
		 
	
 
	
		
			| 
				 
					11-19-2010, 12:39 AM,  
				 
				
			 | 
		 
		
			
				
					
						| 
							
						 | 
						
							fudje 
 
 
							
								Member 
								    
								
							
						 | 
						
							
	Posts: 87 
	Threads: 6 
	Joined: Dec 2007
	
						 | 
					 
				 
			 | 
		 
		
			
				  
				
					I've coded and tested and rearranged and re-tested, rebased, fixed conflicts, corrected for ABI changes, tested again, and decided that apart from finalising the configuration format I have a functional double wishbone simulation. 
I'm currently preferring the concept of deferring the hinge locations to a config subsection (now using '.' instead of '/' I guess)  A second, third, or possibly authoritative opinion would help   
Also if anyone has a series 2 Elise sitting in their back yard and would like to measure the lengths of the wishbone arms (one front pair and one rear pair should be sufficient), ...
				  
				
				
				
				
				 
			 | 
		 
		
			| 
				
				
			 | 
		 
	
 
	
		
			| 
				 
					11-19-2010, 04:20 PM,  
				 
				
			 | 
		 
		
			
				
					
						| 
							
						 | 
						
							fudje 
 
 
							
								Member 
								    
								
							
						 | 
						
							
	Posts: 87 
	Threads: 6 
	Joined: Dec 2007
	
						 | 
					 
				 
			 | 
		 
		
			| 
				  
				 
					You could simulate a simple model of a macpherson strut in data by defining the lower arm and then inserting an identical length and parallel virtual upper arm at any point along the axis of the strut. 
 
EDIT: Uh, scratch that.  Macpherson struts have exceedingly little variation in horizontal movement.  One other major difference from 2 wishbone suspension is that the wheel is actually mounted on the variable length upper arm. 
IMO the simplest way is to keep those types separate and define the macpherson type with the strut's mount point  and the far end of the strut when fully extended (heck you could just use the wheel position and and offset from the top of the strut equivalent to the offset of the wheelfrom the bottom of the strut). 
 
I'll get patches ready just as soon as I've had time to test with a vehicle that's not ridiculously tweaked to try and match reality in just about every other way.
				 
				
				
				
				
				 
			 | 
		 
		
			| 
				
				
			 | 
		 
	
 
	
		
			| 
				 
					11-20-2010, 01:08 AM,  
				 
				
			 | 
		 
		
			
				
					
						| 
							
						 | 
						
							fudje 
 
 
							
								Member 
								    
								
							
						 | 
						
							
	Posts: 87 
	Threads: 6 
	Joined: Dec 2007
	
						 | 
					 
				 
			 | 
		 
		
			
				Patch for LE data. 
				
					I don't seem to be able to add attachments, so here goes: 
Code: Index: vdrift-data/cars/LE/LE.car 
=================================================================== 
--- vdrift-data/cars/LE/LE.car    (revision 725) 
+++ vdrift-data/cars/LE/LE.car    (working copy) 
@@ -1,36 +1,34 @@ 
 include ../../carparts/touring 
  
 [engine] 
-position = 0.0, -0.9, -0.20 
+position = 0.0, -0.75, -0.20 
 mass = 120.0 
-max-power = 1.79e5 
-peak-engine-rpm = 7800.0 
-rpm-limit = 9000.0 
+max-power = 1.04e5 
+peak-engine-rpm = 6400.0 
+rpm-limit = 7200.0 
 inertia = 0.1 
 idle = 0.02 
 start-rpm = 1000 
 stall-rpm = 350 
 fuel-consumption = 1e-9 
 torque-friction = 0.0003 
-torque-curve-00 =  500, 55.0 
-torque-curve-01 = 1000, 60.0 
-torque-curve-02 = 2000, 70.0 
-torque-curve-03 = 3000, 80.0 
-torque-curve-04 = 4000, 90.0 
-torque-curve-05 = 4500, 97.0 
-torque-curve-06 = 5000, 111.0 
-torque-curve-07 = 5500, 145.0 
-torque-curve-08 = 6000, 170.0 
-torque-curve-09 = 6250, 148.0 
-torque-curve-10 = 6500, 160.0 
-torque-curve-11 = 6800, 181.0 
-torque-curve-12 = 7000, 179.0 
-torque-curve-13 = 7500, 174.0 
-torque-curve-14 = 7800, 173.0 
-torque-curve-15 = 8000, 171.0 
-torque-curve-16 = 8200, 169.0 
-torque-curve-17 = 8600, 146.0 
-torque-curve-18 = 9000, 137.0 
+torque-curve-00 = 1000, 142.18 
+torque-curve-01 = 1400, 149.78 
+torque-curve-02 = 1800, 154.98 
+torque-curve-03 = 2200, 159.12 
+torque-curve-04 = 2600, 164.85 
+torque-curve-05 = 3000, 168.24 
+torque-curve-06 = 3400, 169.93 
+torque-curve-07 = 3800, 170.52 
+torque-curve-08 = 4200, 170.6 
+torque-curve-09 = 4600, 170.54 
+torque-curve-10 = 5000, 170.05 
+torque-curve-11 = 5400, 168.51 
+torque-curve-12 = 5800, 165.21 
+torque-curve-13 = 6200, 159.34 
+torque-curve-14 = 6600, 150.05 
+torque-curve-15 = 7000, 136.42 
+torque-curve-16 = 7400, 117.5 
  
 [clutch] 
 sliding = 0.27 
@@ -40,7 +38,7 @@ 
  
 [transmission] 
 gears = 5 
-gear-ratio-r = -2.8 
+gear-ratio-r = -2.98 
 gear-ratio-1 = 3.167 
 gear-ratio-2 = 1.842 
 gear-ratio-3 = 1.307 
@@ -49,7 +47,7 @@ 
 shift-delay = 0.08 
  
 [differential-rear] 
-final-drive = 4.100 
+final-drive = 3.94 
 anti-slip = 600.0 
  
 [fuel-tank] 
@@ -65,7 +63,7 @@ 
 [wing.front] 
 position = 0.0, 0.0, 0.2 
 frontal-area = 2 
-drag-coefficient = 0.3 
+drag-coefficient = 0.1 
  
 [wing.center] 
 position = 1.9, 0.0, 0.60 
@@ -175,32 +173,64 @@ 
  
 [wheel.fl.tire] 
 texture = touring.png 
-size = 195,50,16 
+size = 185,55,15 
 type = tire-touring 
  
 [wheel.fr.tire] 
 texture = touring.png 
-size = 195,50,16 
+size = 185,55,15 
 type = tire-touring 
  
 [wheel.rl.tire] 
 texture = touring.png 
-size = 225,45,17 
+size = 205,50,16 
 type = tire-touring 
  
 [wheel.rr.tire] 
 texture = touring.png 
-size = 225,45,17 
+size = 205,50,16 
 type = tire-touring 
  
+[wheel.fl.wishbones] 
+upper-chassis-rear = -0.39, 1.09, -0.330 
+upper-chassis-front = -0.39, 1.20, -0.330 
+upper-hub = -0.68, 1.108, -0.370 
+lower-chassis-rear = -0.34, 0.988, -0.570 
+lower-chassis-front = -0.34, 1.228, -0.570 
+lower-hub = -0.69, 1.108 -0.60 
+ 
+[wheel.fr.wishbones] 
+upper-chassis-rear = 0.39, 1.09, -0.330 
+upper-chassis-front = 0.39, 1.20, -0.330 
+upper-hub = 0.68, 1.108, -0.370 
+lower-chassis-rear = 0.34, 0.988, -0.570 
+lower-chassis-front = 0.34, 1.228, -0.570 
+lower-hub = 0.69, 1.108 -0.6 
+ 
+[wheel.rl.wishbones] 
+upper-chassis-rear = -0.47, -1.083, -0.34 
+upper-chassis-front = -0.47, -1.283, -0.34 
+upper-hub = -0.70, -1.183, -0.38 
+lower-chassis-rear = -0.39, -1.383, -0.58 
+lower-chassis-front = -0.39, -0.983, -0.58 
+lower-hub = -0.72, -1.183 -0.61 
+ 
+[wheel.rr.wishbones] 
+upper-chassis-rear = 0.47, -1.083, -0.34 
+upper-chassis-front = 0.47, -1.283, -0.34 
+upper-hub = 0.70, -1.183, -0.38 
+lower-chassis-rear = 0.39, -1.383, -0.55 
+lower-chassis-front = 0.39, -0.983, -0.55 
+lower-hub = 0.72, -1.183 -0.61 
+ 
 [wheel.fl] 
 texture = oem_wheel.png, oem_wheel-misc1.png 
 mesh = oem_wheel.joe 
 position = -0.706, 1.108, -0.460 
-hinge = 0,0,0 
-camber = -1.33 
+suspension = double-wishbone 
+camber = -0.1 
 caster = 6.12 
-toe = 0.0 
+toe = 0 
 ackermann = 8.56    # 50% ackermann 
 steering = 30 
  
@@ -209,10 +239,10 @@ 
 mesh = oem_wheel.joe 
 scale = -1,1,1 
 position = 0.706, 1.108, -0.460 
-hinge = 0,0,0 
-camber = 1.33 
+suspension = double-wishbone 
+camber = 0.1 
 caster = 6.12 
-toe = 0.0 
+toe = 0 
 ackermann = -8.56 
 steering = 30 
  
@@ -220,8 +250,8 @@ 
 texture = oem_wheel.png, oem_wheel-misc1.png 
 mesh = oem_wheel.joe 
 position = -0.730, -1.183, -0.480 
-hinge = 0,-0.85,0 
-camber = -0.45 
+suspension = double-wishbone 
+camber = -1.8 
 caster = 0.28 
 toe = 0.0 
  
@@ -230,8 +260,8 @@ 
 mesh = oem_wheel.joe 
 scale = -1,1,1 
 position = 0.730, -1.183, -0.480 
-hinge = 0,-0.85,0 
-camber = 0.45 
+suspension = double-wishbone 
+camber = 1.8 
 caster = 0.28 
 toe = 0.0 
  
@@ -265,16 +295,16 @@ 
  
 [particle-02] 
 mass = 116.0 
-position = -0.39, -1.7, 0.0 
+position = -0.39, -1.7, -0.23 
  
 [particle-03] 
 mass = 116.0 
-position = 0.39, -1.7, 0.0 
+position = 0.39, -1.7, -0.23 
  
 [particle-04] 
 mass = 166.0 
-position = -0.39, 1.32, -0.2 
+position = -0.39, 1.32, -0.43 
  
 [particle-05] 
 mass = 166.0 
-position = 0.39, 1.32, -0.2 
+position = 0.39, 1.32, -0.43
 
I made a few additional alterations to the data, mostly the torque curve â I don't know what the data in there was supposed to be for, but I replaced it with some 'clean' data extrapolated from graph data for the Toyota 1ZZ-FE powertrain as paired with the 5-speed gearbox.  It now accelerates from 0-100 in ~5 seconds as it's supposed to. 
I moved the particles down because the centre of mass was ridiculously high and causing the car to prefer tipping over to cornering.  I moved the engine forwards to try and unbalance the back end while cornering â also the -0.9 basically had it hanging almost over the rear axle a la a Beetle with a Porsche 6cyl engine forcibly inserted throught the luggage space.
				  
				
				
				
				
				 
			 | 
		 
		
			| 
				
				
			 | 
		 
	
 
	
		
			| 
				 
					11-20-2010, 04:19 AM,  
				 
				
			 | 
		 
		
			
				
					
						| 
							
						 | 
						
							fudje 
 
 
							
								Member 
								    
								
							
						 | 
						
							
	Posts: 87 
	Threads: 6 
	Joined: Dec 2007
	
						 | 
					 
				 
			 | 
		 
		
			
				  
				
					http://www.youtube.com/watch?v=BhYdSfKMk_E  
Okay it's not the LE.  Here's a complete .car, 'coz it's  that different:
 
cars/GTV6/GTV6.car:
 Code: include ../../carparts/touring 
 
[engine] 
position = 0.0, 1.28, -0.24 
mass = 170.0 
max-power = 1.17e5 
peak-engine-rpm = 5600.0 
rpm-limit = 6300.0 
inertia = 0.31 
idle = 0.02 
start-rpm = 800 
stall-rpm = 350 
fuel-consumption = 1e-9 
torque-friction = 3.5e-4 
torque-curve-00 =     600,    171.33 
torque-curve-01 =     800,    176.54 
torque-curve-02 =     1000,    181.47 
torque-curve-03 =     1200,    186.12 
torque-curve-04 =     1400,    190.44 
torque-curve-05 =     1600,    194.40 
torque-curve-06 =     1800,    197.99 
torque-curve-07 =     2000,    201.19 
torque-curve-08 =     2200,    203.96 
torque-curve-09 =     2400,    206.30 
torque-curve-10 =     2600,    208.19 
torque-curve-11 =     2800,    209.62 
torque-curve-12 =     3000,    210.57 
torque-curve-13 =     3200,    211.05 
torque-curve-14 =     3400,    212.64 
torque-curve-15 =     3600,    216.27 
torque-curve-16 =     3800,    217.93 
torque-curve-17 =     4000,    218.79 
torque-curve-18 =     4200,    219.00 
torque-curve-19 =     4400,    218.84 
torque-curve-20 =     4600,    218.11 
torque-curve-21 =     4800,    216.58 
torque-curve-22 =     5000,    214.08 
torque-curve-23 =     5200,    210.48 
torque-curve-24 =     5400,    205.66 
torque-curve-25 =     5600,    199.52 
torque-curve-26 =     5800,    192.50 
torque-curve-27 =     6000,    185.12 
torque-curve-28 =     6200,    179.22 
torque-curve-29 =     6400,    173.21 
 
# I need some way of specifying a twin-plate clutch.  Grr. 
[clutch] 
sliding = 0.24 
radius = 0.14 
area = 1.12 
max-pressure = 1.56e4 
 
[transmission] 
gears = 5 
gear-ratio-r = -3.0 
gear-ratio-1 = 3.5 
gear-ratio-2 = 1.956 
gear-ratio-3 = 1.345 
gear-ratio-4 = 1.026 
gear-ratio-5 = 0.84 
shift-delay = 0.32 
 
[differential-rear] 
final-drive = 4.1 
anti-slip = 30.0 
 
[fuel-tank] 
position = -1.17, 0, -0.15  
capacity = 0.0650 
volume = 0.0650 
fuel-density = 0.773 
 
[camera] 
view-position = -0.33, -0.1, 0.47 
hood-mounted-view-position = 0.0, 1.2, 0.3 
 
[wing.front] 
position = 0.0, 1.98, -0.30 
frontal-area = 2.1 
drag-coefficient = 0.13 
lift-coefficient = -1.7 
efficiency = 0.87 
 
[wing.center] 
position = 0.0, 0.0, 0.1 
frontal-area = 0.3 
drag-coefficient = 0.0 
lift-coefficient = -0.3 
efficiency = 0.8 
 
[wing.rear] 
position = 0.0, -2.05, 0.22 
frontal-area = 0.17 
drag-coefficient = 0.11 
surface-area = 1.2 
lift-coefficient = -0.75 
efficiency = 0.98 
 
[wheel.fl.coilover] 
spring-constant = 74000 
bounce = 3700 
rebound = 8600 
travel = 0.12 
anti-roll = 12000 
 
[wheel.fr.coilover] 
spring-constant = 74000 
bounce = 3700 
rebound = 8600 
travel = 0.12 
anti-roll = 12000 
 
[wheel.rl.coilover] 
spring-constant = 61500 
bounce = 2900 
rebound = 8200 
travel = 0.43 
anti-roll = 8500 
 
[wheel.rr.coilover] 
spring-constant = 61500 
bounce = 2900 
rebound = 8200 
travel = 0.43 
anti-roll = 8500 
 
[wheel.fl.brake] 
texture = rotor_worn.png 
friction = 0.72 
max-pressure = 1.86e6 
bias = 0.68 
radius = 0.170 
area = 0.019 
 
[wheel.fr.brake] 
texture = rotor_worn.png 
friction = 0.72 
max-pressure = 1.86e6 
bias = 0.68 
radius = 0.170 
area = 0.018 
 
[wheel.rl.brake] 
texture = rotor_worn.png 
friction = 0.64 
max-pressure = 2.02e6 
bias = 0.34 
radius = 0.135 
area = 0.02 
handbrake = 1.0 
 
[wheel.rr.brake] 
texture = rotor_worn.png 
friction = 0.64 
max-pressure = 2.02e6 
bias = 0.34 
radius = 0.135 
area = 0.02 
handbrake = 1.0 
 
[wheel.fl.tire] 
texture = touring.png 
size = 195,65,15 
type = tire-touring 
 
[wheel.fr.tire] 
texture = touring.png 
size = 195,65,15 
type = tire-touring 
 
[wheel.rl.tire] 
texture = touring.png 
size = 195,65,15 
type = tire-touring 
 
[wheel.rr.tire] 
texture = touring.png 
size = 195,65,15 
type = tire-touring 
 
[wheel.fl.wishbones] 
upper-chassis-rear = -0.35, 1.27, -0.07 
upper-chassis-front = -0.35, 1.37, -0.07 
upper-hub = -0.64, 1.27, -0.12 
lower-chassis-rear = -0.28, 1.22, -0.44 
lower-chassis-front = -0.28, 1.32, -0.44 
lower-hub = -0.64, 1.27, -0.49 
 
[wheel.fr.wishbones] 
upper-chassis-rear = 0.35, 1.27, -0.07 
upper-chassis-front = 0.35, 1.37, -0.07 
upper-hub = 0.64, 1.27, -0.12 
lower-chassis-rear = 0.28, 1.22, -0.44 
lower-chassis-front = 0.28, 1.32, -0.44 
lower-hub = 0.64, 1.27, -0.49 
 
[wheel.fl] 
suspension = double-wishbone 
texture = oem_wheel.png, oem_wheel-misc1.png 
mesh = oem_wheel.joe 
position = -0.69, 1.27, -0.44 
camber = -1.27 
caster = 4.9 
toe = 1.2 
ackermann = 7.9    # 50% ackermann 
steering = 32.8 
 
[wheel.fr] 
suspension = double-wishbone 
texture = oem_wheel.png, oem_wheel-misc1.png 
mesh = oem_wheel.joe 
scale = -1,1,1 
position = 0.69, 1.27, -0.44 
camber = 1.27 
caster = 4.9 
toe = -1.2 
ackermann = -7.9    # 50% ackermann 
steering = 32.8 
 
[wheel.rl] 
texture = oem_wheel.png, oem_wheel-misc1.png 
mesh = oem_wheel.joe 
position = -0.68, -1.13, -0.47 
hinge = 0.04, -0.7, -0.23 
camber = -0.65 
caster = 0.28 
toe = 0.0 
 
[wheel.rr] 
texture = oem_wheel.png, oem_wheel-misc1.png 
mesh = oem_wheel.joe 
scale = -1,1,1 
position = 0.68, -1.13, -0.47 
hinge = -0.04, -0.7, -0.23 
camber = 0.65 
caster = 0.28 
toe = 0.0 
 
[driver] 
texture = driver2.png, driver-misc1.png 
mesh = driver.joe 
position = -0.33, -0.1, 0.12 
mass = 70.0 
 
[body] 
texture = body00.png 
mesh = body.joe 
 
[interior] 
texture = interior.png 
mesh = interior.joe 
 
[glass] 
texture = glass.png 
mesh = glass.joe 
draw = transparent 
 
[light-brake] 
texture = brake.png 
mesh = body.joe 
draw = emissive 
 
[light-reverse] 
texture = reverse.png 
mesh = body.joe 
draw = emissive 
 
# these are used to calculate the weight distribution and balance 
[ particle-00 ] 
mass = 160.0 
position = 0.38, 1.26, -0.42 
 
[ particle-01 ] 
mass = 160.0 
position = -0.38, 1.26, -0.42 
 
[ particle-02 ] 
mass = 130.0 
position = 0.38, -1.22, -0.38 
 
[ particle-03 ] 
mass = 130.0 
position = -0.38, -1.22, -0.38 
 
[ particle-04 ] 
mass = 60.0 
position = 0.38, 0.0, 0.61 
 
[ particle-05 ] 
mass = 60.0 
position = -0.38, 0.0, 0.61 
 
[ particle-06 ] 
mass = 46.0 
position = 0.39, -1.12, 0.59 
 
[ particle-07 ] 
mass = 46.0 
position = -0.39, -1.12, 0.59 
 
[ particle-08 ] 
mass = 108.0 
position = 0.0, 0.6, -0.41 
 
[ particle-09 ] #transmission 
mass = 160.0 
position = 0.0, -1.12, -0.24 
 
[ particle-10 ] #driver 
mass = 70 
position = -0.33, -0.1, 0.27
  
				 
				
				
				
				
				 
			 | 
		 
		
			| 
				
				
			 | 
		 
	
 
	
		
			| 
				 
					11-20-2010, 07:41 AM,  
				 
				
			 | 
		 
		
			
				
					
						| 
							
						 | 
						
							NaN 
 
 
							
								Posting Freak 
								      
								
							
						 | 
						
							
	Posts: 2,024 
	Threads: 120 
	Joined: Jan 2010
	
						 | 
					 
				 
			 | 
		 
		
			
				  
				
					Will look into the code asap. 
One cosmetic change I'd like to see in the config:
 Code: [wheel.fl.double-wishbone] 
upper-chassis-rear = -0.35, 1.27, -0.07 
upper-chassis-front = -0.35, 1.37, -0.07 
upper-hub = -0.64, 1.27, -0.12 
lower-chassis-rear = -0.28, 1.22, -0.44 
lower-chassis-front = -0.28, 1.32, -0.44 
lower-hub = -0.64, 1.27, -0.49  
 
[wheel.fl] 
texture = oem_wheel.png, oem_wheel-misc1.png 
mesh = oem_wheel.joe 
position = -0.69, 1.27, -0.44 
camber = -1.27 
caster = 4.9 
toe = 1.2 
ackermann = 7.9   # 50% ackermann 
steering = 32.8
 
PS: I've got Macpherson strut wrong too. Look here:  http://www.youtube.com/watch?v=e2D0BHUm2BI&NR=1
				 
				
				
				
				
				 
			 | 
		 
		
			| 
				
				
			 | 
		 
	
 
	
		
			| 
				 
					11-20-2010, 03:41 PM,  
				 
				
			 | 
		 
		
			
				
					
						| 
							
						 | 
						
							fudje 
 
 
							
								Member 
								    
								
							
						 | 
						
							
	Posts: 87 
	Threads: 6 
	Joined: Dec 2007
	
						 | 
					 
				 
			 | 
		 
		
			
				  
				
					NaN Wrote:Will look into the code asap. 
 
One cosmetic change I'd like to see in the config: 
Then you may want to  also apply  https://github.com/fjwhittle/vdrift/comm...18d94.diff (and make relevant changes to config sections)
				  
				
				
				
				
				 
			 | 
		 
		
			| 
				
				
			 | 
		 
	
 
	
		
			| 
				 
					11-21-2010, 04:46 AM,  
				 
				
			 | 
		 
		
			
				
					
						| 
							
						 | 
						
							fudje 
 
 
							
								Member 
								    
								
							
						 | 
						
							
	Posts: 87 
	Threads: 6 
	Joined: Dec 2007
	
						 | 
					 
				 
			 | 
		 
		
			
				  
				
					MacPherson struts, too! 
https://github.com/fjwhittle/vdrift/comm...5ea9b.diff
And a data diff for M3 (I've also done some work on TL[2] but that's been a little more involved):
 Code: Index: vdrift-data/cars/M3/M3.car 
=================================================================== 
--- vdrift-data/cars/M3/M3.car    (revision 725) 
+++ vdrift-data/cars/M3/M3.car    (working copy) 
@@ -90,14 +90,14 @@ 
 spring-constant = 75000 
 bounce = 3300 
 rebound = 9900 
-travel = 0.32 
+travel = 0.22 
 anti-roll = 6000 
  
 [wheel.fr.coilover] 
 spring-constant = 75000 
 bounce = 3300 
 rebound = 9900 
-travel = 0.32 
+travel = 0.22 
 anti-roll = 6000 
  
 [wheel.rl.coilover] 
@@ -168,10 +168,20 @@ 
 size = 205,55,15 
 type = tire-touring 
  
+[wheel.fl.macpherson-strut] 
+strut-top = -0.66, 1.34, 0.05 
+strut-end = -0.70, 1.34, -0.505 
+hinge = -0.36, 1.34, -0.44 
+ 
+[wheel.fr.macpherson-strut] 
+strut-top = 0.66, 1.34, 0.05 
+strut-end = 0.70, 1.34, -0.505 
+hinge = 0.36, 1.34, -0.44 
+ 
 [wheel.fl] 
 texture = 5_spoke_m.png 
 mesh = 5_spoke_m.joe 
-position = -0.71, 1.34, -0.44 
+position = -0.71, 1.34, -0.49 
 hinge = 0,0,0 
 camber = -2.00 
 caster = 8.00 
@@ -183,7 +193,7 @@ 
 texture = 5_spoke_m.png 
 mesh = 5_spoke_m.joe 
 scale = -1,1,1 
-position = 0.71, 1.34, -0.44 
+position = 0.71, 1.34, -0.49 
 hinge = 0,0,0 
 camber = 2.00 
 caster = 8.00 
@@ -194,7 +204,7 @@ 
 [wheel.rl] 
 texture = 5_spoke_m.png 
 mesh = 5_spoke_m.joe 
-position = -0.71, -1.24, -0.44 
+position = -0.71, -1.24, -0.49 
 hinge = 0.2,-1.1,0 
 camber = -3.00 
 caster = 0.28 
@@ -204,7 +214,7 @@ 
 texture = 5_spoke_m.png 
 mesh = 5_spoke_m.joe 
 scale = -1,1,1 
-position = 0.71, -1.24, -0.44 
+position = 0.71, -1.24, -0.49 
 hinge = -0.2,-1.1,0 
 camber = 3.00 
 caster = 0.28
  
				 
				
				
				
				
				 
			 | 
		 
		
			| 
				
				
			 | 
		 
	
 
	
		
			| 
				 
					11-21-2010, 07:32 AM,  
				 
				
			 | 
		 
		
			
				
					
						| 
							
						 | 
						
							NaN 
 
 
							
								Posting Freak 
								      
								
							
						 | 
						
							
	Posts: 2,024 
	Threads: 120 
	Joined: Jan 2010
	
						 | 
					 
				 
			 | 
		 
		
			
				  
				
					Nice job! 
What do you think about, renaming BASICSUSPENSION to HINGESUSPENSION, moving hinge parameter from wheel.bla to wheel.bla.hinge?
 Code: [wheel.bla.hinge] 
axis = # hinge rotation axis 
hinge =  # hinge axis position
  
				 
				
				
				
				
				 
			 | 
		 
		
			| 
				
				
			 | 
		 
	
 
	 
 |