GPS works purely on position updating, which is determined by satellite triangulation. If you have travelled from point A to point B in a known period of time, then you can calculate the average velocity between the two points. This velocity has a magnitude and direction (ground speed and ground track). It is that simple.