1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-25 22:43:14 +00:00

Fix defects detected by XCode

This commit is contained in:
Carles Fernandez 2018-11-23 16:28:28 +01:00
parent f3e32e30e9
commit a8fe18f435
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
9 changed files with 13 additions and 20 deletions

View File

@ -95,8 +95,6 @@ public:
private:
rtklib_pvt_cc_sptr pvt_;
rtk_t rtk;
bool dump_;
std::string dump_filename_;
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;

View File

@ -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 beta = sqrt(1.0 / 11.0);
int32_t sinboc_11[12 * 4092]; // _codeLength not accepted by Clang
int32_t sinboc_61[12 * 4092];
int32_t sinboc_11[12 * 4092] = {0}; // _codeLength not accepted by Clang
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_61_gen_int(sinboc_61, _prn, _codeLength); //generate sinboc(6,1) 12 samples per chip

View File

@ -131,12 +131,6 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
{
_dest[(i + delay) % _samplesPerCode] = _code[i];
}
if (_fs != _codeFreqBasis)
{
free(_code);
}
else
{
delete[] _code;
}
delete[] _code;
}

View File

@ -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)
{
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);

View File

@ -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
if (bits[GALILEO_FNAV_DATA_FRAME_BITS - parameter[0].first] == 1)
{
value ^= 0xFFFFFFFFFFFFFFFF; //64 bits variable
value ^= 0x0FFFFFFFFFFFFFFF; // 64 bits variable
}
else
{

View File

@ -306,7 +306,7 @@ int64_t Galileo_Navigation_Message::read_navigation_signed(std::bitset<GALILEO_D
// read the MSB and perform the sign extension
if (bits[GALILEO_DATA_JK_BITS - parameter[0].first] == 1)
{
value ^= 0xFFFFFFFFFFFFFFFFLL; // 64 bits variable
value ^= 0x0FFFFFFFFFFFFFFFLL; // 64 bits variable
}
else
{

View File

@ -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
if (bits[GPS_CNAV_DATA_PAGE_BITS - parameter[0].first] == 1)
{
value ^= 0xFFFFFFFFFFFFFFFFLL; // 64 bits variable
value ^= 0x0FFFFFFFFFFFFFFFLL; // 64 bits variable
}
else
{

View File

@ -203,7 +203,7 @@ int64_t Gps_Navigation_Message::read_navigation_signed(std::bitset<GPS_SUBFRAME_
// read the MSB and perform the sign extension
if (bits[GPS_SUBFRAME_BITS - parameter[0].first] == 1)
{
value ^= 0xFFFFFFFFFFFFFFFFLL; // 64 bits variable
value ^= 0x0FFFFFFFFFFFFFFFLL; // 64 bits variable
}
else
{
@ -225,6 +225,7 @@ int64_t Gps_Navigation_Message::read_navigation_signed(std::bitset<GPS_SUBFRAME_
return value;
}
int32_t Gps_Navigation_Message::subframe_decoder(char *subframe)
{
int32_t subframe_ID = 0;

View File

@ -215,7 +215,7 @@ TEST_F(Galileo_FNAV_INAV_test, ValidationOfResults)
{
std::chrono::time_point<std::chrono::system_clock> start, end;
std::chrono::duration<double> elapsed_seconds(0);
start = std::chrono::system_clock::now();
int repetitions = 10;
// 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,
@ -282,7 +282,7 @@ TEST_F(Galileo_FNAV_INAV_test, ValidationOfResults)
EXPECT_EQ(decode_INAV_word(&INAV_frame_odd[0], 240), true);
}
}) << "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;
}