PDA

View Full Version : GNSS receiver calculation of time


jmmoric
9th Jun 2020, 09:49
Trying to understand this correctly.

You need 4 sattelites to calculate position and time accurately.

Each GNSS sattelite sends out a signal containing a time stamp, so the receiver receives 4 signals with the same time stamp, it can use the knowledge of the sattelite position (downloaded in the almanaq) and the time difference between receipt of the signals to calculate a position.... There can only be 1 position in space with that "time difference" in the signals received from sattelites at that exact position.

Now using the knowledge of the position, the receiver can calculate the exact time, which is done as continiously as the updating of the position.

Is the above understod correctly? Cause if not.... I have absolutely no idea how the receiver would know time in the first place.... without going through position first....

mustafagander
9th Jun 2020, 10:27
I don't know about calculating time but what I remember from a course on en route GPS that I helped author many decades ago is that each sat time diff is a sphere surrounding that sat and you are somewhere on this sphere. With configurations of the constellation it is usual to have another valid position solution with 3 or 4 sats but the second one is literally multi thousands of miles out in space and system logic rejects it.

hoss183
9th Jun 2020, 10:49
You have it a little bit backwards.
You just need 1 for time in the accuracy that a human needs it. 2 will give you a circle on a sphere, 3 one of 2 points on a circle (but one will not be on earth so discarded, 2D fix), and 4 is the minimum for an accurate 3D fix.
The signal from a sattelite is accurate time data from its internal clock. The reciever is just calulating the distance from each sattelite by the difference in the recieved time data and the sattelite position from the almanac (or calculated in the reciever with known or recieved orbit data).

Edit: found this https://wiki.openstreetmap.org/wiki/Accuracy_of_GPS_data

hoss183
9th Jun 2020, 11:06
Found this, could be of interest: https://tools.ietf.org/id/draft-thomson-geopriv-grip-gps-00.html#clock

jmmoric
9th Jun 2020, 11:20
You have it a little bit backwards.....

That was my main problem when I think about it..... if the reciever does not have the exact time, you cannot calculate the distance to a satellite in the first place... and since the time stamp in the signal from one satellite doesn't really help in calculating the time to that particulary satellite, we need more satellites....

But if you get a signal from 4 satellites, with the same timestamp, you should, based on the time difference in the receipt, be able to calculate your position..... and then when knowing where you are.... calculate the time (cause now you know the exact distance to the satellites)?

I mean, if you just receive a signal from several satellites with a timestamp.... you'd never know what the time actually is.... just that the time was exactely that when the signal left the satellite.... but comparing the "time difference" in the receipt of the signal, you can at least say where you are (since you can only be at one location in the universe with that timedifference).

Kind of hyperbolic navigation.... just need a 4'th station for 3D calculation....

Obama57
9th Jun 2020, 12:12
Trying to understand this correctly.

You need 4 sattelites to calculate position and time accurately.

Each GNSS sattelite sends out a signal containing a time stamp, so the receiver receives 4 signals with the same time stamp, it can use the knowledge of the sattelite position (downloaded in the almanaq) and the time difference between receipt of the signals to calculate a position.... There can only be 1 position in space with that "time difference" in the signals received from sattelites at that exact position.

Now using the knowledge of the position, the receiver can calculate the exact time, which is done as continiously as the updating of the position.

Is the above understod correctly? Cause if not.... I have absolutely no idea how the receiver would know time in the first place.... without going through position first....

Squawk7700 website has one of best explanations of how GPS works.

msbbarratt
9th Jun 2020, 12:43
It's worth noting that the receiver's calculation of position is accurate only if the clocks on the satellites are also accurately set. A lot of time and thought goes into the design of such clocks. If anything goes wrong with the clocks (as happened with Galileo recently) then the system accuracy goes down. The satellites themselves embed information in the data stream that's overlaid on their signal as to whether or not they consider themselves to be "accurate". The receiver will ignore signals that are saying they're degraded.

Actually setting the clocks to be accurate is pretty difficult. The way GPS works relies on the satellites having atomic clocks on board, and these being remotely set very carefully when they pass over the GPS control centre in the USA.

The Japanese have recently launched a few satellites to supplement GPS in Japan (some clever orbitology has been used, they're in a geosynchronous oribit [not geostationary]), and they've come up with a way that doesn't rely on the satellites having atomic clocks onboard. Instead they distribute "time" from the ground to the spacecraft much more often (or possibly continuously, I can't remember), the result being that less expensive clocks can be used. This makes it a lot cheaper to build these systems, and is probably the way to go for future systems.

Galileo

When you look at what happened to Galileo Jul 2019, one really has to question the system's future. They had a week long outage, due to some screw up on the ground. That's bad enough, but then the official reports into the outage came out and they're masterpieces of "saying nothing", and the recommendations are pretty vague. One is left with the distinct impression of a cover up, founded in the politics surrounding the fragmented ownership, operation and purpose of the system. Take a look at this The Register article (https://www.theregister.com/2020/01/29/galileo_satellite_outage/)

The point is that without proper investigation and reporting of the faults, and proper recommendations, one is left questioning whether or not the project is being governed properly. And with poor governance, it will eventually fail as a system.

hoss183
9th Jun 2020, 13:26
The Japanese have recently launched a few satellites to supplement GPS in Japan (some clever orbitology has been used, they're in a geosynchronous oribit [not geostationary]).
None of the GPS satellites are geo-stationary, they orbit geo-sync about 2x per day.

Dan Winterland
9th Jun 2020, 16:18
None of the GPS satellites are geo-stationary, they orbit geo-sync about 2x per day.

The Japanese QZSS system is separate to, but augments GPS. Using 4 geostationary satellites, it was intended to be a stand-alone system, but now is mostly used as a SBAS system for GPS. India has a similar system IRNSS which is more of a stand-alone system. The Chinese Bei-dou system also used geostationary satellites to begin with, but now uses LEO satellites as per other global sat-nav systems.

One interesting fact about GPS time is that it is out of sync to UTC by 18 seconds. This is because GPS time was set at the system's initiation, doesn't take into account leap seconds to account for the earth's rotation slowdown and it can't be changed. Data sequence one in the GPS system's cycle of 25 sequences has the UTC time correction included. Your GPS may indicate the incorrect time for up to 12 minutes until it picks up the correction.

jimjim1
9th Jun 2020, 17:17
To get back to the original chicken/egg, position/time question, the answer is neither is first.

The key to this is that you get a set of Simultaneous Equations than when solved result in the three spacial coordinates + time being determined.

Time is not separate, it's just one of FOUR coordinates.

To get values for 4 coordinates you need at least 4 equations.
To get values for 3 coordinates you need at least 3 equations.

More satellites results in more equations.

Once turned into equations the maths doesn't care what the symbols represent, just that there is some numeric relationship between them.

I suspect that if you don't understand simultaneous equations (school maths at age less than 16 as I recall) you are not going to be able to 'get' this without a bit of study. If you can do basic algebra then extending to Simultaneous Equations should not be too big a step, otherwise maybe a bit more work. Bound to be some very good material on internet. Youtube? There is very likely a 5 min video somewhere that will make it all clear.

Now while I understand the concept of simultaneous equations, the spherical geometry (+ other stuff) equations involved in this are for sure completely beyond me:-)

PS One of the big on-line-universities was started by a maths teacher for his offspring. udemy, coursera??? Bet he has some good stuff that may have escaped the paywall (legitimately:).

oggers
9th Jun 2020, 22:58
Is the above understod correctly? Cause if not.... I have absolutely no idea how the receiver would know time in the first place.... without going through position first....

The receiver has its own clock. The satellites contain atomic clocks but the receiver contains a quartz clock which is not accurate enough initself but does have the quality of running at a stable rate. In theory the range from 3 satellites provides a position but the position is false due to clock error so the psuedo-range from a fourth satellite is required resulting in a 'cocked hat' which is solved mathematically, determining the clock error in the process. When the receiver is off, its time keeping will diverge from GPS time but when it starts again the error will be dealt with in the manner just described.

jmmoric
10th Jun 2020, 14:36
....

There's no need to be demeaning here....

I was just thinking in the way the old LORAN-C system worked when determining a position, cause technically you don't need to know the time to find your position.... you just need the signals from the stations with the same timestamp, and by knowing the exact position of the stations, and the timeintervals between receiving the signals, you can determine where you are. (which by the way requires 3 stations in a 2D environment, hence 4 satellites are required in a 3D environment).

That system makes sense for GNSS as well, then you can always calculate accurate time afterwards, if you even want to calculate it or just accept whatever time comes from the satellites (accurate enough for most of the stuff we do anyway) since by knowing your position, you'll automatically know the distance, and the from there calculate the time it has taken for a signal to get here. Ans as sasid earlier, it will ofcourse require all satellites to be syncronised time-wise, otherwise we'll get Galileo all over again.

Chu Chu
10th Jun 2020, 17:08
I like to thing about this in one dimension. Imagine you're walking on a road toward a town, and town church bell chimes at exactly the quarter hour. If you're watch is set precisely, you can determine your position on the road from when you hear the bell. If you hear the chime 5 seconds after the quarter hour, you're about a mile from the town (since sound travels about 1000 feet per second).

If you don't an accurate watch, of course, you don't know anything. But imagine the town you just left also has a bell that rings on the quarter hour. If the towns are two miles apart and your hear the chimes at exactly the same time, you're half-way between the towns. And you can set your watch to 5 seconds past the quarter hour. If you hear one chime a second before the other, you're about 500 feet closer to the town with the earlier bell. And with a little simple math, you can work out the time delay from either town and set your watch.

That's just 1-D, of course. But in theory you could work out your position in 2-D with two bells and an accurate watch, or with three bells and no watch. And it would take three bells and a watch or four bells to get a 3-D position. Obviously, the math's harder when you deal with additional dimensions, but the principle's the same.

DaveReidUK
10th Jun 2020, 17:17
If you hear the chime 5 seconds after the quarter hour, you're about a mile from the town (since sound travels about 1000 feet per minute).

You might want to have another think about that.

Jetstream67
10th Jun 2020, 17:54
Receivers start with relative time checks for received signals aided by any still current satellite almanac info they may have from a prior session or other available location or time info (e.g. time or Mobile data/ wifi derived location data on a phone).

Any receivable satellite will give a quite accurate time signal and the receiver can then start to play with the subsequent signals to try to assemble a plausible set of 3D spheres from the relative delay of each time signal and assumptions about credible altitude /depth.

Each satellite also transmits a complete set of constellation almanac data so if a rough location is not not already solved the alamanc info becomes available after about a minute and tells the receiver where each 'visible' satellite should be in space at that moment.
With this info too the rough spheres solution becomes trivial and the receiver can now move to refining the location /altitude to a precision fix and maintain those updates in use.

balsa model
11th Jun 2020, 04:48
Can a half-arsed method of picking time from a randomly chosen satellite and then using it to complete the work of triangulation / tetrahedrongulation / hyper-tetrahedrongulation, actually work?
I'm glad you asked. The delay in the transmission of GPS timestamps ought to be between about 67 ms (directly overhead) and maybe 85 ms (a satellite near the horizon, so add the radius of our planet). With a random pick you should expect up to +/-18 ms of error. And that makes the sides of your triangles +/-5400 km in error. That is to say, you're going to miss that airport.
Surely, one will quickly start averaging the incoming timestamps from all satellites, instead. But with just 12 sats in view, this isn't going to improve this method hugely. And hugely is what we need. Taking a few extra minutes is also no good. The sats take 12 hrs to cross the sky. Given only a few minutes, the constellation and the error of its averaged time will not change. With 12 hrs we are onto something, but then an annoying problem of the varying drift of our local timekeeper props up.

I'm afraid that the methods for multiple-equations for multiple unknowns is pretty much unavoidable, with time one of the unknowns.

Goldenrivett
11th Jun 2020, 09:33
Can a half-arsed method of picking time from a randomly chosen satellite and then using it to complete the work of triangulation / tetrahedrongulation / hyper-tetrahedrongulation?


No.
In a nutshell, the receiver looks at incoming signals from four or more satellites and gauges its own inaccuracy. In other words, there is only one value for the "current time" that the receiver can use. The correct time value will cause all of the signals that the receiver is receiving to align at a single point in space. That time value is the time value held by the atomic clocks in all of the satellites. So the receiver sets its clock to that time value, and it then has the same time value that all the atomic clocks in all of the satellites have. The GPS receiver gets atomic clock accuracy "for free."
https://electronics.howstuffworks.com/gadgets/travel/gps3.htm

hoss183
11th Jun 2020, 10:50
You might want to have another think about that.
well his theory is correct, just with an error of 60x

BDAttitude
11th Jun 2020, 12:42
With ground based hyperbolic navigation one doesn't need absolute time and time error cancels out because one looks at time differences between the RX of stations only (3 stations two equations for 2D). Now you can treat GPS as a hyperbolic problem as well but the bad news is that you need time anyhow to determine the satellites position from its ephemeris data in the first place. So time needs to be synced nevertheless. This is a non issue when the transmitter stations are fixed ground based as with Decca, Omega and similar systems.
A good clock is also important for the first fix in order to synchronize on a specific satellites pseudo random gold code. This is one reason why cold fixes could take longer than hot fixes besides the fact that ephemeris and almanac data need upating. Quality recievers therefore feature thermo compensated quartz clocks which are approx. 20 times more accurate than regular quartz clocks. Mobile phones rely on network time synchronization instead.
Typically data from as many satellites as the reciever can track and are visible in the sky are fed into an extended Kalman filter which will provide a least mean square error solution for position and time offset.
For four sattelites a closed algebraic solution for the set of four nonlinear equation does exist.

balsa model
11th Jun 2020, 13:43
No.
(...)
I'm honoured that you read my post. Well, its opening line only - but honoured nevertheless. In Twitterland, one has to be quick with replies or else one is "irrelevant". Here in PPruneland, we can take our time to ponder each other's thoughts.

golfbananajam
11th Jun 2020, 14:27
GPS satellites also talk to each other and to their controlling ground station and pass information about the health of the system and the time, synchronized by the ground station.

oggers
11th Jun 2020, 14:41
Receivers start with relative time checks for received signals aided by any still current satellite almanac info they may have from a prior session or other available location or time info (e.g. time or Mobile data/ wifi derived location data on a phone). Any receivable satellite will give a quite accurate time signal and the receiver can then start to play with the subsequent signals to try to assemble a plausible set of 3D spheres from the relative delay of each time signal and assumptions about credible altitude /depth.

They start with the assumption that the receiver clock is GPS time even though it isn't. That is the basis of psuedo-ranging.

The receiver unit begins by runnning the PRN code for a satellite and time shifting it until it achieves a lock-on, obtaining a psuedo-range in the process.
After lock-on, the satellite clock error and orbital position data are received in the nav message.
Psuedo-range from 3 satellite positions gives a false position due to receiver clock error, whilst 4 result in a mismatch that enables the unit to figure out the error, fix the position and update the receiver clock.


Each satellite also transmits a complete set of constellation almanac data so if a rough location is not not already solved the alamanc info becomes available after about a minute and tells the receiver where each 'visible' satellite should be in space at that moment.
With this info too the rough spheres solution becomes trivial and the receiver can now move to refining the location /altitude to a precision fix and maintain those updates in use.

I don't know where you are getting this information. It takes 12.5 minutes for the almanac to be updated because it is spread over 25 nav messages. When the unit starts, the existing almanac is good enough and the precise orbital data for the individual satellite is obtained within 30 seconds of lock-on.

turbidus
11th Jun 2020, 16:07
The GPS system knows where the aircraft WAS...
The navigation message consists of 30-second frames 1,500 bits long, divided into five 6-second subframes of ten 30-bit words each. Each subframe has the GPS time in 6-second increments.
GPS signal is about 6 seconds long from each sat... you need at least 4 sats, and for most systems, with redundancy and error trapping you need 6.
Meanwhile, the ac is moving at 400kts ...

The system correlates all of this into where the ac WAS.

Due to all of the latencies involved, the Kalman filters estimate where the aircraft is.

GPS satellites also talk to each other and to their controlling ground station and pass information about the health of the system and the time, synchronized by the ground station.
No, the GPS signal does not include integrity. Integrity has more to do with the atmospheric conditions of the broadcast when receiving. If a SAT is off, it is shut down until repaired.
WASS does broadcasts and GBAS broadcasts do include integrity corrections.

Within the FMC, not the signal, there are integrity factors for accuracy of location...especially for waypoints associated with a procedure. There is the HIL right there on the FMS.

nonsense
12th Jun 2020, 11:12
The internal clock in a cheap handheld GPS can be hideously inaccurate because knowing the time within a few minutes of correct (and the location within a few thousand miles) is ample to quickly determine which satellites should be in view.

Consider for a moment what happens if you have a (lossless) very long antenna lead between the antenna and the GPS. Let's say the antenna is 10 kilometres from the GPS and the antenna cable is straight.

What position does the GPS report?
What time does the GPS report?

Descriptions will do, no need to do the maths for the second question.

Chu Chu
12th Jun 2020, 11:37
I'll guess at that one. The receiver determines position based on the differences in delay of the signal from each satellite. Since the signal from each satellite will be delayed by the same amount by the antenna lead, that delay will automatically be cancelled out of the calculation. So the GPS will accurately return the position of the antenna.

As for time, the GPS will use the calculated position to determine the time delay from each satellite. Since the calculated position is at the antenna, it will only account for the over-air delay, not the delay in the antenna lead. Since the signals actually take longer to reach the GPS than is accounted for in the calculation, the reported time will be sightly slow (i.e. earlier than the actual time). By something like 30 to 50 microseconds, if my math, Latin prefixes, and assumptions about the speed of the signals in the lead are correct.

Chu Chu
12th Jun 2020, 13:11
I thought I'd give a little more explanation -- if nothing else, maybe this will make it obvious where I went wrong.

If you go back to my example of the straight road between church towers two miles apart, imagine you stand at the point where you hear one chime a second before the other. If you recorded the sound, saved it to an SD card and sent it by carrier pigeon to your friend in Timbuktu, your friend could listen to the recording and calculate exactly where you stood on the road when you recorded it. But even if he knew that the those particular notes were played only at 11:15 AM on November 11, he couldn't work out the time in Timbuktu unless he knew something about the speed of a carrier pigeon.

EEngr
13th Jun 2020, 01:21
The GPS system knows where the aircraft WAS...
The navigation message consists of 30-second frames 1,500 bits long, divided into five 6-second subframes of ten 30-bit words each. Each subframe has the GPS time in 6-second increments.

Once the GPS receiver has acquired a minimum of 4 satellites and collected a 30 second frame from each, it can monitor the carrier frequency of each GPS satellite. These are synced to the data frames, so once you know where each frame starts, you can compare the phase difference between the carrier signals continuously and not have to wait 30 seconds times 400 knots to calculate the position where you were. Admittedly an overly simplistic explanation of what the receivers do.

nonsense
13th Jun 2020, 12:00
I'll guess at that one. The receiver determines position based on the differences in delay of the signal from each satellite. Since the signal from each satellite will be delayed by the same amount by the antenna lead, that delay will automatically be cancelled out of the calculation. So the GPS will accurately return the position of the antenna.

As for time, the GPS will use the calculated position to determine the time delay from each satellite. Since the calculated position is at the antenna, it will only account for the over-air delay, not the delay in the antenna lead. Since the signals actually take longer to reach the GPS than is accounted for in the calculation, the reported time will be sightly slow (i.e. earlier than the actual time). By something like 30 to 50 microseconds, if my math, Latin prefixes, and assumptions about the speed of the signals in the lead are correct.

Thus the receiver does not need an accurate time to determine location, rather the accurate time, at the antenna, is part of the 4 dimensional solution of 3d location and time.

Private jet
19th Jun 2020, 16:36
Here's my basic understanding of the GPS system. The Russian and European systems, I have no idea, but I imagine the principles must be similar.

A minimum 5 GPS satellites are visible at any location at any time but often more.

A minimum of 4 signals are required for a 3D position fix, lateral position is more accurate than vertical due to the geometry involved.

5 signals are required for RAIM. This allows for one signal to be eliminated from the navigation solution if a gross error results when using it compared to using the other signals. Important point to remember : No RAIM = No guarantee of accuracy whatsoever.

WAAS/GBAS is also used for approaches, but that's an extra subject...

Distance = speed x time so,
Distance satellite to receiver = radio speed x time from satellite to receiver
Knowing the exact transmission time and exact reception time allows determination of signal travel time and therefore calculation of distance from the satellite to the receiver at the time of reception.

Receiver location is the intersection of the 4+ spherical distance lines calculated from the signals using satellite position (see below) plus a bit of trigonometry and the WGS84 global reference co-ordinate standard.

Every satellite transmits 2 signals;
L1 carrier: This is modulated with a data package containing the satellite ID, the satellite "ephemeris" (basically it's current orbital position above the surface) and exact transmission time from the onboard atomic clock. Also a "pseudo random" binary code ( "P" code) which is used to align the clock in the receiver nav unit with the onboard satellite clock therefore allowing determination of the signal travel time. This code isn't really random, it can't be because the receiver needs to know it too in order to "shift" it's internal clock time to match the satellite. It just looks random because it takes a very long time to repeat.
L2 carrier: This transmits the "P" code only but on a significantly different frequency. This allows a correction to be computed in the receiver to compensate for atmospheric delays to the signal from each satellite, enhancing accuracy.

There is a correction for the effects of relativity too. The satellites in orbit are in a weaker gravitational field, therefore causing the onboard clocks to run a bit faster and also at the speed required for orbit the clocks run a bit slower, so to correct for this and to synchronise all the clocks exactly, which is essential for the system to work, there is an update signal from a ground "master clock" once per 24 hours.

Hope that is helpful in some way!

jmmoric
19th Jun 2020, 18:33
I think you need 6 satellites for the FDE, fault detection and exclusion, function in RAIM to be working, otherwise the reciever cannot see which satellite to exclude, just something is wrong, FD.

I’ve kind of come to the conclusion that we don’t need to know exact time to find our position, we need the exact time between signals with the same timestamp to be recieved.

But we’re on basis of that, getting the exact time for free.