diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index 96827272a..911c9e36e 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -795,6 +795,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, Rtklib_Pvt::~Rtklib_Pvt() { + DLOG(INFO) << "PVT adapter destructor called."; rtkfree(&rtk); } diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h index b658731bf..99c00b36c 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h @@ -160,6 +160,9 @@ private: bool save_gnss_synchro_map_xml(const std::string& file_name); // debug helper function bool load_gnss_synchro_map_xml(const std::string& file_name); // debug helper function + std::shared_ptr d_internal_pvt_solver; + std::shared_ptr d_user_pvt_solver; + std::unique_ptr d_rp; std::unique_ptr d_kml_dump; std::unique_ptr d_gpx_dump; @@ -168,9 +171,6 @@ private: std::unique_ptr d_rtcm_printer; std::unique_ptr d_udp_sink_ptr; - std::shared_ptr d_internal_pvt_solver; - std::shared_ptr d_user_pvt_solver; - std::chrono::time_point d_start; std::chrono::time_point d_end; diff --git a/src/algorithms/PVT/libs/geojson_printer.cc b/src/algorithms/PVT/libs/geojson_printer.cc index bb13c1ae0..06e046976 100644 --- a/src/algorithms/PVT/libs/geojson_printer.cc +++ b/src/algorithms/PVT/libs/geojson_printer.cc @@ -87,6 +87,7 @@ GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path) GeoJSON_Printer::~GeoJSON_Printer() { + DLOG(INFO) << "GeoJSON printer destructor called."; try { GeoJSON_Printer::close_file(); diff --git a/src/algorithms/PVT/libs/gpx_printer.cc b/src/algorithms/PVT/libs/gpx_printer.cc index d60e54235..8ddee75ca 100644 --- a/src/algorithms/PVT/libs/gpx_printer.cc +++ b/src/algorithms/PVT/libs/gpx_printer.cc @@ -228,6 +228,7 @@ bool Gpx_Printer::close_file() Gpx_Printer::~Gpx_Printer() { + DLOG(INFO) << "GPX printer destructor called."; try { close_file(); diff --git a/src/algorithms/PVT/libs/kml_printer.cc b/src/algorithms/PVT/libs/kml_printer.cc index d8978faf3..71ddfaa0d 100644 --- a/src/algorithms/PVT/libs/kml_printer.cc +++ b/src/algorithms/PVT/libs/kml_printer.cc @@ -340,6 +340,7 @@ bool Kml_Printer::close_file() Kml_Printer::~Kml_Printer() { + DLOG(INFO) << "KML printer destructor called."; try { close_file(); diff --git a/src/algorithms/PVT/libs/nmea_printer.cc b/src/algorithms/PVT/libs/nmea_printer.cc index 559d51a99..e3ae93341 100644 --- a/src/algorithms/PVT/libs/nmea_printer.cc +++ b/src/algorithms/PVT/libs/nmea_printer.cc @@ -125,6 +125,7 @@ Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_fi Nmea_Printer::~Nmea_Printer() { + DLOG(INFO) << "NMEA printer destructor called."; auto pos = nmea_file_descriptor.tellp(); try { diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index 3293bb912..1c71618dd 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -234,6 +234,7 @@ Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path, Rinex_Printer::~Rinex_Printer() { + DLOG(INFO) << "RINEX printer destructor called."; // close RINEX files int64_t posn; int64_t poso; diff --git a/src/algorithms/PVT/libs/rtcm.cc b/src/algorithms/PVT/libs/rtcm.cc index 65840b3bd..8240d8bd2 100644 --- a/src/algorithms/PVT/libs/rtcm.cc +++ b/src/algorithms/PVT/libs/rtcm.cc @@ -49,6 +49,7 @@ Rtcm::Rtcm(uint16_t port) Rtcm::~Rtcm() { + DLOG(INFO) << "RTCM object destructor called."; if (server_is_running) { try diff --git a/src/algorithms/PVT/libs/rtcm_printer.cc b/src/algorithms/PVT/libs/rtcm_printer.cc index 625d948e1..bb1babfc1 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.cc +++ b/src/algorithms/PVT/libs/rtcm_printer.cc @@ -24,6 +24,7 @@ #include "galileo_ephemeris.h" #include "glonass_gnav_ephemeris.h" #include "glonass_gnav_utc_model.h" +#include "gnss_sdr_make_unique.h" #include "gnss_synchro.h" #include "gps_cnav_ephemeris.h" #include "gps_ephemeris.h" @@ -170,7 +171,7 @@ Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump port = rtcm_tcp_port; station_id = rtcm_station_id; - rtcm = std::make_shared(port); + rtcm = std::make_unique(port); if (flag_rtcm_server) { @@ -181,6 +182,7 @@ Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump Rtcm_Printer::~Rtcm_Printer() { + DLOG(INFO) << "RTCM printer destructor called."; if (rtcm->is_server_running()) { try diff --git a/src/algorithms/PVT/libs/rtcm_printer.h b/src/algorithms/PVT/libs/rtcm_printer.h index 9cb36464a..89de3f317 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.h +++ b/src/algorithms/PVT/libs/rtcm_printer.h @@ -150,7 +150,7 @@ private: void close_serial(); bool Print_Message(const std::string& message); - std::shared_ptr rtcm; + std::unique_ptr rtcm; std::ofstream rtcm_file_descriptor; // Output file stream for RTCM log file std::string rtcm_filename; // String with the RTCM log filename std::string rtcm_base_path; diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index e7dc48f70..c0715d340 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -98,6 +98,7 @@ Rtklib_Solver::Rtklib_Solver(int nchannels, const std::string &dump_filename, bo Rtklib_Solver::~Rtklib_Solver() { + DLOG(INFO) << "Rtklib_Solver destructor called."; if (d_dump_file.is_open() == true) { auto pos = d_dump_file.tellp(); diff --git a/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h b/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h index 13ed28e62..d502c6d25 100644 --- a/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h @@ -149,25 +149,25 @@ public: void set_resampler_latency(uint32_t latency_samples) override; private: - ConfigurationInterface* configuration_; pcps_acquisition_sptr acquisition_; - Acq_Conf acq_parameters_; + std::vector> code_; + std::weak_ptr channel_fsm_; gr::blocks::float_to_complex::sptr float_to_complex_; complex_byte_to_float_x2_sptr cbyte_to_float_x2_; - size_t item_size_; + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + Acq_Conf acq_parameters_; std::string item_type_; + std::string role_; + std::string dump_filename_; + size_t item_size_; + int64_t fs_in_; + float threshold_; unsigned int vector_length_; unsigned int code_length_; unsigned int channel_; - std::weak_ptr channel_fsm_; - float threshold_; unsigned int doppler_max_; unsigned int doppler_step_; - int64_t fs_in_; - std::string dump_filename_; - std::vector> code_; - Gnss_Synchro* gnss_synchro_; - std::string role_; unsigned int num_codes_; unsigned int in_streams_; unsigned int out_streams_; diff --git a/src/algorithms/acquisition/adapters/beidou_b3i_pcps_acquisition.h b/src/algorithms/acquisition/adapters/beidou_b3i_pcps_acquisition.h index a21589291..dce64b797 100644 --- a/src/algorithms/acquisition/adapters/beidou_b3i_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/beidou_b3i_pcps_acquisition.h @@ -148,25 +148,25 @@ public: void set_resampler_latency(uint32_t latency_samples) override; private: - ConfigurationInterface* configuration_; pcps_acquisition_sptr acquisition_; - Acq_Conf acq_parameters_; + std::vector> code_; + std::weak_ptr channel_fsm_; gr::blocks::float_to_complex::sptr float_to_complex_; complex_byte_to_float_x2_sptr cbyte_to_float_x2_; - size_t item_size_; + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + Acq_Conf acq_parameters_; std::string item_type_; + std::string role_; + std::string dump_filename_; + size_t item_size_; + int64_t fs_in_; + float threshold_; unsigned int vector_length_; unsigned int code_length_; unsigned int channel_; - std::weak_ptr channel_fsm_; - float threshold_; unsigned int doppler_max_; unsigned int doppler_step_; - int64_t fs_in_; - std::string dump_filename_; - std::vector> code_; - Gnss_Synchro* gnss_synchro_; - std::string role_; unsigned int num_codes_; unsigned int in_streams_; unsigned int out_streams_; diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h index 4f729d44e..d5a8e9d73 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h @@ -152,30 +152,30 @@ public: void set_resampler_latency(uint32_t latency_samples) override; private: - ConfigurationInterface* configuration_; - Acq_Conf acq_parameters_; pcps_acquisition_sptr acquisition_; + std::vector> code_; + std::weak_ptr channel_fsm_; gr::blocks::float_to_complex::sptr float_to_complex_; complex_byte_to_float_x2_sptr cbyte_to_float_x2_; - size_t item_size_; + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + Acq_Conf acq_parameters_; std::string item_type_; + std::string dump_filename_; + std::string role_; + int64_t fs_in_; + size_t item_size_; + float threshold_; + int doppler_center_; unsigned int vector_length_; unsigned int code_length_; - bool acquire_pilot_; unsigned int channel_; - std::weak_ptr channel_fsm_; - float threshold_; unsigned int doppler_max_; unsigned int doppler_step_; - int doppler_center_; unsigned int sampled_ms_; - int64_t fs_in_; - std::string dump_filename_; - std::vector> code_; - Gnss_Synchro* gnss_synchro_; - std::string role_; unsigned int in_streams_; unsigned int out_streams_; + bool acquire_pilot_; }; #endif // GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h index 57f949fbb..58a107736 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h @@ -185,20 +185,20 @@ private: static const uint32_t select_all_code_bits = 0xFFFFFFFF; // Select a 20 bit word static const uint32_t shl_code_bits = 65536; // shift left by 10 bits - ConfigurationInterface* configuration_; pcps_acquisition_fpga_sptr acquisition_fpga_; - bool acquire_pilot_; - uint32_t channel_; + std::vector d_all_fft_codes_; // memory that contains all the code ffts std::weak_ptr channel_fsm_; + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + std::string dump_filename_; + std::string role_; + int32_t doppler_center_; + uint32_t channel_; uint32_t doppler_max_; uint32_t doppler_step_; - int32_t doppler_center_; - std::string dump_filename_; - Gnss_Synchro* gnss_synchro_; - std::string role_; unsigned int in_streams_; unsigned int out_streams_; - std::vector d_all_fft_codes_; // memory that contains all the code ffts + bool acquire_pilot_; }; #endif // GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h index 1c2464dd9..2f574abf7 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h @@ -143,29 +143,29 @@ public: void set_resampler_latency(uint32_t latency_samples) override; private: - ConfigurationInterface* configuration_; pcps_acquisition_sptr acquisition_; + std::vector> code_; + std::weak_ptr channel_fsm_; + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; Acq_Conf acq_parameters_; - size_t item_size_; std::string item_type_; std::string dump_filename_; std::string role_; - bool acq_pilot_; - bool acq_iq_; + int64_t fs_in_; + size_t item_size_; + float threshold_; + int doppler_center_; unsigned int vector_length_; unsigned int code_length_; unsigned int channel_; - std::weak_ptr channel_fsm_; unsigned int doppler_max_; unsigned int doppler_step_; - int doppler_center_; unsigned int sampled_ms_; unsigned int in_streams_; unsigned int out_streams_; - int64_t fs_in_; - float threshold_; - std::vector> code_; - Gnss_Synchro* gnss_synchro_; + bool acq_pilot_; + bool acq_iq_; }; #endif // GNSS_SDR_GALILEO_E5A_PCPS_ACQUISITION_H diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h index ecc60823a..14dd1bf03 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h @@ -192,22 +192,22 @@ private: static const uint32_t select_all_code_bits = 0xFFFFFFFF; // Select a 20 bit word static const uint32_t shl_code_bits = 65536; // shift left by 10 bits - ConfigurationInterface* configuration_; pcps_acquisition_fpga_sptr acquisition_fpga_; + std::weak_ptr channel_fsm_; + std::vector d_all_fft_codes_; // memory that contains all the code ffts + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + std::string role_; std::string item_type_; std::string dump_filename_; - std::string role_; - bool acq_pilot_; - bool acq_iq_; + int32_t doppler_center_; uint32_t channel_; - std::weak_ptr channel_fsm_; uint32_t doppler_max_; uint32_t doppler_step_; - int32_t doppler_center_; unsigned int in_streams_; unsigned int out_streams_; - Gnss_Synchro* gnss_synchro_; - std::vector d_all_fft_codes_; // memory that contains all the code ffts + bool acq_pilot_; + bool acq_iq_; }; #endif // GNSS_SDR_GALILEO_E5A_PCPS_ACQUISITION_FPGA_H diff --git a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h index 5f9ec3ac4..c2f204da9 100644 --- a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h @@ -145,26 +145,26 @@ public: void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{}; private: - ConfigurationInterface* configuration_; - Acq_Conf acq_parameters_; pcps_acquisition_sptr acquisition_; + std::vector> code_; + std::weak_ptr channel_fsm_; gr::blocks::float_to_complex::sptr float_to_complex_; complex_byte_to_float_x2_sptr cbyte_to_float_x2_; - size_t item_size_; + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + Acq_Conf acq_parameters_; std::string item_type_; + std::string dump_filename_; + std::string role_; + int64_t fs_in_; + size_t item_size_; + float threshold_; unsigned int vector_length_; unsigned int code_length_; unsigned int channel_; - std::weak_ptr channel_fsm_; - float threshold_; unsigned int doppler_max_; unsigned int doppler_step_; unsigned int sampled_ms_; - int64_t fs_in_; - std::string dump_filename_; - std::vector> code_; - Gnss_Synchro* gnss_synchro_; - std::string role_; unsigned int in_streams_; unsigned int out_streams_; }; diff --git a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h index 94870c48a..7fa249f74 100644 --- a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h @@ -144,26 +144,26 @@ public: void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{}; private: - ConfigurationInterface* configuration_; - Acq_Conf acq_parameters_; pcps_acquisition_sptr acquisition_; + std::vector> code_; + std::weak_ptr channel_fsm_; gr::blocks::float_to_complex::sptr float_to_complex_; complex_byte_to_float_x2_sptr cbyte_to_float_x2_; - size_t item_size_; + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + Acq_Conf acq_parameters_; std::string item_type_; + std::string dump_filename_; + std::string role_; + int64_t fs_in_; + size_t item_size_; + float threshold_; unsigned int vector_length_; unsigned int code_length_; unsigned int channel_; - std::weak_ptr channel_fsm_; - float threshold_; unsigned int doppler_max_; unsigned int doppler_step_; unsigned int sampled_ms_; - int64_t fs_in_; - std::string dump_filename_; - std::vector> code_; - Gnss_Synchro* gnss_synchro_; - std::string role_; unsigned int in_streams_; unsigned int out_streams_; }; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h index 22e945573..3726632d3 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h @@ -156,26 +156,26 @@ public: void set_resampler_latency(uint32_t latency_samples) override; private: - ConfigurationInterface* configuration_; pcps_acquisition_sptr acquisition_; - Acq_Conf acq_parameters_; + std::vector> code_; + std::weak_ptr channel_fsm_; gr::blocks::float_to_complex::sptr float_to_complex_; complex_byte_to_float_x2_sptr cbyte_to_float_x2_; - size_t item_size_; + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + Acq_Conf acq_parameters_; std::string item_type_; + std::string dump_filename_; + std::string role_; + size_t item_size_; + float threshold_; + int doppler_center_; unsigned int vector_length_; unsigned int code_length_; unsigned int channel_; - std::weak_ptr channel_fsm_; - float threshold_; unsigned int doppler_max_; unsigned int doppler_step_; - int doppler_center_; unsigned int sampled_ms_; - std::string dump_filename_; - std::vector> code_; - Gnss_Synchro* gnss_synchro_; - std::string role_; unsigned int in_streams_; unsigned int out_streams_; }; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h index bd4192773..eb74091a3 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h @@ -190,19 +190,18 @@ private: static const uint32_t select_all_code_bits = 0xFFFFFFFF; // Select a 20 bit word static const uint32_t shl_code_bits = 65536; // shift left by 10 bits - - ConfigurationInterface* configuration_; pcps_acquisition_fpga_sptr acquisition_fpga_; - uint32_t channel_; std::weak_ptr channel_fsm_; + std::vector d_all_fft_codes_; // memory that contains all the code ffts + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + std::string role_; + int32_t doppler_center_; + uint32_t channel_; uint32_t doppler_max_; uint32_t doppler_step_; - int32_t doppler_center_; - Gnss_Synchro* gnss_synchro_; - std::string role_; unsigned int in_streams_; unsigned int out_streams_; - std::vector d_all_fft_codes_; // memory that contains all the code ffts }; #endif // GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FPGA_H diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h index 50de93b3a..6bf47245c 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h @@ -153,26 +153,26 @@ public: void set_resampler_latency(uint32_t latency_samples) override; private: - ConfigurationInterface* configuration_; pcps_acquisition_sptr acquisition_; - Acq_Conf acq_parameters_; + std::vector> code_; gr::blocks::float_to_complex::sptr float_to_complex_; complex_byte_to_float_x2_sptr cbyte_to_float_x2_; - size_t item_size_; + std::weak_ptr channel_fsm_; + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + Acq_Conf acq_parameters_; std::string item_type_; + std::string dump_filename_; + std::string role_; + size_t item_size_; + int64_t fs_in_; + float threshold_; + int doppler_center_; unsigned int vector_length_; unsigned int code_length_; unsigned int channel_; - std::weak_ptr channel_fsm_; - float threshold_; unsigned int doppler_max_; unsigned int doppler_step_; - int doppler_center_; - int64_t fs_in_; - std::string dump_filename_; - std::vector> code_; - Gnss_Synchro* gnss_synchro_; - std::string role_; unsigned int in_streams_; unsigned int out_streams_; unsigned int num_codes_; diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h index 8b53a85a4..fb5e1bc44 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h @@ -151,21 +151,21 @@ private: static const uint32_t SELECT_ALL_CODE_BITS = 0xFFFFFFFF; // Select a 20 bit word static const uint32_t SHL_CODE_BITS = 65536; // shift left by 10 bits - ConfigurationInterface* configuration_; pcps_acquisition_fpga_sptr acquisition_fpga_; - std::string item_type_; - unsigned int channel_; + std::vector d_all_fft_codes_; // memory that contains all the code ffts std::weak_ptr channel_fsm_; + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + std::string item_type_; + std::string dump_filename_; + std::string role_; + int64_t fs_in_; float threshold_; + unsigned int channel_; unsigned int doppler_max_; unsigned int doppler_step_; - int64_t fs_in_; - std::string dump_filename_; - Gnss_Synchro* gnss_synchro_; - std::string role_; unsigned int in_streams_; unsigned int out_streams_; - std::vector d_all_fft_codes_; // memory that contains all the code ffts }; #endif // GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_FPGA_H diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h index f4d7d8937..32dc15551 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h @@ -153,29 +153,29 @@ public: void set_resampler_latency(uint32_t latency_samples) override; private: - ConfigurationInterface* configuration_; pcps_acquisition_sptr acquisition_; - Acq_Conf acq_parameters_; + std::vector> code_; gr::blocks::float_to_complex::sptr float_to_complex_; complex_byte_to_float_x2_sptr cbyte_to_float_x2_; - size_t item_size_; + std::weak_ptr channel_fsm_; + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + Acq_Conf acq_parameters_; std::string item_type_; + std::string dump_filename_; + std::string role_; + size_t item_size_; + int64_t fs_in_; + float threshold_; + int doppler_center_; unsigned int vector_length_; unsigned int code_length_; unsigned int channel_; - std::weak_ptr channel_fsm_; - float threshold_; unsigned int doppler_max_; unsigned int doppler_step_; - int doppler_center_; - int64_t fs_in_; - std::string dump_filename_; - std::vector> code_; - Gnss_Synchro* gnss_synchro_; - std::string role_; - unsigned int num_codes_; unsigned int in_streams_; unsigned int out_streams_; + unsigned int num_codes_; }; #endif // GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_H diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h index 2cb02543f..36c76fca4 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h @@ -188,21 +188,22 @@ private: static const uint32_t select_all_code_bits = 0xFFFFFFFF; // Select a 20 bit word static const uint32_t shl_code_bits = 65536; // shift left by 10 bits - ConfigurationInterface* configuration_; + float calculate_threshold(float pfa); + pcps_acquisition_fpga_sptr acquisition_fpga_; - std::string item_type_; - uint32_t channel_; std::weak_ptr channel_fsm_; + std::vector d_all_fft_codes_; // memory that contains all the code ffts + Gnss_Synchro* gnss_synchro_; + ConfigurationInterface* configuration_; + std::string item_type_; + std::string dump_filename_; + std::string role_; + int32_t doppler_center_; + uint32_t channel_; uint32_t doppler_max_; uint32_t doppler_step_; - int32_t doppler_center_; - std::string dump_filename_; - Gnss_Synchro* gnss_synchro_; - std::string role_; unsigned int in_streams_; unsigned int out_streams_; - std::vector d_all_fft_codes_; // memory that contains all the code ffts - float calculate_threshold(float pfa); }; #endif // GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h index 55f8916cf..66574cc87 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h @@ -97,6 +97,11 @@ class pcps_acquisition : public gr::block public: ~pcps_acquisition() = default; + /*! + * \brief Initializes acquisition algorithm and reserves memory. + */ + void init(); + /*! * \brief Set acquisition/tracking common Gnss_Synchro object pointer * to exchange synchronization data between acquisition and tracking blocks. @@ -108,6 +113,21 @@ public: d_gnss_synchro = p_gnss_synchro; } + /*! + * \brief Sets local code for PCPS acquisition algorithm. + * \param code - Pointer to the PRN code. + */ + void set_local_code(std::complex* code); + + /*! + * \brief If set to 1, ensures that acquisition starts at the + * first available sample. + * \param state - int=1 forces start of acquisition + */ + void set_state(int32_t state); + + void set_resampler_latency(uint32_t latency_samples); + /*! * \brief Returns the maximum peak of grid search. */ @@ -116,17 +136,6 @@ public: return d_mag; } - /*! - * \brief Initializes acquisition algorithm and reserves memory. - */ - void init(); - - /*! - * \brief Sets local code for PCPS acquisition algorithm. - * \param code - Pointer to the PRN code. - */ - void set_local_code(std::complex* code); - /*! * \brief Starts acquisition algorithm, turning from standby mode to * active mode @@ -138,13 +147,6 @@ public: d_active = active; } - /*! - * \brief If set to 1, ensures that acquisition starts at the - * first available sample. - * \param state - int=1 forces start of acquisition - */ - void set_state(int32_t state); - /*! * \brief Set acquisition channel unique ID * \param channel - receiver channel. @@ -208,8 +210,6 @@ public: } } - void set_resampler_latency(uint32_t latency_samples); - /*! * \brief Parallel Code Phase Search Acquisition signal processing. */ @@ -243,7 +243,6 @@ private: volk_gnsssdr::vector> d_data_buffer; volk_gnsssdr::vector d_data_buffer_sc; - std::string d_dump_filename; std::unique_ptr d_fft_if; std::unique_ptr d_ifft; std::weak_ptr d_channel_fsm; @@ -253,6 +252,8 @@ private: arma::fmat d_grid; arma::fmat d_narrow_grid; + std::string d_dump_filename; + int64_t d_dump_number; uint64_t d_sample_counter; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h index 011531d50..07d91bbd9 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h @@ -195,11 +195,11 @@ private: void acquisition_core(uint32_t num_doppler_bins, uint32_t doppler_step, int32_t doppler_min); float first_vs_second_peak_statistic(uint32_t& indext, int32_t& doppler, uint32_t num_doppler_bins, int32_t doppler_max, int32_t doppler_step); - pcpsconf_fpga_t d_acq_parameters; - std::shared_ptr d_acquisition_fpga; std::weak_ptr d_channel_fsm; + pcpsconf_fpga_t d_acq_parameters; + Gnss_Synchro* d_gnss_synchro; uint64_t d_sample_counter; diff --git a/src/algorithms/channel/adapters/channel.h b/src/algorithms/channel/adapters/channel.h index 2b27be166..698e602ca 100644 --- a/src/algorithms/channel/adapters/channel.h +++ b/src/algorithms/channel/adapters/channel.h @@ -84,14 +84,14 @@ public: void msg_handler_events(pmt::pmt_t msg); private: - Gnss_Synchro gnss_synchro_{}; - Gnss_Signal gnss_signal_; std::shared_ptr acq_; std::shared_ptr trk_; std::shared_ptr nav_; std::shared_ptr channel_fsm_; channel_msg_receiver_cc_sptr channel_msg_rx_; Concurrent_Queue* queue_; + Gnss_Synchro gnss_synchro_{}; + Gnss_Signal gnss_signal_; std::string role_; std::string implementation_; std::mutex mx_; diff --git a/src/algorithms/channel/libs/channel_fsm.h b/src/algorithms/channel/libs/channel_fsm.h index c9bc7e96f..01fbb168f 100644 --- a/src/algorithms/channel/libs/channel_fsm.h +++ b/src/algorithms/channel/libs/channel_fsm.h @@ -52,11 +52,11 @@ public: // FSM EVENTS bool Event_start_acquisition(); bool Event_start_acquisition_fpga(); - virtual bool Event_valid_acquisition(); bool Event_stop_channel(); + bool Event_failed_tracking_standby(); + virtual bool Event_valid_acquisition(); virtual bool Event_failed_acquisition_repeat(); virtual bool Event_failed_acquisition_no_repeat(); - bool Event_failed_tracking_standby(); private: void start_tracking(); @@ -65,9 +65,6 @@ private: void request_satellite(); void notify_stop_tracking(); - uint32_t channel_; - uint32_t state_; - std::shared_ptr acq_; std::shared_ptr trk_; std::shared_ptr nav_; @@ -75,6 +72,9 @@ private: std::mutex mx_; Concurrent_Queue* queue_; + + uint32_t channel_; + uint32_t state_; }; #endif // GNSS_SDR_CHANNEL_FSM_H diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc index 83e527633..d60bfb936 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc @@ -155,6 +155,7 @@ hybrid_observables_gs::hybrid_observables_gs(const Obs_Conf &conf_) : gr::block( hybrid_observables_gs::~hybrid_observables_gs() { + DLOG(INFO) << "Observables block destructor called."; if (d_dump_file.is_open()) { auto pos = d_dump_file.tellp(); diff --git a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h index db3262c43..2e7bd57e9 100644 --- a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h +++ b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h @@ -113,7 +113,7 @@ private: bool rf_dc_; bool bb_dc_; bool rx1_enable_; - bool rx2_enable_; + bool rx2_enable_; bool enable_DMA_; bool rf_shutdown_; }; diff --git a/src/algorithms/telemetry_decoder/adapters/beidou_b1i_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/beidou_b1i_telemetry_decoder.h index f7b12d718..1ed9b2914 100644 --- a/src/algorithms/telemetry_decoder/adapters/beidou_b1i_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/beidou_b1i_telemetry_decoder.h @@ -45,6 +45,13 @@ public: ~BeidouB1iTelemetryDecoder() = default; + void connect(gr::top_block_sptr top_block) override; + void disconnect(gr::top_block_sptr top_block) override; + gr::basic_block_sptr get_left_block() override; + gr::basic_block_sptr get_right_block() override; + + void set_satellite(const Gnss_Satellite& satellite) override; + inline std::string role() override { return role_; @@ -56,17 +63,11 @@ public: return "BEIDOU_B1I_Telemetry_Decoder"; } - void connect(gr::top_block_sptr top_block) override; - void disconnect(gr::top_block_sptr top_block) override; - gr::basic_block_sptr get_left_block() override; - gr::basic_block_sptr get_right_block() override; - - void set_satellite(const Gnss_Satellite& satellite) override; inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); } + inline void reset() override { telemetry_decoder_->reset(); - return; } inline size_t item_size() override @@ -77,12 +78,12 @@ public: private: beidou_b1i_telemetry_decoder_gs_sptr telemetry_decoder_; Gnss_Satellite satellite_; - int channel_; - bool dump_; std::string dump_filename_; std::string role_; + int channel_; unsigned int in_streams_; unsigned int out_streams_; + bool dump_; }; #endif diff --git a/src/algorithms/telemetry_decoder/adapters/beidou_b3i_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/beidou_b3i_telemetry_decoder.h index 371ebb01e..14860cd67 100644 --- a/src/algorithms/telemetry_decoder/adapters/beidou_b3i_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/beidou_b3i_telemetry_decoder.h @@ -42,6 +42,13 @@ public: ~BeidouB3iTelemetryDecoder() = default; + void connect(gr::top_block_sptr top_block) override; + void disconnect(gr::top_block_sptr top_block) override; + gr::basic_block_sptr get_left_block() override; + gr::basic_block_sptr get_right_block() override; + + void set_satellite(const Gnss_Satellite &satellite) override; + inline std::string role() override { return role_; } //! Returns "BEIDOU_B3I_Telemetry_Decoder" @@ -50,12 +57,6 @@ public: return "BEIDOU_B3I_Telemetry_Decoder"; } - void connect(gr::top_block_sptr top_block) override; - void disconnect(gr::top_block_sptr top_block) override; - gr::basic_block_sptr get_left_block() override; - gr::basic_block_sptr get_right_block() override; - - void set_satellite(const Gnss_Satellite &satellite) override; inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); @@ -64,7 +65,6 @@ public: inline void reset() override { telemetry_decoder_->reset(); - return; } inline size_t item_size() override { return 0; } @@ -72,12 +72,12 @@ public: private: beidou_b3i_telemetry_decoder_gs_sptr telemetry_decoder_; Gnss_Satellite satellite_; - int channel_; - bool dump_; std::string dump_filename_; std::string role_; + int channel_; unsigned int in_streams_; unsigned int out_streams_; + bool dump_; }; #endif diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h index f2777eb06..c4575fd7d 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h @@ -47,6 +47,13 @@ public: ~GalileoE1BTelemetryDecoder() = default; + void connect(gr::top_block_sptr top_block) override; + void disconnect(gr::top_block_sptr top_block) override; + gr::basic_block_sptr get_left_block() override; + gr::basic_block_sptr get_right_block() override; + + void set_satellite(const Gnss_Satellite& satellite) override; + inline std::string role() override { return role_; @@ -60,17 +67,11 @@ public: return "Galileo_E1B_Telemetry_Decoder"; } - void connect(gr::top_block_sptr top_block) override; - void disconnect(gr::top_block_sptr top_block) override; - gr::basic_block_sptr get_left_block() override; - gr::basic_block_sptr get_right_block() override; - - void set_satellite(const Gnss_Satellite& satellite) override; inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); } + inline void reset() override { telemetry_decoder_->reset(); - return; } inline size_t item_size() override @@ -81,12 +82,12 @@ public: private: galileo_telemetry_decoder_gs_sptr telemetry_decoder_; Gnss_Satellite satellite_; - int channel_; - bool dump_; std::string dump_filename_; std::string role_; + int channel_; unsigned int in_streams_; unsigned int out_streams_; + bool dump_; }; #endif diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h index da89ee3ba..15ea2a905 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h @@ -48,6 +48,13 @@ public: ~GalileoE5aTelemetryDecoder() = default; + void connect(gr::top_block_sptr top_block) override; + void disconnect(gr::top_block_sptr top_block) override; + gr::basic_block_sptr get_left_block() override; + gr::basic_block_sptr get_right_block() override; + + void set_satellite(const Gnss_Satellite& satellite) override; + inline std::string role() override { return role_; @@ -61,17 +68,11 @@ public: return "Galileo_E5A_Telemetry_Decoder"; } - void connect(gr::top_block_sptr top_block) override; - void disconnect(gr::top_block_sptr top_block) override; - gr::basic_block_sptr get_left_block() override; - gr::basic_block_sptr get_right_block() override; - - void set_satellite(const Gnss_Satellite& satellite) override; inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); } + inline void reset() override { telemetry_decoder_->reset(); - return; } inline size_t item_size() override @@ -82,12 +83,12 @@ public: private: galileo_telemetry_decoder_gs_sptr telemetry_decoder_; Gnss_Satellite satellite_; - int channel_; - bool dump_; std::string dump_filename_; std::string role_; + int channel_; unsigned int in_streams_; unsigned int out_streams_; + bool dump_; }; #endif // GNSS_SDR_GALILEO_E5A_TELEMETRY_DECODER_H diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h index abeadcd4a..7cd8c6cf1 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h @@ -44,28 +44,32 @@ public: unsigned int out_streams); ~GlonassL1CaTelemetryDecoder() = default; - std::string role() override - { - return role_; - } - //! Returns "GLONASS_L1_CA_Telemetry_Decoder" - std::string implementation() override - { - return "GLONASS_L1_CA_Telemetry_Decoder"; - } void connect(gr::top_block_sptr top_block) override; void disconnect(gr::top_block_sptr top_block) override; gr::basic_block_sptr get_left_block() override; gr::basic_block_sptr get_right_block() override; void set_satellite(const Gnss_Satellite& satellite) override; - void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); } + + inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); } + + inline std::string role() override + { + return role_; + } + + //! Returns "GLONASS_L1_CA_Telemetry_Decoder" + inline std::string implementation() override + { + return "GLONASS_L1_CA_Telemetry_Decoder"; + } + inline void reset() override { telemetry_decoder_->reset(); - return; } - size_t item_size() override + + inline size_t item_size() override { return 0; } @@ -73,12 +77,12 @@ public: private: glonass_l1_ca_telemetry_decoder_gs_sptr telemetry_decoder_; Gnss_Satellite satellite_; - int channel_; - bool dump_; std::string dump_filename_; std::string role_; + int channel_; unsigned int in_streams_; unsigned int out_streams_; + bool dump_; }; #endif diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.h index 6ca3e8f5b..22c653041 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.h @@ -43,28 +43,32 @@ public: unsigned int out_streams); ~GlonassL2CaTelemetryDecoder() = default; - std::string role() override - { - return role_; - } - //! Returns "GLONASS_L2_CA_Telemetry_Decoder" - std::string implementation() override - { - return "GLONASS_L2_CA_Telemetry_Decoder"; - } void connect(gr::top_block_sptr top_block) override; void disconnect(gr::top_block_sptr top_block) override; gr::basic_block_sptr get_left_block() override; gr::basic_block_sptr get_right_block() override; void set_satellite(const Gnss_Satellite& satellite) override; - void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); } + + inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); } + + inline std::string role() override + { + return role_; + } + + //! Returns "GLONASS_L2_CA_Telemetry_Decoder" + inline std::string implementation() override + { + return "GLONASS_L2_CA_Telemetry_Decoder"; + } + inline void reset() override { telemetry_decoder_->reset(); - return; } - size_t item_size() override + + inline size_t item_size() override { return 0; } @@ -72,12 +76,12 @@ public: private: glonass_l2_ca_telemetry_decoder_gs_sptr telemetry_decoder_; Gnss_Satellite satellite_; - int channel_; - bool dump_; std::string dump_filename_; std::string role_; + int channel_; unsigned int in_streams_; unsigned int out_streams_; + bool dump_; }; #endif diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h index 6f8838b0a..462a90c08 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h @@ -44,6 +44,13 @@ public: ~GpsL1CaTelemetryDecoder() = default; + void connect(gr::top_block_sptr top_block) override; + void disconnect(gr::top_block_sptr top_block) override; + gr::basic_block_sptr get_left_block() override; + gr::basic_block_sptr get_right_block() override; + + void set_satellite(const Gnss_Satellite& satellite) override; + inline std::string role() override { return role_; @@ -55,17 +62,11 @@ public: return "GPS_L1_CA_Telemetry_Decoder"; } - void connect(gr::top_block_sptr top_block) override; - void disconnect(gr::top_block_sptr top_block) override; - gr::basic_block_sptr get_left_block() override; - gr::basic_block_sptr get_right_block() override; - - void set_satellite(const Gnss_Satellite& satellite) override; inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); } + inline void reset() override { telemetry_decoder_->reset(); - return; } inline size_t item_size() override @@ -76,12 +77,12 @@ public: private: gps_l1_ca_telemetry_decoder_gs_sptr telemetry_decoder_; Gnss_Satellite satellite_; - int channel_; - bool dump_; std::string dump_filename_; std::string role_; + int channel_; unsigned int in_streams_; unsigned int out_streams_; + bool dump_; }; #endif diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h index 63b2b6793..411ca2207 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h @@ -61,12 +61,14 @@ public: gr::basic_block_sptr get_right_block() override; void set_satellite(const Gnss_Satellite& satellite) override; + inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); } + inline void reset() override { telemetry_decoder_->reset(); - return; } + inline size_t item_size() override { return 0; @@ -75,12 +77,12 @@ public: private: gps_l2c_telemetry_decoder_gs_sptr telemetry_decoder_; Gnss_Satellite satellite_; - int channel_; - bool dump_; std::string dump_filename_; std::string role_; + int channel_; unsigned int in_streams_; unsigned int out_streams_; + bool dump_; }; #endif diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h index ad72343bf..6c5bd5681 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h @@ -63,12 +63,14 @@ public: gr::basic_block_sptr get_right_block() override; void set_satellite(const Gnss_Satellite& satellite) override; + inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); } + inline void reset() override { telemetry_decoder_->reset(); - return; } + inline size_t item_size() override { return 0; @@ -77,12 +79,12 @@ public: private: gps_l5_telemetry_decoder_gs_sptr telemetry_decoder_; Gnss_Satellite satellite_; - int channel_; - bool dump_; std::string dump_filename_; std::string role_; + int channel_; unsigned int in_streams_; unsigned int out_streams_; + bool dump_; }; #endif diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc index 7b957e0bf..c54c91482 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc @@ -103,6 +103,7 @@ beidou_b1i_telemetry_decoder_gs::beidou_b1i_telemetry_decoder_gs( beidou_b1i_telemetry_decoder_gs::~beidou_b1i_telemetry_decoder_gs() { + DLOG(INFO) << "BeiDou B1I Telemetry decoder block (channel " << d_channel << ") destructor called."; if (d_dump_file.is_open() == true) { try diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc index ee43b094f..4b4525cc9 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc @@ -103,6 +103,7 @@ beidou_b3i_telemetry_decoder_gs::beidou_b3i_telemetry_decoder_gs( beidou_b3i_telemetry_decoder_gs::~beidou_b3i_telemetry_decoder_gs() { + DLOG(INFO) << "BeiDou B3I Telemetry decoder block (channel " << d_channel << ") destructor called."; if (d_dump_file.is_open() == true) { try diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc index 4d5205a07..bd0f30caf 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc @@ -181,6 +181,7 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs( galileo_telemetry_decoder_gs::~galileo_telemetry_decoder_gs() { + DLOG(INFO) << "Galileo Telemetry decoder block (channel " << d_channel << ") destructor called."; if (d_dump_file.is_open() == true) { try diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.cc index 31994074a..3c3db47fa 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.cc @@ -96,6 +96,7 @@ glonass_l1_ca_telemetry_decoder_gs::glonass_l1_ca_telemetry_decoder_gs( glonass_l1_ca_telemetry_decoder_gs::~glonass_l1_ca_telemetry_decoder_gs() { + DLOG(INFO) << "Glonass L1 Telemetry decoder block (channel " << d_channel << ") destructor called."; if (d_dump_file.is_open() == true) { try diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.cc index 1cec12e96..e26971e78 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.cc @@ -96,6 +96,7 @@ glonass_l2_ca_telemetry_decoder_gs::glonass_l2_ca_telemetry_decoder_gs( glonass_l2_ca_telemetry_decoder_gs::~glonass_l2_ca_telemetry_decoder_gs() { + DLOG(INFO) << "Glonass L2 Telemetry decoder block (channel " << d_channel << ") destructor called."; if (d_dump_file.is_open() == true) { try diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc index 94175ef34..4330a408b 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc @@ -118,6 +118,7 @@ gps_l1_ca_telemetry_decoder_gs::gps_l1_ca_telemetry_decoder_gs( gps_l1_ca_telemetry_decoder_gs::~gps_l1_ca_telemetry_decoder_gs() { + DLOG(INFO) << "GPS L1 C/A Telemetry decoder block (channel " << d_channel << ") destructor called."; if (d_dump_file.is_open() == true) { try diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.cc index 28bffc8bc..bd90d4636 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.cc @@ -80,6 +80,7 @@ gps_l2c_telemetry_decoder_gs::gps_l2c_telemetry_decoder_gs( gps_l2c_telemetry_decoder_gs::~gps_l2c_telemetry_decoder_gs() { + DLOG(INFO) << "GPS L2C Telemetry decoder block (channel " << d_channel << ") destructor called."; if (d_dump_file.is_open() == true) { try diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.cc index 81a305514..16229788c 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.cc @@ -75,6 +75,7 @@ gps_l5_telemetry_decoder_gs::gps_l5_telemetry_decoder_gs( gps_l5_telemetry_decoder_gs::~gps_l5_telemetry_decoder_gs() { + DLOG(INFO) << "GPS L5 Telemetry decoder block (channel " << d_channel << ") destructor called."; if (d_dump_file.is_open() == true) { try diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index 20eebff0e..15730aff6 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -195,6 +195,7 @@ void ControlThread::init() ControlThread::~ControlThread() // NOLINT(modernize-use-equals-default) { + DLOG(INFO) << "Control Thread destructor called"; if (msqid_ != -1) { msgctl(msqid_, IPC_RMID, nullptr); diff --git a/src/core/receiver/control_thread.h b/src/core/receiver/control_thread.h index c66972607..d2a435dfe 100644 --- a/src/core/receiver/control_thread.h +++ b/src/core/receiver/control_thread.h @@ -147,6 +147,10 @@ private: void keyboard_listener(); void sysv_queue_listener(); + std::shared_ptr configuration_; + std::shared_ptr> control_queue_; + std::shared_ptr flowgraph_; + std::thread cmd_interface_thread_; std::thread keyboard_thread_; std::thread sysv_queue_thread_; @@ -156,10 +160,6 @@ private: boost::thread fpga_helper_thread_; #endif - std::shared_ptr flowgraph_; - std::shared_ptr configuration_; - std::shared_ptr> control_queue_; - // default filename for assistance data const std::string eph_default_xml_filename_ = "./gps_ephemeris.xml"; const std::string utc_default_xml_filename_ = "./gps_utc_model.xml"; diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 144de4135..98ac9c239 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -81,6 +81,7 @@ GNSSFlowgraph::GNSSFlowgraph(std::shared_ptr configurati GNSSFlowgraph::~GNSSFlowgraph() { + DLOG(INFO) << "GNSSFlowgraph destructor called"; if (connected_) { GNSSFlowgraph::disconnect(); diff --git a/src/core/receiver/gnss_flowgraph.h b/src/core/receiver/gnss_flowgraph.h index 36bd3a90b..90abaf04e 100644 --- a/src/core/receiver/gnss_flowgraph.h +++ b/src/core/receiver/gnss_flowgraph.h @@ -176,10 +176,27 @@ private: std::vector split_string(const std::string& s, char delim); + gr::top_block_sptr top_block_; + + std::shared_ptr configuration_; + std::shared_ptr> queue_; + std::vector> sig_source_; std::vector> sig_conditioner_; - std::vector null_sinks_; std::vector> channels_; + std::shared_ptr observables_; + std::shared_ptr pvt_; + + std::map acq_resamplers_; + std::vector null_sinks_; + + gr::basic_block_sptr GnssSynchroMonitor_; + channel_status_msg_receiver_sptr channels_status_; // class that receives and stores the current status of the receiver channels + gnss_sdr_sample_counter_sptr ch_out_sample_counter_; +#if ENABLE_FPGA + gnss_sdr_fpga_sample_counter_sptr ch_out_fpga_sample_counter_; +#endif + std::vector channels_state_; std::list available_GPS_1C_signals_; @@ -207,20 +224,6 @@ private: evBDS_B3 }; std::map mapStringValues_; - std::map acq_resamplers_; - - std::shared_ptr configuration_; - std::shared_ptr> queue_; - std::shared_ptr observables_; - std::shared_ptr pvt_; - - gr::top_block_sptr top_block_; - gr::basic_block_sptr GnssSynchroMonitor_; - channel_status_msg_receiver_sptr channels_status_; // class that receives and stores the current status of the receiver channels - gnss_sdr_sample_counter_sptr ch_out_sample_counter_; -#if ENABLE_FPGA - gnss_sdr_fpga_sample_counter_sptr ch_out_fpga_sample_counter_; -#endif std::string config_file_;