I have a question on the GPS positioning algorithm. In all books I've read for 3D positioning we need four satellites, and I don't understand why.

We need to calculate three variables: x, y, z. We know when satellite send the signal to earth and when we receive it we can measure the time the signal travel to earth by checking the shift in PRN generator. For what purpose do we need four satellite?

  • 1
    We do NOT need to calculate x, y, and z. We need to calculate x, y, z and time. See @starblue s answer for why. Nov 18, 2017 at 16:12

9 Answers 9


Just a graphic to add to M'vy's answer.

From Geocommons:

enter image description here

This is a high-tech version of triangulation, called trilateration. The first satellite locates you somewhere on a sphere (top left of Figure). The second satellite narrows your location to a circle created by the intersection of the two satellite spheres (top right). The third satellite reduces the choice to two possible points (bottom left). Finally, the forth satellite helps calculate a timing and location correction and selects one of the remaining two points as your position (bottom right).


As R.K. points out, this is not a form of triangulation. Even when GPS is leveraging more than 4 satellites, it is still doing trilateration, as opposed to multilateration, which GPS does not use.

Multilateration should not be confused with trilateration, which uses distances or absolute measurements of time-of-flight from three or more sites, or with triangulation, which uses the measurement of absolute angles. Both of these systems are also commonly used with radio navigation systems; trilateration is the basis of GPS.

  • 3
    +1 Nice graphic. I have an issue with the quoted text though. Trilateration is not a high-tech version of triangulation. It's a totally different beast.
    – R.K.
    Nov 14, 2012 at 14:23
  • 1
    cool graphic @kirk Nov 14, 2012 at 20:21
  • 11
    I think this answer is technically incorrect. For GPS to work, your receiver generates the same codes the satellites generate, and it compares the one generated with the one received in order to compute the time difference, and hence distance from the satellite. For this to work you need to know TIME. (An aside, GPS time is very, very precise.) The minimum number of satellites required to work out your position is 4, because you're solving for X, Y, Z and TIME. YOu do get an ambiguous position, either on the Earth's surface or up in space, you can trivially dismiss one of these.
    – Alex Leith
    Apr 2, 2014 at 0:57
  • 2
    Agreed with @AlexLeith. Though so far this answer is still the most helpful, it is still technically wrong. If you have an accurate clock, you only need three satellites. The fourth satellite is required if you don't have an accurate clock.
    – zaTricky
    Aug 16, 2016 at 11:25
  • 2
    This answer down plays the real reason you need a 4th satellite in favor of the bad reason you need a 4th satellite. The fourth satellite is needed for time, not picking one of two positions (one far out in space). @zaTricky and Leith are correct. As written, this answer is misleading at best. Nov 18, 2017 at 16:03

The major reasons why you need a fourth satellite is for timing corrections. If you know the exact position and speed of the satellites, trilateration will give you indeed 2 points, but one will usually be impossible or with an impossible speed. But a gps receiver uses the time it takes to receive a sattelite signal to determine the distance to that satellite. Even minor errors in the time of your gps receiver will cause huge errors and therefore a large uncertainty band when you have only three satellites.


You need four satellites because each data from one satellite put you in a sphere around the satellite. By computing the intersections you can narrow the possibilities to a single point.

Two satellites intersection places you on a circle. (all points possible)

Three satellites intersection places you on two possible points.

The last satellite give you the exact location.

You can avoid using four satellite if you already know the altitude, for example when you drive, you can use the ground level as the last intersection. But you can't possibly do this in a plane, since you are not bound to the ground.

  • ground level also varies in height, in the extreme cases by about as much as a plane, so how is altitude of ground level known?
    – jk.
    Jul 31, 2011 at 11:09
  • @jk if you have a driving map on your GPS device, it knows the ground level located near the two solutions you have. One should definitely be better than the other.
    – M'vy
    Jul 31, 2011 at 13:13
  • 3
    This is wrong. The 4th satellite is needed for timing. A cell phone does not have an on board clock with the atomic accuracy needed for GPS to work. The fourth satellite allows you to sole a linear set of equations for x, y,z, and t simultaneously. You ARE correct that assuming on the surface of the earth can sometimes let you eliminate an equation bit the spheres/location example is wrong. Nov 18, 2017 at 16:08

You actually need to determine four coordinates from the satellites, x, y, z, and t, the time.

You cannot use the clock inside the device, because it is much too inaccurate. It is generated by a quartz crystal, while for the desired precision of a few meters you'd need an atomic clock, like those used in the satellites.

  • You need four satellites to determine the 3D position, in the same way that you need at least three points to determine a third point on a plane, given only distances. Once you have the position, you only need one satellite to determine the time.
    – naught101
    Dec 9, 2012 at 5:29
  • 2
    As @starblue is hinting at, you cannot determine the position without the time, thus your logic is backward.
    – zaTricky
    Oct 17, 2016 at 19:14
  • Yes, since the satellites are moving relative to each other and to the point of interest, and the transmissions are not 'simultaneous', you need to solve for time simultaneously with the position coordinates.
    – Dave X
    Jan 2, 2018 at 17:04

>>3 satellites would be enough

Global positioning system(s) assume an 'earth centered, earth fixed, x-y-z 3D cartesian coordinate system'. Any location in this 3D space requires no more than 3 components to be completely identified. So, even though 3 spheres we obtain by 3 distance measurements intersect at two different points, one of those points is rendered useless by [ earth centered + earth fixed ] characteristic of the coordinate system GPS assumes; we are interested in locations below the earth's atmosphere. 3 satellites could be used to determine 3 position dimensions with a 'perfect' receiver clock (with an expensive atomic/optical clock).

!YES!, you !could have gotten! a 3D position fix with 3 satellites IF the GPS receiver you are using was equipped with an atomic clock. (The ELIMINATION of the second point, on the bottom left figure of the illustration above, is done "intuitively" as it corresponds to someplace in DEEP SPACE. BECAUSE, there is a reason why GPS satellites are at their specific constellation (~their setup in the sky): !more than! 24 GPS satellites, on 6 orbital planes that are ~20,000 kms above you, and 4 satellites on each plane, 60 degrees between these planes, and 55 degrees inclination with respect to equatorial plane, GIVES YOU 5-8 satellites that you can "connect to" from (almost) any place on earth, and 3 SATELLITES TO GIVE A 3D POSITIONAL FIX ON EARTH. If we are talking about locating things "inside AND outside" of earth, WELL THEN YES, you need at least 1 more satellite to eliminate one of two possible intersection points in the last step. This wasn't the question, was it?

In practice, placing expensive clocks in GPS receivers is rarely possible/feasible and 3 space vehicles (SVs, i.e. satellites) can be, instead, used to compute a 2D, horizontal fix (in latitude and longitude) when a certain height (e.g. z-dimension) measurement is ASSUMED; so you get rid of 1 dimensional measurement out of 4 that were originally required. Assumed height can be either the sea level or the altitude of a (normally) altimeter equipped aircraft.

It is the height dimension that is chosen to be discarded, because it is the (relatively) least important one among others. Among the 4 required dimensional mesaurements (x,y,z,time), time always needs to be resolved BECAUSE satellite signals (electromagnetic waves) travel at the speed of light and reach receiver in ~0.07 atomic seconds; and thus, a slight inaccuracy in the GPS receiver's relatively cheap internal clock would give a "very wrong" locational fix because of the extra distance the signal is assumed to travel at the extreme speed of light. And, well, the other two dimensions will place the GPS receiver on some (longitude,latitude) pair on the surface of the planet.

More than 4 satellites provide better accuracy by introducing additional 'time difference pairs'. 4 dimensional requirements remain, yet number of independent equations increase and exceed 4. This will result in an over determined system of equations with multiple solutions. Over determined systems are !approximated! with numeric methods, e.g. least squares. In this case, the least squares method will give the position (of GPS receiver) that best fits all of the time measurements (with extra dimensions) by minimizing the sum of the squares of errors.

(1) Global Positioning System Overview, Peter H. Dana, Department of Geography, University of Texas at Austin, 1994.
(The Master GPS Control facility is located in Colorado, Schriever Air Force Base)

(2) Position Determination with GPS,Dr. Anja Koehne, Michael Wößner,Öko-Institut (Institute for Applied Ecology),Freiburg im Breisgau, Germany

(3) An Underdetermined Linear System for GPS, Dan Kalman

(4) For the colorful illustrations

>> INaccuracy

" Four sphere surfaces typically do NOT intersect. Because of this we can say with confidence that when we solve the navigation equations to find an intersection, this solution gives us the position of the receiver along with accurate time thereby eliminating the need for a very large, expensive, and power hungry clock. "

It says "typically" BECAUSE the measurements are Inaccurate; otherwise they would intersect at exactly one point. From 4 satellites, you get 4 Inaccurate distance measurements. INaccuracy in all these 4 measurements are SAME (=in the same amount) BECAUSE satellites use atomic clocks which keeps them perfectly synchronized among themselves (and accurate with respect to GPS time scale), additionally, the INaccurate clock in the measurements remain the same too, because we are talking about one particular GPS receiver. Since accurate and INaccurate clocks, and thus the INaccuracy, is constant in our measurements, there can be only one correction value that reduces the volume of intersection of 4 spheres to a single point of intersection. That value represents the time INaccuracy.

(5) The UTC clock is currently (2012-11-14) 16 seconds behind the GPS clock.

(6) How a GPS Receiver Locks, Thomas A. Clark, NASA's Goddard Space Flight Center

(7) How Accurate is a Radio Controlled Clock?, Michael A Lombardi, NIST-Time and Frequency Division, Maryland

  • Thank you for these clarifications. Welcome to our site! (BTW, one least squares method is described and illustrated in a reply at gis.stackexchange.com/a/40678. Although the context is 2D positioning, the solution applies to any number of dimensions.)
    – whuber
    Nov 14, 2012 at 13:17
  • Wow. The readability of this answer would be much improved if the crazy formatting and capitalisation was removed. I'm a bit scared to attempt it myself though..
    – naught101
    Dec 9, 2012 at 5:31
  • yo>>ur !answer! I$ *very# difFicul! t0 read...
    – user541686
    Oct 17, 2014 at 5:22

All this talk of "intersecting spheres" cannot possibly be true. Here's why.

  1. When you receive the signal from one satellite you know where it is because that information was transmitted in the message and also precisely at what time it was sent. In the GPS system all the atomic clocks are kept in sync via control signals from the ground to an accuracy of plus of minus 3 nanoseconds. But you can't compute YOUR distance to the satellite, and hence the sphere, because your local time is not the same. If local time is out of sync with satellite time by just 1 millisecond, because light travels at 299,792,458 metres per second, this translates to a distance error of about 300 kilometres!
  2. With two satellites you can compute the RELATIVE distance from the two satellites by computing the differences between the transmission times of the two messages, and local time. So you can plot your position along a hyperboloid in three dimensions. The surface of the hyperboloid describes all the positions in space where the two time differences make sense and where you could be.
  3. With three satellites you can compute TWO hyperboloids. Their intersection is a hyperbola. You can be anywhere along it.
  4. With four satellites you can compute the intersection of THREE hyperboloids, and derive your position in space, discounting the effects of atmospheric delay.

To consider atmospheric delay you need to compare the delays of two signals sent at different frequencies from the same satellite or compare the readings of the same signal seen from two different locations ("differential GPS"). Modern GPS systems correlate the two encrypted military signals at frequencies L1 and L2 to obtain this information.

  • 2
    I'm having trouble understanding your statement: All this talk of "intersecting spheres" cannot possibly be true Which Part of the statement do you an issue with? The sphere part? or something else? Apr 2, 2014 at 3:39

The fourth satellite is there just to increase accuracy to a point where it would be useable. Although, with 3D Trilateration this is not necessary to calculate a location. GPS although requires this because of the accuracy issue.

3-D Trilateration


Some of the answers are close, but not entirely clear.

While I was part of a 3 man team which spent 2 years in the early 90's developing the first non-military differential GPS stations in the South West of England, we came across some extra-ordinary questions. 3 or 4 being one of them.

To explain this, it is best to start with a terrestrial radio navigation system. Take one signal from a fixed known point (Station#1) on the beach and beam it at a ship at sea. The ship knows for how long the beam has been traveling and the exact location of Station#1 - it knows this because the time the beam left the fixed point is imprinted on the transmitted signal - e.g (started at 'A'seconds and was received at 'B'seconds) - therefore, given the speed of light (C) of radio waves the ship must be (B-A) X C from the Station#1 - this answer is Range1.

Take another known point Station2 from which started a signal at the same time 'A'seconds - but Station2 is on a different known point which gives Range2. From Range2 you know that your ship lies along Range1.

Do the same with a 3rd Station and you get an intersection of all 3 Ranges. But they do not intersect perfectly ... ever !

This is due to atmospherics, interference, propagation delays which affect all radio waves. The intersections of the 3 ranges give you a triangle of error (hence triangulation) on a 2 dimensional plane (X and Y - LAT AND LON or Northing and Easting). Now, in order to get your elevation (H) you require a fourth Range (you guessed it - Range4) which will give you a 3Dimensional location - X Y and Z - LAT LON and Height.

Now take all of your Stations and stick them in Space as GPS and your ship is positioned somewhere inside a 4 sided 3D triangle of error which is slightly curved on all sides.


Answer is here :(in 2D you need 2 hyperbola(3 satelites) in 3D you need 3 hyperboloid(4 satelites) Desmond Schmidt is right)


... sorry it is in slovak language (my english is bad), but pictures and little calculation explain everything, an you can use Google translator.


Not the answer you're looking for? Browse other questions tagged or ask your own question.