# GNSS receiver calculation of time

Thread Starter

Join Date: Mar 2014

Location: Way north

Age: 43

Posts: 315

**GNSS receiver calculation of time**

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....

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....

Join Date: Jun 2001

Location: OZ

Posts: 980

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.

Join Date: Nov 2015

Location: BRS/GVA

Posts: 329

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/...cy_of_GPS_data

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/...cy_of_GPS_data

*Last edited by hoss183; 9th Jun 2020 at 11:08.*

Join Date: Nov 2015

Location: BRS/GVA

Posts: 329

Found this, could be of interest: https://tools.ietf.org/id/draft-thom...-00.html#clock

Thread Starter

Join Date: Mar 2014

Location: Way north

Age: 43

Posts: 315

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....

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....

Join Date: Mar 2009

Location: USA

Posts: 40

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....

Join Date: Apr 2008

Location: UK

Posts: 351

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.

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

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.

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

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.

Join Date: Nov 2015

Location: BRS/GVA

Posts: 329

Join Date: Jun 2001

Location: Fragrant Harbour

Posts: 4,718

None of the GPS satellites are geo-stationary, they orbit geo-sync about 2x per day.

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.

Join Date: Oct 2007

Location: Here

Posts: 748

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.

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.

Join Date: Nov 2005

Location: Zulu Time Zone

Posts: 684

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....

*Last edited by oggers; 10th Jun 2020 at 08:11.*

Thread Starter

Join Date: Mar 2014

Location: Way north

Age: 43

Posts: 315

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

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.Join Date: Feb 2009

Location: Virginia

Posts: 365

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.

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.

*Last edited by Chu Chu; 10th Jun 2020 at 17:59. Reason: Fixed mistake DaveReid pointed out.*

Join Date: Jan 2008

Location: Reading, UK

Posts: 11,748

Join Date: Jun 2009

Location: UK

Posts: 87

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.

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.

Join Date: Sep 2005

Location: Ontario, Canada

Age: 52

Posts: 75

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.

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.

*Last edited by balsa model; 11th Jun 2020 at 13:29. Reason: (added ", actually work?" to complete the opening question)*

Join Date: Jan 2014

Location: N5109.2W10.5

Posts: 655

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.co...ravel/gps3.htm

Join Date: Apr 2019

Location: EDSP

Posts: 244

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.

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.

*Last edited by BDAttitude; 11th Jun 2020 at 12:56.*

Join Date: Sep 2005

Location: Ontario, Canada

Age: 52

Posts: 75