Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Let’s spend a few minutes to just learn the basics of GPS, in order to better use it in our code. What GPS boils down to—the nitty-gritty—are two floating-point numbers representing the X and Y position on the Earth. The X value has traditionally been called longitude, and the Y value has been known as the latitude. From a game programming perspective, this is an easier way to grasp the terms, but a naval veteran would scoff at the overly simplistic way this is being presented. We’ll gloss over issues of precision in order to grasp the concepts first.
Longitude represents the “X” or horizontal coordinate on the surface of the Earth, running east or west from the zero point.
Latitude represents the “Y” or vertical coordinate on the surface of the Earth, running north or south from the zero point.