Home   Help Search Login Register  

Author Topic: Calculating bullet deceleration?  (Read 3011 times)

0 Members and 1 Guest are viewing this topic.

Offline Gews

  • Members
  • *
Calculating bullet deceleration?
« on: 19 Apr 2013, 20:55:29 »
There are a few missions out there that will give you the final velocity of your bullet as well as other information.

For example Murcielago's mission "The Shooting Range" tells me the following...

M24
Muzzle - 900m/s - 0.000 sec
100m - 819 m/s - 0.114 sec
200m - 746 m/s - 0.226 sec
400m - 618 m/s - 0.543 sec
600m - 512 m/s - 0.913 sec
1000m - 352 m/s - 1.835 sec



I would like to be able to perform those calculations myself, outside of the game. There are airFriction values in the configs (in this case airFriction = -0.0009324) as well as the initial velocity. The BI Wiki says airFriction = acceleration/velocity^2.

I can't figure out how I can calculate the final velocity of a bullet at a given time or a given range. I'd like to know if there is a formula I can use for this, so far I have had no luck although I have found some interesting threads.

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re: Calculating bullet deceleration?
« Reply #1 on: 03 May 2013, 04:33:21 »
This is a very complex task because the deceleration due to air friction is not constant. A body moving in a non-vacume environment will be more affected by air friction the faster it is moving. Therefore as the bullet slows, its rate of deceleration also slows. At any one moment of time you could calculate the force that the air exerts against the bullet and from that determine the deceleration rate at that moment. What is required is an algorithmic simulation that applies the formula for air friction incrementally over a given time. I made an OFP function that does the air friction calculations. It could be modified to ARMA2 and then used in a looping script could provide a theoretical speed calculation given the time of flight. I will try to dig it up when I get home and attach it. I found the function and some related functions. I hope this will be of some use to you.
« Last Edit: 06 May 2013, 07:17:37 by Raptorsaurus »

Offline Gews

  • Members
  • *
Re: Calculating bullet deceleration?
« Reply #2 on: 06 May 2013, 09:57:43 »
Thanks for the formulas. I (mostly) figured this one out :good: I'm pretty happy with the results I'm getting, they're quite accurate out to all reasonable ranges and much further as well.

Example:

7.62x51mm M24

Range-----In-game v-----Calculated v
000--------900-------------900.0
300--------678-------------678.6
800--------423-------------423.9
1000-------350-------------351.1
1400-------242-------------241.0

1753-------174-------------172.9

So as you can see, pretty close. Just for kicks I tried it in-game at 1753 meters and got 174 m/s; the calculated result for 1753 meters is 172.9 m/s. I'm calculating new acceleration due to drag at 10 meter intervals; if I switch it to, say, 8, it's more accurate at long range but less so at shorter ranges.


It works well with low-velocity bullets too, but is not as accurate. Maybe the rainbow trajectory has something to do with this:

Bizon PP19 9x18mm
Range--------In-Game V---------Calculated V
400-------------115----------------112.9


Switching the interval to 5m results in a 113.6 m/s result, and switching the interval to 5m results in a 114.7 m/s result, or ~115 m/s.


Perhaps BIS uses a time-based interval...

Of course slight differences are to be expected (hitting higher or lower on target, slightly different distance) and the in-game velocities are rounded off to the nearest m/s.





Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re: Calculating bullet deceleration?
« Reply #3 on: 10 May 2013, 00:29:48 »
I'd say you nailed it! Your calculations are better than 99% accurate for the M24 and about 98% for the PP19. You are probably right about the increased parabolic arc causing greater deviation in the slower bullets. That is most likely because their path toward the end of flight is more parallel to the gravitational force. The more parallel the bullet path is to gravity the more gravity will "help" the air friction slow it down on the way up and "hinder" air friction from slowing it on the way down. You could test this by seeing what happens to your calculations when you fire the weapons at increasingly higher elevation angles. You could add gravitational equations to your existing air friction equations to make it very accurate at any firing angle and with any degree of parabolic arc.