The "Real" vehicle speed thread
#1

There's been a lot of discussion about what the actual max. speed should be when it comes to SA-MP vehicles. This thread discusses this.

I think, though, I have found the most accurate max. speed possible. As we know, the max. speed of any vehicle can be calculated using the following formula (KM/H):

pawn Код:
// vX = X velocity of the vehicle
// vY = Y velocity of the vehicle
// vZ = Z velocity of the vehicle

STEP1 = vXІ + vYІ + vZІ (Law of Pythagoras)
STEP2 = SQUARE ROOT of STEP 1
STEP3 = STEP2 * magic number
"the magic number" Is the number everyone has been looking for. Some people have proven that around 180.0 should give a fairly accurate result (which makes the max. speed of the Infernus, the fastest vehicle in the game, around 223 KM/H). We will now try to prove this correct.

Fact: Most of the cars in SA-MP are derived from real life vehicles. The Turismo is clearly a Ferrari F40 so we will use this as the base for our calculations.

Ferrari F40:


Turismo:


The max. speed of a Ferrari F40 is equal to 324 KM/H. (Source: http://en.wikipedia.org/wiki/Ferrari_F40)

Running the following code in a very fast loop, we can determine what the highest possible velocity is when a Turismo in SA-MP reaches his max. speed. This was done on a straight road and without nitrous.

pawn Код:
// vid = current vehicle we are in
// Model 451 = Turismo
if(GetVehicleModel(vid) == 451) {
    new
        Float:speed_x,
        Float:speed_y,
        Float:speed_z
    ;
    GetVehicleVelocity(vid,speed_x,speed_y,speed_z);
    printf("[Velocity] X=%f, Y=%f, Z=%f", speed_x, speed_y, speed_z);
}
We get the following result (these will vary ofcourse, but the calculations will always have the same result):

pawn Код:
X = 1.072348
Y = 0.008095
Z = 0.000000
We can than calculate the magic number when the final speed equals 324:

pawn Код:
= 1.072348 * 1.072348 = 1.149930233104
= 0.008095 * 0.008095 = 0.000065529025
= 0.000000 * 0.000000 = 0.000000000000

SQUARE ROOT (1.149930233104 + 0.000065529025 + 0.000000000000) = 1.0723785535569983

324 = 1.0723785535569983 * mN

mN = [B]302.13[/B]




So the "magic number" is equal to 302.13 (see test above), this though makes the top speed of the other vehicles out of proportion... A bus suddenly goes over 250KM/H!! I guess this issue is unsolvable and we need to search for an acceptable number somewhere in the middle.
Reply


Messages In This Thread
The "Real" vehicle speed thread - by Sinner - 29.07.2012, 17:54
Re: The "Real" vehicle speed thread - by Arca - 29.07.2012, 20:13
Re: The "Real" vehicle speed thread - by Sinner - 30.07.2012, 07:31
Re: The "Real" vehicle speed thread - by Mauzen - 30.07.2012, 09:34
Re: The "Real" vehicle speed thread - by Vince - 30.07.2012, 12:06
Re: The "Real" vehicle speed thread - by playbox12 - 06.08.2012, 18:23
Re: The "Real" vehicle speed thread - by Joe Staff - 06.08.2012, 20:03
Re: The "Real" vehicle speed thread - by Vince - 06.08.2012, 21:14
Respuesta: The "Real" vehicle speed thread - by zugg48 - 12.08.2012, 09:07
Re: Respuesta: The "Real" vehicle speed thread - by Mauzen - 14.08.2012, 23:56
Respuesta: The "Real" vehicle speed thread - by zugg48 - 17.09.2012, 03:00
Re: The "Real" vehicle speed thread - by [ABK]Antonio - 17.09.2012, 08:59
Re: The "Real" vehicle speed thread - by Edix - 02.08.2013, 12:06
Re: The "Real" vehicle speed thread - by Konstantinos - 02.08.2013, 12:13
Re: The "Real" vehicle speed thread - by [ABK]Antonio - 02.08.2013, 18:17
Re: The "Real" vehicle speed thread - by Pottus - 04.08.2013, 17:47
Re: The "Real" vehicle speed thread - by -Prodigy- - 04.08.2013, 18:53
Re: The "Real" vehicle speed thread - by Kar - 04.08.2013, 18:55
Re: The "Real" vehicle speed thread - by -Prodigy- - 04.08.2013, 18:57
Re: The "Real" vehicle speed thread - by Kar - 04.08.2013, 19:00
Re: The "Real" vehicle speed thread - by Pottus - 04.08.2013, 19:52
Re: The "Real" vehicle speed thread - by Mauzen - 05.08.2013, 00:47
Re: The "Real" vehicle speed thread - by Edix - 07.08.2013, 01:59
Re: The "Real" vehicle speed thread - by Pottus - 07.08.2013, 04:53
Re: The "Real" vehicle speed thread - by Edix - 07.08.2013, 12:05
Re: The "Real" vehicle speed thread - by Pottus - 07.08.2013, 17:29
Re: The "Real" vehicle speed thread - by sgoten - 13.08.2013, 10:13
Re: The "Real" vehicle speed thread - by Edix - 13.08.2013, 19:00
Re: The "Real" vehicle speed thread - by Pottus - 13.08.2013, 20:38
Re: The "Real" vehicle speed thread - by Pottus - 13.08.2013, 23:56
Re: The "Real" vehicle speed thread - by Edix - 14.08.2013, 10:10
Re: The "Real" vehicle speed thread - by Mauzen - 14.08.2013, 11:03
Re: The "Real" vehicle speed thread - by Pottus - 14.08.2013, 19:24
AW: The "Real" vehicle speed thread - by Drebin - 04.09.2013, 01:38
Re: The "Real" vehicle speed thread - by Squash - 09.09.2013, 05:20
Re: The "Real" vehicle speed thread - by Pottus - 09.09.2013, 05:27
Re: The "Real" vehicle speed thread - by Squash - 09.09.2013, 05:50
Re: The "Real" vehicle speed thread - by Pottus - 09.09.2013, 06:14
Re: The "Real" vehicle speed thread - by Squash - 09.09.2013, 06:53
Re: The "Real" vehicle speed thread - by Pottus - 09.09.2013, 07:03
Re: The "Real" vehicle speed thread - by Cypog - 13.09.2013, 21:05
Re: The "Real" vehicle speed thread - by Pottus - 13.09.2013, 23:14
Re: The "Real" vehicle speed thread - by Kimossab - 08.11.2013, 22:23
Re: The "Real" vehicle speed thread - by Pottus - 09.11.2013, 04:04
Re: The "Real" vehicle speed thread - by PowerPC603 - 09.02.2014, 20:51
Re: The "Real" vehicle speed thread - by Pottus - 10.02.2014, 00:34
Re: The "Real" vehicle speed thread - by Anzipane - 09.03.2014, 18:04
Re: The "Real" vehicle speed thread - by Pottus - 09.03.2014, 18:50
Re: The "Real" vehicle speed thread - by VerticalGaming - 09.04.2014, 09:36
Re: The "Real" vehicle speed thread - by VerticalGaming - 09.04.2014, 11:57
Respuesta: The "Real" vehicle speed thread - by Siralos - 08.08.2014, 09:02
Re: Respuesta: The "Real" vehicle speed thread - by [XST]O_x - 08.08.2014, 10:15
Respuesta: Re: Respuesta: The "Real" vehicle speed thread - by Siralos - 08.08.2014, 10:50
Re: The "Real" vehicle speed thread - by Kar - 08.08.2014, 16:56
Re: The "Real" vehicle speed thread - by Pottus - 09.08.2014, 15:59
Re: The "Real" vehicle speed thread - by Kar - 09.08.2014, 16:21
Re: The "Real" vehicle speed thread - by Pottus - 09.08.2014, 17:35
Re: The "Real" vehicle speed thread - by Kar - 09.08.2014, 17:45
Re: The "Real" vehicle speed thread - by Kar - 11.08.2014, 17:31
Re: The "Real" vehicle speed thread - by n0minal - 30.12.2014, 16:41
Re: The "Real" vehicle speed thread - by Kimossab - 30.12.2014, 17:14
Re: The "Real" vehicle speed thread - by n0minal - 30.12.2014, 18:44
Re: Respuesta: The "Real" vehicle speed thread - by eikzdej - 30.03.2016, 08:38
Re: Respuesta: The "Real" vehicle speed thread - by RyanKingstone - 10.06.2016, 09:01
Re: The "Real" vehicle speed thread - by Crayder - 03.09.2016, 12:13
Re: The "Real" vehicle speed thread - by AmigaBlizzard - 19.05.2018, 10:36

Forum Jump:


Users browsing this thread: 23 Guest(s)