Mach Simulator
A Computational Framework for Hypersonic and Ballistic Missile Trajectory Simulation with Interception Probability Analysis
Table of Contents
1. Abstract
Mach Simulator is a client-side computational tool for simulating the trajectories of hypersonic cruise missiles and ballistic missiles launched between arbitrary geographic coordinates on the Earth's surface. The simulator computes great-circle distances using the Haversine formula, generates point-by-point trajectory profiles accounting for atmospheric density variations, gravitational effects, and aerodynamic drag, and performs interception feasibility analysis against configurable air defense systems.
The system models two fundamentally different flight profiles: ballistic trajectories following sub-orbital parabolic arcs with boost, midcourse, and terminal phases; and hypersonic cruise trajectories maintaining sustained atmospheric flight at Mach 5+ with skip-glide oscillation patterns. All computations run entirely in the browser with no server-side processing or external API calls.
Interception analysis employs a multi-factor probability model that evaluates engagement windows, reaction times, speed feasibility, altitude envelope matching, and target maneuverability to produce single-shot and salvo kill probabilities against each defense system in the database.
This simulator is intended for educational and illustrative purposes only. All missile specifications, defense system parameters, and computed results are approximate and should not be considered operationally accurate. Real-world missile trajectories involve classified performance parameters, complex guidance systems, and environmental variables not modeled here.
2. Geodesic Computation
The fundamental distance computation uses the Haversine formula, which calculates the great-circle distance between two points on a sphere. While not accounting for Earth's oblate spheroid shape (which introduces errors up to ~0.3%), it provides sufficient accuracy for trajectory simulation purposes.
2.1 Haversine Distance
Given two points P₁(φ₁, λ₁) and P₂(φ₂, λ₂) where φ is latitude and λ is longitude (in radians):
c = 2 · atan2(√a, √(1−a))
d = R · c
where:
2.2 Initial Bearing (Azimuth)
The initial bearing θ from P₁ toward P₂ along the great circle is computed as:
This bearing is used to compute intermediate waypoints along the trajectory. Each trajectory point is projected along the great-circle arc using the destination point formula:
λ₂ = λ₁ + atan2(sin(θ) · sin(d/R) · cos(φ₁), cos(d/R) − sin(φ₁) · sin(φ₂))
3. Atmospheric Model
The simulator employs a simplified but physically meaningful atmospheric model combining an exponential density profile with an ISA (International Standard Atmosphere) temperature model.
3.1 Density Profile
Atmospheric density decreases approximately exponentially with altitude. The model uses:
This exponential model is accurate to within ~5% up to approximately 80 km altitude. Above the Karman line (100 km), the atmosphere is effectively negligible for drag purposes but the model correctly produces near-zero density values.
3.2 Speed of Sound (ISA)
The local speed of sound depends on temperature, which varies with altitude according to the ISA model. The simulator implements a multi-layer temperature profile:
where γ = 1.4 (ratio of specific heats for air), R₁ = 287 J/(kg·K), and T(h) follows the piecewise model:
The minimum temperature is clamped at 180 K. At sea level, c ≈ 343 m/s. At the tropopause, c ≈ 295 m/s. This variation means that a missile's true airspeed at a given Mach number depends on altitude — Mach 10 at 25 km altitude corresponds to a different velocity in m/s than Mach 10 at sea level.
4. Ballistic Trajectory Model
Ballistic missiles follow sub-orbital trajectories consisting of three distinct phases: boost (powered ascent), midcourse (unpowered inertial flight through the upper atmosphere or space), and terminal (atmospheric reentry and descent to target).
4.1 Apogee Calculation
The trajectory apogee (maximum altitude) is determined by the missile class and range. Real ballistic missiles have class-dependent apogee-to-range ratios:
4.2 Launch Angle
The launch elevation angle is derived from the parabolic approximation relating apogee to range:
For an ideal vacuum trajectory, the optimal angle for maximum range is 45°. With atmospheric drag and Earth rotation, real missiles typically launch at 30–40°.
4.3 Flight Time Estimation
Total flight time is estimated from the average horizontal velocity component:
where η = 0.85 is an efficiency factor accounting for non-ideal trajectory effects (drag losses, gravity turn, Earth curvature). The velocity v = M · c₀ where M is the configured Mach number and c₀ = 343 m/s.
4.4 Altitude Profile
The altitude at any point along the trajectory is modeled as a parabolic function of the path fraction f ∈ [0, 1]:
This produces h(0) = 0, h(0.5) = H_apogee, h(1) = 0, matching the expected ballistic arc. The peak altitude occurs at the midpoint of the ground track.
4.5 Velocity Profile by Phase
Progressive acceleration from 0.2M to full Mach. Duration equals configured burn time (50–190s depending on missile class).
Inertial flight at ~0.95M, rising to 1.1M during descent due to gravitational acceleration.
High-speed reentry at ~1.1M, decelerating to ~0.9M at impact due to increasing atmospheric drag.
5. Hypersonic Trajectory Model
Hypersonic cruise missiles fly fundamentally differently from ballistic missiles. Instead of exiting the atmosphere, they maintain sustained flight within the upper atmosphere (typically 20–40 km altitude) using scramjet or rocket-ramjet propulsion at speeds exceeding Mach 5.
5.1 Cruise Speed at Altitude
The true airspeed of a hypersonic vehicle depends on the local speed of sound at cruise altitude:
At a typical cruise altitude of 25 km, c ≈ 298 m/s, so Mach 8 corresponds to approximately 2,384 m/s (8,582 km/h).
5.2 Flight Phases
Climb to cruise altitude with smooth acceleration. Uses an ease-in-out interpolation for realistic acceleration profile:
v(t) = M · 0.3 + M · 0.7 · easeInOut(t / t_boost)
Near-horizontal flight with skip-glide oscillations simulating the characteristic "wavy" flight path of hypersonic glide vehicles. Three sinusoidal oscillation cycles with 15% altitude amplitude:
v(t) = M · (0.95 + 0.05 · sin(f · 4 · 2π))
Steep dive toward target with velocity increasing up to ~1.15M due to gravitational acceleration and potential energy conversion.
5.3 Ease-In-Out Function
The boost phase uses a smooth acceleration curve to avoid unrealistic step changes in velocity:
6. Aerodynamic Forces
The simulator computes three key aerodynamic quantities at each trajectory point, providing insight into the physical environment the missile experiences throughout its flight.
6.1 Dynamic Pressure
Dynamic pressure represents the kinetic energy per unit volume of the airflow and determines structural loads on the vehicle:
At hypersonic speeds within the atmosphere, dynamic pressure can reach extreme values. For example, at Mach 8 and 25 km altitude: ρ ≈ 0.040 kg/m³, v ≈ 2,384 m/s, yielding q ≈ 113 kPa — a significant structural load requiring advanced thermal protection systems.
6.2 Drag Force
The lower drag coefficient for hypersonic vehicles reflects their optimized aerodynamic design (sharp leading edges, waverider configurations) compared to blunt ballistic reentry vehicles. These coefficients are simplified constants; real vehicles have Mach-dependent C_d curves that increase dramatically at transonic speeds and decrease in the hypersonic regime.
6.3 Drag Deceleration
This quantity, displayed in the timeline slider, shows how aerodynamic braking varies dramatically along the trajectory — negligible at apogee (for ballistic missiles) but extreme during terminal phase reentry.
7. Interception Analysis
The interception analysis evaluates whether a given defense system can successfully engage a missile along its computed trajectory. The analysis proceeds in three stages: envelope matching, engagement window computation, and probability estimation.
7.1 Engagement Envelope
For each trajectory point, the system checks three conditions against the defense system's operational envelope:
Points satisfying all three conditions form the set of engageable points. If this set is empty, interception is declared impossible.
7.2 Optimal Intercept Point
Among all engageable points, the simulator selects the optimal intercept point by maximizing a composite score:
where each factor is normalized to [0, 1]:
7.3 Engagement Window
The engagement window must exceed the system's reaction time (t_react) for interception to be feasible. Systems like the S-500 have reaction times as low as 4 seconds, while Aegis BMD requires up to 15 seconds.
8. Probability of Kill (Pk)
The probability of kill is the core metric of interception analysis. The simulator uses a multi-factor model that degrades the system's baseline Pk according to engagement conditions.
8.1 Single-Shot Pk
Cubic penalty. A target at 90% of the system's speed limit retains only 27% of this factor. This models the rapidly degrading tracking accuracy as targets approach the system's kinematic limits.
Quadratic penalty toward envelope edges. Peak performance at the midpoint of the system's altitude range.
f_maneuver = 0.85 (ballistic)
Hypersonic vehicles are significantly harder to intercept due to their ability to execute unpredictable lateral maneuvers, unlike ballistic warheads on predictable parabolic paths.
Reaches 1.0 when the engagement window is at least 3x the reaction time, providing comfortable margin for fire solution refinement.
8.2 Salvo Probability
Multiple interceptors are launched to increase overall kill probability. The salvo size is automatically computed to approach Pk ≥ 0.95:
This formula assumes independent shot attempts — a simplification that may overestimate Pk_salvo when shots are closely spaced in time (correlated misses). For example, with Pk_single = 0.3 and N = 4 interceptors:
9. Missile Configurations
The simulator includes 12 pre-configured missiles (6 hypersonic, 6 ballistic) plus 2 fully customizable configurations. All parameters are editable when the "Custom" variant is selected.
| Name | Country | Mach | Range (km) | Cruise Alt (km) | CEP (m) |
|---|---|---|---|---|---|
| Kh-47M2 Kinzhal | Russia | 5-10 | 2,000 | 20 | 10 |
| 3M22 Zircon | Russia | 5-9 | 1,000 | 28 | 15 |
| DF-ZF (WU-14) | China | 5-10 | 2,500 | 30 | 20 |
| Agni-P HGV | India | 5-8 | 2,000 | 25 | 25 |
| AGM-183A ARRW | USA | 5-8 | 1,600 | 25 | 8 |
| Custom | Any | 3-25 | 5,000 | 30 | 15 |
| Name | Country | Class | Mach | Range (km) | Apogee Factor | Burn (s) |
|---|---|---|---|---|---|---|
| Iskander-M | Russia | SRBM | 4-7.5 | 500 | 0.40 | 50 |
| DF-21D | China | MRBM | 6-10 | 1,800 | 0.50 | 80 |
| Minuteman III | USA | ICBM | 15-23 | 13,000 | 0.25 | 180 |
| Topol-M | Russia | ICBM | 15-22 | 11,000 | 0.25 | 190 |
| Shaheen-III | Pakistan | IRBM | 8-14 | 2,750 | 0.35 | 120 |
| Custom | Any | Any | 2-25 | 15,000 | 0.30 | 120 |
10. Defense System Configurations
Seven defense systems are modeled, spanning the full spectrum from short-range point defense to exo-atmospheric ballistic missile defense.
| Name | Country | Type | Range (km) | Alt (km) | Max Target | Pk Base | React (s) |
|---|---|---|---|---|---|---|---|
| S-400 Triumf | Russia | SAM | 2-400 | 0.01-30 | M14.5 | 90% | 9 |
| Patriot PAC-3 | USA | SAM | 3-160 | 0.06-25 | M8 | 80% | 9 |
| THAAD | USA | TMD | 50-200 | 40-150 | M14 | 95% | 12 |
| Iron Dome | Israel | SHORAD | 4-70 | 0.03-10 | M3 | 85% | 4 |
| Aegis SM-3 | USA | BMD | 100-700 | 70-500 | M15 | 85% | 15 |
| S-500 Prometey | Russia | ABM | 10-600 | 5-200 | M20 | 92% | 4 |
| Arrow 3 | Israel | ABM | 100-2400 | 40-100 | M15 | 90% | 10 |
Note the trade-offs between systems: THAAD has the highest base Pk (95%) but operates only in the 40–150 km altitude band, making it effective only during the midcourse phase of ballistic trajectories. Iron Dome has the fastest reaction time (4s) but can only engage targets below Mach 3, rendering it ineffective against any hypersonic threat. The S-500 has the highest speed ceiling (Mach 20) and fastest reaction time among long-range systems, designed specifically for the anti-hypersonic role.
11. Software Architecture
11.1 Technology Stack
11.2 Module Structure
src/
config/
missiles.json # 12 missile configurations
defense-systems.json # 7 defense system specs
scenarios.json # 5 preset scenarios
constants.json # Physical constants
lib/
types.ts # TypeScript type definitions
physics.ts # Haversine, atmospheric model,
# trajectory generation, formulas
interception.ts # Engagement analysis, Pk computation
simulation.ts # Orchestrator combining all models
components/
MissileSelector.tsx # Missile type/model selection
MachControl.tsx # Speed slider with conversions
CoordinateInput.tsx # Lat/lon input + city presets
DefenseSelector.tsx # Defense system selection
InteractiveMap.tsx # Leaflet map with point placement
TrajectoryChart.tsx # Altitude vs distance (canvas)
VelocityChart.tsx # Mach vs time (canvas)
FormulaDisplay.tsx # Step-by-step formula rendering
ResultsPanel.tsx # Summary stats + interception
TimelineSlider.tsx # Scrubber with instantaneous data
app/
page.tsx # Main simulator page
about/page.tsx # This documentation page
layout.tsx # Root layout
globals.css # Global styles + Leaflet overrides11.3 Data Flow
The simulation pipeline follows a clear unidirectional flow:
500 points
6-8 steps
11.4 Trajectory Resolution
Each trajectory is computed as 500 discrete points (configurable via numPoints parameter). For an ICBM with ~30 minute flight time, this yields one point every ~3.6 seconds. For a short-range Iskander with ~90 seconds flight time, points are ~0.18 seconds apart. The timeline slider in the UI allows scrubbing through all 500 points with instantaneous readouts of position, velocity, altitude, dynamic pressure, drag force, and air density.