diff --git a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc index 385a5e7bb..76b1eb41d 100644 --- a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc @@ -266,11 +266,11 @@ int galileo_e1_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_it if (((d_sample_counter % d_display_rate_ms) == 0) and d_ls_pvt->b_valid_position == true) { std::cout << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d + << " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl; LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d + << " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]"; LOG(INFO) << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) diff --git a/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc index ac49a20e0..cae5e0b2b 100644 --- a/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc @@ -304,11 +304,11 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite if (((d_sample_counter % d_display_rate_ms) == 0) and d_ls_pvt->b_valid_position == true) { std::cout << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d + << " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl; LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d + << " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]"; LOG(INFO) << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) diff --git a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc index 94e661717..de484914a 100644 --- a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc @@ -330,15 +330,15 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items, if (((d_sample_counter % d_display_rate_ms) == 0) and d_ls_pvt->b_valid_position == true) { std::cout << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " using "<d_valid_observations<<" observations is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d + << " UTC using "<< d_ls_pvt->d_valid_observations<<" observations is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl; LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " using "<d_valid_observations<<" observations is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d + << " UTC using "<< d_ls_pvt->d_valid_observations<<" observations is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]"; std::cout << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " using "<d_valid_observations<<" observations is HDOP = " << d_ls_pvt->d_HDOP << " VDOP = " + << " UTC using "<< d_ls_pvt->d_valid_observations<<" observations is HDOP = " << d_ls_pvt->d_HDOP << " VDOP = " << d_ls_pvt->d_VDOP <<" TDOP = " << d_ls_pvt->d_TDOP << " GDOP = " << d_ls_pvt->d_GDOP; } diff --git a/src/core/system_parameters/galileo_utc_model.cc b/src/core/system_parameters/galileo_utc_model.cc index f48d9e5ba..abf63be98 100644 --- a/src/core/system_parameters/galileo_utc_model.cc +++ b/src/core/system_parameters/galileo_utc_model.cc @@ -49,7 +49,7 @@ double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int WN) { double t_Utc; double t_Utc_daytime; - double Delta_t_Utc=0; + double Delta_t_Utc = 0; // Determine if the effectivity time of the leap second event is in the past int weeksToLeapSecondEvent = WN_LSF_6 - (WN % 256); @@ -59,25 +59,23 @@ double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int WN) int secondOfLeapSecondEvent = DN_6 * 24 * 60 * 60; if (abs(t_e - secondOfLeapSecondEvent) > 21600) { - /* 5.1.7a + /* 5.1.7a GST->UTC case a * Whenever the leap second adjusted time indicated by the WN_LSF and the DN values * is not in the past (relative to the user's present time), and the user's * present time does not fall in the time span which starts at six hours prior * to the effective time and ends at six hours after the effective time, * the GST/Utc relationship is given by */ - //std::cout<<"GST->UTC case a"<((WN % 256) - WNot_6)); t_Utc_daytime = fmod(t_e - Delta_t_Utc, 86400); } else { - /* 5.1.7b + /* 5.1.7b GST->UTC case b * Whenever the user's current time falls within the time span of six hours * prior to the leap second adjustment to six hours after the adjustment time, , * the effective time is computed according to the following equations: */ - //std::cout<<"GST->UTC case b"<((WN % 256) - WNot_6)); double W = fmod(t_e - Delta_t_Utc - 43200, 86400) + 43200; t_Utc_daytime = fmod(W, 86400 + Delta_tLSF_6 - Delta_tLS_6); @@ -86,19 +84,18 @@ double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int WN) } else // the effectivity time is in the past { - /* 5.1.7c + /* 5.1.7c GST->UTC case c * Whenever the leap second adjustment time, as indicated by the WN_LSF and DN values, - * is in the past (relative to the user’s current time) and the user’s present time does not + * is in the past (relative to the user's current time) and the user's present time does not * fall in the time span which starts six hours prior to the leap second adjustment time and * ends six hours after the adjustment time, the effective time is computed according to * the following equation: */ - //std::cout<<"GST->UTC case c"<((WN % 256) - WNot_6)); t_Utc_daytime = fmod(t_e - Delta_t_Utc, 86400); } - double secondsOfWeekBeforeToday = 43200 * floor(t_e / 43200); + double secondsOfWeekBeforeToday = 86400 * floor(t_e / 86400); t_Utc = secondsOfWeekBeforeToday + t_Utc_daytime; return t_Utc; } diff --git a/src/core/system_parameters/gps_utc_model.cc b/src/core/system_parameters/gps_utc_model.cc index 34fba08da..64a8b0758 100644 --- a/src/core/system_parameters/gps_utc_model.cc +++ b/src/core/system_parameters/gps_utc_model.cc @@ -103,7 +103,7 @@ double Gps_Utc_Model::utc_time(double gpstime_corrected, int i_GPS_week) t_utc_daytime = fmod(gpstime_corrected - Delta_t_UTC, 86400); } - double secondsOfWeekBeforeToday = 43200 * floor(gpstime_corrected / 43200); + double secondsOfWeekBeforeToday = 86400 * floor(gpstime_corrected / 86400); t_utc = secondsOfWeekBeforeToday + t_utc_daytime; return t_utc; }