M
MACH SIMULATOR
/About & Documentation
Back to Simulator

Mach Simulator

A Computational Framework for Hypersonic and Ballistic Missile Trajectory Simulation with Interception Probability Analysis

Technical Documentation — v1.0
Built with Next.js, TypeScript, Tailwind CSS, Leaflet

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.

Disclaimer

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):

a = sin²(Δφ/2) + cos(φ₁) · cos(φ₂) · sin²(Δλ/2)
c = 2 · atan2(√a, √(1−a))
d = R · c

where:

R (Earth radius)6,371km
Δφφ₂ − φ₁rad
Δλλ₂ − λ₁rad

2.2 Initial Bearing (Azimuth)

The initial bearing θ from P₁ toward P₂ along the great circle is computed as:

θ = atan2(sin(Δλ) · cos(φ₂), cos(φ₁) · sin(φ₂) − sin(φ₁) · cos(φ₂) · cos(Δλ))

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:

φ₂ = asin(sin(φ₁) · cos(d/R) + cos(φ₁) · sin(d/R) · cos(θ))
λ₂ = λ₁ + 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:

ρ(h) = ρ₀ · exp(−h / H)
ρ₀ (sea-level density)1.225kg/m³
H (scale height)8.5km

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:

c(h) = √(γ · R₁ · T(h))

where γ = 1.4 (ratio of specific heats for air), R₁ = 287 J/(kg·K), and T(h) follows the piecewise model:

Troposphere (0–11 km)T = 288.15 − 6.5h
Tropopause (11–20 km)T = 216.65 K (isothermal)
Stratosphere I (20–32 km)T = 216.65 + 1.0(h − 20)
Stratosphere II (32+ km)T = 228.65 + 2.8(h − 32)

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:

H_apogee = min(R · f_apogee, H_max)
SRBM (<1000 km)f_apogee ≈ 0.4 (lofted trajectory)
MRBM (1000–3000 km)f_apogee ≈ 0.5
ICBM (>5500 km)f_apogee ≈ 0.25 (min energy trajectory)

4.2 Launch Angle

The launch elevation angle is derived from the parabolic approximation relating apogee to range:

θ_launch = atan(4H / R)

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:

T = d / (v · cos(θ) · η)

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]:

h(f) = 4 · H_apogee · f · (1 − f)

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

BOOST(0 → t_burnout)

Progressive acceleration from 0.2M to full Mach. Duration equals configured burn time (50–190s depending on missile class).

v(t) = M · 0.2 + M · 0.8 · (t / t_burn)
MIDCOURSE(t_burnout → 0.85T)

Inertial flight at ~0.95M, rising to 1.1M during descent due to gravitational acceleration.

TERMINAL(0.85T → T)

High-speed reentry at ~1.1M, decelerating to ~0.9M at impact due to increasing atmospheric drag.

v(t) = M · 1.1 · (1 − 0.15 · f_term)

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:

v_cruise = M · c(h_cruise)

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

BOOST(~90 seconds)

Climb to cruise altitude with smooth acceleration. Uses an ease-in-out interpolation for realistic acceleration profile:

altitude(t) = h_cruise · easeInOut(t / t_boost)
v(t) = M · 0.3 + M · 0.7 · easeInOut(t / t_boost)
CRUISE(bulk of flight time)

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:

h(t) = h_cruise + 0.15 · h_cruise · sin(f · 3 · 2π)
v(t) = M · (0.95 + 0.05 · sin(f · 4 · 2π))
TERMINAL(~50 km to target)

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:

easeInOut(t) = { 2t² if t < 0.5, 1 − (−2t + 2)²/2 otherwise }

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:

q = ½ · ρ(h) · v²

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

F_d = q · C_d · A_ref
C_d ballistic0.15
C_d hypersonic0.05
A_ref (reference area)0.5

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

a_drag = F_d / m = (½ · ρ · v² · C_d · A) / m

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:

1. Range: d_min ≤ d(point, defense) ≤ d_max
2. Altitude: h_min ≤ h(point) ≤ h_max
3. Speed: v_target(point) ≤ v_max_target

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:

score = 0.3 · f_range + 0.3 · f_altitude + 0.4 · f_speed

where each factor is normalized to [0, 1]:

f_range — preference for mid-range engagements (normalized deviation from envelope center)
f_altitude — preference for mid-altitude engagements
f_speed — preference for lower target speed (weighted 40% as it most affects Pk)

7.3 Engagement Window

W = t_last_engageable − t_first_engageable

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

Pk_single = Pk_base · f_speed · f_altitude · f_maneuver · f_time
f_speed— Speed feasibility factor
f_speed = max(0, 1 − (v_target / v_max)³)

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.

f_altitude— Altitude envelope factor
f_altitude = max(0, 1 − ((h − h_mid) / h_half_range)²)

Quadratic penalty toward envelope edges. Peak performance at the midpoint of the system's altitude range.

f_maneuver— Target maneuverability factor
f_maneuver = 0.60 (hypersonic)
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.

f_time— Time window factor
f_time = min(1, W / (3 · t_react))

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:

Pk_salvo = 1 − (1 − Pk_single)^N
N = min(N_ready, ⌈3 / Pk_single⌉)

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:

Pk_salvo = 1 − (1 − 0.3)⁴ = 1 − 0.7⁴ = 1 − 0.2401 = 76.0%

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.

Hypersonic Missiles
NameCountryMachRange (km)Cruise Alt (km)CEP (m)
Kh-47M2 KinzhalRussia5-102,0002010
3M22 ZirconRussia5-91,0002815
DF-ZF (WU-14)China5-102,5003020
Agni-P HGVIndia5-82,0002525
AGM-183A ARRWUSA5-81,600258
CustomAny3-255,0003015
Ballistic Missiles
NameCountryClassMachRange (km)Apogee FactorBurn (s)
Iskander-MRussiaSRBM4-7.55000.4050
DF-21DChinaMRBM6-101,8000.5080
Minuteman IIIUSAICBM15-2313,0000.25180
Topol-MRussiaICBM15-2211,0000.25190
Shaheen-IIIPakistanIRBM8-142,7500.35120
CustomAnyAny2-2515,0000.30120

10. Defense System Configurations

Seven defense systems are modeled, spanning the full spectrum from short-range point defense to exo-atmospheric ballistic missile defense.

Defense Systems
NameCountryTypeRange (km)Alt (km)Max TargetPk BaseReact (s)
S-400 TriumfRussiaSAM2-4000.01-30M14.590%9
Patriot PAC-3USASAM3-1600.06-25M880%9
THAADUSATMD50-20040-150M1495%12
Iron DomeIsraelSHORAD4-700.03-10M385%4
Aegis SM-3USABMD100-70070-500M1585%15
S-500 PrometeyRussiaABM10-6005-200M2092%4
Arrow 3IsraelABM100-240040-100M1590%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

FrameworkNext.js 16 (App Router)
LanguageTypeScript
StylingTailwind CSS v4
MapsLeaflet + react-leaflet
TilesCartoDB Dark Matter
ChartsHTML5 Canvas (custom)
DatabaseNone (JSON config files)
DeploymentStatic export capable

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 overrides

11.3 Data Flow

The simulation pipeline follows a clear unidirectional flow:

User Input (missile, Mach, coordinates, defense)
runSimulation() orchestrator
generateTrajectory()
500 points
generateFormulaSteps()
6-8 steps
analyzeInterception()
FullSimulationResult → UI Components

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.

12. Limitations & Assumptions

01.
Spherical Earth: The Haversine formula assumes a perfect sphere (R = 6,371 km). Earth's WGS-84 ellipsoid introduces up to 0.3% distance errors at high latitudes.
02.
No Earth rotation: Coriolis effects, which deflect long-range trajectories eastward and affect ICBM accuracy, are not modeled.
03.
No wind model: Atmospheric winds, jet streams, and turbulence are not considered. These can significantly affect hypersonic cruise missile trajectories.
04.
Constant drag coefficients: Real C_d varies with Mach number (transonic drag rise, hypersonic compression). The model uses fixed values.
05.
No guidance model: Missiles follow pre-computed great-circle paths. Terminal guidance, terrain following, and evasive maneuvers are not dynamically simulated.
06.
Simplified Pk model: Real interception probability depends on radar cross-section, electronic countermeasures, decoys, salvo timing, and many other classified parameters.
07.
Independent shot assumption: The salvo Pk formula assumes independent miss probabilities, which may overestimate effectiveness for closely-timed shots.
08.
No multi-layer defense: The simulator evaluates one defense system at a time. Real integrated air defense networks use layered systems (e.g., S-500 + S-400 + Pantsir).
09.
Parabolic altitude model: The h(f) = 4Hf(1-f) formula produces symmetric trajectories. Real depressed or lofted trajectories are asymmetric.
10.
No thermal effects: Aerodynamic heating, which constrains hypersonic vehicle speed and trajectory, is not modeled.

13. References

[1]Sinnott, R.W. (1984). "Virtues of the Haversine". Sky and Telescope, 68(2), 159.
[2]U.S. Standard Atmosphere, 1976. NOAA/NASA/USAF. Document NOAA-S/T-76-1562.
[3]Anderson, J.D. (2006). Hypersonic and High-Temperature Gas Dynamics, 2nd ed. AIAA.
[4]Zarchan, P. (2012). Tactical and Strategic Missile Guidance, 6th ed. AIAA Progress in Astronautics and Aeronautics.
[5]Missile Defense Agency (MDA). "Ballistic Missile Defense System Overview". U.S. Department of Defense.
[6]Acton, J.M. (2015). "Hypersonic Boost-Glide Weapons". Science & Global Security, 23(3).
[7]Wright, D. & Gronlund, L. (2003). "Depressed Trajectory SLBMs: A Technical Evaluation". Science & Global Security, 11(1).
[8]Karman, T. von (1963). "The boundary of space". Astronautics, 1(4), 70.