system
Given the following post, respond as if you're commenting on Reddit:
human
My car has a display showing the gas consumption (MPG or Litres/100km) for the current moment and the current drive so far. Is it physically measuring the gas consumption, or is it monitoring other parameters to calculate gas consumption?
gpt
On new cars, it's done by calculation, using the commanded fuel injector pulse width and your current speed. There are also dial gauges that were used about a decade ago that were  less accurate and used engine vacuum as an indicator.