re: can EASILY be done by machine
similiar to the far more simplified rudder angle indicator on an auto pilot system for a boat. the autopilot brain uses feed from a compass, gps and feedback from a rudder angle indicator to make real time course corrections at 1/100th of a second intervals.
Some larger more sophisticated yachts integrate a system of gyros into the auto pilot as well, in order to counteract pitch and yaw.
