User:Crazy Software Productions/Sandbox

Number of satellites needed for positioning.
Introduction:

De clock.

The clock in a consumer GPS is a generaly a quartz crystal driven clock. Accurate enough for most daily uses, but it's near to useless when needing a good clock for positioning. A quartz clock will drift, a drift of less than one second a year is very rare. A drift of a second a week is fairly normal. Although in some GPS devices this is partly corrected by using temperature dependend drift tables, which correct for a part of the drift. Even a clockdrift of a second a year will result in a shift of 10 meters a second. So after a minute the clock introduces a fault of 600 meters. (Almost half a mile).

If the GPS has been swiched off for a week the difference can easely be 1 second. A clock with one second off will put you in about moon distance from the earth.

Surfaces

GPS positioning calculations are often modelled with surfaces. The intersection of three surfaces wil result in a point (or a set of points). The intersection of two surfaces will result in a line or an arc, for positioning this will not do, therefore at least three surfaces are needed to get a position fix. The surfaces can be flat, a sphere or another shape.

2 D positioning

If not enough satellites are received, the sphere of the earth (or a sphere at a certain hight) can be used as an extra surface, two other surfaces are then provide by satellites, three are needed then.

A fix on more than one point

If three not flat surfaces for example spheres are used, this will not result in one point but in two points. One off the points will be very unstable, and very far from the position were we are (for example far removed from the earth), and will be moving fast. So this extra point can easely be eliminated. No extra satellite is needed to eliminate this point.

TOA Time Of Arrival

If the arrival time (TOA) of a satellite defines one surface, a sphere. The speed of the signal is known, if the TOA of the signal is also known this will define a virtual sphere around the satellite position (at the time of the transmission). The location of the satellite is also known. With trhee such signals of three different satellites we have three intersecting curves, resulting in a fix. Offcourse this requires a good enough clock to actually register the TOA. This clock will only be available in a GPS-unit after it has corrected it's time, not at swicht on time, and also not after some time that the GPS has it's last time correction. For this to work the clock of the GPS has to be corrected very regulary (it is), but to do this it has to know at least the distance to one of the satelites.

TDAO Time difference of Arrial

The time difference of the signal of two satellites defines also a surface. All points in space that receive the same time difference of arrival of two satellites form a hyperboloid. (A 3D version of a hyperbole). Three of these surfaces can be used to calculate a position. Or two plus the surface of the earth can be used. This is how the GPS system actually works.

Both TOA and TDAO require three independed surfaces to calculate a position. With TOA a accurate clock and three satellites are needed. With TDAO 4 satelites are needed to give three independen surfaces which make it possible to calculate a postion. Because an accurate clock is not available when swithing on a gpsreceiver, the gpsreceiver has to receive 4 satelites before it can calculate it's position. When the hight is known (or assumed) the GPS-unit can calculate a position using only three satelites, using the earth surface as an additional sphere.

Conclusion :

In absense of an accurate clock a GPS needs 4 satellites to get a fix in three dimensions and a correct clock time.

After the clock is set, the GPS-unit can for a short while work with only three satellites, but a clockdrift off only 1 second a year will result in a timing error of about 10 meters for all satellites. if the GPS clock runs slow, you will be lifted of the earth, with a GPS clock running fast you will sink into the earth.

Calculations This description does not go into how the calculations are done. It is possible (and most likely) that all calculations will first be based on the three TDOA and from this a position is established and after that a clock time is established. But it is also possible that from the beginning a clock and a clock error is simulated and that an iterating process is used to make the clock error smaller and smaller. The likely hood of this second method is less, because extra parameters are introduced which do not make the process any faster on a given CPU.

How to make the clock error smaller and smaller. (Pseudo ranging) First the inaccurate clock can be used or an estimation of the time can be made. Use the signals of the 'closest' salellite, that is the satellite the gives the first time signal. This signal needs between 0.067333 and 0.09107 to reach you. So this set's the your time within a few hundreds of a second of the 'correct' time. Do the same with the satellite which is furthest removed from you, overlap the to times and the interval will get smaller. When switching on these estimated times are probably better than the clocks time. Now using the earth sphere you need three other signals to determine your position and the 'correct' time. Using the sphere model, the estimated times you can itterate, but be carefull when making the range smaller, the correct time should ly in the interval. But when making the interval smaller it's not easy to discard the 'wrong' bit of the interval. The least squared or other error might not be increasing or decreasing only in the interval. With three satellites there will be an infinite number of correct solutions, iterating will deliver a 'correct' solution, but not your location. With four satellites there will be two solutions, both with a different time. One of the solutions probably will not fall within the timerange given above and not be near earth either.

More likely it is that the 3 TDOA are used to calculate the 'correct' position and that the time is deferred from that. (The location can be itterated toward, but there might be a direct solution as well).

. A thought experiment. Using a clock and estimating the clock error. A first estimate of the clock could be, the closest satellite (first signal) clock is used plus the time that signal needs to travel to the earth's surface. A second time can be estimated by again the closest satellite and the time it would need to travel if the satellite was on the horizon. (The times are then the satellite time + 0.067333 and the satellite time + 0.067333+0.02378 =sattime+ 0.091061. This estimate can be improved to repeat this process for the farthest satellite, only the ranges which overlap have to be used.)

Then iterate between these values until this gives a single solution for the four satellites signals. With three satellites there will be an infinite number of correct solutions, so iterating towards that probably will not yield a correct result). It's not unlickely that this will give a reasonable clockresult, far better than any quartz crystal can deliver over some time. The range of initial times can even be shrunk to do this process for all signals received and then using the overlap of the ranges. Making the range smaller. (Is this process called pseudo ranging and it this actually used in GPS models ?). This process will probably take longer than the TDOA approach which only has to calculate with three parameters.

Surfaces

For gps explaining often surfaces are used. Models with surfaces are good models to explain the workings of GPS. For positioning three intersecting surfaces are needed. Two intersecting surfaces define a line or an arc. Three intersection surfaces define a point or a set of points. The surface of the earth can be used as one of the surfaces. (Or a known higth).

2 D positioning

A GPS receiver only receiving signals from three satelites with revert to 2D positioning. It will asume a hight and calculate the position for this hight by using the earth surface (or just above the earth surface) an 'extra' surface and thus only needing 2 other surfaces for the positional calculation.

A fix on more than one point If a positional calculating results in two points, one off the points is usualy very unstable and very far removed from the actual point. Often it isn't even near to the earth. This second point can easely be eliminated. So a fix which results in a set of distinct points where all but one point can easely be eliminated will still be regarded as a fix.(For TOA there are can be two positional points, for TDOA there can be two positional points where times also differs).

TOA Time Of Arrival If the arrival time (TOA) of a satellite defines one surface, a sphere. So three satellites define three surfaces. But this requires that the GPS receiver has absolute time. Which is often not the case.

TDAO Time difference of Arrial The time difference of the signal of two satellites defines also a surface. All points in space that receive the same time difference of arrival of two satellites form a hyperboloid. (A 3D version of a hyperbole). Three of these surfaces can be used to calculate a position. Or two plus the surface of the earth can be used.

Both TOA and TDAO require three independed surfaces to calculate a position. With TOA a accurate clock and three satellites are needed. With TDAO 4 satelites are needed to give three independen surfaces which make it possible to calculate a postion. Because an accurate clock is not available when swithing on a gpsreceiver, the gpsreceiver has to receive 4 satelites before it can calculate it's position.

WORK IN PROGRESS, WORK IN PROGRESS, BELOW ARE PARTS OF THE DISCUSSION ABOUT gps.


 * The fourth satellite is needed because the GPS receiver initially does not have a usable clock for the positioning. For positioning three intersecting surfaces are needed. Without a good clock one satellite does not provide such a surface. But a pair of satellites does provide a surface. This surface is defined by the TDOA. All points in the surface have the same Time Difference Off Arrival of the two satellite signals they do not form a sphere but a hyperboloid. Three independed surfaces are needed, 4 satellites will give three independend surfaces which makes it possible to calculate a position. If the GPS receiver has enough information to calculate it's position it can set it's clock knowing the distance from one of the satellites and the TOA of the signal. After the clock is set the GPS receiver can use TOA with three satellites to calculate it's position. Depending on the clocks accuracy, it needs the signal of the fourth satellite to get the clock set correctly once in a while. Clock drift of 1 second a year will give a shift of 10 meters a second. The not corrected clock drift on my GPS is more than a second each week. The GPS receiver will not be able to distinguise between clock drift and movement of the receiver. So it needs to adjust the clock quite often and therefore the signal of four satellites.Crazy Software Productions 17:11, 12 June 2007 (UTC)

If the calculation is done with surfaces it can be that there is a solution for a set off points. Calculating with three spheres give two points (x1, y1 and z1). One of the points will be very instable and can therefore easely be discarded. If the calculations is done with TDOA, this can result in two points where the time is different. (x1, y1, z1 and t1 for one point and (x2, y2, z2 and t2)

To calculate the position or a point in 3D space can be donewith three surfaces. For positioning in space three surfacTo calculate a position in 3D surfaces can be used. Three intersecting surfaces are needed. These can be plains, spheres or other shapes. The surface of the earth for example is used in what is called 2D calculations. If the suface of the earth (or a know hight) is used only two additional surfaces are needed.

TOA Time Of Arrival If the arrival time (TOA) of a satellite defines one surface, a sphere. So three satellites define three surfaces. But this requires that the GPS receiver has absolute time. Which is often not the case.

TDAO Time difference of Arrial The time difference of the signal of two satellites defines also a surface. All points in space that receive the same time difference of arrival of two satellites form a hyperboloid. (A 3D version of a hyperbole). Three of these surfaces can be used to calculate a position. Or two plus the surface of the earth can be used.

In absence of absolute time, for example when switchin on the GPS receiver

To get a positional fix in 3D space at least 3 surfaces are needed. (This could be length, width and higth). Initialy the clock of a GPS receiver can not be used. The GPS receiver does not know the time and therefore can not determine the distance to the first satellite.


 * 1 satellite, no positional information.
 * 2 satellites, 1 TDAO difference (1 surface).
 * 3 satellites, 2 independed TDAO's (2 surfaces)
 * 3 satellites, 2 independed TDAO's, plus the a know hight (or the earth surface) (3 surfaces)
 * 4 satellites, 3 independed TDAO's (3 surfaces)

For 3D positioning 4 satellites are needed.

A difference in delaytime of two satellites does not determine a phere where we are but a hyperboloid (in 3D) or a hyperbole (in 2D). The intersection of 2 hyperboloids determines an arc in 3D space where we are. The intersection of 3 hyperboloids determine a point in 3D space. (Exactly: could determine 2 points) See "Multilateration also known as hyperbolic positioning".

For 2D positioning 3 satellites are needed.

With the informaton of 3 satellites an arc of the intersection of twee hyperboloids can be determinded. This arc will probably intersect with two points on the surface of the earth. One of those points will be very unstable, so it's easy to determine the correct point on the surface of teh earth.

De clock.

Only after the GPS receiver has determined it's position it is possible the set or correct the time on the clock of the GPS receiver. Once the clock is corrected it can be used (for a short interval) als one of the parameters to determine the time, so a satellite less is needed. But a clockdrift of 1 meter for each second is not exceptional, so after a minute the clockdrift can be as much as 60 meters.


 * Small note: this assumes an imprecise clock, such as a crystal, which I will grant is completely normal today. However a more stable clock, such as a miniature atomic clock, invalidates much of this concern; and miniaturized atomic clocks for GPS receivers are something that is being pursued in the research community where they have working prototypes right now. - Davandron | Talk 12:44, 6 June 2007 (UTC)

Position with a single satellite.

With a stationaire GPS receiver containing an extreem accurate clock, given the time, the GPS receiver could calculate it's postion with the information of only one satellite. Because satellites are moving all the time, four different positions of one satellite will be enough to determine a position. The four positions of the one satellite should be fairly different though.

The usual explanation of first determining the distance from a set of satellites and than calculate the postition of intersecting spheres is not correct. Although spheres can be used in the calculating process, the position of the GPS receiver is determined by the intersecting hyperboloids. Crazy Software Productions 13:31, 6 June 2007 (UTC)


 * Any refs for this? At a first glance it seems to contradict the usual (published) explanations of GPS positioning. Especially that a position is needed before clock correction is made (they are usually described as being done at the same time). That 4 satellites is needed: in theory yes, but for the practical matter of recievers on earth the ambiguity can be resolved, and only 3 satellites are typically needed. The GPS system is typically not described as using multilateration, but instead as using absolute TOA measurements. Mossig 12:42, 6 June 2007


 * The signal of the gps satellite itself is a time stable signal; you don't need to have position to determine relative time (meaning, a signal that pulses at 1 pulse per second or whatever), however, since you don't know how far the signal traveled you can't know absolute time until you know your position. You can know the current time to within 6 seconds (one frame) without locking onto more than one satellite, but anything more accurate requires a position fix. - Davandron | Talk 12:49, 6 June 2007 (UTC)
 * Exactly. I can make an guess of my position based on my unaccurate clock. The signals from multiple satellites (4) will then only coincide with a position on the earth surface (or near it) when I have adjusted my clock to the correct time. And at the same time I get my position. This method does still not use multilateration. Mossig 13:16, 6 June 2007 (UTC)
 * If you are earthbound, just saying you are on earth is more accurate than a accurate time within 6 seconds, 6 seconds is about 1.8E9 meters of. Question if not earthbound how do you know that you are only 6 seconds off. If earthbound you are far less of than 6 seconds off with reception of one satelite.
 * I concure with "you can't know absolute time until you know your position". So position has te be calculated first. Mathematically if two points send a signal at a same time, and you receive them on different times, this same difference in time would occure on any position on a virtual hyperboloide in 3d Space. As a receiver of the signals without extra information you can determine that you are at a point somewhere on the hyperboloide, but you cannot determine where.
 * With 3 satelites you can determine where you are on a intersection of two hyperboloides (an arc) but can not determine where you are on the arc. (If you are on the earth you can determine where you are on the arc in two points, one point being so unstable that you can easily determine which point is correct).
 * Calculations can be done with spheres, but your position is still on one, two or three (intersecting) hyperboloides. This is not because of design, but because of mathematics.
 * Guesses based on an unaccurate clock, will place you within an sphere. But the satelite signals will place you in a point on the hyperboloide intersects.Crazy Software Productions 13:47, 6 June 2007 (UTC)
 * With 4 satellites you will get an unique point if you have an accurate clock. Of not, you will get a discrepancy, as you get surfaces that do not intersect in one point. By adjusting your clock you can get the spherical surfaces to inteserct in one point, and at this instant you will both have an accurate position and an accurate clock. Mossig 21:36, 6 June 2007 (UTC)
 * Additional, just did a small test with a GPS receiver, I had not used the GPS receiver for a few days. The clock was off something between .7 en 1.3 seconds. This was the time difference between switching on indoors and after getting an accurate fix. 1 second off is about 3E8 meters, so getting a position based on this would me put just within moon distance of the earth. So for positioning this doesn't give me an accurate position. The clock is therefore completely useless untill you get a more accurate position to get the clock corrected.Crazy Software Productions 14:13, 6 June 2007 (UTC)


 * Stepping back a second, Crazy I'm having a hard time understanding what exactly are you looking to change in the article? - Davandron | Talk 23:33, 6 June 2007 (UTC)

New archive: January 2007
I've moved all the content last commented on in January to a new archive. - Davandron | Talk 23:50, 6 June 2007 (UTC)

Four satellites needed?
Don't know if this is worth an edit, but concerning "When four satellites are measured simultaneously, the intersection of the four imaginary spheres reveals the location of the receiver.", three satellites give two possible locations, and if one is in outer space or is moving faster than the fastest known aircraft while the other is in a fixed position on the surface of the earth, it's pretty clear which is the real location. I suspect that there is no possible combination of three satellite positions that puts both points on the surface of the earth and all three satellites above the surface of the earth. Guymacon 15:24, 7 June 2007 (UTC)


 * You're correct; if you assume you're on or near the surface of the Earth, that surface becomes your fourth sphere. With a poor geometry your two solutions could also be just above and just below the Earth's surface so you'd need the 4th to correctly know your altitude. Also, there is talk about needing a fourth signal to significantly improve error detection and clock correction. - Davandron | Talk 04:11, 8 June 2007 (UTC)


 * With TOA (a good clock in the GPSreceiver) and a reception of three satelites, the three satellites will all three be above the horizon and forming a plain. There are then two solutions for your location, your actual location and the your actual location mirrored in the plain of the three satellites. Because that plain is always (far) above you, the other solution is also very far above you, beyond the plain of the satelites. This solution is far removed from the eath surface and can for normal usage be eliminated as a correct point. So a fourth satellite is not needed to eliminate this point. (The point is also traveling very fast and can therefore be eliminated as well). A poor geometry would require that you are within a few miles from the plain of the three satellites, even in a high altitude plane or on a high mountain, the likelyhood of receiving three signals of satellites on the horizon and no other signals is so small that you do not have to account for these situations. (All three satelites have to be on the horizon for such a geometry)
 * The fourth satellite is needed because the GPS receiver initially does not have a usable clock for the positioning. For positioning three intersecting surfaces are needed. Without a good clock one satellite does not provide such a surface. But a pair of satellites does provide a surface. This surface is defined by the TDOA. All points in the surface have the same Time Difference Off Arrival of the two satellite signals they do not form a sphere but a hyperboloid. Three independed surfaces are needed, 4 satellites will give three independend surfaces which makes it possible to calculate a position. If the GPS receiver has enough information to calculate it's position it can set it's clock knowing the distance from one of the satellites and the TOA of the signal. After the clock is set the GPS receiver can use TOA with three satellites to calculate it's position. Depending on the clocks accuracy, it needs the signal of the fourth satellite to get the clock set correctly once in a while. Clock drift of 1 second a year will give a shift of 10 meters a second. The not corrected clock drift on my GPS is more than a second each week. The GPS receiver will not be able to distinguise between clock drift and movement of the receiver. So it needs to adjust the clock quite often and therefore the signal of four satellites.Crazy Software Productions 17:11, 12 June 2007 (UTC)

First thanks for introducing the concept of surfaces. This can be used for a better explanation. 3 independend surfaces are needed to yield a fix. (For second point see further on) The shapes of the three surfaces can vary, so three (independend) planes will give you a fix. Three spheres will give you a fix. Or three Hyperboloides will give you a fix. But three squares or other shapes would give you a fix as well. The surfaces can be combined as well. For example two hyperboloides and a sphere (earthsurface) wil give you a fix. -- One satellite on it's own AND a corrected clock will give you a surface. (Sphere). -- One satellite on it's own AND NO corrected clock (a GPS just switched on for example) will not give you one surface. This is the point I am trying to make. --Two satellites will give you one surface. Not a sphere but a hyperboloid. Time Difference of Arrival (TDOA) is the same on all points of the hyperboloid. Three surfaces are needed to get the fix, so three independend surfaces will be needed, to get three independen surfaces we need 3 independend satellite pairs. To get three independend satelite pairs you need four satelites. The intersection of two hyperboloids will yield a closed arc. (I would guess an elips but do not know this). An extra hyperboloid intersecting the arc will yield two point. Two points. I think that even with four satellites, there are actually 2 solutions (x/y/z/time) which is consistent with the information of the four satellites. (This then is also true for the four spheres around the satelites, there is a second point with a different time which yields a correct solution). But the second point is far removed from where we actually are (far above the earth surface) and is moving at an incredable speed, so it's easy to discard this point. I have no prove for the existence of this second point with four satelites. Also I am still not sure if there actually is a second point. Remark, this second point has not only a different location but also a different time, for which te solution holds. For this second point probably any of the 4 parameters of the point can be used to discard this point. The x, y, z and the time as well can be very far removed from the other point. But I do not want to introduce this second point into the discussion. Because in all the models this is a very unstable point. Far removed from the earth and moving fast. (For the 2D model it is on the earth surface, but is still moving fast). So to eliminate this second point we do not need an extra satellite. (Although a second positioning is needed to discard the second point). I do not consider the second point an issue. In short. (I ignore that there are solutions with two points, I still call this a fix.) Step 1 : Three surfaces are needed to get a fix. Step 2 : One single satellite does NOT provide a surface. Step 3 : Two satellites provide a hyperboloid surface, where each point on the surface has the same TDOA. Step 4 : Three satellites provide only 2 independend hyperboloids. (there are only 2 independend TDOA parameters). Step 5 : The intersection of the 2 independend hyperboloids yields an closed arc. Step 6 : An intersection of the earth or an independend hyperboloid *) with the arc yields a fix (one or two points). Step 7 : After getting a fix, the clock of the GPS can be adjusted to the correct time. At the moment I am trying to intergrate the concept "surface" with my original writings. Thanks for showing me the way. Your comment would be appreciated by me. Crazy Software Productions 14:18, 8 June 2007 (UTC) Retrieved from "http://en.wikipedia.org/wiki/User_talk:Davandron"
 * )Adding a satellite gives one extra independend TDOA parameter and therefore gives only one extra independend hyporboloid. If the difference.