Questions on the code from Beyerle and Kelley

Oliver Meister <[email protected]> Fri, 13 Aug 2004 11:17:14 +0200
Newsgroups gmane.comp.hardware.gps.opensource
Message-ID <[email protected]>
Dear all,

I have a few questions about the osgps from Beyerle respectively Kelley code.

1.
The first question concern the acquisition function >>ch_acq<< in the gpsisr.cpp file.
Herein the replica code of each satellite is correlated with the received signal in chip steps.
After a full c/a periode of 2046 half chips the counter >>chan[ch].codes<< must be reset.
In the code this reset occure when >>chan[ch].codes == 2044<<. 
But this seems to early for me!
With my understanding the counter must be reset when >>chan[ch].codes >= 2045<<. (because a full periode is from 0,..,2045 = 2046 half chip periods)
The evaluation of the correlation result assured this code change. Otherwise this "miscounting" leads to an migration of the correlation peak.

2. 
The second question occur in the file correlator.cpp.
In the function >>run_software_correlator<< the periode of validity of the chip counters (prompt, early, and late) isassured by an modulo operation. But why is the early counter one chip behind the prompt counter and the late counter one chip before.
I think this should be the other way around? 

3.
The third point is once again in the >>run_software_correlator<< function in the correlator.cpp file.
After a full code period correlation >>HalfChip_Counter[ch] == 2046<< the >>dump<< flag is set and the 
HalfChip_Counter[ch] is reset to zero.
Later in the code in the dump loop the HalfChip_Counter[ch] is incremented by the code slew counter >>HalfChip_Counter[ch] += Regs[ch].code_slew_counter<<.
But what is the purpose of this? I can't understand for what reason the HalfChip_Counter is set to the slew counter.
In my understanding we need a second variable for an offset in order to correlate the received signal with every shifted replica code during the acquisition phase.

Thats all so far...

I appreciate any help, hint, or explanation.

Thanks for your help,

best regards

Oliver Meister

-- 
__________________________________________________________________

Dipl-Ing. Oliver Meister

Institut fÃŒr Theoretische Elektrotechnik und Systemoptimierung

UniversitÀt Karlsruhe
Kaiserstrasse 12 Geb. 30.33
76128 Karlsruhe

Email: [email protected]