gps-sdr-sim icon indicating copy to clipboard operation
gps-sdr-sim copied to clipboard

What does "f_carr" represents in the ComputeCodePhase() function?

Open AntI-HI opened this issue 4 years ago • 4 comments

// Pseudorange rate. rhorate = (rho1.range - chan->rho0.range)/dt;

// Carrier and code frequency. chan->f_carr = -rhorate/LAMBDA_L1; printf("f_carr -> %f\n", chan->f_carr); chan->f_code = CODE_FREQ + chan->f_carrCARR_TO_CODE; printf("f_code -> %f\n", chan->f_code); printf("chan->f_carrCARR_TO_CODE -> %f\n", chan->f_carr*CARR_TO_CODE);

In the above code, based on the rhorate and wavelength of the L1 band, we determine the carrier frequency. But frequencies we found diverges tremendously from the 1575.42 khz. I get some values like 2870.789292, -2981.129475 etc. What is that negative frequency doing here? Can You explain the idea for this and the whole concept for that function?

AntI-HI avatar Sep 07 '21 13:09 AntI-HI

I believe that is just the doppler shift in Hz

terrymarkovich avatar Sep 08 '21 18:09 terrymarkovich

2870.789292 this much doppler shift?

Imtiaz08 avatar Jan 02 '22 09:01 Imtiaz08

Yes, GPS doppler shift can be up to 5,000 Hz

terrymarkovich avatar Jan 02 '22 13:01 terrymarkovich

Oh!

Can you also explain how is the spoofing signal generated using thr ephemeris and desired coordinates? I mean what parameters are changing and how is the İQ file generated?

Imtiaz08 avatar Jan 02 '22 16:01 Imtiaz08