Symthic Forum was shut down on January 11th, 2019. You're viewing an archive of this page from 2019-01-08 at 22:57. Thank you all for your support! Please get in touch via the Curse help desk if you need any support using this archive.

Welcome to symthic forums! We would love if you'd register!
You don't have to be expert in bit baking, everyone is more than welcome to join our community.

You are not logged in.

  • "leptis" started this thread

Posts: 282

Date of registration
: Mar 17th 2015

Platform: PC


Reputation modifier: 10

  • Send private message


Wednesday, September 21st 2016, 11:02am

4th approach to air drag model (algorithm)

In the 3rd approach it was established that the model KV2 was adequate to reproduce the conditions of the game. Forget 1st and 2nd approaches based on indirect and inaccurate data (especially zeroing).

Now the question is not to determine the model but how the algorithm is implemented to have general validity, for all weapons and all settings of zeroing.

The reason for this is that, as it was demonstrated in the 3rd approach, the values obtained are very sensitive to the chosen step. That is, choosing the right step we can fit any value, if WE fit only one value of zeroing.

Now we want the algorithm fits all weapons of simple action (bolt or lever) and all its settings zeroing, with the refinements that are described later.

This is necessary because if the values of different zeroing values (calculated later) are used the following values are obtained with previous algorithms (STEYRMAN M1895) (meters):

As can be seen: relatively good fit for 75 m, not so good for 150 m, and really bad for 300 m (0.65 m at nominal distance).

The default zeroing is defined with Vx and Vy (we can calculate de default pitch: ATAN (Vy/Vx)), but additional values are defined as zeroing pitch (vertical angle).

Pitch: angle between the barrel and the line of sight

We have the following weapons and their zeroing settings (black values: listed / red values: calculated). Zeroing pitch values are degrees and the zeroing pitch is additional to default pitch (relative value). It can be demostrated if it is needed.

With those pitch values we can calculate initial Vx and Vy for each zeroing adjustment:

The algorithm I use has some refinements over earlier ones:

1.- Step by time, which is how the game calculate. In this case for a tickrate of 60 Hz (a calculation every 0.0166666 sec).

2.- Drag is applied to the velocity vector, not on projections on the axes, which is not correct from the point of physical and mathematical view.

3.- The value of the speed (vertical and horizontal) applied in the interval is the average value of the initial and final speed in the interval.

To apply the initial value (in fact a model of finite differences "forward" with approach by tangent) produces a cumulative error that increases with distance and overvalue the results. We apply a more accurate "central" method that fits better the physical phenomenon.

The algorithm can be seen here, if someone wants to reproduce it:

Spoiler Spoiler

Intial values in the interval "i" : Vx(i) and Vy(i)

[V] = SQR (Vx(i)^2+Vy(i)^2)

Angle: ANG=ATAN(Vy(i)/Vx(i))

Drag: [V]'= [V]-d*[V]^2.t being "t" the time step.



Values applied in the interval

Vx applied(i)= (Vx(i)+Vx(i+1))/2.

Vy applied(i)= (Vy(i)+Vy(i+1))/2.

Advancex(i): Vx applied(i).t

Advancey(i): Vy applied(i).t

Final position

X (i+1)= X (i)+ Advancex(i)

Y (i+1)= Y (i)+ Advancey(i)

This post has been edited 12 times, last edit by "leptis" (Sep 21st 2016, 1:13pm)

  • "leptis" started this thread

Posts: 282

Date of registration
: Mar 17th 2015

Platform: PC


Reputation modifier: 10

  • Send private message


Wednesday, September 21st 2016, 11:03am

Here you can see the calculated trajectory curves for STEYRMAN M1895 and their crosses with the line "0":

The values of the deviations for all studied weapons are:

As shown differences in the range of millimeters (20 mm maximum error). Curiously (in general) the adjustement is better for zeroing at 75 m and 300 m than at 150 m. (I have no explanation for the moment).


A stepped by time algorithm, drag applied to the velocity vector and applying the average of the values of velocities in the interval provides better fit than previous algorithms.

I can not say that this is the algorithm used in the game, but only that this fits well with the values in files at any distance with any weapon.

This post has been edited 5 times, last edit by "leptis" (Sep 21st 2016, 2:45pm)