mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-05-06 17:34:12 +00:00
Initialize all members in the cosntructor
This commit is contained in:
parent
e7ba7ef23d
commit
6f3e43ec08
@ -79,6 +79,7 @@ void Glonass_Gnav_Navigation_Message::reset()
|
|||||||
flag_CRC_test = false;
|
flag_CRC_test = false;
|
||||||
d_frame_ID = 0;
|
d_frame_ID = 0;
|
||||||
d_string_ID = 0;
|
d_string_ID = 0;
|
||||||
|
i_channel_ID = 0;
|
||||||
|
|
||||||
// Clock terms
|
// Clock terms
|
||||||
d_satClkCorr = 0.0;
|
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++)
|
for(unsigned int i = 0; i < GLONASS_L1_CA_NBR_SATS; i++)
|
||||||
d_previous_Na[i] = 0.0;
|
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
|
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();
|
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]);
|
string_bits[i] = static_cast<int>(bits[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//!< Compute C1 term
|
//!< Compute C1 term
|
||||||
sum_bits = 0;
|
sum_bits = 0;
|
||||||
for(int i = 0; i < static_cast<int>(GLONASS_GNAV_CRC_I_INDEX.size()); i++)
|
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)
|
if(flag_CRC_test == false)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
// Decode all 15 string messages
|
// Decode all 15 string messages
|
||||||
d_string_ID = static_cast<unsigned int>(read_navigation_unsigned(string_bits, STRING_ID));
|
d_string_ID = static_cast<unsigned int>(read_navigation_unsigned(string_bits, STRING_ID));
|
||||||
switch (d_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
|
// 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;
|
gnav_ephemeris.d_tod = gnav_ephemeris.d_t_k + 2*d_string_ID;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
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
|
LOG(INFO) << "GLONASS GNAV: Invalid String ID of received. Received " << d_string_ID
|
||||||
<< ", but acceptable range is from 1-15";
|
<< ", but acceptable range is from 1-15";
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
} // switch string ID ...
|
} // switch string ID ...
|
||||||
|
|
||||||
|
|
||||||
return d_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;
|
flag_almanac_str_7 = false;
|
||||||
new_alm = true;
|
new_alm = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if ((flag_almanac_str_8 == true) and (flag_almanac_str_9 == true))
|
if ((flag_almanac_str_8 == true) and (flag_almanac_str_9 == true))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user