mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Channel internal message queue is replaced by the asynchronous GNURadio
message system. Removing the deprecated channel internal queue and its references. Some tests that are using the old channel queue are disabled in this version
This commit is contained in:
		| @@ -100,7 +100,6 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( | ||||
|         } | ||||
|  | ||||
|     channel_ = 0; | ||||
|     channel_internal_queue_ = 0; | ||||
|  | ||||
|     DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")"; | ||||
| } | ||||
| @@ -122,17 +121,6 @@ void GalileoE1DllPllVemlTracking::set_channel(unsigned int channel) | ||||
|     tracking_->set_channel(channel); | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Set tracking channel internal queue | ||||
|  */ | ||||
| void GalileoE1DllPllVemlTracking::set_channel_queue( | ||||
|         concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     channel_internal_queue_ = channel_internal_queue; | ||||
|  | ||||
|     tracking_->set_channel_queue(channel_internal_queue_); | ||||
|  | ||||
| } | ||||
|  | ||||
| void GalileoE1DllPllVemlTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|   | ||||
| @@ -93,10 +93,6 @@ public: | ||||
|      */ | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set tracking channel internal queue | ||||
|      */ | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     void start_tracking(); | ||||
|  | ||||
| @@ -108,7 +104,6 @@ private: | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|     boost::shared_ptr<gr::msg_queue> queue_; | ||||
|     concurrent_queue<int> *channel_internal_queue_; | ||||
| }; | ||||
|  | ||||
| #endif // GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_H_ | ||||
|   | ||||
| @@ -100,7 +100,6 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking( | ||||
|             LOG(WARNING) << item_type << " unknown tracking item type."; | ||||
|         } | ||||
|     channel_ = 0; | ||||
|     channel_internal_queue_ = 0; | ||||
|     DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")"; | ||||
| } | ||||
|  | ||||
| @@ -123,17 +122,6 @@ void GalileoE1TcpConnectorTracking::set_channel(unsigned int channel) | ||||
|     tracking_->set_channel(channel); | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Set tracking channel internal queue | ||||
|  */ | ||||
| void GalileoE1TcpConnectorTracking::set_channel_queue( | ||||
|         concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     channel_internal_queue_ = channel_internal_queue; | ||||
|  | ||||
|     tracking_->set_channel_queue(channel_internal_queue_); | ||||
|  | ||||
| } | ||||
|  | ||||
| void GalileoE1TcpConnectorTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|   | ||||
| @@ -94,10 +94,6 @@ public: | ||||
|      */ | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set tracking channel internal queue | ||||
|      */ | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     void start_tracking(); | ||||
|  | ||||
| @@ -109,7 +105,6 @@ private: | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|     boost::shared_ptr<gr::msg_queue> queue_; | ||||
|     concurrent_queue<int> *channel_internal_queue_; | ||||
| }; | ||||
|  | ||||
| #endif // GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_H_ | ||||
|   | ||||
| @@ -107,7 +107,6 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( | ||||
|             LOG(WARNING) << item_type << " unknown tracking item type."; | ||||
|         } | ||||
|     channel_ = 0; | ||||
|     channel_internal_queue_ = 0; | ||||
|     DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")"; | ||||
| } | ||||
|  | ||||
| @@ -130,15 +129,6 @@ void GalileoE5aDllPllTracking::set_channel(unsigned int channel) | ||||
|     tracking_->set_channel(channel); | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Set tracking channel internal queue | ||||
|  */ | ||||
| void GalileoE5aDllPllTracking::set_channel_queue( | ||||
|         concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     channel_internal_queue_ = channel_internal_queue; | ||||
|     tracking_->set_channel_queue(channel_internal_queue_); | ||||
| } | ||||
|  | ||||
| void GalileoE5aDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|   | ||||
| @@ -92,10 +92,6 @@ public: | ||||
|      */ | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set tracking channel internal queue | ||||
|      */ | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     void start_tracking(); | ||||
|  | ||||
| @@ -107,7 +103,6 @@ private: | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|     boost::shared_ptr<gr::msg_queue> queue_; | ||||
|     concurrent_queue<int> *channel_internal_queue_; | ||||
| }; | ||||
|  | ||||
| #endif /* GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_H_ */ | ||||
|   | ||||
| @@ -122,7 +122,6 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking( | ||||
|             LOG(WARNING) << item_type_ << " unknown tracking item type."; | ||||
|         } | ||||
|     channel_ = 0; | ||||
|     channel_internal_queue_ = 0; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -168,28 +167,6 @@ void GpsL1CaDllPllCAidTracking::set_channel(unsigned int channel) | ||||
|         } | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Set tracking channel internal queue | ||||
|  */ | ||||
| void GpsL1CaDllPllCAidTracking::set_channel_queue( | ||||
|         concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     channel_internal_queue_ = channel_internal_queue; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|         { | ||||
|             tracking_cc->set_channel_queue(channel_internal_queue_); | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|         { | ||||
|             tracking_sc->set_channel_queue(channel_internal_queue_); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             LOG(WARNING) << item_type_ << " unknown tracking item type"; | ||||
|         } | ||||
| } | ||||
|  | ||||
| void GpsL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|   | ||||
| @@ -94,10 +94,6 @@ public: | ||||
|      */ | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set tracking channel internal queue | ||||
|      */ | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     void start_tracking(); | ||||
|  | ||||
| @@ -111,7 +107,6 @@ private: | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|     boost::shared_ptr<gr::msg_queue> queue_; | ||||
|     concurrent_queue<int> *channel_internal_queue_; | ||||
| }; | ||||
|  | ||||
| #endif // GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_H_ | ||||
|   | ||||
| @@ -95,7 +95,6 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( | ||||
|             LOG(WARNING) << item_type << " unknown tracking item type."; | ||||
|         } | ||||
|     channel_ = 0; | ||||
|     channel_internal_queue_ = 0; | ||||
|     DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")"; | ||||
| } | ||||
|  | ||||
| @@ -120,17 +119,6 @@ void GpsL1CaDllPllTracking::set_channel(unsigned int channel) | ||||
| } | ||||
|  | ||||
|  | ||||
| /* | ||||
|  * Set tracking channel internal queue | ||||
|  */ | ||||
| void GpsL1CaDllPllTracking::set_channel_queue( | ||||
|         concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     channel_internal_queue_ = channel_internal_queue; | ||||
|     tracking_->set_channel_queue(channel_internal_queue_); | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     tracking_->set_gnss_synchro(p_gnss_synchro); | ||||
|   | ||||
| @@ -93,10 +93,6 @@ public: | ||||
|      */ | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set tracking channel internal queue | ||||
|      */ | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     void start_tracking(); | ||||
|  | ||||
| @@ -108,7 +104,6 @@ private: | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|     boost::shared_ptr<gr::msg_queue> queue_; | ||||
|     concurrent_queue<int> *channel_internal_queue_; | ||||
| }; | ||||
|  | ||||
| #endif // GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H_ | ||||
|   | ||||
| @@ -96,7 +96,6 @@ GpsL1CaDllPllTrackingGPU::GpsL1CaDllPllTrackingGPU( | ||||
|             LOG(WARNING) << item_type << " unknown tracking item type."; | ||||
|         } | ||||
|     channel_ = 0; | ||||
|     channel_internal_queue_ = 0; | ||||
|     DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")"; | ||||
| } | ||||
|  | ||||
| @@ -119,16 +118,6 @@ void GpsL1CaDllPllTrackingGPU::set_channel(unsigned int channel) | ||||
|     tracking_->set_channel(channel); | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Set tracking channel internal queue | ||||
|  */ | ||||
| void GpsL1CaDllPllTrackingGPU::set_channel_queue( | ||||
|         concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     channel_internal_queue_ = channel_internal_queue; | ||||
|     tracking_->set_channel_queue(channel_internal_queue_); | ||||
| } | ||||
|  | ||||
| void GpsL1CaDllPllTrackingGPU::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     tracking_->set_gnss_synchro(p_gnss_synchro); | ||||
|   | ||||
| @@ -91,10 +91,6 @@ public: | ||||
|      */ | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set tracking channel internal queue | ||||
|      */ | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     void start_tracking(); | ||||
|  | ||||
| @@ -106,7 +102,6 @@ private: | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|     boost::shared_ptr<gr::msg_queue> queue_; | ||||
|     concurrent_queue<int> *channel_internal_queue_; | ||||
| }; | ||||
|  | ||||
| #endif // GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_H_ | ||||
|   | ||||
| @@ -93,7 +93,6 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking( | ||||
|         } | ||||
|  | ||||
|     channel_ = 0; | ||||
|     channel_internal_queue_ = 0; | ||||
|     DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")"; | ||||
| } | ||||
|  | ||||
| @@ -116,15 +115,6 @@ void GpsL1CaTcpConnectorTracking::set_channel(unsigned int channel) | ||||
|     tracking_->set_channel(channel); | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Set tracking channel internal queue | ||||
|  */ | ||||
| void GpsL1CaTcpConnectorTracking::set_channel_queue( | ||||
|         concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     channel_internal_queue_ = channel_internal_queue; | ||||
|     tracking_->set_channel_queue(channel_internal_queue_); | ||||
| } | ||||
|  | ||||
| void GpsL1CaTcpConnectorTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|   | ||||
| @@ -94,10 +94,6 @@ public: | ||||
|      */ | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set tracking channel internal queue | ||||
|      */ | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     void start_tracking(); | ||||
|  | ||||
| @@ -112,7 +108,6 @@ private: | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|     boost::shared_ptr<gr::msg_queue> queue_; | ||||
|     concurrent_queue<int> *channel_internal_queue_; | ||||
| }; | ||||
|  | ||||
| #endif // GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_H_ | ||||
|   | ||||
| @@ -95,7 +95,6 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking( | ||||
|             LOG(WARNING) << item_type << " unknown tracking item type."; | ||||
|         } | ||||
|     channel_ = 0; | ||||
|     channel_internal_queue_ = 0; | ||||
|     DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")"; | ||||
| } | ||||
|  | ||||
| @@ -118,15 +117,6 @@ void GpsL2MDllPllTracking::set_channel(unsigned int channel) | ||||
|     tracking_->set_channel(channel); | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Set tracking channel internal queue | ||||
|  */ | ||||
| void GpsL2MDllPllTracking::set_channel_queue( | ||||
|         concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     channel_internal_queue_ = channel_internal_queue; | ||||
|     tracking_->set_channel_queue(channel_internal_queue_); | ||||
| } | ||||
|  | ||||
| void GpsL2MDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|   | ||||
| @@ -93,11 +93,6 @@ public: | ||||
|      */ | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Set tracking channel internal queue | ||||
|      */ | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     void start_tracking(); | ||||
|  | ||||
| private: | ||||
| @@ -108,7 +103,6 @@ private: | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|     boost::shared_ptr<gr::msg_queue> queue_; | ||||
|     concurrent_queue<int> *channel_internal_queue_; | ||||
| }; | ||||
|  | ||||
| #endif // GNSS_SDR_gps_l2_m_dll_pll_tracking_H_ | ||||
|   | ||||
| @@ -107,6 +107,9 @@ galileo_e1_dll_pll_veml_tracking_cc::galileo_e1_dll_pll_veml_tracking_cc( | ||||
|     // Telemetry bit synchronization message port input | ||||
|     this->message_port_register_in(pmt::mp("preamble_timestamp_s")); | ||||
|     this->set_relative_rate(1.0 / vector_length); | ||||
|  | ||||
|     this->message_port_register_out(pmt::mp("events")); | ||||
|  | ||||
|     // initialize internal vars | ||||
|     d_queue = queue; | ||||
|     d_dump = dump; | ||||
| @@ -190,7 +193,6 @@ galileo_e1_dll_pll_veml_tracking_cc::galileo_e1_dll_pll_veml_tracking_cc( | ||||
|     *d_Late = gr_complex(0,0); | ||||
|     *d_Very_Late = gr_complex(0,0); | ||||
|  | ||||
|     d_channel_internal_queue = 0; | ||||
|     d_acquisition_gnss_synchro = 0; | ||||
|     d_channel = 0; | ||||
|     d_acq_code_phase_samples = 0.0; | ||||
| @@ -383,11 +385,14 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items __attri | ||||
|                         { | ||||
|                             std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; | ||||
|                             LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; | ||||
|                             std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); | ||||
|                             if (d_queue != gr::msg_queue::sptr()) | ||||
|                                 { | ||||
|                                     d_queue->handle(cmf->GetQueueMessage(d_channel, 2)); | ||||
|                                 } | ||||
|                             pmt::pmt_t value = pmt::from_long(3);//3 -> loss of lock | ||||
|                             this->message_port_pub(pmt::mp("events"), value); | ||||
|  | ||||
| //                            std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); | ||||
| //                            if (d_queue != gr::msg_queue::sptr()) | ||||
| //                                { | ||||
| //                                    d_queue->handle(cmf->GetQueueMessage(d_channel, 2)); | ||||
| //                                } | ||||
|                             d_carrier_lock_fail_counter = 0; | ||||
|                             d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine | ||||
|                         } | ||||
| @@ -523,12 +528,6 @@ void galileo_e1_dll_pll_veml_tracking_cc::set_channel(unsigned int channel) | ||||
|  | ||||
|  | ||||
|  | ||||
| void galileo_e1_dll_pll_veml_tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     d_channel_internal_queue = channel_internal_queue; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| void galileo_e1_dll_pll_veml_tracking_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|   | ||||
| @@ -71,7 +71,6 @@ public: | ||||
|     void set_channel(unsigned int channel); | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|     void start_tracking(); | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Code DLL + carrier PLL according to the algorithms described in: | ||||
| @@ -113,7 +112,6 @@ private: | ||||
|  | ||||
|     // tracking configuration vars | ||||
|     boost::shared_ptr<gr::msg_queue> d_queue; | ||||
|     concurrent_queue<int> *d_channel_internal_queue; | ||||
|     unsigned int d_vector_length; | ||||
|     bool d_dump; | ||||
|  | ||||
|   | ||||
| @@ -187,7 +187,6 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc( | ||||
|     d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; | ||||
|     systemName["E"] = std::string("Galileo"); | ||||
|  | ||||
|     d_channel_internal_queue = 0; | ||||
|     d_acquisition_gnss_synchro = 0; | ||||
|     d_channel = 0; | ||||
|     d_next_rem_code_phase_samples = 0; | ||||
| @@ -541,12 +540,6 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::set_channel(unsigned int channel) | ||||
|  | ||||
|  | ||||
|  | ||||
| void Galileo_E1_Tcp_Connector_Tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     d_channel_internal_queue = channel_internal_queue; | ||||
| } | ||||
|  | ||||
|  | ||||
| void Galileo_E1_Tcp_Connector_Tracking_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     d_acquisition_gnss_synchro = p_gnss_synchro; | ||||
|   | ||||
| @@ -80,7 +80,6 @@ public: | ||||
|     void set_channel(unsigned int channel); | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|     void start_tracking(); | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     int general_work (int noutput_items, gr_vector_int &ninput_items, | ||||
|             gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); | ||||
| @@ -118,7 +117,6 @@ private: | ||||
|  | ||||
|     // tracking configuration vars | ||||
|     boost::shared_ptr<gr::msg_queue> d_queue; | ||||
|     concurrent_queue<int> *d_channel_internal_queue; | ||||
|     unsigned int d_vector_length; | ||||
|     bool d_dump; | ||||
|  | ||||
|   | ||||
| @@ -193,7 +193,6 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc( | ||||
|     d_carrier_lock_fail_counter = 0; | ||||
|     d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD; | ||||
|  | ||||
|     d_channel_internal_queue = 0; | ||||
|     d_acquisition_gnss_synchro = 0; | ||||
|     d_channel = 0; | ||||
|     tmp_E = 0; | ||||
| @@ -754,13 +753,6 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::set_channel(unsigned int channel) | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| void Galileo_E5a_Dll_Pll_Tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     d_channel_internal_queue = channel_internal_queue; | ||||
| } | ||||
|  | ||||
|  | ||||
| void Galileo_E5a_Dll_Pll_Tracking_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     d_acquisition_gnss_synchro = p_gnss_synchro; | ||||
|   | ||||
| @@ -80,7 +80,6 @@ public: | ||||
|     void set_channel(unsigned int channel); | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|     void start_tracking(); | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     int general_work (int noutput_items, gr_vector_int &ninput_items, | ||||
|             gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); | ||||
| @@ -117,7 +116,6 @@ private: | ||||
|     void acquire_secondary(); | ||||
|     // tracking configuration vars | ||||
|     boost::shared_ptr<gr::msg_queue> d_queue; | ||||
|     concurrent_queue<int> *d_channel_internal_queue; | ||||
|     unsigned int d_vector_length; | ||||
|     int d_current_ti_ms; | ||||
|     int d_ti_ms; | ||||
|   | ||||
| @@ -122,7 +122,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc( | ||||
|     this->set_msg_handler(pmt::mp("preamble_timestamp_s"), | ||||
|             boost::bind(&gps_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index, this, _1)); | ||||
|  | ||||
|  | ||||
|     this->message_port_register_out(pmt::mp("events")); | ||||
|     // initialize internal vars | ||||
|     d_queue = queue; | ||||
|     d_dump = dump; | ||||
| @@ -193,7 +193,6 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc( | ||||
|  | ||||
|     set_relative_rate(1.0 / static_cast<double>(d_vector_length)); | ||||
|  | ||||
|     d_channel_internal_queue = 0; | ||||
|     d_acquisition_gnss_synchro = 0; | ||||
|     d_channel = 0; | ||||
|     d_acq_code_phase_samples = 0.0; | ||||
| @@ -549,11 +548,14 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __attri | ||||
|                                 { | ||||
|                                     std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; | ||||
|                                     LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; | ||||
|                                     std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); | ||||
|                                     if (d_queue != gr::msg_queue::sptr()) | ||||
|                                         { | ||||
|                                             d_queue->handle(cmf->GetQueueMessage(d_channel, 2)); | ||||
|                                         } | ||||
|                                     pmt::pmt_t value = pmt::from_long(3);//3 -> loss of lock | ||||
|                                     this->message_port_pub(pmt::mp("events"), value); | ||||
|  | ||||
|                                     //std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); | ||||
|                                     //if (d_queue != gr::msg_queue::sptr()) | ||||
|                                     //    { | ||||
|                                     //        d_queue->handle(cmf->GetQueueMessage(d_channel, 2)); | ||||
|                                     //    } | ||||
|                                     d_carrier_lock_fail_counter = 0; | ||||
|                                     d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine | ||||
|                                 } | ||||
| @@ -691,11 +693,6 @@ void gps_l1_ca_dll_pll_c_aid_tracking_cc::set_channel(unsigned int channel) | ||||
| } | ||||
|  | ||||
|  | ||||
| void gps_l1_ca_dll_pll_c_aid_tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     d_channel_internal_queue = channel_internal_queue; | ||||
| } | ||||
|  | ||||
|  | ||||
| void gps_l1_ca_dll_pll_c_aid_tracking_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|   | ||||
| @@ -83,7 +83,6 @@ public: | ||||
|     void set_channel(unsigned int channel); | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|     void start_tracking(); | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     int general_work (int noutput_items, gr_vector_int &ninput_items, | ||||
|             gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); | ||||
| @@ -120,7 +119,6 @@ private: | ||||
|  | ||||
|     // tracking configuration vars | ||||
|     boost::shared_ptr<gr::msg_queue> d_queue; | ||||
|     concurrent_queue<int> *d_channel_internal_queue; | ||||
|     unsigned int d_vector_length; | ||||
|     bool d_dump; | ||||
|  | ||||
|   | ||||
| @@ -175,7 +175,6 @@ gps_l1_ca_dll_pll_c_aid_tracking_sc::gps_l1_ca_dll_pll_c_aid_tracking_sc( | ||||
|  | ||||
|     set_relative_rate(1.0 / (static_cast<double>(d_vector_length) * 2.0)); | ||||
|  | ||||
|     d_channel_internal_queue = 0; | ||||
|     d_acquisition_gnss_synchro = 0; | ||||
|     d_channel = 0; | ||||
|     d_acq_code_phase_samples = 0.0; | ||||
| @@ -552,12 +551,6 @@ void gps_l1_ca_dll_pll_c_aid_tracking_sc::set_channel(unsigned int channel) | ||||
| } | ||||
|  | ||||
|  | ||||
| void gps_l1_ca_dll_pll_c_aid_tracking_sc::set_channel_queue(concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     d_channel_internal_queue = channel_internal_queue; | ||||
| } | ||||
|  | ||||
|  | ||||
| void gps_l1_ca_dll_pll_c_aid_tracking_sc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     d_acquisition_gnss_synchro = p_gnss_synchro; | ||||
|   | ||||
| @@ -84,7 +84,6 @@ public: | ||||
|     void set_channel(unsigned int channel); | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|     void start_tracking(); | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     int general_work (int noutput_items, gr_vector_int &ninput_items, | ||||
|             gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); | ||||
| @@ -119,7 +118,6 @@ private: | ||||
|  | ||||
|     // tracking configuration vars | ||||
|     boost::shared_ptr<gr::msg_queue> d_queue; | ||||
|     concurrent_queue<int> *d_channel_internal_queue; | ||||
|     unsigned int d_vector_length; | ||||
|     bool d_dump; | ||||
|  | ||||
|   | ||||
| @@ -105,6 +105,9 @@ Gps_L1_Ca_Dll_Pll_Tracking_cc::Gps_L1_Ca_Dll_Pll_Tracking_cc( | ||||
| { | ||||
|     // Telemetry bit synchronization message port input | ||||
|     this->message_port_register_in(pmt::mp("preamble_timestamp_s")); | ||||
|  | ||||
|     this->message_port_register_out(pmt::mp("events")); | ||||
|  | ||||
|     // initialize internal vars | ||||
|     d_queue = queue; | ||||
|     d_dump = dump; | ||||
| @@ -168,7 +171,6 @@ Gps_L1_Ca_Dll_Pll_Tracking_cc::Gps_L1_Ca_Dll_Pll_Tracking_cc( | ||||
|     systemName["G"] = std::string("GPS"); | ||||
|     systemName["S"] = std::string("SBAS"); | ||||
|  | ||||
|     d_channel_internal_queue = 0; | ||||
|     d_acquisition_gnss_synchro = 0; | ||||
|     d_channel = 0; | ||||
|     d_acq_code_phase_samples = 0.0; | ||||
| @@ -406,11 +408,13 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__ | ||||
|                         { | ||||
|                             std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; | ||||
|                             LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; | ||||
|                             std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); | ||||
|                             if (d_queue != gr::msg_queue::sptr()) | ||||
|                                 { | ||||
|                                     d_queue->handle(cmf->GetQueueMessage(d_channel, 2)); | ||||
|                                 } | ||||
|                             pmt::pmt_t value = pmt::from_long(3);//3 -> loss of lock | ||||
|                             this->message_port_pub(pmt::mp("events"), value); | ||||
| //                            std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); | ||||
| //                            if (d_queue != gr::msg_queue::sptr()) | ||||
| //                                { | ||||
| //                                    d_queue->handle(cmf->GetQueueMessage(d_channel, 2)); | ||||
| //                                } | ||||
|                             d_carrier_lock_fail_counter = 0; | ||||
|                             d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine | ||||
|                         } | ||||
| @@ -535,12 +539,6 @@ void Gps_L1_Ca_Dll_Pll_Tracking_cc::set_channel(unsigned int channel) | ||||
| } | ||||
|  | ||||
|  | ||||
| void Gps_L1_Ca_Dll_Pll_Tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     d_channel_internal_queue = channel_internal_queue; | ||||
| } | ||||
|  | ||||
|  | ||||
| void Gps_L1_Ca_Dll_Pll_Tracking_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     d_acquisition_gnss_synchro = p_gnss_synchro; | ||||
|   | ||||
| @@ -77,7 +77,6 @@ public: | ||||
|     void set_channel(unsigned int channel); | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|     void start_tracking(); | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     int general_work (int noutput_items, gr_vector_int &ninput_items, | ||||
|             gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); | ||||
| @@ -108,7 +107,6 @@ private: | ||||
|  | ||||
|     // tracking configuration vars | ||||
|     boost::shared_ptr<gr::msg_queue> d_queue; | ||||
|     concurrent_queue<int> *d_channel_internal_queue; | ||||
|     unsigned int d_vector_length; | ||||
|     bool d_dump; | ||||
|  | ||||
|   | ||||
| @@ -170,7 +170,6 @@ Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc( | ||||
|  | ||||
|     set_relative_rate(1.0 / (static_cast<double>(d_vector_length) * 2.0)); | ||||
|  | ||||
|     d_channel_internal_queue = 0; | ||||
|     d_acquisition_gnss_synchro = 0; | ||||
|     d_channel = 0; | ||||
|     d_acq_code_phase_samples = 0.0; | ||||
| @@ -557,10 +556,6 @@ void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::set_channel(unsigned int channel) | ||||
|         } | ||||
| } | ||||
|  | ||||
| void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     d_channel_internal_queue = channel_internal_queue; | ||||
| } | ||||
|  | ||||
| void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|   | ||||
| @@ -76,7 +76,6 @@ public: | ||||
|     void set_channel(unsigned int channel); | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|     void start_tracking(); | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     int general_work (int noutput_items, gr_vector_int &ninput_items, | ||||
|             gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); | ||||
| @@ -109,7 +108,6 @@ private: | ||||
|  | ||||
|     // tracking configuration vars | ||||
|     boost::shared_ptr<gr::msg_queue> d_queue; | ||||
|     concurrent_queue<int> *d_channel_internal_queue; | ||||
|     unsigned int d_vector_length; | ||||
|     bool d_dump; | ||||
|  | ||||
|   | ||||
| @@ -179,7 +179,6 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc( | ||||
|     systemName["E"] = std::string("Galileo"); | ||||
|     systemName["C"] = std::string("Compass"); | ||||
|  | ||||
|     d_channel_internal_queue = 0; | ||||
|     d_acquisition_gnss_synchro = 0; | ||||
|     d_channel = 0; | ||||
|     d_next_rem_code_phase_samples = 0; | ||||
| @@ -588,12 +587,6 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::set_channel(unsigned int channel) | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| void Gps_L1_Ca_Tcp_Connector_Tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     d_channel_internal_queue = channel_internal_queue; | ||||
| } | ||||
|  | ||||
| void Gps_L1_Ca_Tcp_Connector_Tracking_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     d_acquisition_gnss_synchro = p_gnss_synchro; | ||||
|   | ||||
| @@ -75,7 +75,6 @@ public: | ||||
|     void set_channel(unsigned int channel); | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|     void start_tracking(); | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     /* | ||||
|      * \brief just like gr_block::general_work, only this arranges to call consume_each for you | ||||
| @@ -108,7 +107,6 @@ private: | ||||
|  | ||||
|     // tracking configuration vars | ||||
|     boost::shared_ptr<gr::msg_queue> d_queue; | ||||
|     concurrent_queue<int> *d_channel_internal_queue; | ||||
|     unsigned int d_vector_length; | ||||
|     bool d_dump; | ||||
|  | ||||
|   | ||||
| @@ -174,7 +174,6 @@ gps_l2_m_dll_pll_tracking_cc::gps_l2_m_dll_pll_tracking_cc( | ||||
|     set_relative_rate(1.0/((double)d_vector_length*2)); | ||||
|     //set_min_output_buffer((long int)300); | ||||
|  | ||||
|     d_channel_internal_queue = 0; | ||||
|     d_acquisition_gnss_synchro = 0; | ||||
|     d_channel = 0; | ||||
|     d_acq_code_phase_samples = 0.0; | ||||
| @@ -540,12 +539,6 @@ void gps_l2_m_dll_pll_tracking_cc::set_channel(unsigned int channel) | ||||
|  | ||||
|  | ||||
|  | ||||
| void gps_l2_m_dll_pll_tracking_cc::set_channel_queue(concurrent_queue<int> *channel_internal_queue) | ||||
| { | ||||
|     d_channel_internal_queue = channel_internal_queue; | ||||
| } | ||||
|  | ||||
|  | ||||
| void gps_l2_m_dll_pll_tracking_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     d_acquisition_gnss_synchro = p_gnss_synchro; | ||||
|   | ||||
| @@ -77,7 +77,6 @@ public: | ||||
|     void set_channel(unsigned int channel); | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); | ||||
|     void start_tracking(); | ||||
|     void set_channel_queue(concurrent_queue<int> *channel_internal_queue); | ||||
|  | ||||
|     int general_work (int noutput_items, gr_vector_int &ninput_items, | ||||
|             gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); | ||||
| @@ -108,7 +107,6 @@ private: | ||||
|  | ||||
|     // tracking configuration vars | ||||
|     boost::shared_ptr<gr::msg_queue> d_queue; | ||||
|     concurrent_queue<int> *d_channel_internal_queue; | ||||
|     unsigned int d_vector_length; | ||||
|     bool d_dump; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Javier Arribas
					Javier Arribas