This is a 2d GPS. The calculated x and y show the calculated positions (Duh) The phone x and y show the real position of the phone (also duh) Press space to hide and show the info Mode 0: normal, Mode 1: Visual (Can't move in mode 1), Mode 2: Simpler sprites Explanation: Basically, the satellites send where they are and how long it takes for the message to get there. The phone uses this info to find how far the satellites are from the phone. But Gps doesn't work with only one satellite. 2d GPS needs a minimum of 3 satellites and 3d GPS needs a minimum of 4 satellites. The phone then ultimately calculates its position using trilateration. I'm putting this here because nobody will notice the time and date on the phone. (13:61, 13/32/1991) 13:61 and 13/32 is impossible and 1991 is before the smartphone was invented.
============================================= credit to Computing 101 for showing Python script (without it, I wouldn't have understood the formula). =============================================