mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-11-04 01:03:04 +00:00 
			
		
		
		
	Minor fixes: typos, includes
This commit is contained in:
		@@ -13,6 +13,7 @@ In the L1 band (centered at 1575.42 MHz):
 | 
			
		||||
 | 
			
		||||
In the L2 band (centered at 1227.60 MHz):
 | 
			
		||||
 - 🛰 GPS L2C :white_check_mark:
 | 
			
		||||
 - 🛰 GLONASS L2 C/A :white_check_mark:
 | 
			
		||||
 | 
			
		||||
In the L5 band (centered at 1176.45 MHz):
 | 
			
		||||
 - 🛰 GPS L5 :white_check_mark:
 | 
			
		||||
@@ -1113,6 +1114,7 @@ Each channel must be assigned to a GNSS signal, according to the following ident
 | 
			
		||||
| Galileo E1b/c     |      1B         |
 | 
			
		||||
| Glonass L1 C/A    |      1G         |
 | 
			
		||||
| GPS L2 L2C(M)     |      2S         |
 | 
			
		||||
| Glonass L2 C/A    |      2G         |
 | 
			
		||||
| GPS L5            |      L5         |
 | 
			
		||||
| Galileo E5a       |      5X         |
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -905,42 +905,42 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
 | 
			
		||||
                                                        }
 | 
			
		||||
                                                }
 | 
			
		||||
                                            if (type_of_rx == 29)  // GPS L1 C/A + GLONASS L2 C/A
 | 
			
		||||
												{
 | 
			
		||||
													if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()))
 | 
			
		||||
														{
 | 
			
		||||
															std::string glo_signal("2G");
 | 
			
		||||
															rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
 | 
			
		||||
															if (d_rinex_version == 3)
 | 
			
		||||
																rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
 | 
			
		||||
															if (d_rinex_version == 2)
 | 
			
		||||
																{
 | 
			
		||||
																	rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model);
 | 
			
		||||
																	rp->rinex_nav_header(rp->navGloFile, d_ls_pvt->glonass_gnav_utc_model, glonass_gnav_ephemeris_iter->second);
 | 
			
		||||
																}
 | 
			
		||||
															b_rinex_header_written = true;  // do not write header anymore
 | 
			
		||||
														}
 | 
			
		||||
												}
 | 
			
		||||
											if (type_of_rx == 30)  //  Galileo E1B + GLONASS L2 C/A
 | 
			
		||||
												{
 | 
			
		||||
													if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()))
 | 
			
		||||
														{
 | 
			
		||||
															std::string glo_signal("2G");
 | 
			
		||||
															std::string gal_signal("1B");
 | 
			
		||||
															rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal, gal_signal);
 | 
			
		||||
															rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
 | 
			
		||||
															b_rinex_header_written = true;  // do not write header anymore
 | 
			
		||||
														}
 | 
			
		||||
												}
 | 
			
		||||
											if (type_of_rx == 31)  // GPS L2C + GLONASS L2 C/A
 | 
			
		||||
												{
 | 
			
		||||
													if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.cend()))
 | 
			
		||||
														{
 | 
			
		||||
															std::string glo_signal("2G");
 | 
			
		||||
															rp->rinex_obs_header(rp->obsFile, gps_cnav_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
 | 
			
		||||
															rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_cnav_iono, d_ls_pvt->gps_cnav_utc_model, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
 | 
			
		||||
															b_rinex_header_written = true;  // do not write header anymore
 | 
			
		||||
														}
 | 
			
		||||
												}
 | 
			
		||||
                                                {
 | 
			
		||||
                                                    if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()))
 | 
			
		||||
                                                        {
 | 
			
		||||
                                                            std::string glo_signal("2G");
 | 
			
		||||
                                                            rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
 | 
			
		||||
                                                            if (d_rinex_version == 3)
 | 
			
		||||
                                                                rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
 | 
			
		||||
                                                            if (d_rinex_version == 2)
 | 
			
		||||
                                                                {
 | 
			
		||||
                                                                    rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model);
 | 
			
		||||
                                                                    rp->rinex_nav_header(rp->navGloFile, d_ls_pvt->glonass_gnav_utc_model, glonass_gnav_ephemeris_iter->second);
 | 
			
		||||
                                                                }
 | 
			
		||||
                                                            b_rinex_header_written = true;  // do not write header anymore
 | 
			
		||||
                                                        }
 | 
			
		||||
                                                }
 | 
			
		||||
                                            if (type_of_rx == 30)  //  Galileo E1B + GLONASS L2 C/A
 | 
			
		||||
                                                {
 | 
			
		||||
                                                    if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()))
 | 
			
		||||
                                                        {
 | 
			
		||||
                                                            std::string glo_signal("2G");
 | 
			
		||||
                                                            std::string gal_signal("1B");
 | 
			
		||||
                                                            rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal, gal_signal);
 | 
			
		||||
                                                            rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
 | 
			
		||||
                                                            b_rinex_header_written = true;  // do not write header anymore
 | 
			
		||||
                                                        }
 | 
			
		||||
                                                }
 | 
			
		||||
                                            if (type_of_rx == 31)  // GPS L2C + GLONASS L2 C/A
 | 
			
		||||
                                                {
 | 
			
		||||
                                                    if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.cend()))
 | 
			
		||||
                                                        {
 | 
			
		||||
                                                            std::string glo_signal("2G");
 | 
			
		||||
                                                            rp->rinex_obs_header(rp->obsFile, gps_cnav_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
 | 
			
		||||
                                                            rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_cnav_iono, d_ls_pvt->gps_cnav_utc_model, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
 | 
			
		||||
                                                            b_rinex_header_written = true;  // do not write header anymore
 | 
			
		||||
                                                        }
 | 
			
		||||
                                                }
 | 
			
		||||
                                        }
 | 
			
		||||
                                    if (b_rinex_header_written)  // The header is already written, we can now log the navigation message data
 | 
			
		||||
                                        {
 | 
			
		||||
 
 | 
			
		||||
@@ -57,6 +57,7 @@
 | 
			
		||||
#include "glonass_gnav_navigation_message.h"
 | 
			
		||||
#include "GPS_L1_CA.h"
 | 
			
		||||
#include "Galileo_E1.h"
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include "gnss_synchro.h"
 | 
			
		||||
#include <boost/date_time/posix_time/posix_time.hpp>
 | 
			
		||||
#include <string>
 | 
			
		||||
@@ -64,7 +65,6 @@
 | 
			
		||||
#include <sstream>  // for stringstream
 | 
			
		||||
#include <iomanip>  // for setprecision
 | 
			
		||||
#include <map>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"
 | 
			
		||||
 | 
			
		||||
class Sbas_Raw_Msg;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -55,8 +55,8 @@
 | 
			
		||||
#include "rtklib_conversions.h"
 | 
			
		||||
#include "GPS_L1_CA.h"
 | 
			
		||||
#include "Galileo_E1.h"
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include <glog/logging.h>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
using google::LogMessage;
 | 
			
		||||
 
 | 
			
		||||
@@ -35,9 +35,9 @@
 | 
			
		||||
#include "configuration_interface.h"
 | 
			
		||||
#include "glonass_l1_signal_processing.h"
 | 
			
		||||
#include "gnss_sdr_flags.h"
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include <boost/math/distributions/exponential.hpp>
 | 
			
		||||
#include <glog/logging.h>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
using google::LogMessage;
 | 
			
		||||
 
 | 
			
		||||
@@ -34,13 +34,13 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "pcps_acquisition.h"
 | 
			
		||||
#include "GPS_L1_CA.h"      // for GPS_TWO_PI
 | 
			
		||||
#include "GPS_L1_CA.h"         // for GPS_TWO_PI
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"  // for GLONASS_TWO_PI"
 | 
			
		||||
#include <glog/logging.h>
 | 
			
		||||
#include <gnuradio/io_signature.h>
 | 
			
		||||
#include <matio.h>
 | 
			
		||||
#include <volk/volk.h>
 | 
			
		||||
#include <cstring>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"  // for GLONASS_TWO_PI
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
using google::LogMessage;
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,6 @@
 | 
			
		||||
#include "Galileo_E5a.h"
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include <glog/logging.h>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
using google::LogMessage;
 | 
			
		||||
@@ -101,14 +100,14 @@ SignalGenerator::SignalGenerator(ConfigurationInterface* configuration,
 | 
			
		||||
        }
 | 
			
		||||
    else if (std::find(system.begin(), system.end(), "R") != system.end())
 | 
			
		||||
        {
 | 
			
		||||
    		if (signal1[0].at(0) == '1')
 | 
			
		||||
    			{
 | 
			
		||||
    				vector_length = round((float)fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
 | 
			
		||||
    			}
 | 
			
		||||
    		else
 | 
			
		||||
    			{
 | 
			
		||||
    				vector_length = round((float)fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
 | 
			
		||||
    			}
 | 
			
		||||
            if (signal1[0].at(0) == '1')
 | 
			
		||||
                {
 | 
			
		||||
                    vector_length = round((float)fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
 | 
			
		||||
                }
 | 
			
		||||
            else
 | 
			
		||||
                {
 | 
			
		||||
                    vector_length = round((float)fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
 | 
			
		||||
                }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    if (item_type_.compare("gr_complex") == 0)
 | 
			
		||||
 
 | 
			
		||||
@@ -36,10 +36,11 @@
 | 
			
		||||
#include "Galileo_E1.h"
 | 
			
		||||
#include "Galileo_E5a.h"
 | 
			
		||||
#include "GPS_L1_CA.h"
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include <gnuradio/io_signature.h>
 | 
			
		||||
#include <volk_gnsssdr/volk_gnsssdr.h>
 | 
			
		||||
#include <fstream>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
* Create a new instance of signal_generator_c and return
 | 
			
		||||
 
 | 
			
		||||
@@ -40,10 +40,10 @@
 | 
			
		||||
#include "glonass_gnav_utc_model.h"
 | 
			
		||||
#include "gnss_satellite.h"
 | 
			
		||||
#include "gnss_synchro.h"
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include <gnuradio/block.h>
 | 
			
		||||
#include <fstream>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class glonass_l1_ca_telemetry_decoder_cc;
 | 
			
		||||
 
 | 
			
		||||
@@ -270,7 +270,7 @@ int glonass_l2_ca_telemetry_decoder_cc::general_work(int noutput_items __attribu
 | 
			
		||||
                    d_preamble_time_samples = d_symbol_history.at(0).Tracking_sample_counter;  // record the preamble sample stamp
 | 
			
		||||
                }
 | 
			
		||||
        }
 | 
			
		||||
    else if (d_stat == 1)  // posible preamble lock
 | 
			
		||||
    else if (d_stat == 1)  // possible preamble lock
 | 
			
		||||
        {
 | 
			
		||||
            if (abs(corr_value) >= d_symbols_per_preamble)
 | 
			
		||||
                {
 | 
			
		||||
 
 | 
			
		||||
@@ -40,8 +40,8 @@
 | 
			
		||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking.h"
 | 
			
		||||
#include "configuration_interface.h"
 | 
			
		||||
#include "gnss_sdr_flags.h"
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include <glog/logging.h>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
using google::LogMessage;
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,8 @@
 | 
			
		||||
#include "glonass_l1_ca_dll_pll_tracking.h"
 | 
			
		||||
#include "configuration_interface.h"
 | 
			
		||||
#include "gnss_sdr_flags.h"
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include <glog/logging.h>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
using google::LogMessage;
 | 
			
		||||
 
 | 
			
		||||
@@ -38,6 +38,7 @@
 | 
			
		||||
 | 
			
		||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking_cc.h"
 | 
			
		||||
#include "glonass_l1_signal_processing.h"
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include "tracking_discriminators.h"
 | 
			
		||||
#include "lock_detectors.h"
 | 
			
		||||
#include "gnss_sdr_flags.h"
 | 
			
		||||
@@ -53,7 +54,6 @@
 | 
			
		||||
#include <iostream>
 | 
			
		||||
#include <memory>
 | 
			
		||||
#include <sstream>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define CN0_ESTIMATION_SAMPLES 10
 | 
			
		||||
 
 | 
			
		||||
@@ -39,6 +39,7 @@
 | 
			
		||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking_sc.h"
 | 
			
		||||
#include "gnss_synchro.h"
 | 
			
		||||
#include "glonass_l1_signal_processing.h"
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include "tracking_discriminators.h"
 | 
			
		||||
#include "lock_detectors.h"
 | 
			
		||||
#include "gnss_sdr_flags.h"
 | 
			
		||||
@@ -54,7 +55,6 @@
 | 
			
		||||
#include <iostream>
 | 
			
		||||
#include <memory>
 | 
			
		||||
#include <sstream>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define CN0_ESTIMATION_SAMPLES 10
 | 
			
		||||
 
 | 
			
		||||
@@ -38,6 +38,7 @@
 | 
			
		||||
 | 
			
		||||
#include "glonass_l1_ca_dll_pll_tracking_cc.h"
 | 
			
		||||
#include "glonass_l1_signal_processing.h"
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include "tracking_discriminators.h"
 | 
			
		||||
#include "lock_detectors.h"
 | 
			
		||||
#include "gnss_sdr_flags.h"
 | 
			
		||||
@@ -51,7 +52,7 @@
 | 
			
		||||
#include <iostream>
 | 
			
		||||
#include <memory>
 | 
			
		||||
#include <sstream>
 | 
			
		||||
#include "../../../core/system_parameters/GLONASS_L1_L2_CA.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define CN0_ESTIMATION_SAMPLES 10
 | 
			
		||||
using google::LogMessage;
 | 
			
		||||
 
 | 
			
		||||
@@ -604,7 +604,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
 | 
			
		||||
                d_code_phase_step_chips,
 | 
			
		||||
                d_correlation_length_samples);
 | 
			
		||||
 | 
			
		||||
            // ####### coherent intergration extension
 | 
			
		||||
            // ####### coherent integration extension
 | 
			
		||||
            // keep the last symbols
 | 
			
		||||
            d_E_history.push_back(d_correlator_outs[0]);  // save early output
 | 
			
		||||
            d_P_history.push_back(d_correlator_outs[1]);  // save prompt output
 | 
			
		||||
 
 | 
			
		||||
@@ -598,7 +598,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
 | 
			
		||||
                d_code_phase_step_chips,
 | 
			
		||||
                d_correlation_length_samples);
 | 
			
		||||
 | 
			
		||||
            // ####### coherent intergration extension
 | 
			
		||||
            // ####### coherent integration extension
 | 
			
		||||
            // keep the last symbols
 | 
			
		||||
            d_E_history.push_back(d_correlator_outs_16sc[0]);  // save early output
 | 
			
		||||
            d_P_history.push_back(d_correlator_outs_16sc[1]);  // save prompt output
 | 
			
		||||
@@ -711,7 +711,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
 | 
			
		||||
                    d_code_error_filt_chips_Ti = d_code_error_filt_chips_s * CURRENT_INTEGRATION_TIME_S;
 | 
			
		||||
                    code_error_filt_secs_Ti = d_code_error_filt_chips_Ti / d_code_freq_chips;  // [s/Ti]
 | 
			
		||||
 | 
			
		||||
                    // ################## CARRIER AND CODE NCO BUFFER ALIGNEMENT #######################
 | 
			
		||||
                    // ################## CARRIER AND CODE NCO BUFFER ALIGNMENT #######################
 | 
			
		||||
                    // keep alignment parameters for the next input buffer
 | 
			
		||||
                    // Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation
 | 
			
		||||
                    double T_chip_seconds = 1.0 / d_code_freq_chips;
 | 
			
		||||
@@ -741,7 +741,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
 | 
			
		||||
                    d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast<double>(d_fs_in));
 | 
			
		||||
 | 
			
		||||
                    // ####### CN0 ESTIMATION AND LOCK DETECTORS #######################################
 | 
			
		||||
                    if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES )
 | 
			
		||||
                    if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES)
 | 
			
		||||
                        {
 | 
			
		||||
                            // fill buffer with prompt correlator output values
 | 
			
		||||
                            d_Prompt_buffer[d_cn0_estimation_counter] = lv_cmake(static_cast<float>(d_correlator_outs_16sc[1].real()), static_cast<float>(d_correlator_outs_16sc[1].imag()));  // prompt
 | 
			
		||||
 
 | 
			
		||||
@@ -585,7 +585,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
 | 
			
		||||
            double code_error_filt_secs = (T_prn_seconds * code_error_filt_chips * T_chip_seconds);  //[seconds]
 | 
			
		||||
            //double code_error_filt_secs = (GPS_L1_CA_CODE_PERIOD * code_error_filt_chips) / GLONASS_L1_CA_CODE_RATE_HZ; // [seconds]
 | 
			
		||||
 | 
			
		||||
            // ################## CARRIER AND CODE NCO BUFFER ALIGNEMENT #######################
 | 
			
		||||
            // ################## CARRIER AND CODE NCO BUFFER ALIGNMENT #######################
 | 
			
		||||
            // keep alignment parameters for the next input buffer
 | 
			
		||||
            // Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation
 | 
			
		||||
            //double T_chip_seconds =  1.0 / static_cast<double>(d_code_freq_chips);
 | 
			
		||||
 
 | 
			
		||||
@@ -32,8 +32,9 @@
 | 
			
		||||
 | 
			
		||||
#include "glonass_gnav_ephemeris.h"
 | 
			
		||||
#include "gnss_satellite.h"
 | 
			
		||||
#include <cmath>
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include <cmath>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Glonass_Gnav_Ephemeris::Glonass_Gnav_Ephemeris()
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -38,8 +38,8 @@
 | 
			
		||||
#include "glonass_gnav_ephemeris.h"
 | 
			
		||||
#include "glonass_gnav_almanac.h"
 | 
			
		||||
#include "glonass_gnav_utc_model.h"
 | 
			
		||||
#include <bitset>
 | 
			
		||||
#include "GLONASS_L1_L2_CA.h"
 | 
			
		||||
#include <bitset>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*!
 | 
			
		||||
@@ -63,8 +63,8 @@ public:
 | 
			
		||||
    int i_channel_ID;
 | 
			
		||||
    unsigned int i_satellite_PRN;
 | 
			
		||||
 | 
			
		||||
    Glonass_Gnav_Ephemeris gnav_ephemeris;                      //!< Ephemeris information decoded
 | 
			
		||||
    Glonass_Gnav_Utc_Model gnav_utc_model;                      //!< UTC model information
 | 
			
		||||
    Glonass_Gnav_Ephemeris gnav_ephemeris;                   //!< Ephemeris information decoded
 | 
			
		||||
    Glonass_Gnav_Utc_Model gnav_utc_model;                   //!< UTC model information
 | 
			
		||||
    Glonass_Gnav_Almanac gnav_almanac[GLONASS_CA_NBR_SATS];  //!< Almanac information for all 24 satellites
 | 
			
		||||
 | 
			
		||||
    // Ephemeris Flags and control variables
 | 
			
		||||
@@ -100,7 +100,7 @@ public:
 | 
			
		||||
    double d_dtr;          //!<  Relativistic clock correction term
 | 
			
		||||
    double d_satClkDrift;  //!<  Satellite clock drift
 | 
			
		||||
 | 
			
		||||
    double d_previous_tb;                          //!< Previous iode for the Glonass_Gnav_Ephemeris object. Used to determine when new data arrives
 | 
			
		||||
    double d_previous_tb;                       //!< Previous iode for the Glonass_Gnav_Ephemeris object. Used to determine when new data arrives
 | 
			
		||||
    double d_previous_Na[GLONASS_CA_NBR_SATS];  //!< Previous time for almanac of the Glonass_Gnav_Almanac object
 | 
			
		||||
 | 
			
		||||
    /*!
 | 
			
		||||
 
 | 
			
		||||
@@ -271,9 +271,16 @@ if(ENABLE_UNIT_TESTING_EXTRA)
 | 
			
		||||
           SHOW_PROGRESS
 | 
			
		||||
           EXPECTED_HASH MD5=ffb72fc63c116be58d5e5ccb1daaed3a )
 | 
			
		||||
   endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat)
 | 
			
		||||
   # if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin)
 | 
			
		||||
   #   message(STATUS "Downloading some data files for testing...")
 | 
			
		||||
   #   file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin
 | 
			
		||||
   #        SHOW_PROGRESS
 | 
			
		||||
   #        EXPECTED_HASH MD5=d7055fc1dc931872b547a148af50a09b )
 | 
			
		||||
   # endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin)
 | 
			
		||||
   if(ENABLE_INSTALL_TESTS)
 | 
			
		||||
      install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat DESTINATION share/gnss-sdr/signal_samples)
 | 
			
		||||
      install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
 | 
			
		||||
      # install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin DESTINATION share/gnss-sdr/signal_samples)
 | 
			
		||||
   endif(ENABLE_INSTALL_TESTS)
 | 
			
		||||
endif(ENABLE_UNIT_TESTING_EXTRA)
 | 
			
		||||
 | 
			
		||||
@@ -282,14 +289,12 @@ if(ENABLE_INSTALL_TESTS)
 | 
			
		||||
   install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION share/gnss-sdr/signal_samples)
 | 
			
		||||
   install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION share/gnss-sdr/signal_samples)
 | 
			
		||||
   install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin DESTINATION share/gnss-sdr/signal_samples)
 | 
			
		||||
   install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin DESTINATION share/gnss-sdr/signal_samples)
 | 
			
		||||
   add_definitions(-DTEST_PATH="${CMAKE_INSTALL_PREFIX}/share/gnss-sdr/")
 | 
			
		||||
else(ENABLE_INSTALL_TESTS)
 | 
			
		||||
   file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
 | 
			
		||||
   file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
 | 
			
		||||
   file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
 | 
			
		||||
   file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
 | 
			
		||||
   file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/NT1065_GLONASS_L2_20160831_fs6625e6_if0e3_4ms.bin DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
 | 
			
		||||
   add_definitions(-DTEST_PATH="${CMAKE_SOURCE_DIR}/thirdparty/")
 | 
			
		||||
endif(ENABLE_INSTALL_TESTS)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -244,17 +244,17 @@ void GlonassL2CaPcpsAcquisitionTest::config_1()
 | 
			
		||||
    config->set_property("InputFilter.filter_type", "bandpass");
 | 
			
		||||
    config->set_property("InputFilter.grid_density", "16");
 | 
			
		||||
 | 
			
		||||
    config->set_property("Acquisition.item_type", "gr_complex");
 | 
			
		||||
    config->set_property("Acquisition.if", "4000000");
 | 
			
		||||
    config->set_property("Acquisition.coherent_integration_time_ms",
 | 
			
		||||
    config->set_property("Acquisition_2G.item_type", "gr_complex");
 | 
			
		||||
    config->set_property("Acquisition_2G.if", "4000000");
 | 
			
		||||
    config->set_property("Acquisition_2G.coherent_integration_time_ms",
 | 
			
		||||
        std::to_string(integration_time_ms));
 | 
			
		||||
    config->set_property("Acquisition.max_dwells", "1");
 | 
			
		||||
    config->set_property("Acquisition.implementation", "GLONASS_L2_CA_PCPS_Acquisition");
 | 
			
		||||
    config->set_property("Acquisition.threshold", "0.8");
 | 
			
		||||
    config->set_property("Acquisition.doppler_max", "10000");
 | 
			
		||||
    config->set_property("Acquisition.doppler_step", "250");
 | 
			
		||||
    config->set_property("Acquisition.bit_transition_flag", "false");
 | 
			
		||||
    config->set_property("Acquisition.dump", "false");
 | 
			
		||||
    config->set_property("Acquisition_2G.max_dwells", "1");
 | 
			
		||||
    config->set_property("Acquisition_2G.implementation", "GLONASS_L2_CA_PCPS_Acquisition");
 | 
			
		||||
    config->set_property("Acquisition_2G.threshold", "0.8");
 | 
			
		||||
    config->set_property("Acquisition_2G.doppler_max", "10000");
 | 
			
		||||
    config->set_property("Acquisition_2G.doppler_step", "250");
 | 
			
		||||
    config->set_property("Acquisition_2G.bit_transition_flag", "false");
 | 
			
		||||
    config->set_property("Acquisition_2G.dump", "false");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -332,17 +332,17 @@ void GlonassL2CaPcpsAcquisitionTest::config_2()
 | 
			
		||||
    config->set_property("InputFilter.filter_type", "bandpass");
 | 
			
		||||
    config->set_property("InputFilter.grid_density", "16");
 | 
			
		||||
 | 
			
		||||
    config->set_property("Acquisition.item_type", "gr_complex");
 | 
			
		||||
    config->set_property("Acquisition.if", "4000000");
 | 
			
		||||
    config->set_property("Acquisition.coherent_integration_time_ms",
 | 
			
		||||
    config->set_property("Acquisition_2G.item_type", "gr_complex");
 | 
			
		||||
    config->set_property("Acquisition_2G.if", "4000000");
 | 
			
		||||
    config->set_property("Acquisition_2G.coherent_integration_time_ms",
 | 
			
		||||
        std::to_string(integration_time_ms));
 | 
			
		||||
    config->set_property("Acquisition.max_dwells", "1");
 | 
			
		||||
    config->set_property("Acquisition.implementation", "GLONASS_L2_CA_PCPS_Acquisition");
 | 
			
		||||
    config->set_property("Acquisition.pfa", "0.1");
 | 
			
		||||
    config->set_property("Acquisition.doppler_max", "10000");
 | 
			
		||||
    config->set_property("Acquisition.doppler_step", "250");
 | 
			
		||||
    config->set_property("Acquisition.bit_transition_flag", "false");
 | 
			
		||||
    config->set_property("Acquisition.dump", "false");
 | 
			
		||||
    config->set_property("Acquisition_2G.max_dwells", "1");
 | 
			
		||||
    config->set_property("Acquisition_2G.implementation", "GLONASS_L2_CA_PCPS_Acquisition");
 | 
			
		||||
    config->set_property("Acquisition_2G.pfa", "0.01");
 | 
			
		||||
    config->set_property("Acquisition_2G.doppler_max", "10000");
 | 
			
		||||
    config->set_property("Acquisition_2G.doppler_step", "250");
 | 
			
		||||
    config->set_property("Acquisition_2G.bit_transition_flag", "false");
 | 
			
		||||
    config->set_property("Acquisition_2G.dump", "false");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -442,7 +442,7 @@ TEST_F(GlonassL2CaPcpsAcquisitionTest, ConnectAndRun)
 | 
			
		||||
    top_block = gr::make_top_block("Acquisition test");
 | 
			
		||||
 | 
			
		||||
    config_1();
 | 
			
		||||
    acquisition = new GlonassL2CaPcpsAcquisition(config.get(), "Acquisition", 1, 1);
 | 
			
		||||
    acquisition = new GlonassL2CaPcpsAcquisition(config.get(), "Acquisition_2G", 1, 1);
 | 
			
		||||
    boost::shared_ptr<GlonassL2CaPcpsAcquisitionTest_msg_rx> msg_rx = GlonassL2CaPcpsAcquisitionTest_msg_rx_make(channel_internal_queue);
 | 
			
		||||
 | 
			
		||||
    ASSERT_NO_THROW({
 | 
			
		||||
@@ -473,7 +473,7 @@ TEST_F(GlonassL2CaPcpsAcquisitionTest, ValidationOfResults)
 | 
			
		||||
    queue = gr::msg_queue::make(0);
 | 
			
		||||
    top_block = gr::make_top_block("Acquisition test");
 | 
			
		||||
 | 
			
		||||
    acquisition = new GlonassL2CaPcpsAcquisition(config.get(), "Acquisition", 1, 1);
 | 
			
		||||
    acquisition = new GlonassL2CaPcpsAcquisition(config.get(), "Acquisition_2G", 1, 1);
 | 
			
		||||
    boost::shared_ptr<GlonassL2CaPcpsAcquisitionTest_msg_rx> msg_rx = GlonassL2CaPcpsAcquisitionTest_msg_rx_make(channel_internal_queue);
 | 
			
		||||
 | 
			
		||||
    ASSERT_NO_THROW({
 | 
			
		||||
@@ -493,7 +493,7 @@ TEST_F(GlonassL2CaPcpsAcquisitionTest, ValidationOfResults)
 | 
			
		||||
    }) << "Failure setting doppler_step.";
 | 
			
		||||
 | 
			
		||||
    ASSERT_NO_THROW({
 | 
			
		||||
        acquisition->set_threshold(0.5);
 | 
			
		||||
        acquisition->set_threshold(0.0005);
 | 
			
		||||
    }) << "Failure setting threshold.";
 | 
			
		||||
 | 
			
		||||
    ASSERT_NO_THROW({
 | 
			
		||||
@@ -568,39 +568,33 @@ TEST_F(GlonassL2CaPcpsAcquisitionTest, ValidationOfResultsProbabilities)
 | 
			
		||||
    config_2();
 | 
			
		||||
    queue = gr::msg_queue::make(0);
 | 
			
		||||
    top_block = gr::make_top_block("Acquisition test");
 | 
			
		||||
    acquisition = new GlonassL2CaPcpsAcquisition(config.get(), "Acquisition", 1, 1);
 | 
			
		||||
    acquisition = new GlonassL2CaPcpsAcquisition(config.get(), "Acquisition_2G", 1, 1);
 | 
			
		||||
    boost::shared_ptr<GlonassL2CaPcpsAcquisitionTest_msg_rx> msg_rx = GlonassL2CaPcpsAcquisitionTest_msg_rx_make(channel_internal_queue);
 | 
			
		||||
 | 
			
		||||
    ASSERT_NO_THROW({
 | 
			
		||||
        acquisition->set_channel(1);
 | 
			
		||||
    }) << "Failure setting channel."
 | 
			
		||||
       << std::endl;
 | 
			
		||||
    }) << "Failure setting channel.";
 | 
			
		||||
 | 
			
		||||
    ASSERT_NO_THROW({
 | 
			
		||||
        acquisition->set_gnss_synchro(&gnss_synchro);
 | 
			
		||||
    }) << "Failure setting gnss_synchro."
 | 
			
		||||
       << std::endl;
 | 
			
		||||
    }) << "Failure setting gnss_synchro.";
 | 
			
		||||
 | 
			
		||||
    ASSERT_NO_THROW({
 | 
			
		||||
        acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000));
 | 
			
		||||
    }) << "Failure setting doppler_max."
 | 
			
		||||
       << std::endl;
 | 
			
		||||
        acquisition->set_doppler_max(config->property("Acquisition_2G.doppler_max", 10000));
 | 
			
		||||
    }) << "Failure setting doppler_max.";
 | 
			
		||||
 | 
			
		||||
    ASSERT_NO_THROW({
 | 
			
		||||
        acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500));
 | 
			
		||||
    }) << "Failure setting doppler_step."
 | 
			
		||||
       << std::endl;
 | 
			
		||||
        acquisition->set_doppler_step(config->property("Acquisition_2G.doppler_step", 500));
 | 
			
		||||
    }) << "Failure setting doppler_step.";
 | 
			
		||||
 | 
			
		||||
    ASSERT_NO_THROW({
 | 
			
		||||
        acquisition->set_threshold(config->property("Acquisition.threshold", 0.0));
 | 
			
		||||
    }) << "Failure setting threshold."
 | 
			
		||||
       << std::endl;
 | 
			
		||||
        acquisition->set_threshold(config->property("Acquisition_2G.threshold", 0.0));
 | 
			
		||||
    }) << "Failure setting threshold.";
 | 
			
		||||
 | 
			
		||||
    ASSERT_NO_THROW({
 | 
			
		||||
        acquisition->connect(top_block);
 | 
			
		||||
        top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
 | 
			
		||||
    }) << "Failure connecting acquisition to the top_block."
 | 
			
		||||
       << std::endl;
 | 
			
		||||
    }) << "Failure connecting acquisition to the top_block.";
 | 
			
		||||
 | 
			
		||||
    acquisition->init();
 | 
			
		||||
 | 
			
		||||
@@ -611,8 +605,7 @@ TEST_F(GlonassL2CaPcpsAcquisitionTest, ValidationOfResultsProbabilities)
 | 
			
		||||
        signal_source.reset(new GenSignalSource(signal_generator, filter, "SignalSource", queue));
 | 
			
		||||
        signal_source->connect(top_block);
 | 
			
		||||
        top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
 | 
			
		||||
    }) << "Failure connecting the blocks of acquisition test."
 | 
			
		||||
       << std::endl;
 | 
			
		||||
    }) << "Failure connecting the blocks of acquisition test.";
 | 
			
		||||
 | 
			
		||||
    std::cout << "Probability of false alarm (target) = " << 0.1 << std::endl;
 | 
			
		||||
 | 
			
		||||
@@ -637,8 +630,7 @@ TEST_F(GlonassL2CaPcpsAcquisitionTest, ValidationOfResultsProbabilities)
 | 
			
		||||
 | 
			
		||||
            EXPECT_NO_THROW({
 | 
			
		||||
                top_block->run();  // Start threads and wait
 | 
			
		||||
            }) << "Failure running the top_block."
 | 
			
		||||
               << std::endl;
 | 
			
		||||
            }) << "Failure running the top_block.";
 | 
			
		||||
 | 
			
		||||
            if (i == 0)
 | 
			
		||||
                {
 | 
			
		||||
@@ -654,14 +646,12 @@ TEST_F(GlonassL2CaPcpsAcquisitionTest, ValidationOfResultsProbabilities)
 | 
			
		||||
#ifdef OLD_BOOST
 | 
			
		||||
            ASSERT_NO_THROW({
 | 
			
		||||
                ch_thread.timed_join(boost::posix_time::seconds(1));
 | 
			
		||||
            }) << "Failure while waiting the queue to stop"
 | 
			
		||||
               << std::endl;
 | 
			
		||||
            }) << "Failure while waiting the queue to stop";
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef OLD_BOOST
 | 
			
		||||
            ASSERT_NO_THROW({
 | 
			
		||||
                ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
 | 
			
		||||
            }) << "Failure while waiting the queue to stop"
 | 
			
		||||
               << std::endl;
 | 
			
		||||
            }) << "Failure while waiting the queue to stop";
 | 
			
		||||
#endif
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user