User:DangerisGo/sandbox

GPS, or Global Positioning System, is a satellite system deployed and maintained by the United States Department of Defense. Initially designed for use by the military, the United States Government decided in the early 2000’s to remove military signal restrictions and allow its use for civilians. The first instances of popular civilian GPS use were standalone car units meant for driving navigation. In 1989, Magellan Navigation released the Magellan NAV 100, the world’s first commercially available navigation unit. After GPS was opened to civilians, more companies such as Garmin, Benefon and TomTom released their units to market, driving the cost of the units down to the $100 range. With the acceleration of technology, these standalone GPS units were soon integrated into smartphones.

Trilateration
Trilateration is the “process of determining absolute or relative locations of points by measurement of distances using the geometry of circles, spheres or triangles. In the satellites case, spheres are used. When a GPS receiver determines the distance from a satellite, it knows that it lies on the surface of an imaginary sphere with the satellite at the center. Once the receiver is able to get the distance from at least 3 satellites along with where each is located, it can determine where each sphere intersects. The point of intersection is where the user is located. Let us look at visual to the left. This graphic may look confusing but in actuality, it isn’t. Each color sphere has a satellite at the center. Somewhere on earth, a receiver has picked up these 4 satellites and determined their distances. Where these spheres intersect is where that user is located. A receiver doesn’t limit itself to just 3 satellites, it will obtain as many satellites as it can before performing calculations to determine the best 3 satellites to use for trilateration. A 4th satellite could be used for data confirmation and/or altitude measurement. You may say that this seems similar to triangulation, however trilateration and triangulation are calculated very differently. Triangulation is the process of determining a point by measuring angles to it from known points rather than measuring distances to the point directly. One popular use of triangulation is locating cell phones within a triangle of cell towers.

Trilateration calculation involves solving a set of equations to determine where a user is located.


 * $$d_i=c(t_{t,i}-t_{r,i}+t_c)=\sqrt{(x_i-x)^2+(y_i-y)^2+\sqrt{(z_i-z)^2}}$$

where i = 1...N where N is the number of satellites.

Most of these variables are known or can be initially calculated: The only unknowns are x, y and z: the location of the user!
 * c = Speed of light constant
 * tt,i = Time data from satellite i was transmitted
 * tr,i = Time data from satellite i was received
 * tc = Correction time for relativity provided by satellite i
 * di = Distance of satellite i calculated from previous 4 variables
 * xi = Provided by Ephemeris data from satellite i
 * yi = Provided by Ephemeris data from satellite i
 * zi = Provided by Ephemeris data from satellite i

Examples
1. Let us say a GPS receiver unit received a satellite signal at 3/18/2015 14:25:32.338128135. In the pseudo-random code received, the following data is provided:


 * tt = 3/18/2015 14:25:32.265978421
 * tc = 134 nS

How far away is the satellite from the user's location?

Using the formula above, we can start to plug in the values:

$$d=(299,792,458)*(0.338128135 - 0.265978421 + 134nS)$$ The dates, hours, minutes and seconds were removed as they do not change

$$d=(299,792,458)*(0.072149848)$$

$$d=21,629,980 m$$ $$d=21,629.9 km$$

The satellite is located 21,630 km away from the user.

2. As a basic, 2-D example of trilateration, look at the graph to the left. You can see that satellite A is $$\sqrt{2}$$ m away, satellite B is $$\sqrt{5}$$ m away and satellite C is $$2\sqrt{2}$$ m away. All of these distances were calculated from each satellite's Ephemeris data. The satellite locations are: A = (2, 4), B = (5, 2), C = (1, 1). Since there is no Z-plane, that can be omitted from the equation. Let's calculate the location of the user:

Satellite A: $$\sqrt{2} = \sqrt{(x-x_1)^2+(y-y_1)^2}$$

Satellite B: $$\sqrt{5} = \sqrt{(x-x_2)^2+(y-y_2)^2}$$

Satellite C: $$2\sqrt{2} = \sqrt{(x-x_3)^2+(y-y_3)^2}$$

Satellite A: $$\sqrt{2} = \sqrt{(x-2)^2+(y-4)^2}$$

Satellite B: $$\sqrt{5} = \sqrt{(x-5)^2+(y-2)^2}$$

Satellite C: $$2\sqrt{2} = \sqrt{(x-1)^2+(y-1)^2}$$

Satellite A: $$2 = (x-2)^2+(y-4)^2$$

Satellite B: $$5 = (x-5)^2+(y-2)^2$$

Satellite C: $$8 = (x-1)^2+(y-1)^2$$

If we plot these three equations on an X/Y graph as has been done on the left, you can see where all three graphs intersect. They intersect at (3,3), the location of the user. If we plug x=3 and y=3 into each equation, we can see that they are all valid.

Real satellites would provide distances in several thousand kilometers and the location data would be latitude/longitude. The receiver would then convert the latitude and longitude values to cartesian coordinates to be able to calculate the location of the user. Once the location is calculated, the value is converted back to the latitude/longitude system.