Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. Ballast table for UF1 (not used because first race)
  2. 5% -> 30 kg
  3. 4% -> 24 kg
  4. 3% -> 18 kg
  5. 2% -> 12 kg
  6. 1% -> 6 kg
  7. Ballast table for LX4
  8. 5% -> 24 kg
  9. 4% -> 19 kg
  10. 3% -> 14 kg
  11. 2% -> 9 kg
  12. 1% -> 4 kg
  13. Ballast table for RAC
  14. 10% -> 80kg
  15. 9% -> 72kg
  16. 8% -> 64kg
  17. 7% -> 56kg
  18. 6% -> 48kg
  19. 5% -> 40kg
  20. 4% -> 32kg
  21. 3% -> 24kg
  22. 2% -> 16kg
  23. 1% -> 8kg
  24. Ballast table for LX6
  25. 15% -> 80kg
  26. 14% -> 75kg
  27. 13% -> 70kg
  28. 12% -> 64kg
  29. 11% -> 59kg
  30. 10% -> 53kg
  31. 9% -> 48kg
  32. 8% -> 43kg
  33. 7% -> 37kg
  34. 6% -> 32kg
  35. 5% -> 26kg
  36. 4% -> 21kg
  37. 3% -> 16kg
  38. 2% -> 10kg
  39. 1% -> 5kg
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46. function calculateBallast (carMass, carPower, percent)
  47. powerWeightRatio = carMass/carPower
  48. newPowerWeightRatio = powerWeightRatio * (1+(percent/100))
  49. newCarMass = newPowerWeightRatio * carPower
  50. ballast = newCarMass - carMass
  51. return math.floor(ballast)
  52. end
  53.  
  54. io.write ("Ballast table for UF1 (not used because first race)\n")
  55. for i=5,1,-1 do
  56. io.write(i,"% -> ", calculateBallast (600 ,55, i), " kg\n")
  57. end
  58.  
  59.  
  60. io.write ("Ballast table for LX4 \n")
  61. for i=5,1,-1 do
  62. io.write(i,"% -> ", calculateBallast (499 ,140, i), " kg\n")
  63. end
  64.  
  65. io.write ("Ballast table for RAC \n")
  66. for i=10,1,-1 do
  67. io.write(i,"% -> ",calculateBallast (800 ,245 , i), "kg\n")
  68. end
  69.  
  70. io.write ("Ballast table for LX6 \n")
  71. for i=15,1,-1 do
  72. io.write(i,"% -> ",calculateBallast (539 ,190 , i), "kg\n")
  73. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement