mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-15 11:45:47 +00:00
Fix defects detected by XCode
This commit is contained in:
parent
f3e32e30e9
commit
a8fe18f435
@ -95,8 +95,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
rtklib_pvt_cc_sptr pvt_;
|
rtklib_pvt_cc_sptr pvt_;
|
||||||
rtk_t rtk;
|
rtk_t rtk;
|
||||||
bool dump_;
|
|
||||||
std::string dump_filename_;
|
|
||||||
std::string role_;
|
std::string role_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
|
@ -126,8 +126,8 @@ void galileo_e1_gen_float(float* _dest, int* _prn, char _Signal[3])
|
|||||||
const float alpha = sqrt(10.0 / 11.0);
|
const float alpha = sqrt(10.0 / 11.0);
|
||||||
const float beta = sqrt(1.0 / 11.0);
|
const float beta = sqrt(1.0 / 11.0);
|
||||||
|
|
||||||
int32_t sinboc_11[12 * 4092]; // _codeLength not accepted by Clang
|
int32_t sinboc_11[12 * 4092] = {0}; // _codeLength not accepted by Clang
|
||||||
int32_t sinboc_61[12 * 4092];
|
int32_t sinboc_61[12 * 4092] = {0};
|
||||||
|
|
||||||
galileo_e1_sinboc_11_gen_int(sinboc_11, _prn, _codeLength); //generate sinboc(1,1) 12 samples per chip
|
galileo_e1_sinboc_11_gen_int(sinboc_11, _prn, _codeLength); //generate sinboc(1,1) 12 samples per chip
|
||||||
galileo_e1_sinboc_61_gen_int(sinboc_61, _prn, _codeLength); //generate sinboc(6,1) 12 samples per chip
|
galileo_e1_sinboc_61_gen_int(sinboc_61, _prn, _codeLength); //generate sinboc(6,1) 12 samples per chip
|
||||||
|
@ -131,12 +131,6 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
|
|||||||
{
|
{
|
||||||
_dest[(i + delay) % _samplesPerCode] = _code[i];
|
_dest[(i + delay) % _samplesPerCode] = _code[i];
|
||||||
}
|
}
|
||||||
if (_fs != _codeFreqBasis)
|
|
||||||
{
|
|
||||||
free(_code);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
delete[] _code;
|
delete[] _code;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -131,7 +131,7 @@ void gps_l1_ca_code_gen_float(float* _dest, int32_t _prn, uint32_t _chip_shift)
|
|||||||
void gps_l1_ca_code_gen_complex(std::complex<float>* _dest, int32_t _prn, uint32_t _chip_shift)
|
void gps_l1_ca_code_gen_complex(std::complex<float>* _dest, int32_t _prn, uint32_t _chip_shift)
|
||||||
{
|
{
|
||||||
const uint32_t _code_length = 1023;
|
const uint32_t _code_length = 1023;
|
||||||
int32_t ca_code_int[_code_length];
|
int32_t ca_code_int[_code_length] = {0};
|
||||||
|
|
||||||
gps_l1_ca_code_gen_int(ca_code_int, _prn, _chip_shift);
|
gps_l1_ca_code_gen_int(ca_code_int, _prn, _chip_shift);
|
||||||
|
|
||||||
|
@ -459,7 +459,7 @@ int64_t Galileo_Fnav_Message::read_navigation_signed(std::bitset<GALILEO_FNAV_DA
|
|||||||
// read the MSB and perform the sign extension
|
// read the MSB and perform the sign extension
|
||||||
if (bits[GALILEO_FNAV_DATA_FRAME_BITS - parameter[0].first] == 1)
|
if (bits[GALILEO_FNAV_DATA_FRAME_BITS - parameter[0].first] == 1)
|
||||||
{
|
{
|
||||||
value ^= 0xFFFFFFFFFFFFFFFF; //64 bits variable
|
value ^= 0x0FFFFFFFFFFFFFFF; // 64 bits variable
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -306,7 +306,7 @@ int64_t Galileo_Navigation_Message::read_navigation_signed(std::bitset<GALILEO_D
|
|||||||
// read the MSB and perform the sign extension
|
// read the MSB and perform the sign extension
|
||||||
if (bits[GALILEO_DATA_JK_BITS - parameter[0].first] == 1)
|
if (bits[GALILEO_DATA_JK_BITS - parameter[0].first] == 1)
|
||||||
{
|
{
|
||||||
value ^= 0xFFFFFFFFFFFFFFFFLL; // 64 bits variable
|
value ^= 0x0FFFFFFFFFFFFFFFLL; // 64 bits variable
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -115,7 +115,7 @@ int64_t Gps_CNAV_Navigation_Message::read_navigation_signed(std::bitset<GPS_CNAV
|
|||||||
// read the MSB and perform the sign extension
|
// read the MSB and perform the sign extension
|
||||||
if (bits[GPS_CNAV_DATA_PAGE_BITS - parameter[0].first] == 1)
|
if (bits[GPS_CNAV_DATA_PAGE_BITS - parameter[0].first] == 1)
|
||||||
{
|
{
|
||||||
value ^= 0xFFFFFFFFFFFFFFFFLL; // 64 bits variable
|
value ^= 0x0FFFFFFFFFFFFFFFLL; // 64 bits variable
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -203,7 +203,7 @@ int64_t Gps_Navigation_Message::read_navigation_signed(std::bitset<GPS_SUBFRAME_
|
|||||||
// read the MSB and perform the sign extension
|
// read the MSB and perform the sign extension
|
||||||
if (bits[GPS_SUBFRAME_BITS - parameter[0].first] == 1)
|
if (bits[GPS_SUBFRAME_BITS - parameter[0].first] == 1)
|
||||||
{
|
{
|
||||||
value ^= 0xFFFFFFFFFFFFFFFFLL; // 64 bits variable
|
value ^= 0x0FFFFFFFFFFFFFFFLL; // 64 bits variable
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -225,6 +225,7 @@ int64_t Gps_Navigation_Message::read_navigation_signed(std::bitset<GPS_SUBFRAME_
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32_t Gps_Navigation_Message::subframe_decoder(char *subframe)
|
int32_t Gps_Navigation_Message::subframe_decoder(char *subframe)
|
||||||
{
|
{
|
||||||
int32_t subframe_ID = 0;
|
int32_t subframe_ID = 0;
|
||||||
|
@ -215,7 +215,7 @@ TEST_F(Galileo_FNAV_INAV_test, ValidationOfResults)
|
|||||||
{
|
{
|
||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
std::chrono::duration<double> elapsed_seconds(0);
|
std::chrono::duration<double> elapsed_seconds(0);
|
||||||
|
start = std::chrono::system_clock::now();
|
||||||
int repetitions = 10;
|
int repetitions = 10;
|
||||||
// FNAV FULLY ENCODED FRAME
|
// FNAV FULLY ENCODED FRAME
|
||||||
double FNAV_frame[488] = {-1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
double FNAV_frame[488] = {-1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||||
@ -282,7 +282,7 @@ TEST_F(Galileo_FNAV_INAV_test, ValidationOfResults)
|
|||||||
EXPECT_EQ(decode_INAV_word(&INAV_frame_odd[0], 240), true);
|
EXPECT_EQ(decode_INAV_word(&INAV_frame_odd[0], 240), true);
|
||||||
}
|
}
|
||||||
}) << "Exception during INAV frame decoding";
|
}) << "Exception during INAV frame decoding";
|
||||||
|
end = std::chrono::system_clock::now();
|
||||||
|
elapsed_seconds = end - start;
|
||||||
std::cout << "Galileo FNAV/INAV Test completed in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Galileo FNAV/INAV Test completed in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user