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:

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.

Vx(i+1)=[V]'.COS(ANG)

Vy(i+1)=[V]'.SIN(ANG)+g.t

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)