This program implements the external ballistic model described in this paper.
The program is written in standard C++11 with one library dependency on Dlib that is included in sources (no need to download/install it separately).
- Run ballistic trajectories with different options: wind, air turbulences, initial height above the Earth’s surface; even send to space or orbit around the Earth.
- Solve for ranges or max - the programs finds the angles (for both flat and high trajectories) for a given range.
- Tune the drag coefficient function given some firing table data.
You would need to
- Define basic parameters of the projectile: mass, diameter, length; and muzzle velocity.
- Define drag coefficient function. If the function is not known, there is an option to generate this function from empirical data. See section Solve.
First, check out src
directory. Build dlad
and build drag
. If you have make
, type make
and it should build. As a direct option use make PLAT=w
for Windows or make PLAT=u
for Unix builds. If you do not have make
, then build manually.
- Unpack
dlib.tar.bz2
- Place
dlib
directory insidedlad
. - Compile dlibad.cpp, e.g.
g++ -std=c++14 -c dlibad.cpp
- Compile all cpp files (except alglib.cpp, timer_inc.cpp, timer_w.cpp)
inside
drag
, e.g.g++ -std=c++14 -c -I ../dlad *.cpp
. This example command will actually spits errors on those files not to be compiled – that is fine. - Copy
dlibad.o
fromdlad
todrag
- Link all
.o
files, e.g.g++ *.o -o drag
If you have gcc installed, then follow Unix build instructions. If you use MS C++ compiler, check its version – it should be 19 or above:
C:\>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.24821 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
- Unpack
dlib.tar.bz2
- Place
dlib
directory insidedlad
. - Compile dlibad.cpp, e.g.
cl -EHsc -c dlibad.cpp
- Compile all cpp files (except alglib.cpp, timer_inc.cpp,
timer_u.cpp) inside
drag
, e.g.cl -EHsc -c -I ../dlad *.cpp
. This example command will actually spits errors on those files not to be compiled – that is fine. - Copy
dlibad.obj
fromdlad
todrag
- Link all
.obj
files, e.g.cl *.obj /Fedrag
See User Guide