[time-nuts] Trimble Mini-T Timing Glitches

Attila Kinali attila at kinali.ch
Thu Nov 30 19:28:02 EST 2017

On Thu, 30 Nov 2017 21:31:54 +0000
Leo Bodnar <leo at leobodnar.com> wrote:

> From: Bob kb8tq <kb8tq at n1k.org>
> > GPS extracts time and location by locking on to various codes in the transmissions. 
> > One of them happens to run at about a 1 KHz clock rate. A slip on that part of the 
> > process gives you a (modulo) 1 ms clock jump. Certain types of interference may
> > “help” the receiver make these sorts of mistakes.

> Bob, this is quite an unorthodox description of how GPS works.
> You probably want to rephrase that before it gets ripped to shreds.

Actually, that's a pretty accurate, two sentence description.
It wouldnt be possible to build a GPS receiver using this, but
it's ok for the purpose.

On Thu, 30 Nov 2017 23:05:55 +0000
Leo Bodnar <leo at leobodnar.com> wrote:

> I can't see how randomly selected 1ms of data can contain unambiguously detectable start of C/A code.
> If NAV data bit phase flip occurred within this 1ms of data then correlation search will most probably fail.
> Yes, the probability of this is only 5% (assuming equal number of 1s and 0s in NAV message) but still not zero.
> Perhaps the quote should have added "carefully chosen 1ms of data"

The C/A code repeates every 1ms. The decoder cannot tell the repetitions
themselves appart at all. To solve this ambiguity, the decoder has to wait
for the flip caused by the tranmitted data, that happens exactly at those
1ms boundaries. As you noted, they happen only every 20ms (50baud data).
So, if you take these bit flips into account, there is now a 20ms ambiguity.
To resolve this, one has to wait for a start of frame (Preamble of the TLM
in GPS-speak), which then gives an 6s amibiguitiy, but as the data frame
contains the current time, the ambiguity can be completely resolved.

Now, depending on how the decoder is organized, it is totally possible,
that the decoder jumps by 1ms. Why doesn't this cause a loss of correltation?
Because most modern receivers use multiple C/A code-blocks for corrlation.
Correlation times of 10ms or 20ms are pretty normal, 100ms are not unheard of.
Thus, when using such long correlation times, slipping by 1ms will only cause
a slight degradation of C/N0 but it will still sufficiently high.
And also the data will decode correctly, because it's just a 5% (or -1.45dB) 
loss of signal assuming 20ms correlation time[1].

I've encountered modern receivers (aka not older than 5 years), that slip 
by 1ms under certain conditions.

> At the minimum, one would typically select 2ms of sampled data when they are doing a correlation search and then
> they are guaranteed a full PRN sequence somewhere in there.

2ms is actually a pretty bad choice. If the bit flip happens within
those 2ms, then the correlation output, if perfectly matched, will 
be exactly zero (assuming no noise). You have to use either 1ms
correlation times, for aquisition, or a more sophisticated method.
Section 5.8 "signal acquisition" in Kaplan and Hegarty's book[2]
contains a few common techniques with good explanations.

			Attila Kinali

[1] ok, it's actually more like 10%/1.91dB loss, because the
signal during that flipped 1ms is multiplied by -1 instead of +1, so it
causes twice the amount of signal los than uncorrelated signal

[2] "Understanding GPS - Principles and Applications", 2nd ed
by Kaplan and Hegarthy, 2006

<JaberWorky>	The bad part of Zurich is where the degenerates
                throw DARK chocolate at you.

More information about the time-nuts mailing list