1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 20:50:33 +00:00

Initialize all members in the cosntructor

This commit is contained in:
Carles Fernandez 2018-01-25 15:07:13 +01:00
parent e7ba7ef23d
commit 6f3e43ec08

View File

@ -79,6 +79,7 @@ void Glonass_Gnav_Navigation_Message::reset()
flag_CRC_test = false;
d_frame_ID = 0;
d_string_ID = 0;
i_channel_ID = 0;
// Clock terms
d_satClkCorr = 0.0;
@ -90,7 +91,6 @@ void Glonass_Gnav_Navigation_Message::reset()
for(unsigned int i = 0; i < GLONASS_L1_CA_NBR_SATS; i++)
d_previous_Na[i] = 0.0;
std::map<int,std::string> satelliteBlock; //!< Map that stores to which block the PRN belongs http://www.navcen.uscg.gov/?Do=constellationStatus
auto gnss_sat = Gnss_Satellite();
@ -129,7 +129,6 @@ bool Glonass_Gnav_Navigation_Message::CRC_test(std::bitset<GLONASS_GNAV_STRING_B
string_bits[i] = static_cast<int>(bits[i]);
}
//!< Compute C1 term
sum_bits = 0;
for(int i = 0; i < static_cast<int>(GLONASS_GNAV_CRC_I_INDEX.size()); i++)
@ -330,7 +329,6 @@ int Glonass_Gnav_Navigation_Message::string_decoder(std::string frame_string)
if(flag_CRC_test == false)
return 0;
// Decode all 15 string messages
d_string_ID = static_cast<unsigned int>(read_navigation_unsigned(string_bits, STRING_ID));
switch (d_string_ID) {
@ -449,10 +447,8 @@ int Glonass_Gnav_Navigation_Message::string_decoder(std::string frame_string)
// 4) Set time of day (tod) when ephemeris data is complety decoded
gnav_ephemeris.d_tod = gnav_ephemeris.d_t_k + 2*d_string_ID;
}
break;
case 6:
@ -678,11 +674,9 @@ int Glonass_Gnav_Navigation_Message::string_decoder(std::string frame_string)
LOG(INFO) << "GLONASS GNAV: Invalid String ID of received. Received " << d_string_ID
<< ", but acceptable range is from 1-15";
break;
} // switch string ID ...
return d_string_ID;
}
@ -755,7 +749,6 @@ bool Glonass_Gnav_Navigation_Message::have_new_almanac() //Check if we have a ne
flag_almanac_str_7 = false;
new_alm = true;
}
}
if ((flag_almanac_str_8 == true) and (flag_almanac_str_9 == true))
{