The "Real" vehicle speed thread
#61

the result will not be the same to add those floats, you're summing the x, y and z velocity and the result will not be the real velocity. To get the real velocity you need to use the pitagora's or whatever formula.

example:

Let's use a real life example. Supose you're seeing the ground from the top and imagine X and Y coordinates there, the car is moving on a straight line diagonally (not 45є but not 90є o 0є from the X line) for 100 KM and the speedo counts constantly 100 KM/H. In total he had taken 1 Hour. So in X let's suppose he went 70KMs, so in Y he went : 100*100 = 70*70 + y*y <=> y = sqrt(5100) <=> y ~=71 KMs.

Therefor he went at a speed of 70Km/h in the X and 71 Km/h in the y. 70+71 = 141. 141 is not 100. There you get it. So now you can do the other way around to get the first value: speed = sqrt(70*70+71*71) ~= 99 Km/h (I just used int and not float to show you, with floats it will give a more exact value).

Hope you understood. If you didn't, pm me, and I'll explain it to you in portuguese.
Reply
#62

Well i did a mistake, misunderstood... Yeah i need to use pythagoras to do it because:

sqroot((3*3 = 9) + (4*4 = 16)) = log(25, 2) = 5;

and without pythagoras i get 3 + 4 = 7... Sorry.

I did a confusion cause when i was sleeping i remind of cancelling powers inside roots xD

I can only cancel one square power per square root, like:

floatsqroot(3*3) = log(9, 2) = 3...
Reply
#63

Quote:
Originally Posted by zugg48
Посмотреть сообщение
Of the handling.cfg archive:


Код:
		             		

                                     ------- CARS --------

        NAME           |      MAX. VEL (Km/h)       |              ACELERATION (m/sІ)        |
-----------------------|----------------------------|----------------------------------------|   
	LANDSTAL     		160.0 					25.0 
	BRAVURA     		160.0 					15.0 
	BUFFALO      		200.0 					28.0 
	LINERUN      		120.0 					25.0 
	PEREN        		150.0 					18.0 
	SENTINEL     		165.0 					24.0 
	DUMPER       		110.0 					25.0 
	FIRETRUK     		170.0 					27.0 
	TRASH        		110.0 					20.0 
	STRETCH      		180.0 					18.0 
	MANANA       		160.0 					19.0
	INFERNUS     		240.0 					30.0 
	VOODOO       		160.0 					23.0 
	PONY         		160.0 					15.0 
	MULE         		140.0 					18.0 
	CHEETAH      		230.0 					30.0 
	AMBULAN      		155.0 					24.0 
	MOONBEAM     		150.0 					15.0 
	ESPERANT     		160.0 					18.0 
	TAXI         		180.0 					19.0 
	WASHING      		180.0 					21.0 
	BOBCAT       		165.0 					20.0 
	MRWHOOP      		145.0 					14.0
	BFINJECT     		170.0 					30.0 
	PREMIER     		200.0 					22.0 
	ENFORCER     		170.0 					20.0 
	SECURICA     		170.0 					15.0 
	BANSHEE      		200.0 					33.0 
	BUS          		130.0 					14.0 
	RHINO        		80.0  					40.0 
	BARRACKS     		180.0 					20.0 
	HOTKNIFE     		200.0 					28.0 
	ARTICT1      		120.0 					18.0 
	PREVION      		160.0 					18.0 
	COACH        		160.0					18.0 
	CABBIE       		160.0 					24.0 
	STALLION     		160.0 					23.0 
	RUMPO        		160.0 					18.0 
	RCBANDIT     		75.0  					35.0 
	ROMERO       		150.0 					16.0 
	PACKER       		150.0 					13.0 
	MONSTER      		110.0 					45.0 
	ADMIRAL      		165.0 					22.0 
	TRAM         		150.0 					25.0 
	AIRTRAIN     		140.0 					24.0 
	ARTICT2      		120.0 					18.0 
	TURISMO      		240.0 					30.0 
	FLATBED      		140.0 					25.0 
	YANKEE       		160.0 					14.0 
	GOLFCART    		160.0 					15.0 
	SOLAIR      		165.0 					20.0 
	TOPFUN       		160.0 					15.0 
	GLENDALE     		160.0 					22.0 
	OCEANIC      		160.0 					16.0
	PATRIOT      		170.0 					25.0 
	HERMES       		160.0 					18.0 
	SABRE        		160.0 					24.0 
	ZR350        		200.0 					28.0 
	WALTON       		150.0 					14.0 
	REGINA       		165.0 					16.0 
	COMET       		200.0 					30.0 
	BURRITO      		150.0 					25.0 
	CAMPER       		120.0 					16.0 
	BAGGAGE      		160.0 					20.0 
	DOZER        		100.0 					35.0 
	RANCHER      		170.0 					20.0 
	FBIRANCH     		170.0 					22.0 
	VIRGO        		160.0 					18.0 
	GREENWOO     		160.0 					20.0 
	HOTRING      		220.0 					26.0 
	SANDKING     		170.0 					28.0 
	BLISTAC      		200.0 					26.0 
	BOXVILLE     		140.0 					14.0 
	BENSON       		140.0 					14.0 
	MESA         		160.0 					24.0 
	BLOODRA      		160.0 					24.0 
	BLOODRB      		160.0 					26.0 	
	SUPERGT      		230.0 					26.0 	
	ELEGANT      		165.0 					20.0 
	JOURNEY      		140.0 					14.0 	
	PETROL       		120.0 					25.0 
	RDTRAIN      		120.0 					25.0 
	NEBULA       		165.0 					20.0 
	MAJESTIC     		165.0 					22.0 
	BUCCANEE     		160.0 					24.0 
	CEMENT       		110.0 					20.0 
	TOWTRUCK     		160.0 					25.0 
	FORTUNE      		160.0 					20.0 
	CADRONA      		160.0 					20.0 
	FBITRUCK     		170.0 					25.0 
	WILLARD      		160.0 					18.0 
	FORKLIFT     		60.0 					20.0 
	TRACTOR      		70.0 					20.0 
	COMBINE      		140.0 					25.0
	FELTZER      		200.0 					28.0 
	REMINGTN     		160.0 					23.0 
	SLAMVAN      		160.0 					40.0 
	BLADE	     		160.0 					24.0 
	FREIGHT      		110.0 					20.0
	STREAK       		110.0 					20.0 
	VINCENT      		160.0 					18.0 
	BULLET       		230.0 					30.0  
	CLOVER       		160.0 					24.0 
	SADLER       		165.0 					25.0 
	RANGER       		160.0 					20.0 
	HUSTLER      		160.0 					22.0 
	INTRUDER     		160.0 					18.0 
	PRIMO        		160.0 					18.0 
	TAMPA        		160.0 					24.0 
	SUNRISE      		160.0 					17.0 
	MERIT        		165.0 					22.0 
	UTILITY      		160.0 					18.0 
	YOSEMITE     		170.0 					25.0
	WINDSOR      		180.0 					30.0 
	MTRUCK_A     		110.0 					45.0 
	MTRUCK_B     		110.0 					45.0 
	URANUS       		200.0 					20.0 
	JESTER       		200.0 					28.0 
	SULTAN       		200.0 					28.0
	STRATUM      		200.0 					20.0 
	ELEGY        		200.0 					28.0 
	RCTIGER      		75.0  					35.0 		
	FLASH        		200.0 					24.0 
	TAHOMA      		160.0 					24.0 
	SAVANNA      		160.0 					24.0 
	BANDITO      		170.0 					35.0
	FREIFLAT     		110.0 					20.0 
	CSTREAK      		110.0 					20.0 
	KART         		90.0					18.0 
	MOWER        		60.0 					12.0 
	DUNE         		110.0 					35.0 
	SWEEPER      		60.0 					12.0 
	BROADWAY     		160.0					20.0 
	TORNADO      		160.0 					20.0 
	DFT30        		110.0					20.0 
	HUNTLEY      		160.0 					25.0 
	STAFFORD     		165.0 					24.0
	NEWSVAN      		160.0 					15.0
	TUG	         	170.0 					15.0 
	PETROTR      		120.0 					18.0 
	EMPEROR      		165.0 					21.0 
	FLOAT        		110.0 					20.0 
	EUROS        		200.0 					24.0 
	HOTDOG	     		140.0 					14.0 
	CLUB	     		200.0 					30.0
	ARTICT3      		120.0 					18.0 
	RCCAM	     		60.0 					50.0 
	POLICE_LA    		200.0 					25.0 
	POLICE_SF    		200.0 					25.0 
	POLICE_VG    		200.0 					25.0 
	POLRANGER    		160.0 					30.0 
	PICADOR      		165.0 					25.0 
	SWATVAN      		110.0 					24.0 
	ALPHA        		200.0 					23.0 
	PHOENIX      		200.0 					26.0 
	BAGBOXA      		160.0 					20.0 
	STAIRS 		 	160.0 					20.0 
	BOXBURG      		140.0 					14.0 
	FARM_TR1     		160.0 					20.0
	UTIL_TR1     		60.0  					20.0 
	ROLLER	     		160.0 					15.0 
												
		              ------- BIKES & MOTOR BIKES --------

        NAME           |      MAX. VEL (Km/h)       |              ACELERATION (m/sІ)        |
-----------------------|----------------------------|----------------------------------------|    
	BIKE         		190.0 					50.0 
	MOPED        		190.0 					30.0 
	DIRTBIKE     		190.0 					50.0 
	FCR900       		190.0 					50.0 
	NRG500       		190.0 					60.0 
	HPV1000      		190.0 					50.0 
	BF400        		190.0 					50.0 
	WAYFARER     		190.0 					40.0 
	QUADBIKE     		160.0 					25.0 
	BMX          		120.0 					18.0 
	CHOPPERB     		120.0 					18.0 
	MTB          		140.0 					25.0 
	FREEWAY      		190.0 					40.0


		                   ------- BOATS --------

        NAME           |      MAX. VEL (Km/h)       |              ACELERATION (m/sІ)        |
-----------------------|----------------------------|----------------------------------------|   
	PREDATOR     		190.0					1.7  
	SPEEDER      		190.0 					2.5  
	REEFER       		190.0 					0.7  
	RIO          		190.0 					0.5  
	SQUALO       		190.0 					3.0  
	TROPIC       		190.0 					1.4 
	COASTGRD     		190.0 					1.6  
	DINGHY       		190.0 					1.2  
	MARQUIS      		190.0 					0.5  
	CUPBOAT      		190.0 					3.0  
	LAUNCH       		190.0 					1.5  




                                   ------- PLANES --------

         NAME          |      MAX. VEL (Km/h)       |              ACELERATION (m/sІ)        |
-----------------------|----------------------------|----------------------------------------|           
	SEAPLANE                200.0  					1.7  
	VORTEX       		150.0  					2.0  
	RUSTLER      		200.0 					16.0  
	BEAGLE       		200.0 					16.0 
	CROPDUST     		200.0 					16.0  
	STUNT        		200.0					16.0  
	SHAMAL       		200.0 					16.0 	
	HYDRA        		200.0 					16.0 
	NEVADA       		200.0 					16.0 
	AT400        		200.0 					16.0 
	ANDROM       		200.0 					16.0 
	DODO	     		200.0 					16.0 
	SPARROW      		200.0 					16.0 
	SEASPAR      		200.0 					16.0 
	MAVERICK     		200.0 					16.0 
	COASTMAV     		200.0 					16.0 
	POLMAV       		200.0 					16.0 
	HUNTER       		200.0 					16.0 	
	LEVIATHN     		200.0 					16.0 
	CARGOBOB     		200.0 					16.0
	RAINDANC     		200.0 					16.0 
	RCBARON      		75.0  					1.0 
	RCGOBLIN     		75.0  					35.0 
	RCRAIDER     		75.0  					35.0
______________
this includes the additional speed of nitro?
Reply
#64

Quote:
Originally Posted by eikzdej
Посмотреть сообщение
this includes the additional speed of nitro?
Nitro only affects acceleration.
Reply
#65

Just gotta bump right here for a sec...

In GTA, it seems every vehicle returns a different velocity even when actually going the same speed as other vehicles. This shouldn't be like this, it might even be a bug. This is why you are all wrong.

Like, suppose we lined up an Infernus, a Rhino, a Sanchez, an Elegy, and a Slam Van. Now suppose could push (disregarding the vehicles' acceleration) each of these vehicles the same distance in the same amount of time, each of those vehicles return different values even though they are all going the same speed (distance over time).

So every vehicle has it's own magic number depending on it's handling data. I'm going to try to work out a table of information and try to find the formula for every vehicle's magic number.

EDIT: Well I got the data sorted and got the values I need IG, but there isn't much of a correlation in the values. There's also like no relation from vehicle to vehicle in the data, as expected, so it's a bit tough unless we can correlate the handling data with the GetVehicleVelocity data.



EDIT2: Perhaps I should just make an AHK script to get the velocity vector size of each vehicle at top speed on a series of object 19552.


EDIT3: Whoever finds the correlation between the number "1.23" (Infernus top velocity on model 19552) and 30, 1.5, and 240 (limiting, not the actual top speed, it only limits the top speed with drag) wins.
Reply
#66

This is just based on assumptions.
Can you be absolutely sure that Rockstar implemented the exact same speeds as their real-life counterparts?
Even with a value of 180.0 (which can be proven nicely), the mower has a speed of over 40 kph while their real-life counterparts have a speed of about 13 kph (at least mine does).
So with your value, it would reach speed of nearly 80 kph, which doesn't seem real to me.

I too tried to find tha magic number and found 180.0 to be the most realistic.

I just created 2 checkpoints at the highway around Las Venturas.
They were both on the vertical part of that highway at the right-most part of Las Venturas and they were exactly 1000 units apart (1000 units = 1000 meters).
I drove the Elegy at top speed and drove through those checkpoints in a straight line and I measured the time between entering both checkpoints.

So I knew the distance and time required to cross that distance and I could therefore calculate the speed of the Elegy.
From that speed and the velocity value used by samp, I calculated the magic number and found 180.0 to be very accurate.
When I used the magic number of 180.0, my speedometer displayed the calculated speed I found earlier using the distance and time between both checkpoints.

Your value was found based on assumptions (where you assumed Rockstar used the real Ferrari F40's speed and implemented it without changes), my value was based on real measurements ingame.
If you used the mower's real speed (13kph), you would have found the magic number to be around 60.0 or something like that.
So using assumptions isn't going to give any accurate value.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)