A modern Progressive Web Application for military fire direction calculations, built with React, TypeScript, and Vite. Fully static client-side application with CSV data assets.
- Calculate firing solutions using MGRS coordinates
- Support for observer, mortar, and target positions
- NEW: Terrain elevation support for accurate uphill/downhill firing
- Real-time ballistic calculations with derivative interpolation
- Multiple ammunition types from static CSV data
- FO adjustments with automatic recalculation
- Optional gun and target elevation inputs
- Automatic slope angle calculations
- Corrected tube elevation for height differences
- Supports uphill and downhill engagements
- Military-grade trigonometric accuracy
- See ELEVATION_SUPPORT.md for details
- Full offline functionality with service worker caching
- Static CSV data loaded and cached for instant access
- Responsive design for desktop and mobile devices
- Install as native app on supported platforms
- Clean, modern interface with Font Awesome icons
- React Router navigation between Calculator and Settings
- Mobile-responsive design with sticky navigation
- Real-time PWA status indicators
- CSV files as static assets for ballistic data
- Client-side CSV parsing and caching
- No backend server or database required
- Fast loading with smart data management
FDC2/
├── docs/ # Project documentation
├── docker/ # Docker configuration files
├── lighthouse-reports/ # Lighthouse performance reports
├── scripts/ # Build and utility scripts
│ └── deploy/ # Deployment scripts
├── test-results/ # Test files and results
├── src/ # Source code
├── public/ # Static assets
└── data/ # Ballistic data CSV files
For detailed documentation, see the docs directory.
- Node.js 18+
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd FDC2- Install dependencies:
npm install- Start the development environment:
npm run dev
# or simply
npm start
# or
npm runThis will start the frontend development server on port 5173.
npm run dev/npm start/npm run- Start development servernpm run build- Build for productionnpm run preview- Preview production build locallynpm test- Run unit tests with Vitestnpm run test:ui- Run tests with UInpm run docker:build- Build Docker imagenpm run docker:run- Run Docker container
- React 19 with TypeScript for type-safe development
- Vite for fast development and optimized builds
- React Router for client-side navigation
- Tailwind CSS v4 for responsive styling
- Font Awesome icons for enhanced UI
- CSV files as static data assets
- Client-side parsing of ballistic data
- No backend server required - fully static
- Service worker for offline caching
- Web app manifest for installation
- CSV data caching for offline access
- Responsive design for all devices
- Sticky navigation bar with active state indicators
- Mobile-responsive with collapsible text
- Font Awesome icons for visual clarity
- Round selection from available CSV data
- Real-time validation and error handling
- Comprehensive results display with firing commands
- PWA status and update management
- Data cache controls and offline capabilities
- Application information and version details
The application uses the Military Grid Reference System (MGRS) for all coordinate inputs:
- Full validation of MGRS grid formats
- Distance and azimuth calculations
- Support for all UTM zones and grid squares
- All calculations run client-side for offline capability
- CSV data cached by service worker
- Static assets cached for complete offline operation
- No server dependencies
- Responsive design adapts to all screen sizes
- Touch-friendly interface elements
- Progressive enhancement for mobile browsers
- PWA installation on mobile devices
Build and run as a static application:
# Build Docker image
docker build -t fdc2-app .
# Run container (serves on port 80)
docker run -p 80:80 fdc2-appCSV ballistic data included:
M819_Smoke_Shell_Ballistics.csvM821_HE_mortar_data.csvM853A1_Illumination_Round_Ballistics.csvM879_Practice_Round_Ballistics.csv