Detonation Velocity - For TNT, it's 6,900 m/s. For Ammonium Nitrate (fertilizer) it's 5,270 m/s.
Deflagration - What happens typically when gasses burn. The reaction spreads by heat being conducted through the medium. Detonation Velocities usually far below 100 m/s.
Detonation - Shock wave compresses gas which causes temperature rise above ignition point. Detonation velocities vary because gasses aren't stoichiometrically mixed, but are in the ballpark of 1,000 - 2,000 m/s.
The problem is that gasses have to be mixed well enough for them to react quickly enough to form a shock wave, and then for that shock wave to become powerful enough to initiate detonation.
https://en.wikipedia.org/wiki/Deflagrat ... transition
A deflagration is characterized by a subsonic flame propagation velocity, typically far below 100 m/s, and relatively modest overpressures, say below 0.5 bar. The main mechanism of combustion propagation is of a flame front that moves forward through the gas mixture - in technical terms the reaction zone (chemical combustion) progresses through the medium by processes of diffusion of heat and mass. In its most benign form, a deflagration may simply be a flash fire. In contrast, a detonation is characterized by supersonic flame propagation velocities, perhaps up to 2000 m/s, and substantial overpressures, up to 20 bars. The main mechanism of combustion propagation is of a powerful pressure wave that compresses the unburnt gas ahead of the wave to a temperature above the autoignition temperature. In technical terms, the reaction zone (chemical combustion) is a self-driven shock wave where the reaction zone and the shock are coincident, and the chemical reaction is initiated by the compressive heating caused by the shock wave.
Under certain conditions, mainly in terms of geometrical conditions such as partial confinement and many obstacles in the flame path that cause turbulent flame eddy currents, a subsonic flame may accelerate to supersonic speed, transitioning from deflagration to detonation. The exact mechanism is not fully understood, and while existing theories are able to explain and model both deflagrations and detonations, there is no theory at present which can predict the transition phenomenon.