I declared one point in each octant of the globe, transformed it to XYZ using the equations I had, and then tested martin f's answer. It didn't returned the same points. Then I delved deeper into Wikipedia's equations, and I finally understood how they worked. Then I adapted them.
latitude(r, x, y, z) = arcsin(z/r)(180/π)
longitude(r, x, y, z) =
if (x > 0) {
arctan(y/x)(180/π)
} else if (y > 0) {
arctan(y/x)(180/π) + 180
} else {
arctan(y/x)(180/π) - 180
}
(I wanted to write a piecewise function, but LaTeX isn't supported here) This is considering North and East as positive and right hand rule for XYZ, where Y is transverse to the plane that contains the Greenwhich meridian, positive to the East as well, and Z is aligned to North-South.
Thanks for helping me get there.
Edit: I just checked on Wikipedia, and it seems I learned the wrong right hand rule. Here, I mean X in the thumb, Y in the index finger and Z in the middle finger.
EDIT: I answered this question originally with the assumption that there was only one way of understanding the way GPS works. There's a good few paragraphs on Wikipedia: https://en.wikipedia.org/wiki/Global_Positioning_System#Geometric_interpretation
I don't understand why you can't have more hyperboloids. I wonder if there is no value at adding more hyperboloids, i.e., including more than 3 'differences' when you have 4 satellites doesn't increase the amount of information?
--old post follows
I thought having two satellites to measure your distance from would give you a circle (the intersection of two spheres. And that three satellites gives you two points, one near the Earth's surface and one up in space somewhere. I don't think that you do get hyperboloids so I am keen to see a reference.
Also, note that in order to measure distances, your receiver needs to solve for time too, so you need at least four satellites. (You also need the almanac that tells you where the satellite is at a particular time, and that's transmitted in the signal from the satellites, or used to be, which is why it took ages to get a first fix on old hardware).
This seems like a pretty good resource for reading up: https://www.maptoaster.com/maptoaster-topo-nz/articles/how-gps-works/how-gps-works.html
Quote:
When you switch the GPS on, the time-to-first-fix varies depending on how long it is since you last used the GPS. To get a fix, the GPS receiver needs a valid almanac, initial location, time, and ephemeris data.
The terms "cold/warm/hot start" indicate how many of these pieces of data the GPS receiver already has. The terms mean different things to different GPS manufacturers.
Cold start - if the GPS not been used for a long time and/or has moved several hundred kilometres it will take some time to get the first fix. In this state, the GPS receiver does not have a current almanac, ephemeris, initial position or time. Older GPS units may take up to an hour to search for satellites, download the almanac and ephemeris data and obtain an initial position, though newer GPS units may require much less than this.
If the GPS receiver has moved several hundred kilometres, its assumptions about which satellites to use will be incorrect and it will have to search for them. Most units will let you enter an approximate location to speed the process.
![satellite positioning example from http://www.nptel.ac.in/courses/105102015/Flash/gps3.jpg](https://i.stack.imgur.com/0If0y.jpg)
Best Answer
If i understood question right see this one How to measure the accuracy of latitude and longitude?. So basicly take off that n+1 gps point from first, to get relative distance and then use 111km per degree to distance in meters. Center everything to 0 and you should get nice graph
To convert decimal degrees read this article in wikipedia
If you want to plot GPS data right place on map, you need to reproject data. Read more in wikipedia. Tools like proj4, postgis , gdal etc.