Calculate accurate firing solutions for mortars in Project Reality: BF2. Takes into account height deltas automatically. Support 1.8.1.2 (November 2025)
Now available for Android! See ANDROID.md for building the mobile app.
- Visual map representation with satellite/overview imagery
- Automatic elevation detection from heightmaps
- Firing solutions in Mils and Degrees
- Support for all 84 Project Reality maps (as of 20/11/2025)
- Completely offline operation
- Android app - Use on mobile devices without internet
- Desktop/Web: Windows, Linux, macOS (via Python + Flask)
- Android: Version 6.0+ (API 23+) - See ANDROID.md
- iOS: Not yet supported
- Project Reality: BF2
- This repository cloned (shallow clone recommended)
- Python dependencies installed
- Python 3.8 or newer
- Flask 2.3+ and Werkzeug 2.3+ (auto-installed on first run)
- Modern web browser (Chrome, Firefox, Edge)
DO NOT perform a full clone of this repository - it's over 10GB due to (zipped) map files.
Use shallow clone command instead:
git clone --depth 3 https://github.com/zadzanl/Project_Reality-Mortar-CalculatorThis fetch only the 3 latest commits.
Note: When performing whole history clone, some older commits in raw_map_data/ may still contain large files that haven't been cleaned.
No Python installation required!
-
Go to Releases
-
Download for your platform:
- Windows:
PR-Mortar-Calculator-Windows.zip - Linux:
PR-Mortar-Calculator-Linux.tar.gz
- Windows:
-
Extract and run:
- Windows: Double-click
PR-Mortar-Calculator.exe - Linux:
./PR-Mortar-Calculator/PR-Mortar-Calculator
- Windows: Double-click
-
Browser opens automatically!
For developers or advanced users:
git clone --depth 3 https://github.com/zadzanl/Project_Reality-Mortar-Calculator
cd Project_Reality-Mortar-Calculatorpip install -r requirements.txtrun.bat # Windows
./run.sh # Linux/MacThe calculator will open automatically at http://localhost:8080 (if the port is unused).
Build from source or use pre-built APK:
See detailed instructions in ANDROID.md for:
- Building the Android APK locally or via GitHub Actions
- Installing on your device
- Requirements and troubleshooting
Quick local build:
./build-android.sh # Linux/Mac
build-android.bat # WindowsOr use GitHub Actions (in the Actions tab → Build Android APK workflow)
The APK will be at: android/app/build/outputs/apk/debug/pr-mortar-calc-debug.apk
- Select a map from the dropdown menu
- Click "Load Map"
- Choose mortar position using shift + click
- Move target position pointer using
- Click "Calculate Firing Solution" (or not, as it should be done automatically)
- Read elevation in Mils (used in game) and Degrees (secondary)
-
Collect map files from your PR:BF2 installation using collect_maps.py:
python processor/collect_maps.py
-
Process the maps (convert heightmaps to JSON):
- Option A: Open and run
processor/process_maps.ipynbin Jupyter Notebook - Option B: Run via command line:
jupyter nbconvert --to notebook --execute --inplace processor\process_maps.ipynb
- Option A: Open and run
-
Verify processing by checking
processor/collection_report.txt -
Restart the calculator - new maps should be available (large map may show wrong grid scale)
/calculator/- Web application and Flask server/processed_maps/- Heightmap data (JSON) and minimap images (PNG) for all maps/processor/- Tools for processing new maps (heightmaps + minimaps)/raw_map_data/- Original map files from game (server.zip + client.zip)run.bat/run.sh- Launch scripts
- calculator/README.md - Frontend documentation
- processor/README.md - Map processing guide
- openspec/project.md - Technical context
MIT License - See LICENSE file
-
Previous mortar calculator projects:
-
Community:
- PRID and the Project Reality community for the motivation (how inaccurate we play the mortar), feedback, and testing
- All community members and developers who discussed and answered mortar mechanics and physics
-
Development
- GitHub Copilot for UI implementation assistance
