This is the tool seismologists actually use: a travel-time (distance–time) diagram. Every wave type travels outward from the rupture at a fixed speed, so on a plot of distance d versus arrival time t each wave traces a straight line through the origin — its slope is 1/V:
t_P(d) = d / V_p (V_p ≈ 5–8 km/s in crustal rock)
t_S(d) = d / V_s (V_s ≈ 2.5–4.5 km/s, always < V_p)
Reading straight off that diagram at the station's and city's distance gives their exact P and S arrival times — real seismic networks pick arrivals from recorded waveforms the same way. Below the diagram, two synthetic seismograms are synthesized live from Ricker wavelets, one centred on each arrival, with peak amplitude falling off as 1/r (geometric spreading of body-wave energy) and scaled by the quake's magnitude, so the near station's trace and the far city's trace show realistically different amplitudes and onset times:
A(r, M) = A0 · 10^(0.5·(M−4)) / r
w(t) = A · [1 − 2(πf(t−t_arr))²] · exp[−(πf(t−t_arr))²]
lead time = t_S(d_city) − [ t_P(d_station) + t_proc ]
- Distance slider — how far the city sits from the epicenter; farther means more lead time, because the S-wave has longer to travel, but also a weaker signal at the city.
- Vp / Vs sliders — set by local rock stiffness and density; a bigger speed gap widens the warning window and steepens the gap between the two travel-time lines.
- Magnitude — scales the seismogram amplitudes (not the timing) — bigger quakes shake harder at every distance, but the physics of the race is unchanged.
- Processing delay — real networks need ~1–10 s (scaled up here for a visible race) to confirm a detection isn't noise before alerting; a slower network eats directly into the lead time.
- If the computed lead time goes negative, the city is inside the EEW "blind zone" — the S-wave outruns the alert entirely.