In reality, and in simple terms, the GPS unit derives it's position by reference to several satellites. Simple speed, distance, time calculations knowing the speed and time elements of signals generated by the satellites. From that position translated to the surface it will work out the distance to the required waypoint.