๐ฌ๐ง A ballistic fire control simulator with satellite map, blast zones and Coriolis effect. Built as a microservices architecture: Python/Flask frontend + C# ballistic processor + Redis Streams.
๐ต๐ฑ Symulator obliczeniowy balistyki zewnฤtrznej z mapฤ satelitarnฤ , strefami raลผenia i efektem Coriolisa. Zbudowany jako architektura mikrousลug: frontend Python/Flask + procesor balistyczny C# + Redis Streams.
- ๐บ๏ธ Satellite map (Google Satellite via Leaflet) with shooter and target positioning
- ๐ฏ Multi-select targets โ mark multiple targets, sequential fire with FIRE button
- ๐ข Ballistic calculations with Euler simulation + air resistance (Cd), air density, wind
- ๐ Coriolis effect โ real deflection based on latitude and time of flight
- ๐ฅ Blast zones โ 4 concentric circles (total destruction / heavy / light / hazard)
- ๐ Results panel โ live ballistic results in side panel after each shot
- ๐ Shot history โ clickable list with map zoom to marker
- ๐ PDF export โ session report with full ballistic data and blast zones
- ๐ System/ammo change without restart โ dropdowns in side panel
- ๐ Session token authorization โ endpoints protected against unauthorized access
| System | Round | vโ [m/s] | Mass [kg] | Trajectory |
|---|---|---|---|---|
| AHS KRAB (155mm) | M107 HE | 560 | 43.2 | Artillery |
| AHS KRAB (155mm) | EXCALIBUR | 560 | 48.0 | Artillery |
| M120 RAK (120mm) | HE STD | 280 | 14.5 | Artillery |
| M120 RAK (120mm) | SMOKE | 250 | 13.8 | Artillery |
| LEOPARD 2 (120mm) | APFSDS | 1650 | 7.3 | Flat (KE) |
| LEOPARD 2 (120mm) | HEAT | 1140 | 13.1 | Flat (KE) |
โโโโโโโโโโโโโโโโโโโโโโโ Redis Stream โโโโโโโโโโโโโโโโโโโโโโโโ
โ Python / Flask โ โโโโโโโโโโโโโโโโโโโบ โ C# Processor โ
โ โ ballistics:stream โ โ
โ - Leaflet Map โ โ - Euler Simulation โ
โ - Weather API โ โโโโโโโโโโโโโโโโโโโ โ - Coriolis Effect โ
โ - Results Panel โ ballistics:result โ - Blast Zones โ
โ - PDF Export โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
- Python 3.10+
- .NET 10 SDK
- Redis 7.x (Memurai for Windows)
- OpenWeatherMap API key (free tier)
1. Clone the repository
git clone https://github.com/YOUR_LOGIN/balistic.git
cd balistic2. Install Python dependencies
python -m pip install flask redis requests python-dotenv reportlab3. Create .env file
WEATHER_API_KEY=YOUR_API_KEY
4. Start Redis
redis-cli ping # should respond PONG5. Build C# processor
dotnet buildRun in two separate windows:
Window 1 โ Ballistic processor:
dotnet runWindow 2 โ Frontend:
python Balistic_Input.pyLog in (admin / admin), the map will open automatically in your browser.
| Action | Effect |
|---|---|
| RMB (right click) | Move shooter position |
| LMB (left click) | Mark target (yellow marker) |
| FIRE (N) button | Fire at all marked targets |
| CANCEL button | Remove all targets without firing |
| History click | Zoom to target on map |
| โฌ PDF | Export session report |
Trajectory simulation
- Euler method with
dt=0.01sstep for KE/HEAT rounds - Empirical formula for artillery (angle 45ยฐโ65ยฐ based on dist/max_range ratio)
- Drag force:
F_drag = ยฝ ยท Cd ยท ฯ ยท A ยท vยฒ
Coriolis Effect
d_cor = ฮฉ ยท sin(ฯ) ยท v_avg ยท tยฒ / 2
where ฮฉ = 7.2921ร10โปโต rad/s, ฯ = shooter's latitude (dynamic)
Air density
ฯ = (p ยท 100) / (287.058 ยท (T + 273.15))
Calculated from live weather data via OpenWeatherMap.
Blast zones (NATO / FM 6-40 data)
| Round | Total | Heavy | Light | Hazard |
|---|---|---|---|---|
| M107 HE / EXCALIBUR | 30 m | 100 m | 300 m | 800 m |
| HE STD (RAK) | 8 m | 30 m | 80 m | 200 m |
| SMOKE | โ | โ | โ | 80 m |
| APFSDS | kinetic penetration | โ | โ | โ |
| HEAT | โ | โ | โ | 5 m |
This system is intended for educational and simulation purposes only. Calculations are a physical approximation โ not suitable for operational use. Real fire control systems use far more complex models (6-DOF, 3-axis Coriolis, met data from balloon sondes, barrel wear, etc.).
- ๐บ๏ธ Mapa satelitarna (Google Satellite via Leaflet) z pozycjonowaniem strzelca i celรณw
- ๐ฏ Multi-select celรณw โ zaznacz wiele celรณw, wystrzaล sekwencyjny przyciskiem OGIEล
- ๐ข Obliczenia balistyczne z symulacjฤ Euler + opรณr powietrza (Cd), gฤstoลฤ powietrza, wiatr
- ๐ Efekt Coriolisa โ realne odchylenie zaleลผne od szerokoลci geograficznej i czasu lotu
- ๐ฅ Strefy raลผenia โ 4 koncentryczne okrฤgi (zniszczenie totalne / ciฤลผkie / lekkie / zagroลผenie)
- ๐ Panel wynikรณw โ wyniki balistyczne na ลผywo w panelu bocznym po kaลผdym strzale
- ๐ Historia strzaลรณw โ klikalna lista z powrotem do znacznika na mapie
- ๐ Eksport PDF โ raport sesji z peลnymi danymi balistycznymi i strefami raลผenia
- ๐ Zmiana systemu/amunicji bez restartu โ dropdowny w panelu bocznym
- ๐ Autoryzacja tokenem sesji โ endpointy chronione przed nieautoryzowanym dostฤpem
| System | Pocisk | vโ [m/s] | Masa [kg] | Typ toru |
|---|---|---|---|---|
| AHS KRAB (155mm) | M107 HE | 560 | 43.2 | Artyleryjski |
| AHS KRAB (155mm) | EXCALIBUR | 560 | 48.0 | Artyleryjski |
| M120 RAK (120mm) | HE STD | 280 | 14.5 | Artyleryjski |
| M120 RAK (120mm) | SMOKE | 250 | 13.8 | Artyleryjski |
| LEOPARD 2 (120mm) | APFSDS | 1650 | 7.3 | Pลaski (KE) |
| LEOPARD 2 (120mm) | HEAT | 1140 | 13.1 | Pลaski (KE) |
โโโโโโโโโโโโโโโโโโโโโโโ Redis Stream โโโโโโโโโโโโโโโโโโโโโโโโ
โ Python / Flask โ โโโโโโโโโโโโโโโโโโโบ โ C# Procesor โ
โ โ ballistics:stream โ Balistyczny โ
โ - Mapa Leaflet โ โ โ
โ - Pogoda API โ โโโโโโโโโโโโโโโโโโโ โ - Symulacja Euler โ
โ - Panel wynikรณw โ ballistics:result โ - Coriolis โ
โ - Eksport PDF โ โ - Strefy raลผenia โ
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
- Python 3.10+
- .NET 10 SDK
- Redis 7.x (Memurai dla Windows)
- Klucz API OpenWeatherMap (darmowy)
1. Sklonuj repozytorium
git clone https://github.com/TWOJ_LOGIN/balistic.git
cd balistic2. Zainstaluj zaleลผnoลci Python
python -m pip install flask redis requests python-dotenv reportlab3. Utwรณrz plik .env
WEATHER_API_KEY=TWOJ_KLUCZ_API
4. Uruchom Redis
redis-cli ping # powinno odpowiedzieฤ PONG5. Skompiluj procesor C#
dotnet buildUruchom w dwรณch osobnych oknach:
Okno 1 โ Procesor balistyczny:
dotnet runOkno 2 โ Frontend:
python Balistic_Input.pyZaloguj siฤ (admin / admin), mapa otworzy siฤ automatycznie w przeglฤ
darce.
| Akcja | Efekt |
|---|---|
| PPM (prawy klik) | Przesuล pozycjฤ strzelca |
| LPM (lewy klik) | Zaznacz cel (ลผรณลty znacznik) |
| Przycisk OGIEล (N) | Wystrzaล do wszystkich zaznaczonych celรณw |
| Przycisk ANULUJ CELE | Usuล zaznaczenia bez strzelania |
| Klik na historiฤ | Zoom na cel na mapie |
| โฌ PDF | Eksportuj raport sesji |
Symulacja trajektorii
- Metoda Euler z krokiem
dt=0.01sdla pociskรณw KE/HEAT - Wzรณr empiryczny dla artylerii (kฤ t 45ยฐโ65ยฐ zaleลผny od stosunku dystans/zasiฤg_max)
- Siลa oporu:
F_drag = ยฝ ยท Cd ยท ฯ ยท A ยท vยฒ
Efekt Coriolisa
d_cor = ฮฉ ยท sin(ฯ) ยท v_avg ยท tยฒ / 2
gdzie ฮฉ = 7.2921ร10โปโต rad/s, ฯ = szerokoลฤ geograficzna strzelca (dynamiczna)
Gฤstoลฤ powietrza
ฯ = (p ยท 100) / (287.058 ยท (T + 273.15))
Obliczana na podstawie aktualnych danych pogodowych z OpenWeatherMap.
Strefy raลผenia (dane NATO / FM 6-40)
| Pocisk | Totalne | Ciฤลผkie | Lekkie | Zagroลผenie |
|---|---|---|---|---|
| M107 HE / EXCALIBUR | 30 m | 100 m | 300 m | 800 m |
| HE STD (RAK) | 8 m | 30 m | 80 m | 200 m |
| SMOKE | โ | โ | โ | 80 m |
| APFSDS | penetracja kinetyczna | โ | โ | โ |
| HEAT | โ | โ | โ | 5 m |
balistic/
โโโ Balistic_Input.py # Frontend Python/Flask + mapa
โโโ Program.cs # Procesor balistyczny C#
โโโ Balistic.csproj # Konfiguracja projektu .NET
โโโ .env # Klucz API (nie commitowaฤ!)
โโโ .gitignore
โโโ balistic_log.txt # Log strzaลรณw (generowany automatycznie)
โโโ README.md
System przeznaczony wyลฤ cznie do celรณw edukacyjnych i symulacyjnych. Obliczenia sฤ przybliลผeniem fizycznym โ nie nadajฤ siฤ do zastosowaล operacyjnych. Rzeczywiste systemy kierowania ogniem uลผywajฤ znacznie bardziej zลoลผonych modeli (6-DOF, efekt Coriolisa w 3 osiach, dane meteorologiczne z sond balonowych, zuลผycie lufy i in.).
MIT โ use it, modify it, build on it. / Uลผywaj, modyfikuj, rozwijaj.