Airsoft Ballistics for PC Application

Airsoft Ballistics for PC Application #

I have developed a PC application for calculating airsoft ballistics.

The GUI looks like this.
ballistics_application.png

1. How to use? #

  1. Download the zip file from the link below.
    airsoft_ballistics_v1.0.2.zip (76MB)
Older version
  1. After downloading and unzipping, you will obtain the following three files.

    airsoft_ballistics_v1.0.0/
      ├ airsoft_ballistics.exe
      ├ LICENSE
      └ VERSION
    
  2. Execute airsoft_ballistics.exe

  3. Set the parameters and press “Calculate”.

  4. The calculation results will be output in the folder where airsoft_ballistics.exe is located as follows.

    airsoft_ballistics_v1.0.0/
      ├ airsoft_ballistics.exe
      ├ LICENSE
      ├ VERSION
      ├ input_parameters.txt
      ├ out_approx.txt
      └ x_z.png
    

In addition, if you check Output all figures in the settings, the results will be output as follows.

```
airsoft_ballistics_v1.0.0/
  ├ airsoft_ballistics.exe
  ├ LICENSE
  ├ VERSION
  ├ input_parameters.txt
  ├ out_approx.txt
  ├ x_t.png
  ├ x_y.png
  ├ x_z.png
  ├ y_z.png
  ├ x_vx.png
  ├ x_vy.png
  ├ x_vz.png
  ├ x_v.png
  ├ x_wx.png
  ├ x_wy.png
  ├ x_wz.png
  └ x_w.png
```

2. File Descriptions #

I will explain the files and the data that are output.

File Description Parameter Related to Output
airsoft_ballistics.exe Execution file -
LICENSE License file -
VERSION Program version -
input_parameters.txt (Output) Parameters at the time of calculation -
out_exact.txt (Output) Calculation result text Solving EOM
out_approx.txt (Output) Calculation result text Solving EOM
out_approx_w_solved.txt (Output) Calculation result text Solving EOM
out_no_rotation_decay.txt (Output) Calculation result text Solving EOM
x_t.png (Output) X-axis: Time (s), Y-axis: Position x (m) Output all figures
x_y.png (Output) X-axis: Position x (m), Y-axis: Position y (m) Output all figures
x_z.png (Output) X-axis: Position x (m), Y-axis: Position z (m) Output all figures
y_z.png (Output) X-axis: Position y (m), Y-axis: Position z (m) -
x_vx.png (Output) X-axis: Position y (m), Y-axis: Velocity x (m/s) Output all figures
x_vy.png (Output) X-axis: Position y (m), Y-axis: Velocity y (m/s) Output all figures
x_vz.png (Output) X-axis: Position y (m), Y-axis: Velocity z (m/s) Output all figures
x_v.png (Output) X-axis: Position y (m), Y-axis: Speed |v| (m/s) Output all figures
x_wx.png (Output) X-axis: Position y (m), Y-axis: Rotation x (rot/s) Output all figures
x_wy.png (Output) X-axis: Position y (m), Y-axis: Rotation y (rot/s) Output all figures
x_wz.png (Output) X-axis: Position y (m), Y-axis: Rotation z (rot/s) Output all figures
x_w.png (Output) X-axis: Position y (m), Y-axis: Magnitude of rotation |w| (rot/s) Output all figures

3. Source Files #

Source files are not necessary for executing the above exe. However, as some people might want to fine-tune it, I am making the source code available.

(python) airsoft_ballistics_src_v1.0.2.zip (~400kB)

Older version

The compute_ballistics(...) in main_ballistics.py serves as the main function.

Originally, I was directly executing compute_ballistics() as the main function in Python, but it has been wrapped in airsoft_ballistics.py to control it through the GUI.

Please look at the code for details. Roughly speaking, the structure is as follows.

Folder Description
class_def Class definitions. Used mainly as read-only structs.
physical_quantities Calculation of physical quantities, mainly related to fluid dynamics.
ivp_functions Calculations for initial value problems. The equations of motion are found here.
output_functions Functions for outputting text data.

It’s released under the MIT license.