Re: Discrepancy in doppler

Clifford Kelley <[email protected]> Mon, 7 Aug 2006 20:49:36 -0700 (GMT-07:00)
Newsgroups gmane.comp.hardware.gps.opensource
Message-ID <3997288.1155008976781.JavaMail.root@elwamui-wigeon.atl.sa.earthlink.net>
Gustavo,

I think the issue is that clock_offset is really only used for display purposes and is converted to parts per million so that is where the 1e6 factor came from.  Putting it into ppm gives you the same units that clock manufacturers normally provide.

Best regards,

Cliff

-----Original Message-----
>From: Gustavo <[email protected]>
>Sent: Aug 7, 2006 3:32 PM
>To: Georg Beyerle <[email protected]>, Clifford Kelley <[email protected]>
>Cc: [email protected]
>Subject: Discrepancy in doppler
>
>Hi Georg, Cliff
>
>I have analised your code and I notice some difference in the way you
>both compute the carrier and code correction from doppler.
>Take a Look on this analisis
>
>You both define this
>
>doppler = (range1-range2)*5.2514/60 = -vel * (L1_HZ / c)
>clock_offset = clock_offset_vel /c * 1e6
>
>So
>clock_offset_vel = (clock_offset/1e6)*c
>
>doppler_clock = -clock_offset_vel*(L1_HZ / c) = -(clock_offset/1e6) * c
>*(L1_HZ / c) = -(clock_offset/1e6) * L1_HZ = = -clock_offset * L1_MHZ
>
>clock_offset = -doppler_clock/L1_MHZ
>
>car_corr = (-doppler - clock_offset * L1_MHZ)/ CARFRQRES
>= (-doppler + doppler_clock/L1_MHZ * L1_MHZ)/ CARFRQRES
>= (-doppler + doppler_clock)/ CARFRQRES
>
>But here you (Georg) use
>
>code_corr = doppler/134 + clock_offset*24.0
>
>while you (Cliff) use
>
>code_corr = doppler/65.5 + clock_offset*24.0
>
>Well, analising I could find out that the value is indeed 65.5,
>because it is the result of L1_MHZ/2.046 * CODFRQRES.
>It is a scalling between the carrier freq and code half chips
>(CODFRQRES = 85.14949e-3 Hz).
>I understanf that L1_MHZ/2.046 is the amount of MHZ per half chip
>represented in freq by CODFRQRES (which is given in Hz!!!).
>
>See
>code_corr = doppler/65.5 + clock_offset*24.0
>= doppler/(L1_MHZ/2.046 * CODFRQRES) + clock_offset*2.046/CODFRQRES
>= doppler*2.046/(L1_MHZ * CODFRQRES) + clock_offset*2.046/CODFRQRES
>= (doppler/L1_MHZ  + clock_offset)*2.046/CODFRQRES
>= (doppler/L1_MHZ  - doppler_clock/L1_MHZ)*2.046/CODFRQRES
>
>= (doppler - doppler_clock)*(2.046/L1_MHZ)/ CODFRQRES
>= (doppler - doppler_clock)*(2.046*1e6/L1_HZ)/ CODFRQRES
>= 1e6 * (doppler - doppler_clock)*(2.046*/L1_HZ)/ CODFRQRES
>
>However I did not understand:
>
>1-why this 1e6 appears here?
>2-In the case of carrier correction the negative signal appears only for
>the shift in the down conversion from RF to IF, due the phase reversal.
>However in the code correction there is a negative signal for the
>doppler due clock. Is that correct?
>3-Why does the code DCO needs this scaling 2.046*/L1_HZ?
>
>Well I think the carrier correction is ok, however, the code correction
>should be
>
>code_corr = (doppler + doppler_clock)*(2.046*/L1_HZ)/ CODFRQRES
>
>which is (turning back)
>
>code_corr = (doppler + doppler_clock)*(2.046/L1_HZ)/ CODFRQRES
>= (doppler/L1_HZ  + doppler_clock/L1_HZ)*2.046/CODFRQRES
>
>= (doppler/L1_HZ  - clock_offset/1e6)*2.046/CODFRQRES
>= doppler*2.046/(L1_HZ * CODFRQRES) - clock_offset/1e6*2.046/CODFRQRES
>= doppler/(L1_HZ/2.046 * CODFRQRES) - clock_offset/1e6*2.046/CODFRQRES
>= doppler/65.5e6 - clock_offset*24.0e-6
>
>Regards,
>
>-- 
>Msc. Eng. Gustavo Baldo Carvalho
>ZARM - Uni-Bremen - Room 1210
>Am Fallturm, 28359 Bremen
>www.zarm.uni-bremen.de
>Tel:(0049)-(0)421-218-4796
>Fax:(0049)-(0)421-218-2521