1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00

initializing members (defects detected by coverity scan)

This commit is contained in:
Carles Fernandez 2015-12-02 23:44:07 +01:00
parent 45195917c1
commit 7b0285ba60
11 changed files with 33 additions and 28 deletions

View File

@ -44,6 +44,7 @@ galileo_e1_ls_pvt::galileo_e1_ls_pvt(int nchannels, std::string dump_filename, b
d_dump_filename = dump_filename;
d_flag_dump_enabled = flag_dump_to_file;
d_galileo_current_time = 0;
d_flag_averaging = false;
// ############# ENABLE DATA FILE LOG #################
if (d_flag_dump_enabled == true)

View File

@ -37,7 +37,10 @@
#include <sstream>
#include <glog/logging.h>
GeoJSON_Printer::GeoJSON_Printer () {}
GeoJSON_Printer::GeoJSON_Printer()
{
first_pos = true;
}

View File

@ -44,7 +44,7 @@ gps_l1_ca_ls_pvt::gps_l1_ca_ls_pvt(int nchannels, std::string dump_filename, boo
d_ephemeris = new Gps_Navigation_Message[nchannels];
d_dump_filename = dump_filename;
d_flag_dump_enabled = flag_dump_to_file;
d_flag_averaging = false;
d_GPS_current_time = 0;
// ############# ENABLE DATA FILE LOG #################

View File

@ -48,6 +48,7 @@ hybrid_ls_pvt::hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag
d_valid_GPS_obs = 0;
d_valid_GAL_obs = 0;
count_valid_position = 0;
d_flag_averaging = false;
// ############# ENABLE DATA FILE LOG #################
if (d_flag_dump_enabled == true)
{

View File

@ -88,7 +88,6 @@ private:
galileo_e1b_telemetry_decoder_cc_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
int channel_;
unsigned int vector_length_;
std::string item_type_;
bool dump_;
std::string dump_filename_;

View File

@ -83,7 +83,6 @@ private:
gps_l1_ca_telemetry_decoder_cc_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
int channel_;
unsigned int vector_length_;
std::string item_type_;
bool dump_;
std::string dump_filename_;

View File

@ -83,7 +83,6 @@ private:
gps_l2_m_telemetry_decoder_cc_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
int channel_;
unsigned int vector_length_;
std::string item_type_;
bool dump_;
std::string dump_filename_;

View File

@ -86,7 +86,6 @@ private:
sbas_l1_telemetry_decoder_cc_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
int channel_;
unsigned int vector_length_;
std::string item_type_;
bool dump_;
std::string dump_filename_;

View File

@ -173,6 +173,9 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc(
d_code_phase_samples = 0.0;
d_pll_to_dll_assist_secs_Ti = 0.0;
d_rem_code_phase_chips = 0.0;
d_code_phase_step_chips = 0.0;
d_carrier_phase_step_rad = 0.0;
//set_min_output_buffer((long int)300);
}

View File

@ -146,6 +146,7 @@ cpu_multicorrelator::cpu_multicorrelator()
d_local_code_in = NULL;
d_shifts_chips = NULL;
d_corr_out = NULL;
d_local_codes_resampled = NULL;
d_code_length_chips = 0;
d_n_correlators = 0;
}

View File

@ -2325,7 +2325,7 @@ int Rtcm::set_DF398(const Gnss_Synchro & gnss_synchro)
int Rtcm::set_DF399(const Gnss_Synchro & gnss_synchro)
{
double lambda;
double lambda = 0.0;
std::string sig_(gnss_synchro.Signal);
std::string sig = sig_.substr(0,2);
@ -2358,31 +2358,31 @@ int Rtcm::set_DF400(const Gnss_Synchro & gnss_synchro)
double meters_to_miliseconds = GPS_C_m_s * 0.001;
double rough_range_s = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10;
double psrng_s;
double lambda;
std::string sig_(gnss_synchro.Signal);
std::string sig = sig_.substr(0,2);
double lambda = 0.0;
std::string sig_(gnss_synchro.Signal);
std::string sig = sig_.substr(0,2);
if (sig.compare("1C") == 0 )
{
lambda = GPS_C_m_s / GPS_L1_FREQ_HZ;
}
if (sig.compare("2S") == 0 )
{
lambda = GPS_C_m_s / GPS_L2_FREQ_HZ;
}
if (sig.compare("1C") == 0 )
{
lambda = GPS_C_m_s / GPS_L1_FREQ_HZ;
}
if (sig.compare("2S") == 0 )
{
lambda = GPS_C_m_s / GPS_L2_FREQ_HZ;
}
if (sig.compare("5X") == 0 )
{
lambda = GPS_C_m_s / Galileo_E5a_FREQ_HZ;
}
if (sig.compare("1B") == 0 )
{
lambda = GPS_C_m_s / Galileo_E1_FREQ_HZ;
}
psrng_s = (gnss_synchro.Carrier_phase_rads / GPS_TWO_PI) * lambda - rough_range_s;
if (sig.compare("5X") == 0 )
{
lambda = GPS_C_m_s / Galileo_E5a_FREQ_HZ;
}
if (sig.compare("1B") == 0 )
{
lambda = GPS_C_m_s / Galileo_E1_FREQ_HZ;
}
psrng_s = (gnss_synchro.Carrier_phase_rads / GPS_TWO_PI) * lambda - rough_range_s;
DF400 = std::bitset<15>(static_cast<int>( psrng_s)); // Units!!
DF400 = std::bitset<15>(static_cast<int>( psrng_s)); // Units!!
return 0;
}