Jump to content

Calculating a position


Køkkenchefen

Recommended Posts

Perhaps a better place for this question in the GPS forums, but;

 

3 satellites will give you an approximate position, unless you use a Magellan which will remain un-located uintil 4 are acquired.

 

4 satellites will resolve the timing inaccuracies and give you your position but with limited vertical accuracy.

 

5++ satellites will give you your position with as good an accuracy as possible depending on the positions of the satellites.

 

I've had 11 satellites show bars on my Magellan and one WAAS satellite (the other East Coast one is currently dead), and my GPS still said my EPE (Estimated Position Error) was 3, yards that is. I don't think I have ever seen a 2.

Link to comment

The number of sats available at any given location is only part of the accuracy problem. The position of the sats relative to your location, strength of signal and signals bounced off nearby objects greatly effect your HDOP (Horizontal Dilution of Precision). Before geocaching was invented, I used a $5000 4 lb. GPS collecting a GIS database for my employer. We used DGPS to determine positions within 2 feet 90% of the time.

The property corners were taken with 3-3 minute averaged waypoints. The downloaded data was differentially corrected using data from CORS data from base stations with precise location.

We had limits on the DOPS and "residual" for acceptance of a property corner. There were a few times I had to return to a corner later for additional waypoints when the sats were in a better position or there were more of them available.

Link to comment

Put the GPS down and let her sit for 15 minutes and watch the accuracy get better. You will get different results on different days, different places, but almost always bad in the holler, good on the ridge. Don't get in a hurry to mark anything important - let her sit a spell and lock at will. It changes its mind alot and will finally settle down to a nice combination of sats. Tomorow it will be a little different. Cloudy days vary alot - sometimes great sometimes pitiful.

Link to comment

Trilateration is involved.

 

In 3 Dimmensions:

Known distance from one location = any where on a sphere : infinite points

Known distance from two locations= points where the spheres intersection (a circle or single point) : infinite points

Known distance from three locations= points where a sphere intersects a circle): one or two points

Known distance from four locations= points where a fourth sphere intersects one of the two possible points: one point

 

So the GPS can guess from 3 satellites since one point is fairly stationary and the other incorrect position will be moving at an incedibly fast speed out into space. With four satellites, you'll get a fairly stable and accurate position lock.

 

I did some research on the altitude aspect, and increased satellite coverage doesn't necessarily increase the altitude accuracy. Altimeters either work on barometric pressure or by using trilateral computations. We already know that the GPS can be off on trilateral computations by 30-50 feet. The barometric altimeter will give fairly accurate readings if it is properly calibrated DAILY from a known altitude.

 

When talking with a Garmin tech a couple of years ago, he made a statement that makes a lot of sense to me:

 

For the unit to best determine altitude just from the computations, it needs the sats dispersed in as wide of a constellation as possible, closest to the horizon. However, positioning the sats at the horizon increases atmospheric disturbances that distort the signal as well. So those calculations acutally become distorted from the sats that will be giving you the best possible information.

 

Don't rely on the calculated altimeter unless you're using a barometric altimeter that's been calibrated.

 

 

Ummm, what was the question again?

 

Oh yea - four sats

Link to comment

Known distance from one location = any where on a sphere : infinite points

Known distance from two locations= points where the spheres intersection (a circle or single point) : infinite points

Known distance from three locations= points where a sphere intersects a circle): one or two points

Known distance from four locations= points where a fourth sphere intersects one of the two possible points: one point

 

So the GPS can guess from 3 satellites since one point is fairly stationary and the other incorrect position will be moving at an incedibly fast speed out into space. With four satellites, you'll get a fairly stable and accurate position lock.

That's not quite it. The problem is that you don't have a known distance. For each of your known distances you have an unknown time offset added to it. Time is the fourth unknown that necessitates a fourth measurement.

 

With three satellites, you can get an inaccurate position by assuming that your height hasn't changed since the last time you calculated position. That reduces it to three unknowns, so three satellites are sufficient. But if you're a few hundred meters higher than you were the last time you got a position, your 3-satellite 2-d position is going to be pretty bad.

Link to comment

Years ago I read that on a Gps with 12 channel’s only 5 was used to calculate the position.

Some one who knows the facts?

Years ago, because of limited computing power, that might have been true. As others have stated you need a minimum of 4 spheres to cacluate a position in space, and the 5th gives a basic error check. So the receivers locked on the best 5 signals and discarded the rest. Better modern receivers use ALL available signals to further refine the position.

 

You can get a 2D lock (no altitude info) using 3 satelites because most units can use the surface of the earth itself as the 4th "sphere". And yes, I know the earth is not a true sphere.

Link to comment

That's not quite it. The problem is that you don't have a known distance. For each of your known distances you have an unknown time offset added to it. Time is the fourth unknown that necessitates a fourth measurement.

Really? If you know the location of a satellite, and you know the exact time the transmission commenced (atomic clocks in the sats) and you know the time lag, and you know the approximate speed of the signal - you should know a fairly accurate distance from the satellite, right?

 

If you have a motorcyle moving at precisely 20 mph and it starts from a known position and travels 2 minutes, you should know that it travelled precisely 2/3 miles. Fixed location, known speed, known travel time should equal known distance traveled.

 

Admittedly, there are variances for atmospheric conditions, but I don't think that the unknown time offset is what is necessitating the fourth measurement.

Link to comment

Really? If you know the location of a satellite, and you know the exact time the transmission commenced (atomic clocks in the sats) and you know the time lag, and you know the approximate speed of the signal - you should know a fairly accurate distance from the satellite, right?

 

Just for fun, and to give you something to markwell the next time this comes up -

 

Each Block II/IIA satellite contains two cesium (Cs) and two rubidium (Rb) atomic clocks. Each Block IIR satellite contains three Rb atomic clocks.

 

GPS time is not adjusted and therefore is offset from UTC by an integer number of seconds, due to the insertion of leap seconds. The number remains constant until the next leap second occurs. This offset is also given in the navigation (NAV) message and your receiver should apply the correction automatically. The last time I checked, the offset was satellites being 14 seconds ahead of UTC.

 

(my personal theory is that relativity kicks in an causes nanosecond deviations over time, too, but no one will listen to me when I postulate such babble)

Edited by Jeep_Dog
Link to comment

That's not quite it. The problem is that you don't have a known distance. For each of your known distances you have an unknown time offset added to it. Time is the fourth unknown that necessitates a fourth measurement.

Really? If you know the location of a satellite, and you know the exact time the transmission commenced (atomic clocks in the sats) and you know the time lag, and you know the approximate speed of the signal - you should know a fairly accurate distance from the satellite, right?

 

If you have a motorcyle moving at precisely 20 mph and it starts from a known position and travels 2 minutes, you should know that it travelled precisely 2/3 miles. Fixed location, known speed, known travel time should equal known distance traveled.

 

Admittedly, there are variances for atmospheric conditions, but I don't think that the unknown time offset is what is necessitating the fourth measurement.

Link to comment

That's not quite it. The problem is that you don't have a known distance. For each of your known distances you have an unknown time offset added to it. Time is the fourth unknown that necessitates a fourth measurement.

Really? If you know the location of a satellite, and you know the exact time the transmission commenced (atomic clocks in the sats) and you know the time lag, and you know the approximate speed of the signal - you should know a fairly accurate distance from the satellite, right?

 

If you have a motorcyle moving at precisely 20 mph and it starts from a known position and travels 2 minutes, you should know that it travelled precisely 2/3 miles. Fixed location, known speed, known travel time should equal known distance traveled.

 

Admittedly, there are variances for atmospheric conditions, but I don't think that the unknown time offset is what is necessitating the fourth measurement.

The problem is your GPSr unit doesn't have an atomic clock like the satellite. (Well your's might but mine doesn't) Therefore you don't know the time lag for the signal to get from the satellite to your unit. There are four unknowns to solve for: your position in 3 dimensions (x, y, z) and the accurate time at your unit when you got the signal (t). For each satellite you get one equation:

 

c(t'-t) = √[(x' - x)²+(y' - y)²+(z' - z)²]

 

You need four equations to solve for four unknowns. Some units will solve with three satellites by assuming you are at known altitude (or more simply at a know distance from the center of the Earth in order to get the fourth equation:

 

r = √[x²+ y²+z²]

Link to comment

tozainamboku came in while I was typing, but here's my post anyway

 

Really? If you know the location of a satellite, and you know the exact time the transmission commenced (atomic clocks in the sats) and you know the time lag, and you know the approximate speed of the signal - you should know a fairly accurate distance from the satellite, right?

True. But in order to know the time lag, you need not only a precise time the signal left the satellite (which you calculate from the NAV message and the code phase) but also a precise time you received the signal. The receiver clock offset is what you need to solve.

 

The clock in your receiver that keeps track of time while it's turned off is really no better than a cheap digital watch. Say it loses one second after being off for a day. That means that your time of reception, and therefore your time lag and range, is off by 300,000 meters. Each nanosecond of clock error is a foot of range error. Even just going through a tunnel for a few seconds, the crummy little crystal oscillator in your GPSr is going to drift enough to be not very good for positioning.

 

You can make a receiver that's hooked up to an atomic clock or even just a high quality ovenized crystal oscillator to keep track of your receiver time better, but that's bulky and expensive. But that's the beauty of GPS. You don't need a good clock because you can just calculate the time.

If you have a motorcyle moving at precisely 20 mph and it starts from a known position and travels 2 minutes, you should know that it travelled precisely 2/3 miles. Fixed location, known speed, known travel time should equal known distance traveled.
So in this example, there's an accurate clock at the starting position at mile marker 35 and the guy on the motorcycle wrote down the time as he passed it, say 3:52. When he gets to you, you look at the time on your sundial which says 4:15. So you don't know the real distance he traveled, just some erroneous "pseudo" distance: 23 minutes * 1/3 milesperminute = 7 2/3 miles.

 

But another 20 mph motorcycle is coming from the other direction on the road and arrives at the same time. It started at mile marker 36 at 3:53. So you think that distance is 22 * 1/3 = 7 1/3 miles.

 

You don't know yet that your are actually on the 2/3 mile point between these to motorcycle start points. What you do know is that you live in a one dimensional universe (a road) and that

35 + 7 2/3 + ClockError = WhereIAm

and

36 - 7 1/3 - ClockError = WhereIAm

(The sign change is necessary because it's going the other direction. Sorry this is a bit hand-wavy, but you can see that any travel time going in that direction should be making the mile markers lower. Same with ClockError; bigger ClockError will make the mile marker bigger for the first motorcycle and lower for the second.)

 

So two equations and two unknowns. A little algebra and you have 2*ClockError = 36 - 7 1/3 - 35 - 7 2/3, or ClockError = -7 minutes. Plug that back into either equation and you have WhereIAm = 35 2/3. Hooray!

 

And you also now know that the precise time when the motorcycles arrived was 3:54. Woohoo!

Admittedly, there are variances for atmospheric conditions, but I don't think that the unknown time offset is what is necessitating the fourth measurement.

It's the same idea in 3-d, but the math gets harder.

 

(x,y,z) = my position (unknown)

(xn,yn,zn) = position of satellite n (known)

Pn = pseudorange to satellite n (measured bad distance affected by clock error)

c = receiver clock error (unknown)

en = other errors: atmospheric delay, satellite clock and orbit errors, multipath, etc. (estimated)

 

So for four satellites you have

P1 = squareroot( (x-x1)^2 + (y-y1)^2 + (z-z1)^2 ) + c + e1

P2 = squareroot( (x-x2)^2 + (y-y2)^2 + (z-z2)^2 ) + c + e2

P3 = squareroot( (x-x3)^2 + (y-y3)^2 + (z-z3)^2 ) + c + e3

P4 = squareroot( (x-x4)^2 + (y-y4)^2 + (z-z4)^2 ) + c + e4

and you can solve for your four uknowns: x,y,z, and c.

 

With more satellites you can average out the other errors better. Where WAAS helps is getting better estimates of some of these errors.

Edited by GPSlug
Link to comment

The problem is your GPSr unit doesn't have an atomic clock like the satellite. (Well your's might but mine doesn't) Therefore you don't know the time lag for the signal to get from the satellite to your unit. There are four unknowns to solve for: your position in 3 dimensions (x, y, z) and the accurate time at your unit when you got the signal (t). For each satellite you get one equation:

 

c(t'-t) = √[(x' - x)²+(y' - y)²+(z' - z)²]

 

You need four equations to solve for four unknowns. Some units will solve with three satellites by assuming you are at known altitude (or more simply at a know distance from the center of the Earth in order to get the fourth equation:

 

r = √[x²+ y²+z²]

 

That's the reason you need a 4'th satellite to get an accurate fix. The fourth one gets rid of the time ambiguity.

 

I can tell you that the clock in my Magellan Meridian Gold is horendous, at least the displayed time that is. It's sometimes off by minutes and once when it went to being as neer to correct to a couple minutes off my GPS all of a sudden thought I was 1000 miles more west.

The display clockin my Garmin backup unit is off too. When I turn it on after not usinig it for a week or more, it's off by 10-20 seconds. But once it gets a good fix it resets itself to the calculated, unambiguous GPS time. Not so for that Magellan, to correct that you have to do a 4 finger salute, erase everyhthing and re-acequire the satellite almanac and each satellites ephemeris before it get correct time, what a hastle.

Link to comment

 

(my personal theory is that relativity kicks in an causes nanosecond deviations over time, too, but no one will listen to me when I postulate such babble)

 

Relativity is adjusted for in GPS sats by clock rate and ground units by computation. Sat clocks are set to run slower before launch than our earthbound clocks because our clocks are affected by the mass of the earth which makes them run slower (us being the observer) even though the satellites themselves are moving faster than we are (which would make THEM "relativistically" slower if no mass was involved).

 

If relativity was not taken into account, the GPS system would go "out of kilter" to the tune of (if I remember right) about 10 miles or so (added cumulatively) PER DAY and be useless. Sats are not in "geostatic" orbit either (as one might think).

 

I believe I read about this in Popular Science...... been working from memory so this has been edited for clarity which I hope I finally achieved.

Edited by Rattlebars
Link to comment

http://en.wikipedia.org/wiki/Global_Positioning_System

 

THe 4'th satellite is not for altitude, it's to correct for the fact that your GPS receiver does not have a million dollar atomic clock. It just so happens that having a fix with 4 satellites makes the altitude figure relatively good instead of the inaccurate one that you have with only 3 fixes. Yes 3 spheres intersect 1 point, but you do not know the exact starting time of the LFSR data exactly, and the line of sight to each satellite is longer than straight line due to ionospheric effects and so on. The 4'th acquisition fixes most of that and WAAS helps with that last one even more.

Link to comment

Three spheres CAN intersect at one point, but it can also intersect two.

 

Two Sats - "known" distance from two locations. Two spheres intersect in a circle:

65b87ca2-6a7e-4c03-b99b-e2d1dacbb90c.jpg

 

Three Sats - "known" distance from three locations. Third sphere can intersect the circle in 0, 1 or 2 points:

9c032f5c-0ce1-4ecf-82a9-15f0995c45d3.jpg

 

Four Sats - "known" distance from four locations. Fourth sphere determines which of the two possible points is a true position:

f1694bd9-a83c-4286-b004-fd917568dd95.jpg

Link to comment

Three spheres CAN intersect at one point, but it can also intersect two.

 

Two Sats - "known" distance from two locations. Two spheres intersect in a circle:

65b87ca2-6a7e-4c03-b99b-e2d1dacbb90c.jpg

And in the case where you have an unknown receiver time offset, the infinite number of spheres intersect on a surface containing an infinite number of circles all centered on the line between the satellites. I think it might be a hyperboloid, because the difference in the distance to the two foci is constant.

 

Three Sats - "known" distance from three locations. Third sphere can intersect the circle in 0, 1 or 2 points:

9c032f5c-0ce1-4ecf-82a9-15f0995c45d3.jpg

Here the intersection with unknown time would be a curve. I'm having a hard time visualizing it, but it's probably still some kind of conic section. Anyone want to derive it?

 

Four Sats - "known" distance from four locations. Fourth sphere determines which of the two possible points is a true position:

f1694bd9-a83c-4286-b004-fd917568dd95.jpg

And then we get two points on the previous curve, one of which you're unlikely to converge to if your on or near the Earth's surface.

 

All of this trying to think geometrically in 4 dimensions is giving me a headache. Having equations to linearize and iterate on is actually much easier.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...