Ceks.it
2026

Mach Simulator

A client-side computational tool for simulating the trajectories of hypersonic cruise missiles and ballistic missiles launched between arbitrary geographic coordinates. 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.

StackNext.js, TypeScript, Tailwind CSS, LeafletTypeEducational SimulationRoleDesign & DevelopmentFeatures12 missiles, 7 defense systems, real-time interception analysisLinks
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.

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 (up to ~0.3% error), it provides sufficient accuracy for trajectory simulation.

Haversine Distance

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

Initial Bearing (Azimuth)

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

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(φ₂))

Atmospheric Model

A simplified but physically meaningful atmospheric model combining an exponential density profile with an ISA (International Standard Atmosphere) temperature model.

Density Profile

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

Accurate to within ~5% up to approximately 80 km altitude. Above the Karman line (100 km), the atmosphere is effectively negligible for drag purposes.

Speed of Sound (ISA)

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

where γ = 1.4, R₁ = 287 J/(kg·K), and T(h) follows a 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)

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

Apogee Calculation

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

Launch Angle

θ_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°.

Flight Time Estimation

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

where η = 0.85 accounts for non-ideal trajectory effects (drag losses, gravity turn, Earth curvature).

Altitude Profile

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

Parabolic function of the path fraction f ∈ [0, 1]. Produces h(0) = 0, h(0.5) = H_apogee, h(1) = 0.

Velocity Profile by Phase

BOOST

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

v(t) = M · 0.2 + M · 0.8 · (t / t_burn)

MIDCOURSE

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

TERMINAL

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)

Hypersonic Trajectory Model

Hypersonic cruise missiles maintain sustained flight within the upper atmosphere (typically 20–40 km altitude) using scramjet or rocket-ramjet propulsion at speeds exceeding Mach 5.

Cruise Speed at 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).

Flight Phases

BOOST

~90 seconds

Climb to cruise altitude with smooth acceleration using ease-in-out interpolation.

h(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. Three sinusoidal cycles with 15% altitude amplitude.

h(t) = h_cruise + 0.15 · h_cruise · sin(f · 6π)
v(t) = M · (0.95 + 0.05 · sin(f · 8π))

TERMINAL

~50 km to target

Steep dive toward target with velocity increasing up to ~1.15M due to gravitational acceleration and potential energy conversion.

Ease-In-Out Function

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

Aerodynamic Forces

Three key aerodynamic quantities are computed at each trajectory point.

Dynamic Pressure

q = ½ · ρ(h) · v²

At Mach 8 and 25 km altitude: ρ ≈ 0.040 kg/m³, v ≈ 2,384 m/s, yielding q ≈ 113 kPa — requiring advanced thermal protection systems.

Drag Force

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

Drag Deceleration

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

Interception Analysis

The interception analysis evaluates whether a given defense system can successfully engage a missile along its computed trajectory through three stages: envelope matching, engagement window computation, and probability estimation.

Engagement Envelope

For each trajectory point, three conditions are checked:

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

Optimal Intercept Point

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

Each factor normalized to [0, 1]. Speed is weighted 40% as it most affects Pk.

Engagement Window

W = t_last_engageable − t_first_engageable

Must exceed the system's reaction time (t_react). Systems like the S-500 have reaction times as low as 4 seconds, while Aegis BMD requires up to 15 seconds.

Probability of Kill (Pk)

The core metric of interception analysis. A multi-factor model degrades the system's baseline Pk according to engagement conditions.

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.

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

Quadratic penalty toward envelope edges. Peak performance at midpoint of altitude range.

f_maneuver— Target maneuverability factor
f_maneuver = 0.60 (hypersonic) | 0.85 (ballistic)

Hypersonic vehicles are harder to intercept due to unpredictable lateral maneuvers.

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

Reaches 1.0 when engagement window is at least 3x the reaction time.

Salvo Probability

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

Assumes independent shot attempts. Example: Pk_single = 0.3, N = 4 interceptors:

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

Missile Configurations

12 pre-configured missiles (6 hypersonic, 6 ballistic) plus 2 fully customizable configurations.

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

Defense System Configurations

Seven defense systems modeled, spanning 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: THAAD has the highest base Pk (95%) but operates only at 40–150 km altitude. Iron Dome has the fastest reaction time (4s) but can only engage targets below Mach 3. 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.

Software Architecture

Technology Stack

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

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

Data Flow

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

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.
04.
Constant drag coefficients: Real C_d varies with Mach number. The model uses fixed values.
05.
No guidance model: Missiles follow pre-computed great-circle paths. Terminal guidance and evasive maneuvers are not dynamically simulated.
06.
Simplified Pk model: Real interception probability depends on radar cross-section, electronic countermeasures, decoys, and many classified parameters.
07.
Independent shot assumption: The salvo Pk formula assumes independent miss probabilities, which may overestimate effectiveness.
08.
No multi-layer defense: The simulator evaluates one defense system at a time. Real IADS use layered systems.
09.
Parabolic altitude model: The h(f) = 4Hf(1-f) formula produces symmetric trajectories. Real trajectories are asymmetric.
10.
No thermal effects: Aerodynamic heating, which constrains hypersonic vehicle speed and trajectory, is not modeled.

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.
[5]Missile Defense Agency (MDA). "Ballistic Missile Defense System Overview". U.S. DoD.
[6]Acton, J.M. (2015). "Hypersonic Boost-Glide Weapons". Science & Global Security, 23(3).
[7]Wright, D. & Gronlund, L. (2003). "Depressed Trajectory SLBMs". Science & Global Security, 11(1).
[8]Karman, T. von (1963). "The boundary of space". Astronautics, 1(4), 70.