Nib asked, and Nib — askNib's tutor — drew the answer live at a whiteboard. This is the spoken transcript; enable JavaScript to watch it drawn.
how does a gps know there's traffic
Plot twist: the G P S satellites do not know about traffic at all. Their one job is to broadcast the time, over and over, and they never hear your phone.
Your phone listens to several satellites, compares their timing, and works out where it is. That is the whole job of G P S: a position, nothing more.
So where do jams come from? From phones. When many phones crawl along a road, close together and slowly, that road is clearly jammed.
Each phone with location sharing on sends its position and speed over the internet. A server averages many phones on each stretch of road.
The map turns the average into colour: green where phones are moving, red where they crawl. Drivers' reports and road sensors add detail in some places.
So the whole chain: satellites tell your phone where it is, phones tell the server how fast they are going, and the server paints the map.
Next time the map shows red ahead, remember: it is not the satellites, it is the crowd of phones crawling there.