mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Add chip delay in Glonass L1 CA Code
This commit is contained in:
parent
ce68bbf069
commit
4be07c78c7
@ -41,6 +41,7 @@ void glonass_l1_ca_code_gen_complex(std::complex<float>* _dest,/* signed int _pr
|
|||||||
bool G1_register[9];
|
bool G1_register[9];
|
||||||
bool feedback1;
|
bool feedback1;
|
||||||
bool aux;
|
bool aux;
|
||||||
|
unsigned int delay;
|
||||||
unsigned int lcv, lcv2;
|
unsigned int lcv, lcv2;
|
||||||
|
|
||||||
for(lcv = 0; lcv < 9; lcv++)
|
for(lcv = 0; lcv < 9; lcv++)
|
||||||
@ -78,6 +79,26 @@ void glonass_l1_ca_code_gen_complex(std::complex<float>* _dest,/* signed int _pr
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Implement the chip shifting*/
|
/* TODO: Implement the chip shifting*/
|
||||||
|
/* Set the delay */
|
||||||
|
delay = _code_length;
|
||||||
|
delay += _chip_shift;
|
||||||
|
delay %= _code_length;
|
||||||
|
|
||||||
|
/* Generate PRN from G1 and G2 Registers */
|
||||||
|
for(lcv = 0; lcv < _code_length; lcv++)
|
||||||
|
{
|
||||||
|
aux = G1[(lcv + _chip_shift) % _code_length];
|
||||||
|
if(aux == true)
|
||||||
|
{
|
||||||
|
_dest[lcv] = std::complex<float>(1, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_dest[lcv] = std::complex<float>(-1, 0);
|
||||||
|
}
|
||||||
|
delay++;
|
||||||
|
delay %= _code_length;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user