1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00

Changed two files.

This commit is contained in:
piyush0411 2020-06-04 07:51:37 +05:30
parent 261d841deb
commit 2b66cd1da2

View File

@ -57,8 +57,6 @@ void galileo_e5_a_code_gen_complex_primary(own::span<std::complex<float>> _dest,
hex_to_binary_converter(a, GALILEO_E5A_Q_PRIMARY_CODE[prn][GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1]); hex_to_binary_converter(a, GALILEO_E5A_Q_PRIMARY_CODE[prn][GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1]);
_dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0); _dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0);
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0); _dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0);
_dest[index + 2] = std::complex<float>(0.0, 0.0);
_dest[index + 3] = std::complex<float>(0.0, 0.0);
} }
else if (_Signal[0] == '5' && _Signal[1] == 'I') else if (_Signal[0] == '5' && _Signal[1] == 'I')
{ {
@ -75,8 +73,6 @@ void galileo_e5_a_code_gen_complex_primary(own::span<std::complex<float>> _dest,
hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn][GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1]); hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn][GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1]);
_dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0); _dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0);
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0); _dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0);
_dest[index + 2] = std::complex<float>(0.0, 0.0);
_dest[index + 3] = std::complex<float>(0.0, 0.0);
} }
else if (_Signal[0] == '5' && _Signal[1] == 'X') else if (_Signal[0] == '5' && _Signal[1] == 'X')
{ {
@ -96,8 +92,6 @@ void galileo_e5_a_code_gen_complex_primary(own::span<std::complex<float>> _dest,
hex_to_binary_converter(b, GALILEO_E5A_Q_PRIMARY_CODE[prn][GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1]); hex_to_binary_converter(b, GALILEO_E5A_Q_PRIMARY_CODE[prn][GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1]);
_dest[index] = std::complex<float>(static_cast<float>(a[0]), static_cast<float>(b[0])); _dest[index] = std::complex<float>(static_cast<float>(a[0]), static_cast<float>(b[0]));
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), static_cast<float>(b[1])); _dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), static_cast<float>(b[1]));
_dest[index + 2] = std::complex<float>(0.0, 0.0);
_dest[index + 3] = std::complex<float>(0.0, 0.0);
} }
} }
@ -145,7 +139,7 @@ void galileo_e5_b_code_gen_complex_primary(own::span<std::complex<float>> _dest,
{ {
return; return;
} }
if (_Signal[0] == '5' && _Signal[1] == 'Q') if (_Signal[0] == '7' && _Signal[1] == 'Q')
{ {
for (size_t i = 0; i < GALILEO_E5B_Q_PRIMARY_CODE[prn].length() - 1; i++) for (size_t i = 0; i < GALILEO_E5B_Q_PRIMARY_CODE[prn].length() - 1; i++)
{ {
@ -160,10 +154,8 @@ void galileo_e5_b_code_gen_complex_primary(own::span<std::complex<float>> _dest,
hex_to_binary_converter(a, GALILEO_E5B_Q_PRIMARY_CODE[prn][GALILEO_E5B_Q_PRIMARY_CODE[prn].length() - 1]); hex_to_binary_converter(a, GALILEO_E5B_Q_PRIMARY_CODE[prn][GALILEO_E5B_Q_PRIMARY_CODE[prn].length() - 1]);
_dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0); _dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0);
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0); _dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0);
_dest[index + 2] = std::complex<float>(0.0, 0.0);
_dest[index + 3] = std::complex<float>(0.0, 0.0);
} }
else if (_Signal[0] == '5' && _Signal[1] == 'I') else if (_Signal[0] == '7' && _Signal[1] == 'I')
{ {
for (size_t i = 0; i < GALILEO_E5B_I_PRIMARY_CODE[prn].length() - 1; i++) for (size_t i = 0; i < GALILEO_E5B_I_PRIMARY_CODE[prn].length() - 1; i++)
{ {
@ -178,10 +170,8 @@ void galileo_e5_b_code_gen_complex_primary(own::span<std::complex<float>> _dest,
hex_to_binary_converter(a, GALILEO_E5B_I_PRIMARY_CODE[prn][GALILEO_E5B_I_PRIMARY_CODE[prn].length() - 1]); hex_to_binary_converter(a, GALILEO_E5B_I_PRIMARY_CODE[prn][GALILEO_E5B_I_PRIMARY_CODE[prn].length() - 1]);
_dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0); _dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0);
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0); _dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0);
_dest[index + 2] = std::complex<float>(0.0, 0.0);
_dest[index + 3] = std::complex<float>(0.0, 0.0);
} }
else if (_Signal[0] == '5' && _Signal[1] == 'X') else if (_Signal[0] == '7' && _Signal[1] == 'X')
{ {
std::array<int32_t, 4> b{}; std::array<int32_t, 4> b{};
for (size_t i = 0; i < GALILEO_E5B_I_PRIMARY_CODE[prn].length() - 1; i++) for (size_t i = 0; i < GALILEO_E5B_I_PRIMARY_CODE[prn].length() - 1; i++)
@ -199,8 +189,6 @@ void galileo_e5_b_code_gen_complex_primary(own::span<std::complex<float>> _dest,
hex_to_binary_converter(b, GALILEO_E5B_Q_PRIMARY_CODE[prn][GALILEO_E5B_Q_PRIMARY_CODE[prn].length() - 1]); hex_to_binary_converter(b, GALILEO_E5B_Q_PRIMARY_CODE[prn][GALILEO_E5B_Q_PRIMARY_CODE[prn].length() - 1]);
_dest[index] = std::complex<float>(static_cast<float>(a[0]), static_cast<float>(b[0])); _dest[index] = std::complex<float>(static_cast<float>(a[0]), static_cast<float>(b[0]));
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), static_cast<float>(b[1])); _dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), static_cast<float>(b[1]));
_dest[index + 2] = std::complex<float>(0.0, 0.0);
_dest[index + 3] = std::complex<float>(0.0, 0.0);
} }
} }