My thought experiment in GPS. Telemetry, lithography, and rocket science must interact to link the digital and physical worlds. Keep in mind, this is not a researched piece but an analysis of how I would invent GPS based upon the functionality of an existing invention.
I often hang around with pretty ambitious people. Recently one of them wanted to build mapping software for a smartphone… you know, reinvent the wheel. This is less than half of the idea; therefore it is acceptable to share. The process of re-engineering an existing software product sounded like fun and gave me food for thought.
This thought experiment is purely on the conceptual level. Retrieving simple GPS data is within all of our reach with an UpWork developer and some free time. I am certain that there is ample documentation to interface with GPS satellites and smartphones with gyroscopes.
Challenge #1 - Establishing a Direction
The most basic type of directions that you can give another human being is to point in a direction and say, “go that way.” This technique is a simple 360 degree, 2-dimensional activity and is well defined in the digital and mathematical world. When you do this in a computer program you are doing elementary level mathematics in the form of that age-old formula:
- y = mx + b
Yes, simple 2-dimensional graphing is useful in GPS mapping. Remember that telemetry word I threw around at the beginning? It means remote measurement. You need to use the coordinates of your destination (probably in a file or database), compared with your actual coordinates requested from a geosynchronous satellite. When you have these you can to plot 2 points on a graph.
Simply put, direction comes from subtracting the two coordinates. This requires subtraction of the the destination longitude from GPS longitude, and the destination latitude from the GPS latitude. We all hopefully remember that (x1, y1) - (x2, y2) gives us “rise over run.” It is easiest for developers to assume that the Y-axis represents latitude and the X-axis represents longitude. Finally, coordinates of positive "y" values represent North, negative represents South; positive "x" represents East and negative "x" represents West.
Here is a graphical illustration:
Fun fact, the actual (0, 0) coordinate is on the equator, near/in the Gulf of Guinea off of the coast of Africa
The GPS device is assumed to be the starting point of a line “segment.” The phone will calculate angle against the X-axis due to slope-intercept translation, and distance as calculated with pythagorean theorem. You can now use the phone’s mapping information and gyroscope to draw an arrow or a straight segment to your intended destination overlayed on a map. The only problem with a straight line is that it does not take into account useful human paths that can be navigated on foot or in a vehicle. It also fails to account for typically unimportant factors like the curvature of planet dirt… this was the easy part.
Dilemma and Solution
There may be issues with this model and Y axis slope plots. As you remember from 4th grade, you cannot divide by zero. To handle due north and due south graph slope, the software will require some form of error handling, and conditional arithmetic logic.
All in all, we have enough logic to support a simple app that points at a destination and tells a user to, “go that way!” Check back in two weeks for Part 2 on useable paths.