How does iPhone know I'm travelling with location services switched off Recently acquired an iPhone SE (after a factory refresh), and I have location services turned off.

Twice recently I've taken a train, and had the pop-up/splash screen offering to turn on do no disturb when I'm driving.

How does the phone know I'm "driving"? It would be easy to tell via GPS from my speed, but I'm sceptical it would be possible using an accelerometer (trains are pretty smooth). Is my phone still recording/tracking my location even with location services switched off?
It's not geolocation. It's detection of specific motion. See Settings > Do Not Disturb.

See How to Use Do Not Disturb While Driving