diff --git a/conf/gnss-sdr.conf b/conf/gnss-sdr.conf index debb1e4eb..639b506c3 100644 --- a/conf/gnss-sdr.conf +++ b/conf/gnss-sdr.conf @@ -118,7 +118,7 @@ InputFilter.number_of_bands=2 ;#The number of band_begin and band_end elements must match the number of bands InputFilter.band1_begin=0.0 -InputFilter.band1_end=0.45 +InputFilter.band1_end=0.44 InputFilter.band2_begin=0.55 InputFilter.band2_end=1.0 @@ -159,6 +159,7 @@ InputFilter.IF=0 ;Resampler.implementation=Direct_Resampler Resampler.implementation=Pass_Through + ;#dump: Dump the resamplered data to a file. Resampler.dump=false ;#dump_filename: Log path and filename. @@ -169,10 +170,10 @@ Resampler.item_type=gr_complex ;Resampler.item_type=cbyte ;#sample_freq_in: the sample frequency of the input signal -Resampler.sample_freq_in=8000000 +Resampler.sample_freq_in=4000000 ;#sample_freq_out: the desired sample frequency of the output signal -Resampler.sample_freq_out=4000000 +Resampler.sample_freq_out=2000000 ;######### CHANNELS GLOBAL CONFIG ############ @@ -289,9 +290,9 @@ PVT.output_rate_ms=10 ;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms. PVT.display_rate_ms=500 -;# RINEX, KML, and NMEA output configuration +;# KML, GeoJSON and NMEA output configuration -;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump. +;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump, ".kml" and ".geojson" to GIS-friendly formats. PVT.dump_filename=./PVT ;#nmea_dump_filename: NMEA log path and filename diff --git a/src/algorithms/tracking/libs/lock_detectors.cc b/src/algorithms/tracking/libs/lock_detectors.cc index b3d6e9cb9..dc738c936 100644 --- a/src/algorithms/tracking/libs/lock_detectors.cc +++ b/src/algorithms/tracking/libs/lock_detectors.cc @@ -73,16 +73,20 @@ float cn0_svn_estimator(gr_complex* Prompt_buffer, int length, long fs_in, doubl float SNR_dB_Hz = 0; float Psig = 0; float Ptot = 0; + float Psig2, Ptot2, SNR_dB_Hz2; Psig2=0; Ptot2=0; for (int i=0; i Rtcm::get_MT1001_sat_content(const Gnss_Synchro & gnss_synchro) } - std::string Rtcm::print_MT1001(const Gps_Ephemeris & gps_eph, double obs_time, const std::map & pseudoranges) { unsigned int ref_id = static_cast(FLAGS_RTCM_Ref_Station_ID); @@ -351,8 +349,7 @@ std::string Rtcm::print_MT1001(const Gps_Ephemeris & gps_eph, double obs_time, c pseudoranges_iter != pseudoranges.end(); pseudoranges_iter++) { - - std::bitset<58> content = Rtcm::get_MT1001_sat_content(pseudoranges_iter->second); + std::bitset<58> content = Rtcm::get_M1001_sat_content(pseudoranges_iter->second); data += content.to_string(); } @@ -420,6 +417,42 @@ std::bitset<152> Rtcm::get_MT1005_test () return test_msg; } +std::string Rtcm::print_M1005( unsigned int ref_id, double ecef_x, double ecef_y, double ecef_z, bool gps, bool glonass, bool galileo, bool non_physical, bool single_oscillator, unsigned int quarter_cycle_indicator) +{ + unsigned int msg_number = 1005; + std::bitset<1> DF001_; + + Rtcm::set_DF002(msg_number); + Rtcm::set_DF003(ref_id); + Rtcm::set_DF021(); + Rtcm::set_DF022(gps); + Rtcm::set_DF023(glonass); + Rtcm::set_DF024(galileo); + DF141 = std::bitset<1>(non_physical); + DF001_ = std::bitset<1>("0"); + Rtcm::set_DF025(ecef_x); + DF142 = std::bitset<1>(single_oscillator); + Rtcm::set_DF026(ecef_y); + DF364 = std::bitset<2>(quarter_cycle_indicator); + Rtcm::set_DF027(ecef_z); + + std::string data = DF002.to_string() + + DF003.to_string() + + DF021.to_string() + + DF022.to_string() + + DF023.to_string() + + DF024.to_string() + + DF141.to_string() + + DF025.to_string() + + DF142.to_string() + + DF001_.to_string() + + DF026.to_string() + + DF364.to_string() + + DF027.to_string() ; + + std::string message = build_message(data); + return message; +} std::string Rtcm::print_MT1005( unsigned int ref_id, double ecef_x, double ecef_y, double ecef_z, bool gps, bool glonass, bool galileo, bool non_physical, bool single_oscillator, unsigned int quarter_cycle_indicator) { diff --git a/src/core/system_parameters/rtcm.h b/src/core/system_parameters/rtcm.h index 4e31670bd..b17f3cdf8 100644 --- a/src/core/system_parameters/rtcm.h +++ b/src/core/system_parameters/rtcm.h @@ -97,6 +97,7 @@ public: std::string print_MT1005_test(); //print_M1005(2003, 1114104.5999, -4850729.7108, 3975521.4643, true, false, false, false, false, 0); + + EXPECT_EQ(0, reference_msg.compare(reference_msg2)); + unsigned int ref_id; double ecef_x; double ecef_y;