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 fpga
This commit is contained in:
		| @@ -578,7 +578,7 @@ $ sudo port install doxygen +docs | ||||
| You also might need to activate a Python installation. The list of installed versions can be retrieved with: | ||||
|  | ||||
| ~~~~~~ | ||||
| $ port select list python | ||||
| $ port select --list python | ||||
| ~~~~~~ | ||||
|  | ||||
| and you can activate a certain version by typing: | ||||
|   | ||||
| @@ -100,6 +100,13 @@ else() | ||||
|             gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND) | ||||
|             gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND) | ||||
|         endif() | ||||
|         if(NOT MAKO_FOUND OR NOT SIX_FOUND) | ||||
|             unset(PYTHON_EXECUTABLE) | ||||
|             find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION}) | ||||
|             gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND) | ||||
|             gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND) | ||||
|             gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND) | ||||
|         endif() | ||||
|     endif() | ||||
| endif() | ||||
|  | ||||
|   | ||||
| @@ -123,7 +123,7 @@ BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -102,7 +102,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_->set_channel_fsm(channel_fsm); | ||||
| @@ -173,7 +173,7 @@ private: | ||||
|     bool bit_transition_flag_; | ||||
|     bool use_CFAR_algorithm_flag_; | ||||
|     uint32_t channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     uint32_t doppler_max_; | ||||
|     uint32_t doppler_step_; | ||||
|   | ||||
| @@ -121,7 +121,7 @@ BeidouB3iPcpsAcquisition::BeidouB3iPcpsAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -101,7 +101,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_->set_channel_fsm(channel_fsm); | ||||
| @@ -172,7 +172,7 @@ private: | ||||
|     bool bit_transition_flag_; | ||||
|     bool use_CFAR_algorithm_flag_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -110,7 +110,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -96,7 +96,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||
| @@ -156,7 +156,7 @@ private: | ||||
|     unsigned int vector_length_; | ||||
|     unsigned int code_length_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -154,7 +154,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -100,7 +100,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_->set_channel_fsm(channel_fsm); | ||||
| @@ -171,7 +171,7 @@ private: | ||||
|     bool use_CFAR_algorithm_flag_; | ||||
|     bool acquire_pilot_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -187,7 +187,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | ||||
|     channel_ = 0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     // temporary buffers that we can delete | ||||
|     delete[] code; | ||||
|     delete fft_if; | ||||
|   | ||||
| @@ -99,11 +99,12 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_fpga_->set_channel_fsm(channel_fsm); | ||||
|     } | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set statistics threshold of PCPS algorithm | ||||
|      */ | ||||
| @@ -156,7 +157,7 @@ private: | ||||
|     pcps_acquisition_fpga_sptr acquisition_fpga_; | ||||
|     bool acquire_pilot_; | ||||
|     uint32_t channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     uint32_t doppler_max_; | ||||
|     uint32_t doppler_step_; | ||||
|     std::string dump_filename_; | ||||
|   | ||||
| @@ -111,7 +111,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -96,7 +96,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||
| @@ -155,7 +155,7 @@ private: | ||||
|     unsigned int code_length_; | ||||
|     //unsigned int satellite_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -144,7 +144,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -97,7 +97,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||
| @@ -159,7 +159,7 @@ private: | ||||
|     unsigned int code_length_; | ||||
|     bool bit_transition_flag_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -114,7 +114,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -96,7 +96,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||
| @@ -157,7 +157,7 @@ private: | ||||
|     unsigned int vector_length_; | ||||
|     unsigned int code_length_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -119,7 +119,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -97,7 +97,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||
| @@ -160,7 +160,7 @@ private: | ||||
|     unsigned int code_length_; | ||||
|     bool bit_transition_flag_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -152,7 +152,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -88,7 +88,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_->set_channel_fsm(channel_fsm); | ||||
| @@ -169,7 +169,7 @@ private: | ||||
|     unsigned int vector_length_; | ||||
|     unsigned int code_length_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int sampled_ms_; | ||||
|   | ||||
| @@ -189,7 +189,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf | ||||
|     channel_ = 0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     // temporary buffers that we can delete | ||||
|     delete[] code; | ||||
|     delete fft_if; | ||||
|   | ||||
| @@ -88,6 +88,7 @@ public: | ||||
|      * tracking blocks | ||||
|      */ | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set acquisition channel unique ID | ||||
|      */ | ||||
| @@ -100,11 +101,12 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_fpga_->set_channel_fsm(channel_fsm); | ||||
|     } | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set statistics threshold of PCPS algorithm | ||||
|      */ | ||||
| @@ -174,7 +176,7 @@ private: | ||||
|     bool acq_iq_; | ||||
|  | ||||
|     uint32_t channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     uint32_t doppler_max_; | ||||
|     uint32_t doppler_step_; | ||||
|     unsigned int in_streams_; | ||||
|   | ||||
| @@ -125,7 +125,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -98,7 +98,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_->set_channel_fsm(channel_fsm); | ||||
| @@ -162,7 +162,7 @@ private: | ||||
|     bool bit_transition_flag_; | ||||
|     bool use_CFAR_algorithm_flag_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -124,7 +124,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -98,7 +98,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_->set_channel_fsm(channel_fsm); | ||||
| @@ -162,7 +162,7 @@ private: | ||||
|     bool bit_transition_flag_; | ||||
|     bool use_CFAR_algorithm_flag_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -147,7 +147,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -104,7 +104,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_->set_channel_fsm(channel_fsm); | ||||
| @@ -174,7 +174,7 @@ private: | ||||
|     bool bit_transition_flag_; | ||||
|     bool use_CFAR_algorithm_flag_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -97,7 +97,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -97,7 +97,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||
| @@ -152,7 +152,7 @@ private: | ||||
|     std::string item_type_; | ||||
|     unsigned int vector_length_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -169,7 +169,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( | ||||
|     channel_ = 0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     // temporary buffers that we can delete | ||||
|     delete[] code; | ||||
|     delete fft_if; | ||||
|   | ||||
| @@ -101,13 +101,14 @@ public: | ||||
|     } | ||||
|  | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|      * \brief Set channel fsm associated to this acquisition instance | ||||
|      */ | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_fpga_->set_channel_fsm(channel_fsm); | ||||
|     } | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set statistics threshold of PCPS algorithm | ||||
|      */ | ||||
| @@ -159,7 +160,7 @@ private: | ||||
|     ConfigurationInterface* configuration_; | ||||
|     pcps_acquisition_fpga_sptr acquisition_fpga_; | ||||
|     uint32_t channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     uint32_t doppler_max_; | ||||
|     uint32_t doppler_step_; | ||||
|     Gnss_Synchro* gnss_synchro_; | ||||
|   | ||||
| @@ -89,7 +89,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -97,7 +97,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||
| @@ -149,7 +149,7 @@ private: | ||||
|     unsigned int vector_length_; | ||||
|     //unsigned int satellite_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -105,7 +105,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -96,7 +96,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||
| @@ -154,7 +154,7 @@ private: | ||||
|     unsigned int code_length_; | ||||
|     bool bit_transition_flag_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -137,7 +137,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -98,7 +98,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||
| @@ -160,7 +160,7 @@ private: | ||||
|     unsigned int code_length_; | ||||
|     bool bit_transition_flag_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -99,7 +99,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -97,7 +97,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_cc_->set_channel_fsm(channel_fsm); | ||||
| @@ -158,7 +158,7 @@ private: | ||||
|     unsigned int vector_length_; | ||||
|     unsigned int code_length_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -151,7 +151,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     num_codes_ = acq_parameters_.sampled_ms / acq_parameters_.ms_per_code; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|   | ||||
| @@ -101,7 +101,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_->set_channel_fsm(channel_fsm); | ||||
| @@ -171,7 +171,7 @@ private: | ||||
|     bool bit_transition_flag_; | ||||
|     bool use_CFAR_algorithm_flag_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -144,8 +144,8 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( | ||||
|                     fft_data = local_code & SELECT_ALL_CODE_BITS; | ||||
|                     d_all_fft_codes_[i + (nsamples_total * (PRN - 1))] = fft_data; | ||||
|  | ||||
|                     //                    d_all_fft_codes_[i + nsamples_total * (PRN - 1)] = lv_16sc_t(static_cast<int32_t>(floor(fft_codes_padded[i].real() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max)), | ||||
|                     //                        static_cast<int32_t>(floor(fft_codes_padded[i].imag() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max))); | ||||
|                     // d_all_fft_codes_[i + nsamples_total * (PRN - 1)] = lv_16sc_t(static_cast<int32_t>(floor(fft_codes_padded[i].real() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max)), | ||||
|                     // static_cast<int32_t>(floor(fft_codes_padded[i].imag() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max))); | ||||
|                 } | ||||
|         } | ||||
|  | ||||
| @@ -161,7 +161,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( | ||||
|     channel_ = 0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|  | ||||
|     threshold_ = 0.0; | ||||
| } | ||||
|   | ||||
| @@ -100,7 +100,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_fpga_->set_channel_fsm(channel_fsm); | ||||
| @@ -158,7 +158,7 @@ private: | ||||
|     pcps_acquisition_fpga_sptr acquisition_fpga_; | ||||
|     std::string item_type_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
| @@ -169,7 +169,6 @@ private: | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|  | ||||
|     //lv_16sc_t* d_all_fft_codes_;  // memory that contains all the code ffts | ||||
|     uint32_t* d_all_fft_codes_;  // memory that contains all the code ffts | ||||
|  | ||||
|     //float calculate_threshold(float pfa); | ||||
|   | ||||
| @@ -147,7 +147,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
|   | ||||
| @@ -101,7 +101,7 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_->set_channel_fsm(channel_fsm); | ||||
| @@ -170,7 +170,7 @@ private: | ||||
|     bool bit_transition_flag_; | ||||
|     bool use_CFAR_algorithm_flag_; | ||||
|     unsigned int channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     float threshold_; | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|   | ||||
| @@ -172,7 +172,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( | ||||
|     channel_ = 0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     channel_fsm_ = nullptr; | ||||
|      | ||||
|     // temporary buffers that we can delete | ||||
|     delete[] code; | ||||
|     delete fft_if; | ||||
|   | ||||
| @@ -101,11 +101,12 @@ public: | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override | ||||
|     { | ||||
|         channel_fsm_ = channel_fsm; | ||||
|         acquisition_fpga_->set_channel_fsm(channel_fsm); | ||||
|     } | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set statistics threshold of PCPS algorithm | ||||
|      */ | ||||
| @@ -158,7 +159,7 @@ private: | ||||
|     pcps_acquisition_fpga_sptr acquisition_fpga_; | ||||
|     std::string item_type_; | ||||
|     uint32_t channel_; | ||||
|     std::shared_ptr<ChannelFsm> channel_fsm_; | ||||
|     std::weak_ptr<ChannelFsm> channel_fsm_; | ||||
|     uint32_t doppler_max_; | ||||
|     uint32_t doppler_step_; | ||||
|     std::string dump_filename_; | ||||
|   | ||||
| @@ -100,7 +100,7 @@ private: | ||||
|         int doppler_offset); | ||||
|     float estimate_input_power(gr_complex* in); | ||||
|  | ||||
|     std::shared_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::weak_ptr<ChannelFsm> d_channel_fsm; | ||||
|     int64_t d_fs_in; | ||||
|     int d_samples_per_ms; | ||||
|     int d_sampled_ms; | ||||
| @@ -216,7 +216,7 @@ public: | ||||
|     /*! | ||||
|       * \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::weak_ptr<ChannelFsm> channel_fsm) | ||||
|     { | ||||
|         d_channel_fsm = channel_fsm; | ||||
|     } | ||||
|   | ||||
| @@ -118,7 +118,7 @@ private: | ||||
|     int32_t d_state; | ||||
|     bool d_dump; | ||||
|     uint32_t d_channel; | ||||
|     std::shared_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::weak_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::string d_dump_filename; | ||||
|  | ||||
| public: | ||||
| @@ -186,7 +186,7 @@ public: | ||||
|     /*! | ||||
|       * \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::weak_ptr<ChannelFsm> channel_fsm) | ||||
|     { | ||||
|         d_channel_fsm = channel_fsm; | ||||
|     } | ||||
|   | ||||
| @@ -429,10 +429,11 @@ void pcps_acquisition::send_positive_acquisition() | ||||
|                << ", magnitude " << d_mag | ||||
|                << ", input signal power " << d_input_power; | ||||
|     d_positive_acq = 1; | ||||
|     if (d_channel_fsm) | ||||
|  | ||||
|     if (!d_channel_fsm.expired()) | ||||
|         { | ||||
|             //the channel FSM is set, so, notify it directly the positive acquisition to minimize delays | ||||
|             d_channel_fsm->Event_valid_acquisition(); | ||||
|             d_channel_fsm.lock()->Event_valid_acquisition(); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|   | ||||
| @@ -124,7 +124,7 @@ private: | ||||
|     int64_t d_old_freq; | ||||
|     int32_t d_state; | ||||
|     uint32_t d_channel; | ||||
|     std::shared_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::weak_ptr<ChannelFsm> d_channel_fsm; | ||||
|     uint32_t d_doppler_step; | ||||
|     float d_doppler_center_step_two; | ||||
|     uint32_t d_num_noncoherent_integrations_counter; | ||||
| @@ -213,7 +213,7 @@ public: | ||||
|     /*! | ||||
|       * \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::weak_ptr<ChannelFsm> channel_fsm) | ||||
|     { | ||||
|         d_channel_fsm = channel_fsm; | ||||
|     } | ||||
|   | ||||
| @@ -122,7 +122,7 @@ private: | ||||
|     int d_n_samples_in_buffer; | ||||
|     bool d_dump; | ||||
|     unsigned int d_channel; | ||||
|     std::shared_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::weak_ptr<ChannelFsm> d_channel_fsm; | ||||
|  | ||||
|     std::string d_dump_filename; | ||||
|  | ||||
| @@ -189,7 +189,7 @@ public: | ||||
|     /*! | ||||
|       * \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::weak_ptr<ChannelFsm> channel_fsm) | ||||
|     { | ||||
|         d_channel_fsm = channel_fsm; | ||||
|     } | ||||
|   | ||||
| @@ -81,7 +81,6 @@ pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) | ||||
|     d_max_num_acqs = acq_parameters.max_num_acqs; | ||||
|  | ||||
|     acquisition_fpga = std::make_shared<Fpga_Acquisition>(acq_parameters.device_name, acq_parameters.code_length, acq_parameters.doppler_max, d_fft_size, | ||||
|  | ||||
|         acq_parameters.fs_in, acq_parameters.sampled_ms, acq_parameters.select_queue_Fpga, acq_parameters.all_fft_codes, acq_parameters.excludelimit); | ||||
| } | ||||
|  | ||||
| @@ -152,7 +151,7 @@ void pcps_acquisition_fpga::send_positive_acquisition() | ||||
|                << ", input signal power " << d_input_power; | ||||
|  | ||||
|     //the channel FSM is set, so, notify it directly the positive acquisition to minimize delays | ||||
|     d_channel_fsm->Event_valid_acquisition(); | ||||
|     d_channel_fsm.lock()->Event_valid_acquisition(); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -171,11 +170,11 @@ void pcps_acquisition_fpga::send_negative_acquisition() | ||||
|  | ||||
|     if (acq_parameters.repeat_satellite == true) | ||||
|         { | ||||
|             d_channel_fsm->Event_failed_acquisition_repeat(); | ||||
|             d_channel_fsm.lock()->Event_failed_acquisition_repeat(); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             d_channel_fsm->Event_failed_acquisition_no_repeat(); | ||||
|             d_channel_fsm.lock()->Event_failed_acquisition_no_repeat(); | ||||
|         } | ||||
| } | ||||
|  | ||||
| @@ -248,6 +247,7 @@ void pcps_acquisition_fpga::acquisition_core(uint32_t num_doppler_bins, uint32_t | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| void pcps_acquisition_fpga::set_active(bool active) | ||||
| { | ||||
|     d_active = active; | ||||
| @@ -264,7 +264,6 @@ void pcps_acquisition_fpga::set_active(bool active) | ||||
|                // no CFAR algorithm in the FPGA | ||||
|                << ", use_CFAR_algorithm_flag: false"; | ||||
|  | ||||
|  | ||||
|     acquisition_fpga->open_device(); | ||||
|     acquisition_fpga->configure_acquisition(); | ||||
|     acquisition_fpga->write_local_code(); | ||||
|   | ||||
| @@ -62,8 +62,7 @@ typedef struct | ||||
|     int32_t code_length; | ||||
|     uint32_t select_queue_Fpga; | ||||
|     std::string device_name; | ||||
|     //lv_16sc_t* all_fft_codes;  // memory that contains all the code ffts | ||||
|     uint32_t* all_fft_codes; | ||||
|     uint32_t* all_fft_codes; // pointer to memory that contains all the code ffts | ||||
|     //float downsampling_factor; | ||||
|     uint32_t downsampling_factor; | ||||
|     uint32_t total_block_exp; | ||||
| @@ -112,7 +111,7 @@ private: | ||||
|     float d_test_statistics; | ||||
|     int32_t d_state; | ||||
|     uint32_t d_channel; | ||||
|     std::shared_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::weak_ptr<ChannelFsm> d_channel_fsm; | ||||
|     uint32_t d_doppler_step; | ||||
|     uint32_t d_doppler_max; | ||||
|     uint32_t d_fft_size; | ||||
| @@ -188,11 +187,10 @@ public: | ||||
|         d_channel = channel; | ||||
|     } | ||||
|  | ||||
|  | ||||
|     /*! | ||||
|       * \brief Set channel fsm associated to this acquisition instance | ||||
|       */ | ||||
|     inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) | ||||
|      * \brief Set channel fsm associated to this acquisition instance | ||||
|      */ | ||||
|     inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) | ||||
|     { | ||||
|         d_channel_fsm = channel_fsm; | ||||
|     } | ||||
|   | ||||
| @@ -138,7 +138,7 @@ private: | ||||
|     int32_t d_well_count; | ||||
|     bool d_dump; | ||||
|     uint32_t d_channel; | ||||
|     std::shared_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::weak_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::string d_dump_filename; | ||||
|  | ||||
| public: | ||||
| @@ -199,7 +199,7 @@ public: | ||||
|     /*! | ||||
|       * \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::weak_ptr<ChannelFsm> channel_fsm) | ||||
|     { | ||||
|         d_channel_fsm = channel_fsm; | ||||
|     } | ||||
|   | ||||
| @@ -117,7 +117,7 @@ private: | ||||
|     int32_t d_state; | ||||
|     bool d_dump; | ||||
|     uint32_t d_channel; | ||||
|     std::shared_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::weak_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::string d_dump_filename; | ||||
|  | ||||
| public: | ||||
| @@ -186,7 +186,7 @@ public: | ||||
|     /*! | ||||
|       * \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::weak_ptr<ChannelFsm> channel_fsm) | ||||
|     { | ||||
|         d_channel_fsm = channel_fsm; | ||||
|     } | ||||
|   | ||||
| @@ -162,7 +162,7 @@ private: | ||||
|     cl::CommandQueue* d_cl_queue; | ||||
|     clFFT_Plan d_cl_fft_plan; | ||||
|     cl_int d_cl_fft_batch_size; | ||||
|     std::shared_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::weak_ptr<ChannelFsm> d_channel_fsm; | ||||
|     int d_opencl; | ||||
|  | ||||
| public: | ||||
| @@ -230,7 +230,7 @@ public: | ||||
|     /*! | ||||
|       * \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::weak_ptr<ChannelFsm> channel_fsm) | ||||
|     { | ||||
|         d_channel_fsm = channel_fsm; | ||||
|     } | ||||
|   | ||||
| @@ -151,7 +151,7 @@ private: | ||||
|     int32_t d_state; | ||||
|     bool d_dump; | ||||
|     uint32_t d_channel; | ||||
|     std::shared_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::weak_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::string d_dump_filename; | ||||
|  | ||||
| public: | ||||
| @@ -219,7 +219,7 @@ public: | ||||
|     /*! | ||||
|       * \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::weak_ptr<ChannelFsm> channel_fsm) | ||||
|     { | ||||
|         d_channel_fsm = channel_fsm; | ||||
|     } | ||||
|   | ||||
| @@ -134,7 +134,7 @@ private: | ||||
|     int32_t d_state; | ||||
|     bool d_dump; | ||||
|     uint32_t d_channel; | ||||
|     std::shared_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::weak_ptr<ChannelFsm> d_channel_fsm; | ||||
|     std::string d_dump_filename; | ||||
|  | ||||
| public: | ||||
| @@ -202,7 +202,7 @@ public: | ||||
|     /*! | ||||
|       * \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::weak_ptr<ChannelFsm> channel_fsm) | ||||
|     { | ||||
|         d_channel_fsm = channel_fsm; | ||||
|     } | ||||
|   | ||||
| @@ -20,53 +20,6 @@ if(DEFINED __INCLUDED_VOLK_PYTHON_CMAKE) | ||||
| endif() | ||||
| set(__INCLUDED_VOLK_PYTHON_CMAKE TRUE) | ||||
|  | ||||
| ######################################################################## | ||||
| # Setup the python interpreter: | ||||
| # This allows the user to specify a specific interpreter, | ||||
| # or finds the interpreter via the built-in cmake module. | ||||
| ######################################################################## | ||||
| set(VOLK_PYTHON_MIN_VERSION "2.7") | ||||
| set(VOLK_PYTHON3_MIN_VERSION "3.4") | ||||
|  | ||||
| if(CMAKE_VERSION VERSION_LESS 3.12) | ||||
|     if(PYTHON_EXECUTABLE) | ||||
|         message(STATUS "User set python executable ${PYTHON_EXECUTABLE}") | ||||
|         find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED) | ||||
|     else() | ||||
|         message(STATUS "PYTHON_EXECUTABLE not set - using default python2") | ||||
|         message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.") | ||||
|         find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION}) | ||||
|         if(NOT PYTHONINTERP_FOUND) | ||||
|             message(STATUS "python2 not found - using python3") | ||||
|             find_package(PythonInterp ${VOLK_PYTHON3_MIN_VERSION} REQUIRED) | ||||
|         endif() | ||||
|     endif() | ||||
| else() | ||||
|     if(PYTHON_EXECUTABLE) | ||||
|         message(STATUS "User set python executable ${PYTHON_EXECUTABLE}") | ||||
|         find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED) | ||||
|     else() | ||||
|         find_package(Python3 COMPONENTS Interpreter) | ||||
|         if(Python3_FOUND) | ||||
|             set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) | ||||
|             set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR}) | ||||
|         endif() | ||||
|         if(NOT Python3_FOUND OR NOT MAKO_FOUND OR NOT SIX_FOUND) | ||||
|             find_package(Python2 COMPONENTS Interpreter) | ||||
|             if(Python2_FOUND) | ||||
|                 set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE}) | ||||
|                 set(PYTHON_VERSION_MAJOR ${Python2_VERSION_MAJOR}) | ||||
|             endif() | ||||
|         endif() | ||||
|     endif() | ||||
| endif() | ||||
|  | ||||
| if(${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3) | ||||
|     set(PYTHON3 TRUE) | ||||
| endif() | ||||
|  | ||||
|  | ||||
|  | ||||
| ######################################################################## | ||||
| # Check for the existence of a python module: | ||||
| # - desc a string description of the check | ||||
| @@ -102,6 +55,61 @@ except: pass | ||||
|     "${have}") | ||||
| endmacro() | ||||
|  | ||||
|  | ||||
| ######################################################################## | ||||
| # Setup the python interpreter: | ||||
| # This allows the user to specify a specific interpreter, | ||||
| # or finds the interpreter via the built-in cmake module. | ||||
| ######################################################################## | ||||
| set(VOLK_PYTHON_MIN_VERSION "2.7") | ||||
| set(VOLK_PYTHON3_MIN_VERSION "3.4") | ||||
|  | ||||
| if(CMAKE_VERSION VERSION_LESS 3.12) | ||||
|     if(PYTHON_EXECUTABLE) | ||||
|         message(STATUS "User set python executable ${PYTHON_EXECUTABLE}") | ||||
|         find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED) | ||||
|     else() | ||||
|         message(STATUS "PYTHON_EXECUTABLE not set - using default python2") | ||||
|         message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.") | ||||
|         find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION}) | ||||
|         if(NOT PYTHONINTERP_FOUND) | ||||
|             message(STATUS "python2 not found - using python3") | ||||
|             find_package(PythonInterp ${VOLK_PYTHON3_MIN_VERSION} REQUIRED) | ||||
|         endif() | ||||
|     endif() | ||||
| else() | ||||
|     if(PYTHON_EXECUTABLE) | ||||
|         message(STATUS "User set python executable ${PYTHON_EXECUTABLE}") | ||||
|         find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED) | ||||
|     else() | ||||
|         find_package(Python3 COMPONENTS Interpreter) | ||||
|         if(Python3_FOUND) | ||||
|             set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) | ||||
|             set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR}) | ||||
|             volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND) | ||||
|             volk_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND) | ||||
|         endif() | ||||
|         if(NOT Python3_FOUND OR NOT MAKO_FOUND OR NOT SIX_FOUND) | ||||
|             find_package(Python2 COMPONENTS Interpreter) | ||||
|             if(Python2_FOUND) | ||||
|                 set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE}) | ||||
|                 set(PYTHON_VERSION_MAJOR ${Python2_VERSION_MAJOR}) | ||||
|                 volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND) | ||||
|                 volk_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND) | ||||
|             endif() | ||||
|             if(NOT MAKO_FOUND OR NOT SIX_FOUND) | ||||
|                 unset(PYTHON_EXECUTABLE) | ||||
|                 find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION}) | ||||
|             endif() | ||||
|         endif() | ||||
|     endif() | ||||
| endif() | ||||
|  | ||||
| if(${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3) | ||||
|     set(PYTHON3 TRUE) | ||||
| endif() | ||||
|  | ||||
|  | ||||
| ######################################################################## | ||||
| # Sets the python installation directory VOLK_PYTHON_DIR | ||||
| ######################################################################## | ||||
|   | ||||
| @@ -114,7 +114,7 @@ hybrid_observables_gs::hybrid_observables_gs(uint32_t nchannels_in, | ||||
|                 } | ||||
|         } | ||||
|     T_rx_TOW_ms = 0U; | ||||
|     T_rx_TOW_offset_ms = 0U; | ||||
|     T_rx_step_ms = 20;  //read from config at the adapter GNSS-SDR.observable_interval_ms!! | ||||
|     T_rx_TOW_set = false; | ||||
|  | ||||
|     // rework | ||||
| @@ -443,38 +443,39 @@ void hybrid_observables_gs::update_TOW(const std::vector<Gnss_Synchro> &data) | ||||
|     //2. If the TOW is set, it must be incremented by the desired receiver time step. | ||||
|     //   the time step must match the observables timer block (connected to the las input channel) | ||||
|     std::vector<Gnss_Synchro>::const_iterator it; | ||||
|     //    if (!T_rx_TOW_set) | ||||
|     //        { | ||||
|     //uint32_t TOW_ref = std::numeric_limits<uint32_t>::max(); | ||||
|     uint32_t TOW_ref = 0U; | ||||
|     for (it = data.cbegin(); it != data.cend(); it++) | ||||
|     if (!T_rx_TOW_set) | ||||
|         { | ||||
|             if (it->Flag_valid_word) | ||||
|             //uint32_t TOW_ref = std::numeric_limits<uint32_t>::max(); | ||||
|             uint32_t TOW_ref = 0U; | ||||
|             for (it = data.cbegin(); it != data.cend(); it++) | ||||
|                 { | ||||
|                     if (it->TOW_at_current_symbol_ms > TOW_ref) | ||||
|                     if (it->Flag_valid_word) | ||||
|                         { | ||||
|                             TOW_ref = it->TOW_at_current_symbol_ms; | ||||
|                             T_rx_TOW_set = true; | ||||
|                             if (it->TOW_at_current_symbol_ms > TOW_ref) | ||||
|                                 { | ||||
|                                     TOW_ref = it->TOW_at_current_symbol_ms; | ||||
|                                     T_rx_TOW_set = true; | ||||
|                                 } | ||||
|                         } | ||||
|                 } | ||||
|             T_rx_TOW_ms = TOW_ref - (TOW_ref % 20); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             T_rx_TOW_ms += T_rx_step_ms;  //the tow time step increment must match the ref time channel step | ||||
|             //todo: check what happens during the week rollover | ||||
|             if (T_rx_TOW_ms >= 604800000) | ||||
|                 { | ||||
|                     T_rx_TOW_ms = T_rx_TOW_ms % 604800000; | ||||
|                 } | ||||
|         } | ||||
|     T_rx_TOW_ms = TOW_ref; | ||||
|     //} | ||||
|     //    else | ||||
|     //        { | ||||
|     //            T_rx_TOW_ms += T_rx_step_ms; | ||||
|     //            //todo: check what happens during the week rollover | ||||
|     //            if (T_rx_TOW_ms >= 604800000) | ||||
|     //                { | ||||
|     //                    T_rx_TOW_ms = T_rx_TOW_ms % 604800000; | ||||
|     //                } | ||||
|     //        } | ||||
|     //    std::cout << "T_rx_TOW_ms: " << T_rx_TOW_ms << std::endl; | ||||
| } | ||||
|  | ||||
|  | ||||
| void hybrid_observables_gs::compute_pranges(std::vector<Gnss_Synchro> &data) | ||||
| { | ||||
|     //    std::cout.precision(17); | ||||
|     //    std::cout << " T_rx_TOW_ms: " << static_cast<double>(T_rx_TOW_ms) << std::endl; | ||||
|     std::vector<Gnss_Synchro>::iterator it; | ||||
|     for (it = data.begin(); it != data.end(); it++) | ||||
|         { | ||||
| @@ -486,13 +487,21 @@ void hybrid_observables_gs::compute_pranges(std::vector<Gnss_Synchro> &data) | ||||
|                     it->Pseudorange_m = traveltime_s * SPEED_OF_LIGHT; | ||||
|                     it->Flag_valid_pseudorange = true; | ||||
|                     // debug code | ||||
|                     // std::cout.precision(17); | ||||
|                     // std::cout << "[" << it->Channel_ID << "] interp_TOW_ms: " << it->interp_TOW_ms << std::endl; | ||||
|                     // std::cout << "[" << it->Channel_ID << "] Diff T_rx_TOW_ms - interp_TOW_ms: " << static_cast<double>(T_rx_TOW_ms) - it->interp_TOW_ms << std::endl; | ||||
|                     // std::cout << "[" << it->Channel_ID << "] Pseudorange_m: " << it->Pseudorange_m << std::endl; | ||||
|                     // | ||||
|                     //                    std::cout << "[" << it->Channel_ID << "] interp_TOW_ms: " << it->interp_TOW_ms << std::endl; | ||||
|                     //                    std::cout << "[" << it->Channel_ID << "] Diff T_rx_TOW_ms - interp_TOW_ms: " << static_cast<double>(T_rx_TOW_ms) - it->interp_TOW_ms << std::endl; | ||||
|                 } | ||||
|         } | ||||
|     // usleep(1000); | ||||
|  | ||||
|     //    for (it = data.begin(); it != data.end(); it++) | ||||
|     //        { | ||||
|     //            if (it->Flag_valid_word) | ||||
|     //                { | ||||
|     //                    std::cout << "[" << it->Channel_ID << "] Pseudorange_m: " << it->Pseudorange_m << std::endl; | ||||
|     //                } | ||||
|     //        } | ||||
|     //    std::cout << std::endl; | ||||
|     //    usleep(1000); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -548,7 +557,7 @@ int hybrid_observables_gs::general_work(int noutput_items __attribute__((unused) | ||||
|             for (uint32_t n = 0; n < d_nchannels_out; n++) | ||||
|                 { | ||||
|                     Gnss_Synchro interpolated_gnss_synchro{}; | ||||
|                     if (!interp_trk_obs(interpolated_gnss_synchro, n, d_Rx_clock_buffer.front() + T_rx_TOW_offset_ms * T_rx_clock_step_samples)) | ||||
|                     if (!interp_trk_obs(interpolated_gnss_synchro, n, d_Rx_clock_buffer.front())) | ||||
|                         { | ||||
|                             // Produce an empty observation | ||||
|                             interpolated_gnss_synchro = Gnss_Synchro(); | ||||
| @@ -564,49 +573,10 @@ int hybrid_observables_gs::general_work(int noutput_items __attribute__((unused) | ||||
|                         } | ||||
|                     epoch_data.push_back(interpolated_gnss_synchro); | ||||
|                 } | ||||
|             if (n_valid > 0) | ||||
|                 { | ||||
|                     update_TOW(epoch_data); | ||||
|                     int tow_inc_loop_count = 0; | ||||
|                     while (T_rx_TOW_ms % 20 != 0 and tow_inc_loop_count < 20) | ||||
|                         { | ||||
|                             tow_inc_loop_count++; | ||||
|                             T_rx_TOW_offset_ms++; | ||||
|                             T_rx_TOW_offset_ms = T_rx_TOW_offset_ms % 20; | ||||
|                             //check if effectively the receiver TOW is now multiple of 20 ms | ||||
|                             n_valid = 0; | ||||
|                             epoch_data.clear(); | ||||
|                             for (uint32_t n = 0; n < d_nchannels_out; n++) | ||||
|                                 { | ||||
|                                     Gnss_Synchro interpolated_gnss_synchro{}; | ||||
|                                     if (!interp_trk_obs(interpolated_gnss_synchro, n, d_Rx_clock_buffer.front() + T_rx_TOW_offset_ms * T_rx_clock_step_samples)) | ||||
|                                         { | ||||
|                                             // Produce an empty observation | ||||
|                                             interpolated_gnss_synchro = Gnss_Synchro(); | ||||
|                                             interpolated_gnss_synchro.Flag_valid_pseudorange = false; | ||||
|                                             interpolated_gnss_synchro.Flag_valid_word = false; | ||||
|                                             interpolated_gnss_synchro.Flag_valid_acquisition = false; | ||||
|                                             interpolated_gnss_synchro.fs = 0; | ||||
|                                             interpolated_gnss_synchro.Channel_ID = n; | ||||
|                                         } | ||||
|                                     else | ||||
|                                         { | ||||
|                                             n_valid++; | ||||
|                                         } | ||||
|                                     epoch_data.push_back(interpolated_gnss_synchro); | ||||
|                                 } | ||||
|                             update_TOW(epoch_data); | ||||
|                             // debug code: | ||||
|                             // if (T_rx_TOW_ms % 20 != 0) | ||||
|                             //     { | ||||
|                             //         std::cout << "Warning: RX TOW is not multiple of 20 ms\n"; | ||||
|                             //     } | ||||
|                             // std::cout << "T_rx_TOW_ms=" << T_rx_TOW_ms << " T_rx_TOW_offset_ms=" << T_rx_TOW_offset_ms << " ->" << T_rx_TOW_ms % 20 << std::endl; | ||||
|                         } | ||||
|                 } | ||||
|  | ||||
|             if (n_valid > 0) | ||||
|                 { | ||||
|                     update_TOW(epoch_data); | ||||
|                     compute_pranges(epoch_data); | ||||
|                 } | ||||
|  | ||||
|   | ||||
| @@ -83,7 +83,7 @@ private: | ||||
|     //rx time follow GPST | ||||
|     bool T_rx_TOW_set; | ||||
|     uint32_t T_rx_TOW_ms; | ||||
|     uint32_t T_rx_TOW_offset_ms; | ||||
|     uint32_t T_rx_step_ms; | ||||
|     bool d_dump; | ||||
|     bool d_dump_mat; | ||||
|     uint32_t d_nchannels_in; | ||||
|   | ||||
| @@ -560,9 +560,6 @@ void dll_pll_veml_tracking::start_tracking() | ||||
|     d_carrier_phase_rate_step_rad = 0.0; | ||||
|     d_carr_ph_history.clear(); | ||||
|     d_code_ph_history.clear(); | ||||
|     // DLL/PLL filter initialization | ||||
|     d_carrier_loop_filter.initialize(static_cast<float>(d_acq_carrier_doppler_hz));  // initialize the carrier filter | ||||
|     d_code_loop_filter.initialize();                                                 // initialize the code filter | ||||
|  | ||||
|     if (systemName == "GPS" and signal_type == "1C") | ||||
|         { | ||||
| @@ -732,8 +729,14 @@ void dll_pll_veml_tracking::start_tracking() | ||||
|  | ||||
|     d_current_correlation_time_s = d_code_period; | ||||
|  | ||||
|  | ||||
|     // Initialize tracking  ========================================== | ||||
|     d_carrier_loop_filter.set_params(trk_parameters.fll_bw_hz, trk_parameters.pll_bw_hz, trk_parameters.pll_filter_order); | ||||
|     d_code_loop_filter.set_noise_bandwidth(trk_parameters.dll_bw_hz); | ||||
|     d_code_loop_filter.set_update_interval(d_code_period); | ||||
|     // DLL/PLL filter initialization | ||||
|     d_carrier_loop_filter.initialize(static_cast<float>(d_acq_carrier_doppler_hz));  // initialize the carrier filter | ||||
|     d_code_loop_filter.initialize();                                                 // initialize the code filter | ||||
|  | ||||
|     // DEBUG OUTPUT | ||||
|     std::cout << "Tracking of " << systemName << " " << signal_pretty_name << " signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl; | ||||
|   | ||||
| @@ -58,7 +58,7 @@ class AcquisitionInterface : public GNSSBlockInterface | ||||
| public: | ||||
|     virtual void set_gnss_synchro(Gnss_Synchro* gnss_synchro) = 0; | ||||
|     virtual void set_channel(unsigned int channel_id) = 0; | ||||
|     virtual void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) = 0; | ||||
|     virtual void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) = 0; | ||||
|     virtual void set_threshold(float threshold) = 0; | ||||
|     virtual void set_doppler_max(unsigned int doppler_max) = 0; | ||||
|     virtual void set_doppler_step(unsigned int doppler_step) = 0; | ||||
|   | ||||
| @@ -104,7 +104,7 @@ gnss_sdr_fpga_sample_counter::~gnss_sdr_fpga_sample_counter() | ||||
| } | ||||
|  | ||||
|  | ||||
| // Called by gnuradio to enable drivers, etc for i/o devices. | ||||
| // Called by GNU Radio to enable drivers, etc for i/o devices. | ||||
| bool gnss_sdr_fpga_sample_counter::start() | ||||
| { | ||||
|     // configure the number of samples per output in the FPGA and enable the interrupts | ||||
| @@ -114,7 +114,8 @@ bool gnss_sdr_fpga_sample_counter::start() | ||||
|     return true; | ||||
| } | ||||
|  | ||||
| // Called by GNURadio to disable drivers, etc for i/o devices. | ||||
|  | ||||
| // Called by GNU Radio to disable drivers, etc for i/o devices. | ||||
| bool gnss_sdr_fpga_sample_counter::stop() | ||||
| { | ||||
|     close_device(); | ||||
| @@ -188,37 +189,6 @@ void gnss_sdr_fpga_sample_counter::close_device() | ||||
| } | ||||
|  | ||||
|  | ||||
| //uint32_t gnss_sdr_fpga_sample_counter::wait_for_interrupt_and_read_counter() | ||||
| //{ | ||||
| //    int32_t irq_count; | ||||
| //   ssize_t nb; | ||||
| //    int32_t counter; | ||||
| // | ||||
| //   // enable interrupts | ||||
| //    int32_t reenable = 1; | ||||
| //    ssize_t nbytes = TEMP_FAILURE_RETRY(write(fd, reinterpret_cast<void *>(&reenable), sizeof(int32_t))); | ||||
| //   if (nbytes != sizeof(int32_t)) | ||||
| //        { | ||||
| //            std::cerr << "Error enabling interruptions in the FPGA." << std::endl; | ||||
| //        } | ||||
| // | ||||
| //    // wait for interrupt | ||||
| //   nb = read(fd, &irq_count, sizeof(irq_count)); | ||||
| //   if (nb != sizeof(irq_count)) | ||||
| //        { | ||||
| //            std::cout << "FPGA sample counter module read failed to retrieve 4 bytes!" << std::endl; | ||||
| //            std::cout << "FPGA sample counter module interrupt number " << irq_count << std::endl; | ||||
| //        } | ||||
| // | ||||
| //    // it is a rising edge interrupt, the interrupt does not need to be acknowledged | ||||
| //    //map_base[1] = 0; // writing anything to reg 1 acknowledges the interrupt | ||||
| // | ||||
| //    // add number of passed samples or read the current counter value for more accuracy | ||||
| //    counter = samples_per_output;  //map_base[0]; | ||||
| //    return counter; | ||||
| //} | ||||
|  | ||||
|  | ||||
| int gnss_sdr_fpga_sample_counter::general_work(int noutput_items __attribute__((unused)), | ||||
|     __attribute__((unused)) gr_vector_int &ninput_items, | ||||
|     __attribute__((unused)) gr_vector_const_void_star &input_items, | ||||
| @@ -240,7 +210,6 @@ int gnss_sdr_fpga_sample_counter::general_work(int noutput_items __attribute__(( | ||||
|     out[0].Channel_ID = -1; | ||||
|     out[0].fs = fs; | ||||
|  | ||||
|  | ||||
|     if ((sample_counter - last_sample_counter) > samples_per_report) | ||||
|         { | ||||
|             last_sample_counter = sample_counter; | ||||
| @@ -305,69 +274,8 @@ int gnss_sdr_fpga_sample_counter::general_work(int noutput_items __attribute__(( | ||||
|     current_T_rx_ms = interval_ms * (sample_counter) / samples_per_output; | ||||
|     return 1; | ||||
| } | ||||
| //<<<<<<< HEAD:src/algorithms/libs/gnss_sdr_fpga_sample_counter.cc | ||||
|  | ||||
| //uint32_t gnss_sdr_fpga_sample_counter::test_register(uint32_t writeval) | ||||
| //{ | ||||
| //uint32_t readval; | ||||
| //// write value to test register | ||||
| //map_base[3] = writeval; | ||||
| //// read value from test register | ||||
| //readval = map_base[3]; | ||||
| //// return read value | ||||
| //return readval; | ||||
| //} | ||||
|  | ||||
| //void gnss_sdr_fpga_sample_counter::configure_samples_per_output(uint32_t interval) | ||||
| //{ | ||||
| //    // note : the counter is a 48-bit value in the HW. | ||||
| //    map_base[0] = interval - 1; | ||||
| //} | ||||
|  | ||||
| //void gnss_sdr_fpga_sample_counter::open_device() | ||||
| //{ | ||||
| //// open communication with HW accelerator | ||||
| //if ((fd = open(device_name.c_str(), O_RDWR | O_SYNC)) == -1) | ||||
| //{ | ||||
| //    LOG(WARNING) << "Cannot open deviceio" << device_name; | ||||
| //    std::cout << "Counter-Intr: cannot open deviceio" << device_name << std::endl; | ||||
| //} | ||||
| //map_base = reinterpret_cast<volatile uint32_t *>(mmap(nullptr, PAGE_SIZE, | ||||
| //PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)); | ||||
| // | ||||
| //if (map_base == reinterpret_cast<void *>(-1)) | ||||
| //{ | ||||
| //    LOG(WARNING) << "Cannot map the FPGA acquisition module into user memory"; | ||||
| //    std::cout << "Counter-Intr: cannot map deviceio" << device_name << std::endl; | ||||
| //} | ||||
|  | ||||
| //// sanity check : check test register | ||||
| //uint32_t writeval = TEST_REG_SANITY_CHECK; | ||||
| //uint32_t readval; | ||||
| //readval = gnss_sdr_fpga_sample_counter::test_register(writeval); | ||||
| //if (writeval != readval) | ||||
| //{ | ||||
| //    LOG(WARNING) << "Acquisition test register sanity check failed"; | ||||
| //} | ||||
| //else | ||||
| //{ | ||||
| //    LOG(INFO) << "Acquisition test register sanity check success!"; | ||||
| //} | ||||
| //} | ||||
|  | ||||
| //void gnss_sdr_fpga_sample_counter::close_device() | ||||
| //{ | ||||
| //map_base[2] = 0;  // disable the generation of the interrupt in the device | ||||
| // | ||||
| //auto *aux = const_cast<uint32_t *>(map_base); | ||||
| //if (munmap(static_cast<void *>(aux), PAGE_SIZE) == -1) | ||||
| //{ | ||||
| //    std::cout << "Failed to unmap memory uio" << std::endl; | ||||
| //} | ||||
| //close(fd); | ||||
| //} | ||||
|  | ||||
| ////uint32_t gnss_sdr_fpga_sample_counter::wait_for_interrupt_and_read_counter() | ||||
| void gnss_sdr_fpga_sample_counter::wait_for_interrupt() | ||||
| { | ||||
|     int32_t irq_count; | ||||
| @@ -385,5 +293,3 @@ void gnss_sdr_fpga_sample_counter::wait_for_interrupt() | ||||
|             std::cout << "fpga sample counter module interrupt number " << irq_count << std::endl; | ||||
|         } | ||||
| } | ||||
| //======= | ||||
| //>>>>>>> b409f1c15efdd3c80fde680f4b5b966a1c18467b:src/core/libs/gnss_sdr_fpga_sample_counter.cc | ||||
|   | ||||
| @@ -246,8 +246,8 @@ void GNSSFlowgraph::connect() | ||||
|                                 { | ||||
|                                     // Connect the multichannel signal source to multiple signal conditioners | ||||
|                                     // GNURADIO max_streams=-1 means infinite ports! | ||||
|                                     LOG(INFO) << "sig_source_.at(i)->get_right_block()->output_signature()->max_streams()=" << sig_source_.at(i)->get_right_block()->output_signature()->max_streams(); | ||||
|                                     LOG(INFO) << "sig_conditioner_.at(signal_conditioner_ID)->get_left_block()->input_signature()=" << sig_conditioner_.at(signal_conditioner_ID)->get_left_block()->input_signature()->max_streams(); | ||||
|                                     DLOG(INFO) << "sig_source_.at(i)->get_right_block()->output_signature()->max_streams()=" << sig_source_.at(i)->get_right_block()->output_signature()->max_streams(); | ||||
|                                     DLOG(INFO) << "sig_conditioner_.at(signal_conditioner_ID)->get_left_block()->input_signature()=" << sig_conditioner_.at(signal_conditioner_ID)->get_left_block()->input_signature()->max_streams(); | ||||
|  | ||||
|                                     if (sig_source_.at(i)->get_right_block()->output_signature()->max_streams() > 1) | ||||
|                                         { | ||||
| @@ -443,10 +443,26 @@ void GNSSFlowgraph::connect() | ||||
|                                                 { | ||||
|                                                     // create a FIR low pass filter | ||||
|                                                     std::vector<float> taps; | ||||
|  | ||||
|                                                     //                                                    float beta = 7.0; | ||||
|                                                     //                                                    float halfband = 0.5; | ||||
|                                                     //                                                    float fractional_bw = 0.4; | ||||
|                                                     //                                                    float rate = 1.0 / static_cast<float>(decimation); | ||||
|                                                     // | ||||
|                                                     //                                                    float trans_width = rate * (halfband - fractional_bw); | ||||
|                                                     //                                                    float mid_transition_band = rate * halfband - trans_width / 2.0; | ||||
|                                                     // | ||||
|                                                     //                                                    taps = gr::filter::firdes::low_pass(1.0, | ||||
|                                                     //                                                        1.0, | ||||
|                                                     //                                                        mid_transition_band, | ||||
|                                                     //                                                        trans_width, | ||||
|                                                     //                                                        gr::filter::firdes::win_type::WIN_KAISER, | ||||
|                                                     //                                                        beta); | ||||
|  | ||||
|                                                     taps = gr::filter::firdes::low_pass(1.0, | ||||
|                                                         fs, | ||||
|                                                         acq_fs / 2.1, | ||||
|                                                         acq_fs / 10, | ||||
|                                                         acq_fs / 2, | ||||
|                                                         gr::filter::firdes::win_type::WIN_HAMMING); | ||||
|  | ||||
|                                                     gr::basic_block_sptr fir_filter_ccf_ = gr::filter::fir_filter_ccf::make(decimation, taps); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Marc Majoral
					Marc Majoral