diff --git a/conf/gnss-sdr_GLONASS_L1_CA_GPS_L1_CA_ibyte.conf b/conf/gnss-sdr_GLONASS_L1_CA_GPS_L1_CA_ibyte.conf index aa37222fd..050e145a9 100644 --- a/conf/gnss-sdr_GLONASS_L1_CA_GPS_L1_CA_ibyte.conf +++ b/conf/gnss-sdr_GLONASS_L1_CA_GPS_L1_CA_ibyte.conf @@ -6,7 +6,7 @@ Receiver.sources_count=2 ;######### SIGNAL_SOURCE CONFIG ############ SignalSource0.implementation=File_Signal_Source -SignalSource0.filename=/archive/NT1065_L1_20160923_fs6625e6_if60e3_schar.bin ; <- PUT YOUR FILE HERE +SignalSource0.filename=/media/dmiralles/Seagate Backup Plus Drive/GNSS Data/NT1065_L1_20160923_fs6625e6_if60e3_schar.bin ; <- PUT YOUR FILE HERE SignalSource0.item_type=ibyte SignalSource0.sampling_frequency=6625000 SignalSource0.samples=0 @@ -14,7 +14,7 @@ SignalSource0.dump=false; SignalSource0.dump_filename=/archive/signal_glonass.bin SignalSource1.implementation=File_Signal_Source -SignalSource1.filename=/archive/NT1065_GLONASS_L1_20160923_fs6625e6_if0e3_schar.bin ; <- PUT YOUR FILE HERE +SignalSource1.filename=/media/dmiralles/Seagate Backup Plus Drive/GNSS Data/NT1065_GLONASS_L1_20160923_fs6625e6_if0e3_schar.bin ; <- PUT YOUR FILE HERE SignalSource1.item_type=ibyte SignalSource1.sampling_frequency=6625000 SignalSource1.samples=0 @@ -138,4 +138,4 @@ PVT.rtcm_MT1019_rate_ms=5000 PVT.rtcm_MT1045_rate_ms=5000 PVT.rtcm_MT1097_rate_ms=1000 PVT.rtcm_MT1077_rate_ms=1000 -PVT.rinex_version=3 +PVT.rinex_version=2 diff --git a/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf b/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf index a256bd370..1541f1126 100644 --- a/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf +++ b/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf @@ -5,7 +5,7 @@ GNSS-SDR.internal_fs_sps=6625000 ;######### SIGNAL_SOURCE CONFIG ############ SignalSource.implementation=File_Signal_Source -SignalSource.filename=/archive/NT1065_GLONASS_L1_20160923_fs6625e6_if0e3_schar.bin ; <- PUT YOUR FILE HERE +SignalSource.filename=/media/dmiralles/Seagate Backup Plus Drive/GNSS Data/NT1065_GLONASS_L1_20160924_fs6625e6_if0e3_schar.bin ; <- PUT YOUR FILE HERE SignalSource.item_type=ibyte SignalSource.sampling_frequency=6625000 SignalSource.samples=0 @@ -39,7 +39,7 @@ Acquisition_1G.pfa=0.0001 Acquisition_1G.if=0 Acquisition_1G.doppler_max=10000 Acquisition_1G.doppler_step=250 -Acquisition_1G.dump=false; +Acquisition_1G.dump=true; Acquisition_1G.dump_filename=/archive/glo_acquisition.dat ;Acquisition_1G.coherent_integration_time_ms=1 ;Acquisition_1G.max_dwells = 5 @@ -51,7 +51,7 @@ Tracking_1G.if=0 Tracking_1G.early_late_space_chips=0.5 Tracking_1G.pll_bw_hz=25.0; Tracking_1G.dll_bw_hz=3.0; -Tracking_1G.dump=false; +Tracking_1G.dump=true; Tracking_1G.dump_filename=/archive/glo_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ @@ -59,7 +59,7 @@ TelemetryDecoder_1G.implementation=GLONASS_L1_CA_Telemetry_Decoder ;######### OBSERVABLES CONFIG ############ Observables.implementation=Hybrid_Observables -Observables.dump=false; +Observables.dump=true; Observables.dump_filename=/archive/glo_observables.dat ;######### PVT CONFIG ############ @@ -76,4 +76,4 @@ PVT.rtcm_MT1019_rate_ms=5000 PVT.rtcm_MT1045_rate_ms=5000 PVT.rtcm_MT1097_rate_ms=1000 PVT.rtcm_MT1077_rate_ms=1000 -PVT.rinex_version=3 +PVT.rinex_version=2 diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index 0eabf724f..58ce9f0d1 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -6019,6 +6019,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri { // RINEX observations timestamps are GPS timestamps. std::string line; + double int_sec = 0; // Avoid compiler warning if(glonass_band.size()){} @@ -6027,12 +6028,12 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri std::string timestring = boost::posix_time::to_iso_string(p_glonass_time); //double utc_t = nav_msg.utc_time(nav_msg.sv_clock_correction(obs_time)); //double gps_t = eph.sv_clock_correction(obs_time); - double glonass_t = obs_time; std::string month (timestring, 4, 2); std::string day (timestring, 6, 2); std::string hour (timestring, 9, 2); std::string minutes (timestring, 11, 2); + double utc_sec = modf (obs_time , &int_sec) + p_glonass_time.time_of_day().seconds() ; if (version == 2) { @@ -6065,12 +6066,11 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri line += std::string(1, ' '); line += minutes; line += std::string(1, ' '); - double second_ = fmod(glonass_t, 60); - if (second_ < 10) + if (utc_sec < 10) { line += std::string(1, ' '); } - line += Rinex_Printer::asString(second_, 7); + line += Rinex_Printer::asString(utc_sec, 7); line += std::string(2, ' '); // Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event line += std::string(1, '0'); @@ -6168,13 +6168,12 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri line += minutes; line += std::string(1, ' '); - double seconds = fmod(glonass_t, 60); // Add extra 0 if seconds are < 10 - if (seconds < 10) + if (utc_sec < 10) { line += std::string(1, '0'); } - line += Rinex_Printer::asString(seconds, 7); + line += Rinex_Printer::asString(utc_sec, 7); line += std::string(2, ' '); // Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event line += std::string(1, '0'); @@ -8338,12 +8337,11 @@ boost::posix_time::ptime Rinex_Printer::compute_UTC_time(const Glonass_Gnav_Ephe boost::posix_time::ptime ls_time(d3, t3); if (utc_time >= ls_time) { - // We subtract the leap second when going from gpst to utc - utc_time = utc_time - boost::posix_time::time_duration(0,0,fabs(GLONASS_LEAP_SECONDS[i][6])); + // We subtract the leap second when going from gpst to utc, values store as negatives + utc_time = utc_time + boost::posix_time::time_duration(0,0,GLONASS_LEAP_SECONDS[i][6]); break; } } - return utc_time; } @@ -8351,7 +8349,7 @@ double Rinex_Printer::get_leap_second(const Glonass_Gnav_Ephemeris& eph, const d { double tod = 0.0; double glot2utc = 3*3600; - double obs_time_utc = 0.0, obs_time_glot = 0.0; + double obs_time_glot = 0.0; int i = 0; double leap_second = 0;