From 769a14cb5941393c63f2b0c60f967d2e6ad050f4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 21 May 2015 20:27:07 +0200 Subject: [PATCH] initializing members in the constructor --- src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc | 16 ++++++++++++++++ src/algorithms/PVT/libs/hybrid_ls_pvt.cc | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc b/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc index f19f2c66c..6afd2d86f 100644 --- a/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc +++ b/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc @@ -63,6 +63,22 @@ galileo_e1_ls_pvt::galileo_e1_ls_pvt(int nchannels, std::string dump_filename, b } } } + d_valid_observations = 0; + d_latitude_d = 0.0; + d_longitude_d = 0.0; + d_height_m = 0.0; + d_avg_latitude_d = 0.0; + d_avg_longitude_d = 0.0; + d_avg_height_m = 0.0; + d_x_m = 0.0; + d_y_m = 0.0; + d_z_m = 0.0; + d_GDOP = 0.0; + d_PDOP = 0.0; + d_HDOP = 0.0; + d_VDOP = 0.0; + d_TDOP = 0.0; + d_flag_averaging = false; } diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc index 72d0fd499..1319fa7f2 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc @@ -47,6 +47,25 @@ hybrid_ls_pvt::hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag d_averaging_depth = 0; d_galileo_current_time = 0; b_valid_position = false; + d_latitude_d = 0.0; + d_longitude_d = 0.0; + d_height_m = 0.0; + d_avg_latitude_d = 0.0; + d_avg_longitude_d = 0.0; + d_avg_height_m = 0.0; + d_x_m = 0.0; + d_y_m = 0.0; + d_z_m = 0.0; + d_GDOP = 0.0; + d_PDOP = 0.0; + d_HDOP = 0.0; + d_VDOP = 0.0; + d_TDOP = 0.0; + d_flag_averaging = false; + d_valid_observations = 0; + d_valid_GPS_obs = 0; + d_valid_GAL_obs = 0; + count_valid_position = 0; // ############# ENABLE DATA FILE LOG ################# if (d_flag_dump_enabled == true) {