The airbags are a further stage of reducing the deceleration experienced by the occupants; they are controlled by accelerometers so they fire off when they detect an abnormally high acceleration.
Airbags used to be triggered (and maybe still are) by nothing more complicated than a metal ball bearing in an angled tube with electrical contacts at the upper end, if the impact was severe enough the ball would roll up the tube and bridge the contacts this fired the airbag.
I think you've just described an accelerometer !
an accelerometer is something that measures rate of acceleration across a range and displays / stores / transmits results (can be analogue or digital)
https://learn.sparkfun.com/tutorials/accelerometer-basicsWhat I described was an on/off switch that triggered at a certain pre-designed deceleration, it did not measure anything, just reacted when a certain mechanical level was reached (it was only programmable in as much as you could alter the angle of the tube to the horizontal.
I guess the airbag trigger in modern cars will be a solid state device, and will accept other inputs such as if the seat is occupied and if it is not the airbag shouldn't trigger.