mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
		| @@ -366,10 +366,10 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, | |||||||
|  |  | ||||||
|     // Display time in local time zone |     // Display time in local time zone | ||||||
|     d_show_local_time_zone = conf_.show_local_time_zone; |     d_show_local_time_zone = conf_.show_local_time_zone; | ||||||
|     time_t when = std::time(nullptr); |  | ||||||
|     auto const tm = *std::localtime(&when); |  | ||||||
|     std::ostringstream os; |     std::ostringstream os; | ||||||
| #ifdef HAS_PUT_TIME | #ifdef HAS_PUT_TIME | ||||||
|  |     time_t when = std::time(nullptr); | ||||||
|  |     auto const tm = *std::localtime(&when); | ||||||
|     os << std::put_time(&tm, "%z"); |     os << std::put_time(&tm, "%z"); | ||||||
| #endif | #endif | ||||||
|     std::string utc_diff_str = os.str();  // in ISO 8601 format: "+HHMM" or "-HHMM" |     std::string utc_diff_str = os.str();  // in ISO 8601 format: "+HHMM" or "-HHMM" | ||||||
|   | |||||||
| @@ -93,7 +93,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_->set_channel(channel_); |         acquisition_->set_channel(channel_); | ||||||
| @@ -102,7 +102,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_->set_channel_fsm(channel_fsm); |         acquisition_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -92,7 +92,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_->set_channel(channel_); |         acquisition_->set_channel(channel_); | ||||||
| @@ -101,7 +101,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_->set_channel_fsm(channel_fsm); |         acquisition_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -87,7 +87,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_cc_->set_channel(channel_); |         acquisition_cc_->set_channel(channel_); | ||||||
| @@ -96,7 +96,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); |         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -91,7 +91,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_->set_channel(channel_); |         acquisition_->set_channel(channel_); | ||||||
| @@ -100,7 +100,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_->set_channel_fsm(channel_fsm); |         acquisition_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -64,6 +64,9 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | |||||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||||
|     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|  |  | ||||||
|  |     acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false); | ||||||
|  |     DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite; | ||||||
|  |  | ||||||
|     float downsampling_factor = configuration_->property(role + ".downsampling_factor", 4.0); |     float downsampling_factor = configuration_->property(role + ".downsampling_factor", 4.0); | ||||||
|     acq_parameters.downsampling_factor = downsampling_factor; |     acq_parameters.downsampling_factor = downsampling_factor; | ||||||
|  |  | ||||||
| @@ -163,7 +166,6 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | |||||||
|     acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14); |     acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14); | ||||||
|  |  | ||||||
|     acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); |     acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); | ||||||
|     DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")"; |  | ||||||
|  |  | ||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
| @@ -274,5 +276,5 @@ gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisitionFpga::get_left_block() | |||||||
|  |  | ||||||
| gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisitionFpga::get_right_block() | gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisitionFpga::get_right_block() | ||||||
| { | { | ||||||
|     return acquisition_fpga_; |     return nullptr; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -33,10 +33,7 @@ | |||||||
| #define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H_ | #define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H_ | ||||||
|  |  | ||||||
| #include "channel_fsm.h" | #include "channel_fsm.h" | ||||||
| #include "complex_byte_to_float_x2.h" |  | ||||||
| #include "pcps_acquisition_fpga.h" | #include "pcps_acquisition_fpga.h" | ||||||
| #include <gnuradio/blocks/float_to_complex.h> |  | ||||||
| #include <gnuradio/blocks/stream_to_vector.h> |  | ||||||
| #include <gnuradio/runtime_types.h>  // for basic_block_sptr, top_block_sptr | #include <gnuradio/runtime_types.h>  // for basic_block_sptr, top_block_sptr | ||||||
| #include <volk/volk_complex.h>       // for lv_16sc_t | #include <volk/volk_complex.h>       // for lv_16sc_t | ||||||
| #include <cstddef>                   // for size_t | #include <cstddef>                   // for size_t | ||||||
| @@ -93,7 +90,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_fpga_->set_channel(channel_); |         acquisition_fpga_->set_channel(channel_); | ||||||
| @@ -102,11 +99,12 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_fpga_->set_channel_fsm(channel_fsm); |         acquisition_fpga_->set_channel_fsm(channel_fsm); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /*! |     /*! | ||||||
|      * \brief Set statistics threshold of PCPS algorithm |      * \brief Set statistics threshold of PCPS algorithm | ||||||
|      */ |      */ | ||||||
| @@ -157,9 +155,6 @@ public: | |||||||
| private: | private: | ||||||
|     ConfigurationInterface* configuration_; |     ConfigurationInterface* configuration_; | ||||||
|     pcps_acquisition_fpga_sptr acquisition_fpga_; |     pcps_acquisition_fpga_sptr acquisition_fpga_; | ||||||
|     gr::blocks::stream_to_vector::sptr stream_to_vector_; |  | ||||||
|     gr::blocks::float_to_complex::sptr float_to_complex_; |  | ||||||
|     complex_byte_to_float_x2_sptr cbyte_to_float_x2_; |  | ||||||
|     bool acquire_pilot_; |     bool acquire_pilot_; | ||||||
|     uint32_t channel_; |     uint32_t channel_; | ||||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; |     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||||
|   | |||||||
| @@ -87,7 +87,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_cc_->set_channel(channel_); |         acquisition_cc_->set_channel(channel_); | ||||||
| @@ -96,7 +96,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); |         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -88,7 +88,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_cc_->set_channel(channel_); |         acquisition_cc_->set_channel(channel_); | ||||||
| @@ -97,7 +97,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); |         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -87,7 +87,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_cc_->set_channel(channel_); |         acquisition_cc_->set_channel(channel_); | ||||||
| @@ -96,7 +96,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); |         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -88,7 +88,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_cc_->set_channel(channel_); |         acquisition_cc_->set_channel(channel_); | ||||||
| @@ -97,7 +97,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); |         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -79,7 +79,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_->set_channel(channel_); |         acquisition_->set_channel(channel_); | ||||||
| @@ -88,7 +88,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_->set_channel_fsm(channel_fsm); |         acquisition_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -61,6 +61,9 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf | |||||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); | ||||||
|     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|  |  | ||||||
|  |     acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false); | ||||||
|  |     DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite; | ||||||
|  |  | ||||||
|     float downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0); |     float downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0); | ||||||
|     acq_parameters.downsampling_factor = downsampling_factor; |     acq_parameters.downsampling_factor = downsampling_factor; | ||||||
|     fs_in = fs_in / downsampling_factor; |     fs_in = fs_in / downsampling_factor; | ||||||
| @@ -164,7 +167,6 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf | |||||||
|     acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14); |     acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14); | ||||||
|  |  | ||||||
|     acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); |     acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); | ||||||
|     DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")"; |  | ||||||
|  |  | ||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
| @@ -274,5 +276,5 @@ gr::basic_block_sptr GalileoE5aPcpsAcquisitionFpga::get_left_block() | |||||||
|  |  | ||||||
| gr::basic_block_sptr GalileoE5aPcpsAcquisitionFpga::get_right_block() | gr::basic_block_sptr GalileoE5aPcpsAcquisitionFpga::get_right_block() | ||||||
| { | { | ||||||
|     return acquisition_fpga_; |     return nullptr; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -35,7 +35,6 @@ | |||||||
|  |  | ||||||
| #include "channel_fsm.h" | #include "channel_fsm.h" | ||||||
| #include "pcps_acquisition_fpga.h" | #include "pcps_acquisition_fpga.h" | ||||||
| #include <gnuradio/blocks/stream_to_vector.h> |  | ||||||
| #include <gnuradio/runtime_types.h>  // for basic_block_sptr, top_block_sptr | #include <gnuradio/runtime_types.h>  // for basic_block_sptr, top_block_sptr | ||||||
| #include <volk/volk_complex.h>       // for lv_16sc_t | #include <volk/volk_complex.h>       // for lv_16sc_t | ||||||
| #include <cstddef>                   // for size_t | #include <cstddef>                   // for size_t | ||||||
| @@ -89,10 +88,11 @@ public: | |||||||
|      * tracking blocks |      * tracking blocks | ||||||
|      */ |      */ | ||||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; |     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; | ||||||
|  |  | ||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_fpga_->set_channel(channel_); |         acquisition_fpga_->set_channel(channel_); | ||||||
| @@ -101,11 +101,12 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_fpga_->set_channel_fsm(channel_fsm); |         acquisition_fpga_->set_channel_fsm(channel_fsm); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /*! |     /*! | ||||||
|      * \brief Set statistics threshold of PCPS algorithm |      * \brief Set statistics threshold of PCPS algorithm | ||||||
|      */ |      */ | ||||||
| @@ -166,7 +167,6 @@ public: | |||||||
| private: | private: | ||||||
|     ConfigurationInterface* configuration_; |     ConfigurationInterface* configuration_; | ||||||
|     pcps_acquisition_fpga_sptr acquisition_fpga_; |     pcps_acquisition_fpga_sptr acquisition_fpga_; | ||||||
|     gr::blocks::stream_to_vector::sptr stream_to_vector_; |  | ||||||
|  |  | ||||||
|     std::string item_type_; |     std::string item_type_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|   | |||||||
| @@ -89,7 +89,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_->set_channel(channel_); |         acquisition_->set_channel(channel_); | ||||||
| @@ -98,7 +98,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_->set_channel_fsm(channel_fsm); |         acquisition_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -89,7 +89,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_->set_channel(channel_); |         acquisition_->set_channel(channel_); | ||||||
| @@ -98,7 +98,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_->set_channel_fsm(channel_fsm); |         acquisition_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -95,7 +95,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_->set_channel(channel_); |         acquisition_->set_channel(channel_); | ||||||
| @@ -104,7 +104,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_->set_channel_fsm(channel_fsm); |         acquisition_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -88,7 +88,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_cc_->set_channel(channel_); |         acquisition_cc_->set_channel(channel_); | ||||||
| @@ -97,7 +97,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); |         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -68,6 +68,9 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( | |||||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|  |  | ||||||
|  |     acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false); | ||||||
|  |     DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite; | ||||||
|  |  | ||||||
|     float downsampling_factor = configuration_->property(role + ".downsampling_factor", 4.0); |     float downsampling_factor = configuration_->property(role + ".downsampling_factor", 4.0); | ||||||
|     acq_parameters.downsampling_factor = downsampling_factor; |     acq_parameters.downsampling_factor = downsampling_factor; | ||||||
|  |  | ||||||
| @@ -146,7 +149,6 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( | |||||||
|     acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14); |     acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14); | ||||||
|  |  | ||||||
|     acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); |     acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); | ||||||
|     DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")"; |  | ||||||
|  |  | ||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
| @@ -257,5 +259,5 @@ gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_left_block() | |||||||
|  |  | ||||||
| gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_right_block() | gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_right_block() | ||||||
| { | { | ||||||
|     return acquisition_fpga_; |     return nullptr; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -93,7 +93,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_fpga_->set_channel(channel_); |         acquisition_fpga_->set_channel(channel_); | ||||||
| @@ -102,11 +102,12 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_fpga_->set_channel_fsm(channel_fsm); |         acquisition_fpga_->set_channel_fsm(channel_fsm); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /*! |     /*! | ||||||
|      * \brief Set statistics threshold of PCPS algorithm |      * \brief Set statistics threshold of PCPS algorithm | ||||||
|      */ |      */ | ||||||
|   | |||||||
| @@ -88,7 +88,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_cc_->set_channel(channel_); |         acquisition_cc_->set_channel(channel_); | ||||||
| @@ -97,7 +97,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); |         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -87,7 +87,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_cc_->set_channel(channel_); |         acquisition_cc_->set_channel(channel_); | ||||||
| @@ -96,7 +96,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); |         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -89,7 +89,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_cc_->set_channel(channel_); |         acquisition_cc_->set_channel(channel_); | ||||||
| @@ -98,7 +98,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); |         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -88,7 +88,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_cc_->set_channel(channel_); |         acquisition_cc_->set_channel(channel_); | ||||||
| @@ -97,7 +97,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); |         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -92,7 +92,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_->set_channel(channel_); |         acquisition_->set_channel(channel_); | ||||||
| @@ -101,7 +101,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_->set_channel_fsm(channel_fsm); |         acquisition_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -70,6 +70,9 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( | |||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in_; |     acq_parameters.fs_in = fs_in_; | ||||||
|  |  | ||||||
|  |     acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false); | ||||||
|  |     DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite; | ||||||
|  |  | ||||||
|     doppler_max_ = configuration->property(role + ".doppler_max", 5000); |     doppler_max_ = configuration->property(role + ".doppler_max", 5000); | ||||||
|     if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max; |     if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max; | ||||||
|     acq_parameters.doppler_max = doppler_max_; |     acq_parameters.doppler_max = doppler_max_; | ||||||
| @@ -139,13 +142,11 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( | |||||||
|     delete[] fft_codes_padded; |     delete[] fft_codes_padded; | ||||||
|  |  | ||||||
|     acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); |     acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); | ||||||
|     DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")"; |  | ||||||
|  |  | ||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = nullptr; |     gnss_synchro_ = nullptr; | ||||||
|     channel_fsm_ = nullptr; |     channel_fsm_ = nullptr; | ||||||
|     DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")"; |  | ||||||
|  |  | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
| } | } | ||||||
| @@ -253,5 +254,5 @@ gr::basic_block_sptr GpsL2MPcpsAcquisitionFpga::get_left_block() | |||||||
|  |  | ||||||
| gr::basic_block_sptr GpsL2MPcpsAcquisitionFpga::get_right_block() | gr::basic_block_sptr GpsL2MPcpsAcquisitionFpga::get_right_block() | ||||||
| { | { | ||||||
|     return acquisition_fpga_; |     return nullptr; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -35,10 +35,7 @@ | |||||||
| #define GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_FPGA_H_ | #define GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_FPGA_H_ | ||||||
|  |  | ||||||
| #include "channel_fsm.h" | #include "channel_fsm.h" | ||||||
| #include "complex_byte_to_float_x2.h" |  | ||||||
| #include "pcps_acquisition_fpga.h" | #include "pcps_acquisition_fpga.h" | ||||||
| #include <gnuradio/blocks/float_to_complex.h> |  | ||||||
| #include <gnuradio/blocks/stream_to_vector.h> |  | ||||||
| #include <gnuradio/runtime_types.h>  // for basic_block_sptr, top_block_sptr | #include <gnuradio/runtime_types.h>  // for basic_block_sptr, top_block_sptr | ||||||
| #include <volk/volk_complex.h>       // for lv_16sc_t | #include <volk/volk_complex.h>       // for lv_16sc_t | ||||||
| #include <cstddef>                   // for size_t | #include <cstddef>                   // for size_t | ||||||
| @@ -94,7 +91,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_fpga_->set_channel(channel_); |         acquisition_fpga_->set_channel(channel_); | ||||||
| @@ -103,11 +100,12 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_fpga_->set_channel_fsm(channel_fsm); |         acquisition_fpga_->set_channel_fsm(channel_fsm); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /*! |     /*! | ||||||
|      * \brief Set statistics threshold of PCPS algorithm |      * \brief Set statistics threshold of PCPS algorithm | ||||||
|      */ |      */ | ||||||
| @@ -158,9 +156,6 @@ public: | |||||||
| private: | private: | ||||||
|     ConfigurationInterface* configuration_; |     ConfigurationInterface* configuration_; | ||||||
|     pcps_acquisition_fpga_sptr acquisition_fpga_; |     pcps_acquisition_fpga_sptr acquisition_fpga_; | ||||||
|     gr::blocks::stream_to_vector::sptr stream_to_vector_; |  | ||||||
|     gr::blocks::float_to_complex::sptr float_to_complex_; |  | ||||||
|     complex_byte_to_float_x2_sptr cbyte_to_float_x2_; |  | ||||||
|     std::string item_type_; |     std::string item_type_; | ||||||
|     unsigned int channel_; |     unsigned int channel_; | ||||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; |     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||||
|   | |||||||
| @@ -92,7 +92,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_->set_channel(channel_); |         acquisition_->set_channel(channel_); | ||||||
| @@ -101,7 +101,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_->set_channel_fsm(channel_fsm); |         acquisition_->set_channel_fsm(channel_fsm); | ||||||
|   | |||||||
| @@ -67,6 +67,9 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( | |||||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|  |  | ||||||
|  |     acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false); | ||||||
|  |     DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite; | ||||||
|  |  | ||||||
|     float downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0); |     float downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0); | ||||||
|     acq_parameters.downsampling_factor = downsampling_factor; |     acq_parameters.downsampling_factor = downsampling_factor; | ||||||
|  |  | ||||||
| @@ -146,7 +149,6 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( | |||||||
|     acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14); |     acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14); | ||||||
|  |  | ||||||
|     acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); |     acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); | ||||||
|     DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")"; |  | ||||||
|  |  | ||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
| @@ -258,5 +260,5 @@ gr::basic_block_sptr GpsL5iPcpsAcquisitionFpga::get_left_block() | |||||||
|  |  | ||||||
| gr::basic_block_sptr GpsL5iPcpsAcquisitionFpga::get_right_block() | gr::basic_block_sptr GpsL5iPcpsAcquisitionFpga::get_right_block() | ||||||
| { | { | ||||||
|     return acquisition_fpga_; |     return nullptr; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -36,10 +36,7 @@ | |||||||
| #define GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_ | #define GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_ | ||||||
|  |  | ||||||
| #include "channel_fsm.h" | #include "channel_fsm.h" | ||||||
| #include "complex_byte_to_float_x2.h" |  | ||||||
| #include "pcps_acquisition_fpga.h" | #include "pcps_acquisition_fpga.h" | ||||||
| #include <gnuradio/blocks/float_to_complex.h> |  | ||||||
| #include <gnuradio/blocks/stream_to_vector.h> |  | ||||||
| #include <gnuradio/runtime_types.h>  // for basic_block_sptr, top_block_sptr | #include <gnuradio/runtime_types.h>  // for basic_block_sptr, top_block_sptr | ||||||
| #include <volk/volk_complex.h>       // for lv_16sc_t | #include <volk/volk_complex.h>       // for lv_16sc_t | ||||||
| #include <cstddef>                   // for size_t | #include <cstddef>                   // for size_t | ||||||
| @@ -95,7 +92,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|      * \brief Set acquisition channel unique ID |      * \brief Set acquisition channel unique ID | ||||||
|      */ |      */ | ||||||
|     inline void set_channel(unsigned int channel) |     inline void set_channel(unsigned int channel) override | ||||||
|     { |     { | ||||||
|         channel_ = channel; |         channel_ = channel; | ||||||
|         acquisition_fpga_->set_channel(channel_); |         acquisition_fpga_->set_channel(channel_); | ||||||
| @@ -104,7 +101,7 @@ public: | |||||||
|     /*! |     /*! | ||||||
|       * \brief Set channel fsm associated to this acquisition instance |       * \brief Set channel fsm associated to this acquisition instance | ||||||
|       */ |       */ | ||||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) |     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||||
|     { |     { | ||||||
|         channel_fsm_ = channel_fsm; |         channel_fsm_ = channel_fsm; | ||||||
|         acquisition_fpga_->set_channel_fsm(channel_fsm); |         acquisition_fpga_->set_channel_fsm(channel_fsm); | ||||||
| @@ -159,9 +156,6 @@ public: | |||||||
| private: | private: | ||||||
|     ConfigurationInterface* configuration_; |     ConfigurationInterface* configuration_; | ||||||
|     pcps_acquisition_fpga_sptr acquisition_fpga_; |     pcps_acquisition_fpga_sptr acquisition_fpga_; | ||||||
|     gr::blocks::stream_to_vector::sptr stream_to_vector_; |  | ||||||
|     gr::blocks::float_to_complex::sptr float_to_complex_; |  | ||||||
|     complex_byte_to_float_x2_sptr cbyte_to_float_x2_; |  | ||||||
|     std::string item_type_; |     std::string item_type_; | ||||||
|     uint32_t channel_; |     uint32_t channel_; | ||||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; |     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||||
|   | |||||||
| @@ -35,9 +35,6 @@ | |||||||
| #include "pcps_acquisition_fpga.h" | #include "pcps_acquisition_fpga.h" | ||||||
| #include "gnss_synchro.h" | #include "gnss_synchro.h" | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
| #include <gnuradio/io_signature.h> |  | ||||||
| #include <pmt/pmt.h>        // for from_long |  | ||||||
| #include <pmt/pmt_sugar.h>  // for mp |  | ||||||
| #include <cmath>     // for ceil | #include <cmath>     // for ceil | ||||||
| #include <iostream>  // for operator<< | #include <iostream>  // for operator<< | ||||||
| #include <utility>   // for move | #include <utility>   // for move | ||||||
| @@ -52,12 +49,8 @@ pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_) | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) : gr::block("pcps_acquisition_fpga", | pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) | ||||||
|                                                                           gr::io_signature::make(0, 0, 0), |  | ||||||
|                                                                           gr::io_signature::make(0, 0, 0)) |  | ||||||
| { | { | ||||||
|     this->message_port_register_out(pmt::mp("events")); |  | ||||||
|  |  | ||||||
|     acq_parameters = std::move(conf_); |     acq_parameters = std::move(conf_); | ||||||
|     d_sample_counter = 0ULL;  // SAMPLE COUNTER |     d_sample_counter = 0ULL;  // SAMPLE COUNTER | ||||||
|     d_active = false; |     d_active = false; | ||||||
| @@ -150,16 +143,9 @@ void pcps_acquisition_fpga::send_positive_acquisition() | |||||||
|                << ", magnitude " << d_mag |                << ", magnitude " << d_mag | ||||||
|                << ", input signal power " << d_input_power; |                << ", input signal power " << d_input_power; | ||||||
|  |  | ||||||
|     if (d_channel_fsm) |  | ||||||
|         { |  | ||||||
|     //the channel FSM is set, so, notify it directly the positive acquisition to minimize delays |     //the channel FSM is set, so, notify it directly the positive acquisition to minimize delays | ||||||
|     d_channel_fsm->Event_valid_acquisition(); |     d_channel_fsm->Event_valid_acquisition(); | ||||||
| } | } | ||||||
|     else |  | ||||||
|         { |  | ||||||
|             this->message_port_pub(pmt::mp("events"), pmt::from_long(1)); |  | ||||||
|         } |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |  | ||||||
| void pcps_acquisition_fpga::send_negative_acquisition() | void pcps_acquisition_fpga::send_negative_acquisition() | ||||||
| @@ -175,7 +161,14 @@ void pcps_acquisition_fpga::send_negative_acquisition() | |||||||
|                << ", magnitude " << d_mag |                << ", magnitude " << d_mag | ||||||
|                << ", input signal power " << d_input_power; |                << ", input signal power " << d_input_power; | ||||||
|  |  | ||||||
|     this->message_port_pub(pmt::mp("events"), pmt::from_long(2)); |     if (acq_parameters.repeat_satellite == true) | ||||||
|  |         { | ||||||
|  |             d_channel_fsm->Event_failed_acquisition_repeat(); | ||||||
|  |         } | ||||||
|  |     else | ||||||
|  |         { | ||||||
|  |             d_channel_fsm->Event_failed_acquisition_no_repeat(); | ||||||
|  |         } | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -266,16 +259,6 @@ void pcps_acquisition_fpga::set_active(bool active) | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| int pcps_acquisition_fpga::general_work(int noutput_items __attribute__((unused)), |  | ||||||
|     gr_vector_int& ninput_items __attribute__((unused)), |  | ||||||
|     gr_vector_const_void_star& input_items __attribute__((unused)), |  | ||||||
|     gr_vector_void_star& output_items __attribute__((unused))) |  | ||||||
| { |  | ||||||
|     // the general work is not used with the acquisition that uses the FPGA |  | ||||||
|     return noutput_items; |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |  | ||||||
| void pcps_acquisition_fpga::reset_acquisition(void) | void pcps_acquisition_fpga::reset_acquisition(void) | ||||||
| { | { | ||||||
|     // this function triggers a HW reset of the FPGA PL. |     // this function triggers a HW reset of the FPGA PL. | ||||||
|   | |||||||
| @@ -44,8 +44,6 @@ | |||||||
| #include "channel_fsm.h" | #include "channel_fsm.h" | ||||||
| #include "fpga_acquisition.h" | #include "fpga_acquisition.h" | ||||||
| #include <boost/shared_ptr.hpp> | #include <boost/shared_ptr.hpp> | ||||||
| #include <gnuradio/block.h>     // for block |  | ||||||
| #include <gnuradio/types.h>     // for gr_vector_const_void_star |  | ||||||
| #include <volk/volk_complex.h>  // for lv_16sc_t | #include <volk/volk_complex.h>  // for lv_16sc_t | ||||||
| #include <cstdint>              // for uint32_t | #include <cstdint>              // for uint32_t | ||||||
| #include <memory>               // for shared_ptr | #include <memory>               // for shared_ptr | ||||||
| @@ -68,6 +66,7 @@ typedef struct | |||||||
|     float downsampling_factor; |     float downsampling_factor; | ||||||
|     uint32_t total_block_exp; |     uint32_t total_block_exp; | ||||||
|     uint32_t excludelimit; |     uint32_t excludelimit; | ||||||
|  |     bool repeat_satellite; | ||||||
| } pcpsconf_fpga_t; | } pcpsconf_fpga_t; | ||||||
|  |  | ||||||
| class pcps_acquisition_fpga; | class pcps_acquisition_fpga; | ||||||
| @@ -83,7 +82,7 @@ pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_); | |||||||
|  * Check \ref Navitec2012 "An Open Source Galileo E1 Software Receiver", |  * Check \ref Navitec2012 "An Open Source Galileo E1 Software Receiver", | ||||||
|  * Algorithm 1, for a pseudocode description of this implementation. |  * Algorithm 1, for a pseudocode description of this implementation. | ||||||
|  */ |  */ | ||||||
| class pcps_acquisition_fpga : public gr::block | class pcps_acquisition_fpga | ||||||
| { | { | ||||||
| private: | private: | ||||||
|     friend pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_); |     friend pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_); | ||||||
| @@ -221,13 +220,6 @@ public: | |||||||
|      * \brief This funciton is only used for the unit tests |      * \brief This funciton is only used for the unit tests | ||||||
|      */ |      */ | ||||||
|     void read_fpga_total_scale_factor(uint32_t* total_scale_factor, uint32_t* fw_scale_factor); |     void read_fpga_total_scale_factor(uint32_t* total_scale_factor, uint32_t* fw_scale_factor); | ||||||
|  |  | ||||||
|     /*! |  | ||||||
|      * \brief Parallel Code Phase Search Acquisition signal processing. |  | ||||||
|      */ |  | ||||||
|     int general_work(int noutput_items, gr_vector_int& ninput_items, |  | ||||||
|         gr_vector_const_void_star& input_items, |  | ||||||
|         gr_vector_void_star& output_items); |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif /* GNSS_SDR_PCPS_ACQUISITION_FPGA_H_*/ | #endif /* GNSS_SDR_PCPS_ACQUISITION_FPGA_H_*/ | ||||||
|   | |||||||
| @@ -55,7 +55,7 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::s | |||||||
|     queue_ = std::move(queue); |     queue_ = std::move(queue); | ||||||
|     channel_fsm_ = std::make_shared<ChannelFsm>(); |     channel_fsm_ = std::make_shared<ChannelFsm>(); | ||||||
|  |  | ||||||
|     flag_enable_fpga = configuration->property("Channel.enable_FPGA", false); |     flag_enable_fpga = configuration->property("GNSS-SDR.enable_FPGA", false); | ||||||
|     acq_->set_channel(channel_); |     acq_->set_channel(channel_); | ||||||
|     acq_->set_channel_fsm(channel_fsm_); |     acq_->set_channel_fsm(channel_fsm_); | ||||||
|     trk_->set_channel(channel_); |     trk_->set_channel(channel_); | ||||||
| @@ -124,8 +124,11 @@ Channel::~Channel() = default; | |||||||
|  |  | ||||||
|  |  | ||||||
| void Channel::connect(gr::top_block_sptr top_block) | void Channel::connect(gr::top_block_sptr top_block) | ||||||
|  | { | ||||||
|  |     if (!flag_enable_fpga) | ||||||
|         { |         { | ||||||
|             acq_->connect(top_block); |             acq_->connect(top_block); | ||||||
|  |         } | ||||||
|     trk_->connect(top_block); |     trk_->connect(top_block); | ||||||
|     nav_->connect(top_block); |     nav_->connect(top_block); | ||||||
|  |  | ||||||
| @@ -136,7 +139,10 @@ void Channel::connect(gr::top_block_sptr top_block) | |||||||
|     DLOG(INFO) << "tracking -> telemetry_decoder"; |     DLOG(INFO) << "tracking -> telemetry_decoder"; | ||||||
|  |  | ||||||
|     // Message ports |     // Message ports | ||||||
|  |     if (!flag_enable_fpga) | ||||||
|  |         { | ||||||
|             top_block->msg_connect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events")); |             top_block->msg_connect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events")); | ||||||
|  |         } | ||||||
|     top_block->msg_connect(trk_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events")); |     top_block->msg_connect(trk_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events")); | ||||||
|  |  | ||||||
|     connected_ = true; |     connected_ = true; | ||||||
| @@ -152,12 +158,18 @@ void Channel::disconnect(gr::top_block_sptr top_block) | |||||||
|         } |         } | ||||||
|  |  | ||||||
|     top_block->disconnect(trk_->get_right_block(), 0, nav_->get_left_block(), 0); |     top_block->disconnect(trk_->get_right_block(), 0, nav_->get_left_block(), 0); | ||||||
|  |     if (!flag_enable_fpga) | ||||||
|  |         { | ||||||
|             acq_->disconnect(top_block); |             acq_->disconnect(top_block); | ||||||
|  |         } | ||||||
|     trk_->disconnect(top_block); |     trk_->disconnect(top_block); | ||||||
|     nav_->disconnect(top_block); |     nav_->disconnect(top_block); | ||||||
|  |  | ||||||
|     top_block->msg_disconnect(nav_->get_left_block(), pmt::mp("telemetry_to_trk"), trk_->get_right_block(), pmt::mp("telemetry_to_trk")); |     top_block->msg_disconnect(nav_->get_left_block(), pmt::mp("telemetry_to_trk"), trk_->get_right_block(), pmt::mp("telemetry_to_trk")); | ||||||
|  |     if (!flag_enable_fpga) | ||||||
|  |         { | ||||||
|             top_block->msg_disconnect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events")); |             top_block->msg_disconnect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events")); | ||||||
|  |         } | ||||||
|     top_block->msg_disconnect(trk_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events")); |     top_block->msg_disconnect(trk_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events")); | ||||||
|     connected_ = false; |     connected_ = false; | ||||||
| } | } | ||||||
| @@ -178,6 +190,10 @@ gr::basic_block_sptr Channel::get_left_block_trk() | |||||||
|  |  | ||||||
| gr::basic_block_sptr Channel::get_left_block_acq() | gr::basic_block_sptr Channel::get_left_block_acq() | ||||||
| { | { | ||||||
|  |     if (flag_enable_fpga) | ||||||
|  |         { | ||||||
|  |             LOG(ERROR) << "Enabled FPGA and called get_left_block() in channel interface"; | ||||||
|  |         } | ||||||
|     return acq_->get_left_block(); |     return acq_->get_left_block(); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez