mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-30 23:03:05 +00:00 
			
		
		
		
	Added acquisition and tracking monitors
Added acquisition and tracking monitors to view intermediate outputs of GNSS-SDR from monitoring clients. Each monitor (acquisition, tracking, original monitor, and pvt) pushes its data to a different UDP port.
This commit is contained in:
		 Josh Schindehette
					Josh Schindehette
				
			
				
					committed by
					
						 Carles Fernandez
						Carles Fernandez
					
				
			
			
				
	
			
			
			 Carles Fernandez
						Carles Fernandez
					
				
			
						parent
						
							c1ecd1d1be
						
					
				
				
					commit
					ed93af11ac
				
			
							
								
								
									
										85
									
								
								conf/gnss-sdr_GPS_L1_monitor.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								conf/gnss-sdr_GPS_L1_monitor.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,85 @@ | |||||||
|  | [GNSS-SDR] | ||||||
|  |  | ||||||
|  | ;######### GLOBAL OPTIONS ################## | ||||||
|  | GNSS-SDR.internal_fs_sps=2000000 | ||||||
|  |  | ||||||
|  | ;######### SIGNAL_SOURCE CONFIG ############ | ||||||
|  | SignalSource.implementation=File_Signal_Source | ||||||
|  | SignalSource.filename=/tmp/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat | ||||||
|  | SignalSource.item_type=ishort | ||||||
|  | SignalSource.sampling_frequency=4000000 | ||||||
|  | SignalSource.freq=1575420000 | ||||||
|  | SignalSource.samples=0 | ||||||
|  | SignalSource.enable_throttle_control=true | ||||||
|  |  | ||||||
|  | ;######### SIGNAL_CONDITIONER CONFIG ############ | ||||||
|  | SignalConditioner.implementation=Signal_Conditioner | ||||||
|  |  | ||||||
|  | ;######### DATA_TYPE_ADAPTER CONFIG ############ | ||||||
|  | DataTypeAdapter.implementation=Ishort_To_Complex | ||||||
|  |  | ||||||
|  | ;######### INPUT_FILTER CONFIG ############ | ||||||
|  | InputFilter.implementation=Pass_Through | ||||||
|  | InputFilter.item_type=gr_complex | ||||||
|  |  | ||||||
|  | ;######### RESAMPLER CONFIG ############ | ||||||
|  | Resampler.implementation=Direct_Resampler | ||||||
|  | Resampler.sample_freq_in=4000000 | ||||||
|  | Resampler.sample_freq_out=2000000 | ||||||
|  | Resampler.item_type=gr_complex | ||||||
|  |  | ||||||
|  | ;######### CHANNELS GLOBAL CONFIG ############ | ||||||
|  | Channels_1C.count=3 | ||||||
|  | Channels.in_acquisition=1 | ||||||
|  | Channel.signal=1C | ||||||
|  | Channel0.satellite=1 | ||||||
|  | Channel1.satellite=11 | ||||||
|  | Channel2.satellite=17 | ||||||
|  |  | ||||||
|  | ;######### ACQUISITION GLOBAL CONFIG ############ | ||||||
|  | Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition | ||||||
|  | Acquisition_1C.item_type=gr_complex | ||||||
|  | Acquisition_1C.threshold=0.008 | ||||||
|  | Acquisition_1C.doppler_max=10000 | ||||||
|  | Acquisition_1C.doppler_step=250 | ||||||
|  |  | ||||||
|  | ;######### TRACKING GLOBAL CONFIG ############ | ||||||
|  | Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking | ||||||
|  | Tracking_1C.item_type=gr_complex | ||||||
|  | Tracking_1C.pll_bw_hz=40.0; | ||||||
|  | Tracking_1C.dll_bw_hz=4.0; | ||||||
|  |  | ||||||
|  | ;######### TELEMETRY DECODER GPS CONFIG ############ | ||||||
|  | TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder | ||||||
|  |  | ||||||
|  | ;######### OBSERVABLES CONFIG ############ | ||||||
|  | Observables.implementation=Hybrid_Observables | ||||||
|  |  | ||||||
|  | ;######### PVT CONFIG ############ | ||||||
|  | PVT.implementation=RTKLIB_PVT | ||||||
|  | PVT.averaging_depth=100 | ||||||
|  | PVT.flag_averaging=true | ||||||
|  | PVT.output_rate_ms=10 | ||||||
|  | PVT.display_rate_ms=500 | ||||||
|  | PVT.enable_monitor=true | ||||||
|  | PVT.decimation_factor=1 | ||||||
|  | PVT.client_addresses=127.0.0.1 | ||||||
|  | PVT.udp_port=1234 | ||||||
|  |  | ||||||
|  | ;######### MONITOR CONFIG ############ | ||||||
|  | Monitor.enable_monitor=true | ||||||
|  | Monitor.decimation_factor=1 | ||||||
|  | Monitor.client_addresses=127.0.0.1 | ||||||
|  | Monitor.udp_port=1233 | ||||||
|  |  | ||||||
|  | ;######### ACQUISITION MONITOR CONFIG ############ | ||||||
|  | AcquisitionMonitor.enable_monitor=true | ||||||
|  | AcquisitionMonitor.decimation_factor=1 | ||||||
|  | AcquisitionMonitor.client_addresses=127.0.0.1 | ||||||
|  | AcquisitionMonitor.udp_port=1231 | ||||||
|  |  | ||||||
|  | ;######### TRACKING MONITOR CONFIG ############ | ||||||
|  | TrackingMonitor.enable_monitor=true | ||||||
|  | TrackingMonitor.decimation_factor=1 | ||||||
|  | TrackingMonitor.client_addresses=127.0.0.1 | ||||||
|  | TrackingMonitor.udp_port=1232 | ||||||
							
								
								
									
										78
									
								
								conf/gnss-sdr_GPS_L1_udp_with_monitor.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								conf/gnss-sdr_GPS_L1_udp_with_monitor.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,78 @@ | |||||||
|  | [GNSS-SDR] | ||||||
|  |  | ||||||
|  | ;######### GLOBAL OPTIONS ################## | ||||||
|  | ;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [Sps] | ||||||
|  | GNSS-SDR.internal_fs_sps=4000000 | ||||||
|  |  | ||||||
|  | ;######### SIGNAL_SOURCE CONFIG ############ | ||||||
|  | SignalSource.implementation=Custom_UDP_Signal_Source | ||||||
|  | SignalSource.item_type=gr_complex | ||||||
|  | SignalSource.origin_address=127.0.0.1 | ||||||
|  | SignalSource.capture_device=lo | ||||||
|  | SignalSource.port=1230 | ||||||
|  | ;SignalSource.payload_bytes=1472 # Not used! Size is retrieved from UDP Packet | ||||||
|  | SignalSource.sample_type=cfloat | ||||||
|  | SignalSource.IQ_swap=true | ||||||
|  | SignalSource.RF_channels=1 | ||||||
|  | SignalSource.channels_in_udp=1 | ||||||
|  | SignalSource.dump=false | ||||||
|  | SignalSource.dump_filename=./signal_source.dat | ||||||
|  |  | ||||||
|  | ;######### SIGNAL_CONDITIONER CONFIG ############ | ||||||
|  | SignalConditioner.implementation=Pass_Through | ||||||
|  |  | ||||||
|  | ;######### CHANNELS GLOBAL CONFIG ############ | ||||||
|  | Channels_1C.count=3 | ||||||
|  | Channels.in_acquisition=1 | ||||||
|  | Channel.signal=1C | ||||||
|  | Channel0.satellite=1 | ||||||
|  | Channel1.satellite=11 | ||||||
|  | Channel2.satellite=17 | ||||||
|  |  | ||||||
|  | ;######### ACQUISITION GLOBAL CONFIG ############ | ||||||
|  | Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition | ||||||
|  | Acquisition_1C.item_type=gr_complex | ||||||
|  | Acquisition_1C.threshold=0.008 | ||||||
|  | Acquisition_1C.doppler_max=10000 | ||||||
|  | Acquisition_1C.doppler_step=250 | ||||||
|  |  | ||||||
|  | ;######### TRACKING GLOBAL CONFIG ############ | ||||||
|  | Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking | ||||||
|  | Tracking_1C.item_type=gr_complex | ||||||
|  | Tracking_1C.pll_bw_hz=40.0; | ||||||
|  | Tracking_1C.dll_bw_hz=4.0; | ||||||
|  |  | ||||||
|  | ;######### TELEMETRY DECODER GPS CONFIG ############ | ||||||
|  | TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder | ||||||
|  |  | ||||||
|  | ;######### OBSERVABLES CONFIG ############ | ||||||
|  | Observables.implementation=Hybrid_Observables | ||||||
|  |  | ||||||
|  | ;######### PVT CONFIG ############ | ||||||
|  | PVT.implementation=RTKLIB_PVT | ||||||
|  | PVT.averaging_depth=100 | ||||||
|  | PVT.flag_averaging=true | ||||||
|  | PVT.output_rate_ms=10 | ||||||
|  | PVT.display_rate_ms=500 | ||||||
|  | PVT.enable_monitor=true | ||||||
|  | PVT.decimation_factor=1 | ||||||
|  | PVT.client_addresses=127.0.0.1 | ||||||
|  | PVT.udp_port=1234 | ||||||
|  |  | ||||||
|  | ;######### MONITOR CONFIG ############ | ||||||
|  | Monitor.enable_monitor=true | ||||||
|  | Monitor.decimation_factor=1 | ||||||
|  | Monitor.client_addresses=127.0.0.1 | ||||||
|  | Monitor.udp_port=1233 | ||||||
|  |  | ||||||
|  | ;######### ACQUISITION MONITOR CONFIG ############ | ||||||
|  | AcquisitionMonitor.enable_monitor=true | ||||||
|  | AcquisitionMonitor.decimation_factor=1 | ||||||
|  | AcquisitionMonitor.client_addresses=127.0.0.1 | ||||||
|  | AcquisitionMonitor.udp_port=1231 | ||||||
|  |  | ||||||
|  | ;######### TRACKING MONITOR CONFIG ############ | ||||||
|  | TrackingMonitor.enable_monitor=true | ||||||
|  | TrackingMonitor.decimation_factor=1 | ||||||
|  | TrackingMonitor.client_addresses=127.0.0.1 | ||||||
|  | TrackingMonitor.udp_port=1232 | ||||||
| @@ -85,12 +85,14 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( | |||||||
|  |  | ||||||
|     code_ = std::vector<std::complex<float>>(vector_length_); |     code_ = std::vector<std::complex<float>>(vector_length_); | ||||||
|  |  | ||||||
|  |     bool enable_monitor_output = configuration->property("AcquisitionMonitor.enable_monitor", false); | ||||||
|  |  | ||||||
|     if (item_type_ == "gr_complex") |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = galileo_pcps_8ms_make_acquisition_cc(sampled_ms_, max_dwells_, |             acquisition_cc_ = galileo_pcps_8ms_make_acquisition_cc(sampled_ms_, max_dwells_, | ||||||
|                 doppler_max_, fs_in_, samples_per_ms, code_length_, |                 doppler_max_, fs_in_, samples_per_ms, code_length_, | ||||||
|                 dump_, dump_filename_); |                 dump_, dump_filename_, enable_monitor_output); | ||||||
|             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_); |             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_); | ||||||
|             DLOG(INFO) << "stream_to_vector(" |             DLOG(INFO) << "stream_to_vector(" | ||||||
|                        << stream_to_vector_->unique_id() << ")"; |                        << stream_to_vector_->unique_id() << ")"; | ||||||
|   | |||||||
| @@ -78,12 +78,14 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition | |||||||
|     code_data_ = std::vector<std::complex<float>>(vector_length_); |     code_data_ = std::vector<std::complex<float>>(vector_length_); | ||||||
|     code_pilot_ = std::vector<std::complex<float>>(vector_length_); |     code_pilot_ = std::vector<std::complex<float>>(vector_length_); | ||||||
|  |  | ||||||
|  |     bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false); | ||||||
|  |  | ||||||
|     if (item_type_ == "gr_complex") |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_cccwsr_make_acquisition_cc(sampled_ms_, max_dwells_, |             acquisition_cc_ = pcps_cccwsr_make_acquisition_cc(sampled_ms_, max_dwells_, | ||||||
|                 doppler_max_, fs_in_, samples_per_ms, code_length_, |                 doppler_max_, fs_in_, samples_per_ms, code_length_, | ||||||
|                 dump_, dump_filename_); |                 dump_, dump_filename_, enable_monitor_output); | ||||||
|             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_); |             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_); | ||||||
|             DLOG(INFO) << "stream_to_vector(" |             DLOG(INFO) << "stream_to_vector(" | ||||||
|                        << stream_to_vector_->unique_id() << ")"; |                        << stream_to_vector_->unique_id() << ")"; | ||||||
|   | |||||||
| @@ -111,6 +111,8 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui | |||||||
|     dump_filename_ = configuration_->property(role + ".dump_filename", |     dump_filename_ = configuration_->property(role + ".dump_filename", | ||||||
|         default_dump_filename); |         default_dump_filename); | ||||||
|  |  | ||||||
|  |     bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false); | ||||||
|  |  | ||||||
|     code_ = std::vector<std::complex<float>>(code_length_); |     code_ = std::vector<std::complex<float>>(code_length_); | ||||||
|     LOG(INFO) << "Vector Length: " << vector_length_ |     LOG(INFO) << "Vector Length: " << vector_length_ | ||||||
|               << ", Samples per ms: " << samples_per_ms |               << ", Samples per ms: " << samples_per_ms | ||||||
| @@ -123,7 +125,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui | |||||||
|             acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_, |             acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_, | ||||||
|                 sampled_ms_, max_dwells_, doppler_max_, fs_in_, |                 sampled_ms_, max_dwells_, doppler_max_, fs_in_, | ||||||
|                 samples_per_ms, code_length_, bit_transition_flag_, |                 samples_per_ms, code_length_, bit_transition_flag_, | ||||||
|                 dump_, dump_filename_); |                 dump_, dump_filename_, enable_monitor_output); | ||||||
|             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, |             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, | ||||||
|                 vector_length_); |                 vector_length_); | ||||||
|             DLOG(INFO) << "stream_to_vector_quicksync(" |             DLOG(INFO) << "stream_to_vector_quicksync(" | ||||||
|   | |||||||
| @@ -77,6 +77,8 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | |||||||
|     dump_filename_ = configuration_->property(role + ".dump_filename", |     dump_filename_ = configuration_->property(role + ".dump_filename", | ||||||
|         default_dump_filename); |         default_dump_filename); | ||||||
|  |  | ||||||
|  |     bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false); | ||||||
|  |  | ||||||
|     // -- Find number of samples per spreading code (4 ms)  ----------------- |     // -- Find number of samples per spreading code (4 ms)  ----------------- | ||||||
|  |  | ||||||
|     code_length_ = static_cast<unsigned int>(round( |     code_length_ = static_cast<unsigned int>(round( | ||||||
| @@ -93,7 +95,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | |||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, |             acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, | ||||||
|                 fs_in_, samples_per_ms, code_length_, tong_init_val_, |                 fs_in_, samples_per_ms, code_length_, tong_init_val_, | ||||||
|                 tong_max_val_, tong_max_dwells_, dump_, dump_filename_); |                 tong_max_val_, tong_max_dwells_, dump_, dump_filename_, enable_monitor_output); | ||||||
|  |  | ||||||
|             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_); |             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_); | ||||||
|             DLOG(INFO) << "stream_to_vector(" |             DLOG(INFO) << "stream_to_vector(" | ||||||
|   | |||||||
| @@ -94,6 +94,8 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | |||||||
|     codeQ_ = std::vector<std::complex<float>>(vector_length_); |     codeQ_ = std::vector<std::complex<float>>(vector_length_); | ||||||
|     both_signal_components = false; |     both_signal_components = false; | ||||||
|  |  | ||||||
|  |     bool enable_monitor_output = configuration->property("AcquisitionMonitor.enable_monitor", false); | ||||||
|  |  | ||||||
|     std::string sig_ = configuration_->property("Channel.signal", std::string("5X")); |     std::string sig_ = configuration_->property("Channel.signal", std::string("5X")); | ||||||
|     if (sig_.at(0) == '5' && sig_.at(1) == 'X') |     if (sig_.at(0) == '5' && sig_.at(1) == 'X') | ||||||
|         { |         { | ||||||
| @@ -104,7 +106,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | |||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(sampled_ms_, max_dwells_, |             acquisition_cc_ = galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(sampled_ms_, max_dwells_, | ||||||
|                 doppler_max_, fs_in_, code_length_, code_length_, bit_transition_flag_, |                 doppler_max_, fs_in_, code_length_, code_length_, bit_transition_flag_, | ||||||
|                 dump_, dump_filename_, both_signal_components, CAF_window_hz_, Zero_padding); |                 dump_, dump_filename_, both_signal_components, CAF_window_hz_, Zero_padding, enable_monitor_output); | ||||||
|         } |         } | ||||||
|     else |     else | ||||||
|         { |         { | ||||||
|   | |||||||
| @@ -55,6 +55,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | |||||||
|     sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1); |     sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1); | ||||||
|     max_dwells_ = configuration->property(role + ".max_dwells", 1); |     max_dwells_ = configuration->property(role + ".max_dwells", 1); | ||||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); |     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||||
|  |     bool enable_monitor_output = configuration->property("AcquisitionMonitor.enable_monitor", false); | ||||||
|  |  | ||||||
|     // --- Find number of samples per spreading code ------------------------- |     // --- Find number of samples per spreading code ------------------------- | ||||||
|     vector_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); |     vector_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); | ||||||
| @@ -66,7 +67,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | |||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_make_assisted_acquisition_cc(max_dwells_, sampled_ms_, |             acquisition_cc_ = pcps_make_assisted_acquisition_cc(max_dwells_, sampled_ms_, | ||||||
|                 doppler_max_, doppler_min_, fs_in_, vector_length_, |                 doppler_max_, doppler_min_, fs_in_, vector_length_, | ||||||
|                 dump_, dump_filename_); |                 dump_, dump_filename_, enable_monitor_output); | ||||||
|         } |         } | ||||||
|     else |     else | ||||||
|         { |         { | ||||||
|   | |||||||
| @@ -100,6 +100,8 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | |||||||
|  |  | ||||||
|     dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); |     dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); | ||||||
|  |  | ||||||
|  |     bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false); | ||||||
|  |  | ||||||
|     int samples_per_ms = round(code_length_); |     int samples_per_ms = round(code_length_); | ||||||
|     code_ = std::vector<std::complex<float>>(code_length_); |     code_ = std::vector<std::complex<float>>(code_length_); | ||||||
|     /* Object relevant information for debugging */ |     /* Object relevant information for debugging */ | ||||||
| @@ -116,7 +118,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | |||||||
|             acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_, |             acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_, | ||||||
|                 sampled_ms_, max_dwells_, doppler_max_, fs_in_, |                 sampled_ms_, max_dwells_, doppler_max_, fs_in_, | ||||||
|                 samples_per_ms, code_length_, bit_transition_flag_, |                 samples_per_ms, code_length_, bit_transition_flag_, | ||||||
|                 dump_, dump_filename_); |                 dump_, dump_filename_, enable_monitor_output); | ||||||
|  |  | ||||||
|             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, |             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, | ||||||
|                 code_length_ * folding_factor_); |                 code_length_ * folding_factor_); | ||||||
|   | |||||||
| @@ -67,6 +67,8 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | |||||||
|  |  | ||||||
|     dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); |     dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); | ||||||
|  |  | ||||||
|  |     bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false); | ||||||
|  |  | ||||||
|     // -- Find number of samples per spreading code ------------------------- |     // -- Find number of samples per spreading code ------------------------- | ||||||
|     code_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); |     code_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); | ||||||
|  |  | ||||||
| @@ -79,7 +81,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | |||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, fs_in_, |             acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, fs_in_, | ||||||
|                 code_length_, code_length_, tong_init_val_, tong_max_val_, tong_max_dwells_, |                 code_length_, code_length_, tong_init_val_, tong_max_val_, tong_max_dwells_, | ||||||
|                 dump_, dump_filename_); |                 dump_, dump_filename_, enable_monitor_output); | ||||||
|  |  | ||||||
|             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_); |             stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -46,11 +46,12 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make | |||||||
|     const std::string &dump_filename, |     const std::string &dump_filename, | ||||||
|     bool both_signal_components_, |     bool both_signal_components_, | ||||||
|     int CAF_window_hz_, |     int CAF_window_hz_, | ||||||
|     int Zero_padding_) |     int Zero_padding_, | ||||||
|  |     bool enable_monitor_output) | ||||||
| { | { | ||||||
|     return galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr( |     return galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr( | ||||||
|         new galileo_e5a_noncoherentIQ_acquisition_caf_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, |         new galileo_e5a_noncoherentIQ_acquisition_caf_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, | ||||||
|             samples_per_code, bit_transition_flag, dump, dump_filename, both_signal_components_, CAF_window_hz_, Zero_padding_)); |             samples_per_code, bit_transition_flag, dump, dump_filename, both_signal_components_, CAF_window_hz_, Zero_padding_, enable_monitor_output)); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -66,9 +67,10 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit | |||||||
|     const std::string &dump_filename, |     const std::string &dump_filename, | ||||||
|     bool both_signal_components_, |     bool both_signal_components_, | ||||||
|     int CAF_window_hz_, |     int CAF_window_hz_, | ||||||
|     int Zero_padding_) : gr::block("galileo_e5a_noncoherentIQ_acquisition_caf_cc", |     int Zero_padding_, | ||||||
|                              gr::io_signature::make(1, 1, sizeof(gr_complex)), |     bool enable_monitor_output) : gr::block("galileo_e5a_noncoherentIQ_acquisition_caf_cc", | ||||||
|                              gr::io_signature::make(0, 0, sizeof(gr_complex))) |                                   gr::io_signature::make(1, 1, sizeof(gr_complex)), | ||||||
|  |                                   gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))) | ||||||
| { | { | ||||||
|     this->message_port_register_out(pmt::mp("events")); |     this->message_port_register_out(pmt::mp("events")); | ||||||
|     d_sample_counter = 0ULL;  // SAMPLE COUNTER |     d_sample_counter = 0ULL;  // SAMPLE COUNTER | ||||||
| @@ -96,6 +98,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit | |||||||
|     d_buffer_count = 0; |     d_buffer_count = 0; | ||||||
|     d_both_signal_components = both_signal_components_; |     d_both_signal_components = both_signal_components_; | ||||||
|     d_CAF_window_hz = CAF_window_hz_; |     d_CAF_window_hz = CAF_window_hz_; | ||||||
|  |     d_enable_monitor_output = enable_monitor_output; | ||||||
|  |  | ||||||
|     d_inbuffer.reserve(d_fft_size); |     d_inbuffer.reserve(d_fft_size); | ||||||
|     d_fft_code_I_A.reserve(d_fft_size); |     d_fft_code_I_A.reserve(d_fft_size); | ||||||
| @@ -285,7 +288,7 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_state(int state) | |||||||
|  |  | ||||||
| int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items __attribute__((unused)), | int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items __attribute__((unused)), | ||||||
|     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, |     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, | ||||||
|     gr_vector_void_star &output_items __attribute__((unused))) |     gr_vector_void_star &output_items) | ||||||
| { | { | ||||||
|     /* |     /* | ||||||
|      * By J.Arribas, L.Esteve, M.Molina and M.Sales |      * By J.Arribas, L.Esteve, M.Molina and M.Sales | ||||||
| @@ -300,6 +303,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items | |||||||
|      */ |      */ | ||||||
|  |  | ||||||
|     int acquisition_message = -1;  // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL |     int acquisition_message = -1;  // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL | ||||||
|  |     int return_value = 0;  // 0=Produces no Gnss_Synchro objects | ||||||
|     /* States: 0 Stop Channel |     /* States: 0 Stop Channel | ||||||
|      *         1 Load the buffer until it reaches fft_size |      *         1 Load the buffer until it reaches fft_size | ||||||
|      *         2 Acquisition algorithm |      *         2 Acquisition algorithm | ||||||
| @@ -726,6 +730,17 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items | |||||||
|                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); |                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); | ||||||
|                 d_sample_counter += static_cast<uint64_t>(ninput_items[0]);  // sample counter |                 d_sample_counter += static_cast<uint64_t>(ninput_items[0]);  // sample counter | ||||||
|                 consume_each(ninput_items[0]); |                 consume_each(ninput_items[0]); | ||||||
|  |  | ||||||
|  |                 // Copy and push current Gnss_Synchro to monitor queue | ||||||
|  |                 if (d_enable_monitor_output) | ||||||
|  |                     { | ||||||
|  |                         auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); | ||||||
|  |                         Gnss_Synchro current_synchro_data = Gnss_Synchro(); | ||||||
|  |                         current_synchro_data = *d_gnss_synchro; | ||||||
|  |                         *out[0] = current_synchro_data; | ||||||
|  |                         return_value = 1;  // Number of Gnss_Synchro objects produced | ||||||
|  |                     } | ||||||
|  |  | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|         case 4: |         case 4: | ||||||
| @@ -752,5 +767,5 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|     return 0; |     return return_value; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -60,7 +60,8 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make | |||||||
|     const std::string& dump_filename, |     const std::string& dump_filename, | ||||||
|     bool both_signal_components_, |     bool both_signal_components_, | ||||||
|     int CAF_window_hz_, |     int CAF_window_hz_, | ||||||
|     int Zero_padding_); |     int Zero_padding_, | ||||||
|  |     bool enable_monitor_output); | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
|  * \brief This class implements a Parallel Code Phase Search Acquisition. |  * \brief This class implements a Parallel Code Phase Search Acquisition. | ||||||
| @@ -186,7 +187,8 @@ private: | |||||||
|         const std::string& dump_filename, |         const std::string& dump_filename, | ||||||
|         bool both_signal_components_, |         bool both_signal_components_, | ||||||
|         int CAF_window_hz_, |         int CAF_window_hz_, | ||||||
|         int Zero_padding_); |         int Zero_padding_, | ||||||
|  |         bool enable_monitor_output); | ||||||
|  |  | ||||||
|     galileo_e5a_noncoherentIQ_acquisition_caf_cc( |     galileo_e5a_noncoherentIQ_acquisition_caf_cc( | ||||||
|         unsigned int sampled_ms, |         unsigned int sampled_ms, | ||||||
| @@ -198,7 +200,8 @@ private: | |||||||
|         const std::string& dump_filename, |         const std::string& dump_filename, | ||||||
|         bool both_signal_components_, |         bool both_signal_components_, | ||||||
|         int CAF_window_hz_, |         int CAF_window_hz_, | ||||||
|         int Zero_padding_); |         int Zero_padding_, | ||||||
|  |         bool enable_monitor_output); | ||||||
|  |  | ||||||
|     void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift, |     void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift, | ||||||
|         int doppler_offset); |         int doppler_offset); | ||||||
| @@ -260,6 +263,7 @@ private: | |||||||
|     bool d_active; |     bool d_active; | ||||||
|     bool d_dump; |     bool d_dump; | ||||||
|     bool d_both_signal_components; |     bool d_both_signal_components; | ||||||
|  |     bool d_enable_monitor_output; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif  // GNSS_SDR_GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H | #endif  // GNSS_SDR_GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H | ||||||
|   | |||||||
| @@ -37,11 +37,13 @@ galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc( | |||||||
|     int64_t fs_in, |     int64_t fs_in, | ||||||
|     int32_t samples_per_ms, |     int32_t samples_per_ms, | ||||||
|     int32_t samples_per_code, |     int32_t samples_per_code, | ||||||
|     bool dump, const std::string &dump_filename) |     bool dump, | ||||||
|  |     const std::string &dump_filename, | ||||||
|  |     bool enable_monitor_output) | ||||||
| { | { | ||||||
|     return galileo_pcps_8ms_acquisition_cc_sptr( |     return galileo_pcps_8ms_acquisition_cc_sptr( | ||||||
|         new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, |         new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, | ||||||
|             samples_per_code, dump, dump_filename)); |             samples_per_code, dump, dump_filename, enable_monitor_output)); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -53,9 +55,10 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc( | |||||||
|     int32_t samples_per_ms, |     int32_t samples_per_ms, | ||||||
|     int32_t samples_per_code, |     int32_t samples_per_code, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string &dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc", |     const std::string &dump_filename, | ||||||
|                                             gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)), |     bool enable_monitor_output) : gr::block("galileo_pcps_8ms_acquisition_cc", | ||||||
|                                             gr::io_signature::make(0, 0, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms))) |                                   gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)), | ||||||
|  |                                   gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))) | ||||||
| { | { | ||||||
|     this->message_port_register_out(pmt::mp("events")); |     this->message_port_register_out(pmt::mp("events")); | ||||||
|     d_sample_counter = 0ULL;  // SAMPLE COUNTER |     d_sample_counter = 0ULL;  // SAMPLE COUNTER | ||||||
| @@ -87,6 +90,8 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc( | |||||||
|     d_dump = dump; |     d_dump = dump; | ||||||
|     d_dump_filename = dump_filename; |     d_dump_filename = dump_filename; | ||||||
|  |  | ||||||
|  |     d_enable_monitor_output = enable_monitor_output; | ||||||
|  |  | ||||||
|     d_doppler_resolution = 0; |     d_doppler_resolution = 0; | ||||||
|     d_threshold = 0; |     d_threshold = 0; | ||||||
|     d_doppler_step = 0; |     d_doppler_step = 0; | ||||||
| @@ -199,7 +204,7 @@ void galileo_pcps_8ms_acquisition_cc::set_state(int32_t state) | |||||||
|  |  | ||||||
| int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items, | int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items, | ||||||
|     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, |     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, | ||||||
|     gr_vector_void_star &output_items __attribute__((unused))) |     gr_vector_void_star &output_items) | ||||||
| { | { | ||||||
|     int32_t acquisition_message = -1;  // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL |     int32_t acquisition_message = -1;  // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL | ||||||
|  |  | ||||||
| @@ -380,6 +385,16 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items, | |||||||
|                 acquisition_message = 1; |                 acquisition_message = 1; | ||||||
|                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); |                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); | ||||||
|  |  | ||||||
|  |                 // Copy and push current Gnss_Synchro to monitor queue | ||||||
|  |                 if (d_enable_monitor_output) | ||||||
|  |                     { | ||||||
|  |                         auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); | ||||||
|  |                         Gnss_Synchro current_synchro_data = Gnss_Synchro(); | ||||||
|  |                         current_synchro_data = *d_gnss_synchro; | ||||||
|  |                         *out[0] = current_synchro_data; | ||||||
|  |                         noutput_items = 1;  // Number of Gnss_Synchro objects produced | ||||||
|  |                     } | ||||||
|  |  | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -52,7 +52,8 @@ galileo_pcps_8ms_make_acquisition_cc(uint32_t sampled_ms, | |||||||
|     int32_t samples_per_ms, |     int32_t samples_per_ms, | ||||||
|     int32_t samples_per_code, |     int32_t samples_per_code, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string& dump_filename); |     const std::string& dump_filename, | ||||||
|  |     bool enable_monitor_output); | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
|  * \brief This class implements a Parallel Code Phase Search Acquisition for |  * \brief This class implements a Parallel Code Phase Search Acquisition for | ||||||
| @@ -174,7 +175,8 @@ private: | |||||||
|         int32_t samples_per_ms, |         int32_t samples_per_ms, | ||||||
|         int32_t samples_per_code, |         int32_t samples_per_code, | ||||||
|         bool dump, |         bool dump, | ||||||
|         const std::string& dump_filename); |         const std::string& dump_filename, | ||||||
|  |         bool enable_monitor_output); | ||||||
|  |  | ||||||
|     galileo_pcps_8ms_acquisition_cc( |     galileo_pcps_8ms_acquisition_cc( | ||||||
|         uint32_t sampled_ms, |         uint32_t sampled_ms, | ||||||
| @@ -184,7 +186,8 @@ private: | |||||||
|         int32_t samples_per_ms, |         int32_t samples_per_ms, | ||||||
|         int32_t samples_per_code, |         int32_t samples_per_code, | ||||||
|         bool dump, |         bool dump, | ||||||
|         const std::string& dump_filename); |         const std::string& dump_filename, | ||||||
|  |         bool enable_monitor_output); | ||||||
|  |  | ||||||
|     void calculate_magnitudes( |     void calculate_magnitudes( | ||||||
|         gr_complex* fft_begin, |         gr_complex* fft_begin, | ||||||
| @@ -230,6 +233,7 @@ private: | |||||||
|  |  | ||||||
|     bool d_active; |     bool d_active; | ||||||
|     bool d_dump; |     bool d_dump; | ||||||
|  |     bool d_enable_monitor_output; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif  // GNSS_SDR_PCPS_8MS_ACQUISITION_CC_H | #endif  // GNSS_SDR_PCPS_8MS_ACQUISITION_CC_H | ||||||
|   | |||||||
| @@ -71,7 +71,7 @@ pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_) | |||||||
|  |  | ||||||
| pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acquisition", | pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acquisition", | ||||||
|                                                                 gr::io_signature::make(1, 1, conf_.it_size), |                                                                 gr::io_signature::make(1, 1, conf_.it_size), | ||||||
|                                                                 gr::io_signature::make(0, 0, conf_.it_size)) |                                                                 gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))) | ||||||
| { | { | ||||||
|     this->message_port_register_out(pmt::mp("events")); |     this->message_port_register_out(pmt::mp("events")); | ||||||
|  |  | ||||||
| @@ -385,6 +385,14 @@ void pcps_acquisition::send_positive_acquisition() | |||||||
|         { |         { | ||||||
|             this->message_port_pub(pmt::mp("events"), pmt::from_long(1)); |             this->message_port_pub(pmt::mp("events"), pmt::from_long(1)); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |     // Copy and push current Gnss_Synchro to monitor queue | ||||||
|  |     if (d_acq_parameters.enable_monitor_output) | ||||||
|  |         { | ||||||
|  |             Gnss_Synchro current_synchro_data = Gnss_Synchro(); | ||||||
|  |             current_synchro_data = *d_gnss_synchro; | ||||||
|  |             d_monitor_queue.push(current_synchro_data); | ||||||
|  |         } | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -903,7 +911,7 @@ void pcps_acquisition::calculate_threshold() | |||||||
| int pcps_acquisition::general_work(int noutput_items __attribute__((unused)), | int pcps_acquisition::general_work(int noutput_items __attribute__((unused)), | ||||||
|     gr_vector_int& ninput_items, |     gr_vector_int& ninput_items, | ||||||
|     gr_vector_const_void_star& input_items, |     gr_vector_const_void_star& input_items, | ||||||
|     gr_vector_void_star& output_items __attribute__((unused))) |     gr_vector_void_star& output_items) | ||||||
| { | { | ||||||
|     /* |     /* | ||||||
|      * By J.Arribas, L.Esteve and M.Molina |      * By J.Arribas, L.Esteve and M.Molina | ||||||
| @@ -1010,5 +1018,22 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)), | |||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |     // Send outputs to the monitor | ||||||
|  |     if (d_acq_parameters.enable_monitor_output) | ||||||
|  |         { | ||||||
|  |             auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); | ||||||
|  |             if (!d_monitor_queue.empty()) | ||||||
|  |                 { | ||||||
|  |                     int num_gnss_synchro_objects = d_monitor_queue.size(); | ||||||
|  |                     for (int i = 0; i < num_gnss_synchro_objects; ++i) { | ||||||
|  |                         Gnss_Synchro current_synchro_data = d_monitor_queue.front(); | ||||||
|  |                         d_monitor_queue.pop(); | ||||||
|  |                         *out[i] = current_synchro_data; | ||||||
|  |                     } | ||||||
|  |                     return num_gnss_synchro_objects; | ||||||
|  |                 } | ||||||
|  |         } | ||||||
|  |  | ||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -61,6 +61,7 @@ | |||||||
| #include <memory> | #include <memory> | ||||||
| #include <string> | #include <string> | ||||||
| #include <utility> | #include <utility> | ||||||
|  | #include <queue> | ||||||
|  |  | ||||||
| #if HAS_STD_SPAN | #if HAS_STD_SPAN | ||||||
| #include <span> | #include <span> | ||||||
| @@ -284,6 +285,8 @@ private: | |||||||
|     bool d_step_two; |     bool d_step_two; | ||||||
|     bool d_use_CFAR_algorithm_flag; |     bool d_use_CFAR_algorithm_flag; | ||||||
|     bool d_dump; |     bool d_dump; | ||||||
|  |  | ||||||
|  |     std::queue<Gnss_Synchro> d_monitor_queue; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif  // GNSS_SDR_PCPS_ACQUISITION_H | #endif  // GNSS_SDR_PCPS_ACQUISITION_H | ||||||
|   | |||||||
| @@ -63,7 +63,7 @@ pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(cons | |||||||
| pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Conf &conf_) | pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Conf &conf_) | ||||||
|     : gr::block("pcps_acquisition_fine_doppler_cc", |     : gr::block("pcps_acquisition_fine_doppler_cc", | ||||||
|           gr::io_signature::make(1, 1, sizeof(gr_complex)), |           gr::io_signature::make(1, 1, sizeof(gr_complex)), | ||||||
|           gr::io_signature::make(0, 0, sizeof(gr_complex))) |           gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))) | ||||||
| { | { | ||||||
|     this->message_port_register_out(pmt::mp("events")); |     this->message_port_register_out(pmt::mp("events")); | ||||||
|     acq_parameters = conf_; |     acq_parameters = conf_; | ||||||
| @@ -482,7 +482,7 @@ void pcps_acquisition_fine_doppler_cc::set_state(int state) | |||||||
|  |  | ||||||
| int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, | int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, | ||||||
|     gr_vector_int &ninput_items __attribute__((unused)), gr_vector_const_void_star &input_items, |     gr_vector_int &ninput_items __attribute__((unused)), gr_vector_const_void_star &input_items, | ||||||
|     gr_vector_void_star &output_items __attribute__((unused))) |     gr_vector_void_star &output_items) | ||||||
| { | { | ||||||
|     /*! |     /*! | ||||||
|      * TODO:     High sensitivity acquisition algorithm: |      * TODO:     High sensitivity acquisition algorithm: | ||||||
| @@ -498,6 +498,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, | |||||||
|      *             S5. Negative_Acq: Send message and stop acq -> S0 |      *             S5. Negative_Acq: Send message and stop acq -> S0 | ||||||
|      */ |      */ | ||||||
|  |  | ||||||
|  |     int return_value = 0;  // Number of Gnss_Syncro objects produced | ||||||
|     int samples_remaining; |     int samples_remaining; | ||||||
|     switch (d_state) |     switch (d_state) | ||||||
|         { |         { | ||||||
| @@ -585,6 +586,15 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, | |||||||
|                     d_sample_counter += static_cast<uint64_t>(noutput_items);  // sample counter |                     d_sample_counter += static_cast<uint64_t>(noutput_items);  // sample counter | ||||||
|                     consume_each(noutput_items); |                     consume_each(noutput_items); | ||||||
|                 } |                 } | ||||||
|  |             // Copy and push current Gnss_Synchro to monitor queue | ||||||
|  |             if (acq_parameters.enable_monitor_output) | ||||||
|  |                 { | ||||||
|  |                     auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); | ||||||
|  |                     Gnss_Synchro current_synchro_data = Gnss_Synchro(); | ||||||
|  |                     current_synchro_data = *d_gnss_synchro; | ||||||
|  |                     *out[0] = current_synchro_data; | ||||||
|  |                     return_value = 1;  // Number of Gnss_Synchro objects produced | ||||||
|  |                 } | ||||||
|             break; |             break; | ||||||
|         case 5:  // Negative_Acq |         case 5:  // Negative_Acq | ||||||
|             DLOG(INFO) << "negative acquisition"; |             DLOG(INFO) << "negative acquisition"; | ||||||
| @@ -619,7 +629,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, | |||||||
|                 } |                 } | ||||||
|             break; |             break; | ||||||
|         } |         } | ||||||
|     return 0; |     return return_value; | ||||||
| } | } | ||||||
|  |  | ||||||
| void pcps_acquisition_fine_doppler_cc::dump_results(int effective_fft_size) | void pcps_acquisition_fine_doppler_cc::dump_results(int effective_fft_size) | ||||||
|   | |||||||
| @@ -40,20 +40,20 @@ extern Concurrent_Map<Gps_Acq_Assist> global_gps_acq_assist_map; | |||||||
| pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc( | pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc( | ||||||
|     int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min, |     int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min, | ||||||
|     int64_t fs_in, int32_t samples_per_ms, bool dump, |     int64_t fs_in, int32_t samples_per_ms, bool dump, | ||||||
|     const std::string &dump_filename) |     const std::string &dump_filename, bool enable_monitor_output) | ||||||
| { | { | ||||||
|     return pcps_assisted_acquisition_cc_sptr( |     return pcps_assisted_acquisition_cc_sptr( | ||||||
|         new pcps_assisted_acquisition_cc(max_dwells, sampled_ms, doppler_max, doppler_min, |         new pcps_assisted_acquisition_cc(max_dwells, sampled_ms, doppler_max, doppler_min, | ||||||
|             fs_in, samples_per_ms, dump, dump_filename)); |             fs_in, samples_per_ms, dump, dump_filename, enable_monitor_output)); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc( | pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc( | ||||||
|     int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min, |     int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min, | ||||||
|     int64_t fs_in, int32_t samples_per_ms, bool dump, |     int64_t fs_in, int32_t samples_per_ms, bool dump, const std::string &dump_filename, | ||||||
|     const std::string &dump_filename) : gr::block("pcps_assisted_acquisition_cc", |     bool enable_monitor_output) : gr::block("pcps_assisted_acquisition_cc", | ||||||
|                                             gr::io_signature::make(1, 1, sizeof(gr_complex)), |                                   gr::io_signature::make(1, 1, sizeof(gr_complex)), | ||||||
|                                             gr::io_signature::make(0, 0, sizeof(gr_complex))) |                                   gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))) | ||||||
| { | { | ||||||
|     this->message_port_register_out(pmt::mp("events")); |     this->message_port_register_out(pmt::mp("events")); | ||||||
|     d_sample_counter = 0ULL;  // SAMPLE COUNTER |     d_sample_counter = 0ULL;  // SAMPLE COUNTER | ||||||
| @@ -81,6 +81,8 @@ pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc( | |||||||
|     // For dumping samples into a file |     // For dumping samples into a file | ||||||
|     d_dump = dump; |     d_dump = dump; | ||||||
|     d_dump_filename = dump_filename; |     d_dump_filename = dump_filename; | ||||||
|  |      | ||||||
|  |     d_enable_monitor_output = enable_monitor_output; | ||||||
|  |  | ||||||
|     d_doppler_resolution = 0; |     d_doppler_resolution = 0; | ||||||
|     d_threshold = 0; |     d_threshold = 0; | ||||||
| @@ -334,7 +336,7 @@ int32_t pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_cons | |||||||
|  |  | ||||||
| int pcps_assisted_acquisition_cc::general_work(int noutput_items, | int pcps_assisted_acquisition_cc::general_work(int noutput_items, | ||||||
|     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, |     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, | ||||||
|     gr_vector_void_star &output_items __attribute__((unused))) |     gr_vector_void_star &output_items) | ||||||
| { | { | ||||||
|     /*! |     /*! | ||||||
|      * TODO:     High sensitivity acquisition algorithm: |      * TODO:     High sensitivity acquisition algorithm: | ||||||
| @@ -428,6 +430,15 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items, | |||||||
|             d_sample_counter += static_cast<uint64_t>(ninput_items[0]);  // sample counter |             d_sample_counter += static_cast<uint64_t>(ninput_items[0]);  // sample counter | ||||||
|             consume_each(ninput_items[0]); |             consume_each(ninput_items[0]); | ||||||
|             d_state = 0; |             d_state = 0; | ||||||
|  |             // Copy and push current Gnss_Synchro to monitor queue | ||||||
|  |             if (d_enable_monitor_output) | ||||||
|  |                 { | ||||||
|  |                     auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); | ||||||
|  |                     Gnss_Synchro current_synchro_data = Gnss_Synchro(); | ||||||
|  |                     current_synchro_data = *d_gnss_synchro; | ||||||
|  |                     *out[0] = current_synchro_data; | ||||||
|  |                     noutput_items = 1;  // Number of Gnss_Synchro objects produced | ||||||
|  |                 } | ||||||
|             break; |             break; | ||||||
|         case 6:  // Negative_Acq |         case 6:  // Negative_Acq | ||||||
|             DLOG(INFO) << "negative acquisition"; |             DLOG(INFO) << "negative acquisition"; | ||||||
|   | |||||||
| @@ -67,7 +67,9 @@ pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc( | |||||||
|     int32_t doppler_min, |     int32_t doppler_min, | ||||||
|     int64_t fs_in, |     int64_t fs_in, | ||||||
|     int32_t samples_per_ms, |     int32_t samples_per_ms, | ||||||
|     bool dump, const std::string& dump_filename); |     bool dump, | ||||||
|  |     const std::string& dump_filename, | ||||||
|  |     bool enable_monitor_output); | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
|  * \brief This class implements a Parallel Code Phase Search Acquisition. |  * \brief This class implements a Parallel Code Phase Search Acquisition. | ||||||
| @@ -183,12 +185,12 @@ private: | |||||||
|     pcps_make_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms, |     pcps_make_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms, | ||||||
|         int32_t doppler_max, int32_t doppler_min, int64_t fs_in, |         int32_t doppler_max, int32_t doppler_min, int64_t fs_in, | ||||||
|         int32_t samples_per_ms, bool dump, |         int32_t samples_per_ms, bool dump, | ||||||
|         const std::string& dump_filename); |         const std::string& dump_filename, bool enable_monitor_output); | ||||||
|  |  | ||||||
|     pcps_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms, |     pcps_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms, | ||||||
|         int32_t doppler_max, int32_t doppler_min, int64_t fs_in, |         int32_t doppler_max, int32_t doppler_min, int64_t fs_in, | ||||||
|         int32_t samples_per_ms, bool dump, |         int32_t samples_per_ms, bool dump, | ||||||
|         const std::string& dump_filename); |         const std::string& dump_filename, bool enable_monitor_output); | ||||||
|  |  | ||||||
|     void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, |     void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, | ||||||
|         int32_t doppler_offset); |         int32_t doppler_offset); | ||||||
| @@ -242,6 +244,7 @@ private: | |||||||
|     bool d_active; |     bool d_active; | ||||||
|     bool d_disable_assist; |     bool d_disable_assist; | ||||||
|     bool d_dump; |     bool d_dump; | ||||||
|  |     bool d_enable_monitor_output; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif  // GNSS_SDR_PCPS_ASSISTED_ACQUISITION_CC_H | #endif  // GNSS_SDR_PCPS_ASSISTED_ACQUISITION_CC_H | ||||||
|   | |||||||
| @@ -42,11 +42,13 @@ pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc( | |||||||
|     int64_t fs_in, |     int64_t fs_in, | ||||||
|     int32_t samples_per_ms, |     int32_t samples_per_ms, | ||||||
|     int32_t samples_per_code, |     int32_t samples_per_code, | ||||||
|     bool dump, const std::string &dump_filename) |     bool dump, | ||||||
|  |     const std::string &dump_filename, | ||||||
|  |     bool enable_monitor_output) | ||||||
| { | { | ||||||
|     return pcps_cccwsr_acquisition_cc_sptr( |     return pcps_cccwsr_acquisition_cc_sptr( | ||||||
|         new pcps_cccwsr_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, |         new pcps_cccwsr_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, | ||||||
|             samples_per_ms, samples_per_code, dump, dump_filename)); |             samples_per_ms, samples_per_code, dump, dump_filename, enable_monitor_output)); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -58,9 +60,10 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc( | |||||||
|     int32_t samples_per_ms, |     int32_t samples_per_ms, | ||||||
|     int32_t samples_per_code, |     int32_t samples_per_code, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string &dump_filename) : gr::block("pcps_cccwsr_acquisition_cc", |     const std::string &dump_filename, | ||||||
|                                             gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)), |     bool enable_monitor_output) : gr::block("pcps_cccwsr_acquisition_cc", | ||||||
|                                             gr::io_signature::make(0, 0, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms))) |                                   gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)), | ||||||
|  |                                   gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))) | ||||||
| { | { | ||||||
|     this->message_port_register_out(pmt::mp("events")); |     this->message_port_register_out(pmt::mp("events")); | ||||||
|     d_sample_counter = 0ULL;  // SAMPLE COUNTER |     d_sample_counter = 0ULL;  // SAMPLE COUNTER | ||||||
| @@ -96,6 +99,8 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc( | |||||||
|     d_dump = dump; |     d_dump = dump; | ||||||
|     d_dump_filename = dump_filename; |     d_dump_filename = dump_filename; | ||||||
|  |  | ||||||
|  |     d_enable_monitor_output = enable_monitor_output; | ||||||
|  |  | ||||||
|     d_doppler_resolution = 0; |     d_doppler_resolution = 0; | ||||||
|     d_threshold = 0; |     d_threshold = 0; | ||||||
|     d_doppler_step = 0; |     d_doppler_step = 0; | ||||||
| @@ -208,7 +213,7 @@ void pcps_cccwsr_acquisition_cc::set_state(int32_t state) | |||||||
|  |  | ||||||
| int pcps_cccwsr_acquisition_cc::general_work(int noutput_items, | int pcps_cccwsr_acquisition_cc::general_work(int noutput_items, | ||||||
|     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, |     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, | ||||||
|     gr_vector_void_star &output_items __attribute__((unused))) |     gr_vector_void_star &output_items) | ||||||
| { | { | ||||||
|     int32_t acquisition_message = -1;  // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL |     int32_t acquisition_message = -1;  // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL | ||||||
|  |  | ||||||
| @@ -400,6 +405,16 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items, | |||||||
|                 acquisition_message = 1; |                 acquisition_message = 1; | ||||||
|                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); |                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); | ||||||
|  |  | ||||||
|  |                 // Copy and push current Gnss_Synchro to monitor queue | ||||||
|  |                 if (d_enable_monitor_output) | ||||||
|  |                     { | ||||||
|  |                         auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); | ||||||
|  |                         Gnss_Synchro current_synchro_data = Gnss_Synchro(); | ||||||
|  |                         current_synchro_data = *d_gnss_synchro; | ||||||
|  |                         *out[0] = current_synchro_data; | ||||||
|  |                         noutput_items = 1;  // Number of Gnss_Synchro objects produced | ||||||
|  |                     } | ||||||
|  |  | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -58,7 +58,8 @@ pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc( | |||||||
|     int32_t samples_per_ms, |     int32_t samples_per_ms, | ||||||
|     int32_t samples_per_code, |     int32_t samples_per_code, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string& dump_filename); |     const std::string& dump_filename, | ||||||
|  |     bool enable_monitor_output); | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
|  * \brief This class implements a Parallel Code Phase Search Acquisition with |  * \brief This class implements a Parallel Code Phase Search Acquisition with | ||||||
| @@ -176,12 +177,12 @@ private: | |||||||
|     pcps_cccwsr_make_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells, |     pcps_cccwsr_make_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells, | ||||||
|         uint32_t doppler_max, int64_t fs_in, |         uint32_t doppler_max, int64_t fs_in, | ||||||
|         int32_t samples_per_ms, int32_t samples_per_code, |         int32_t samples_per_ms, int32_t samples_per_code, | ||||||
|         bool dump, const std::string& dump_filename); |         bool dump, const std::string& dump_filename, bool enable_monitor_output); | ||||||
|  |  | ||||||
|     pcps_cccwsr_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells, |     pcps_cccwsr_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells, | ||||||
|         uint32_t doppler_max, int64_t fs_in, |         uint32_t doppler_max, int64_t fs_in, | ||||||
|         int32_t samples_per_ms, int32_t samples_per_code, |         int32_t samples_per_ms, int32_t samples_per_code, | ||||||
|         bool dump, const std::string& dump_filename); |         bool dump, const std::string& dump_filename, bool enable_monitor_output); | ||||||
|  |  | ||||||
|     void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, |     void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, | ||||||
|         int32_t doppler_offset); |         int32_t doppler_offset); | ||||||
| @@ -231,6 +232,7 @@ private: | |||||||
|  |  | ||||||
|     bool d_active; |     bool d_active; | ||||||
|     bool d_dump; |     bool d_dump; | ||||||
|  |     bool d_enable_monitor_output; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif  // GNSS_SDR_PCPS_CCCWSR_ACQUISITION_CC_H | #endif  // GNSS_SDR_PCPS_CCCWSR_ACQUISITION_CC_H | ||||||
|   | |||||||
| @@ -61,11 +61,12 @@ pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc( | |||||||
|     int samples_per_ms, int samples_per_code, |     int samples_per_ms, int samples_per_code, | ||||||
|     bool bit_transition_flag, |     bool bit_transition_flag, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string &dump_filename) |     const std::string &dump_filename, | ||||||
|  |     bool enable_monitor_output) | ||||||
| { | { | ||||||
|     return pcps_opencl_acquisition_cc_sptr( |     return pcps_opencl_acquisition_cc_sptr( | ||||||
|         new pcps_opencl_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, |         new pcps_opencl_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, | ||||||
|             samples_per_code, bit_transition_flag, dump, dump_filename)); |             samples_per_code, bit_transition_flag, dump, dump_filename, enable_monitor_output)); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -78,9 +79,10 @@ pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc( | |||||||
|     int samples_per_code, |     int samples_per_code, | ||||||
|     bool bit_transition_flag, |     bool bit_transition_flag, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string &dump_filename) : gr::block("pcps_opencl_acquisition_cc", |     const std::string &dump_filename, | ||||||
|                                             gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)), |     bool enable_monitor_output) : gr::block("pcps_opencl_acquisition_cc", | ||||||
|                                             gr::io_signature::make(0, 0, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms))) |                                   gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)), | ||||||
|  |                                   gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))) | ||||||
| { | { | ||||||
|     this->message_port_register_out(pmt::mp("events")); |     this->message_port_register_out(pmt::mp("events")); | ||||||
|     d_sample_counter = 0ULL;  // SAMPLE COUNTER |     d_sample_counter = 0ULL;  // SAMPLE COUNTER | ||||||
| @@ -122,6 +124,8 @@ pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc( | |||||||
|     // For dumping samples into a file |     // For dumping samples into a file | ||||||
|     d_dump = dump; |     d_dump = dump; | ||||||
|     d_dump_filename = dump_filename; |     d_dump_filename = dump_filename; | ||||||
|  |  | ||||||
|  |     d_enable_monitor_output = enable_monitor_output; | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -658,7 +662,7 @@ void pcps_opencl_acquisition_cc::set_state(int state) | |||||||
|  |  | ||||||
| int pcps_opencl_acquisition_cc::general_work(int noutput_items, | int pcps_opencl_acquisition_cc::general_work(int noutput_items, | ||||||
|     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, |     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, | ||||||
|     gr_vector_void_star &output_items __attribute__((unused))) |     gr_vector_void_star &output_items) | ||||||
| { | { | ||||||
|     int acquisition_message = -1;  // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL |     int acquisition_message = -1;  // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL | ||||||
|     switch (d_state) |     switch (d_state) | ||||||
| @@ -761,6 +765,16 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items, | |||||||
|                 acquisition_message = 1; |                 acquisition_message = 1; | ||||||
|                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); |                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); | ||||||
|  |  | ||||||
|  |                 // Copy and push current Gnss_Synchro to monitor queue | ||||||
|  |                 if (d_enable_monitor_output) | ||||||
|  |                     { | ||||||
|  |                         auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); | ||||||
|  |                         Gnss_Synchro current_synchro_data = Gnss_Synchro(); | ||||||
|  |                         current_synchro_data = *d_gnss_synchro; | ||||||
|  |                         *out[0] = current_synchro_data; | ||||||
|  |                         noutput_items = 1;  // Number of Gnss_Synchro objects produced | ||||||
|  |                     } | ||||||
|  |  | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -75,7 +75,8 @@ pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc( | |||||||
|     int samples_per_code, |     int samples_per_code, | ||||||
|     bool bit_transition_flag, |     bool bit_transition_flag, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string& dump_filename); |     const std::string& dump_filename, | ||||||
|  |     bool enable_monitor_output); | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
|  * \brief This class implements a Parallel Code Phase Search Acquisition. |  * \brief This class implements a Parallel Code Phase Search Acquisition. | ||||||
| @@ -210,14 +211,16 @@ private: | |||||||
|         int samples_per_ms, int samples_per_code, |         int samples_per_ms, int samples_per_code, | ||||||
|         bool bit_transition_flag, |         bool bit_transition_flag, | ||||||
|         bool dump, |         bool dump, | ||||||
|         const std::string& dump_filename); |         const std::string& dump_filename, | ||||||
|  |         bool enable_monitor_output); | ||||||
|  |  | ||||||
|     pcps_opencl_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells, |     pcps_opencl_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells, | ||||||
|         uint32_t doppler_max, int64_t fs_in, |         uint32_t doppler_max, int64_t fs_in, | ||||||
|         int samples_per_ms, int samples_per_code, |         int samples_per_ms, int samples_per_code, | ||||||
|         bool bit_transition_flag, |         bool bit_transition_flag, | ||||||
|         bool dump, |         bool dump, | ||||||
|         const std::string& dump_filename); |         const std::string& dump_filename, | ||||||
|  |         bool enable_monitor_output); | ||||||
|  |  | ||||||
|     void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift, |     void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift, | ||||||
|         int doppler_offset); |         int doppler_offset); | ||||||
| @@ -290,6 +293,7 @@ private: | |||||||
|     bool d_active; |     bool d_active; | ||||||
|     bool d_core_working; |     bool d_core_working; | ||||||
|     bool d_dump; |     bool d_dump; | ||||||
|  |     bool d_enable_monitor_output; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -40,7 +40,8 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc( | |||||||
|     int32_t samples_per_code, |     int32_t samples_per_code, | ||||||
|     bool bit_transition_flag, |     bool bit_transition_flag, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string& dump_filename) |     const std::string& dump_filename, | ||||||
|  |     bool enable_monitor_output) | ||||||
| { | { | ||||||
|     return pcps_quicksync_acquisition_cc_sptr( |     return pcps_quicksync_acquisition_cc_sptr( | ||||||
|         new pcps_quicksync_acquisition_cc( |         new pcps_quicksync_acquisition_cc( | ||||||
| @@ -49,7 +50,8 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc( | |||||||
|             fs_in, samples_per_ms, |             fs_in, samples_per_ms, | ||||||
|             samples_per_code, |             samples_per_code, | ||||||
|             bit_transition_flag, |             bit_transition_flag, | ||||||
|             dump, dump_filename)); |             dump, dump_filename, | ||||||
|  |             enable_monitor_output)); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -60,9 +62,10 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc( | |||||||
|     int32_t samples_per_ms, int32_t samples_per_code, |     int32_t samples_per_ms, int32_t samples_per_code, | ||||||
|     bool bit_transition_flag, |     bool bit_transition_flag, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string& dump_filename) : gr::block("pcps_quicksync_acquisition_cc", |     const std::string& dump_filename, | ||||||
|                                             gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)), |     bool enable_monitor_output) : gr::block("pcps_quicksync_acquisition_cc", | ||||||
|                                             gr::io_signature::make(0, 0, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms))) |                                   gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)), | ||||||
|  |                                   gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))) | ||||||
| { | { | ||||||
|     this->message_port_register_out(pmt::mp("events")); |     this->message_port_register_out(pmt::mp("events")); | ||||||
|     d_sample_counter = 0ULL;  // SAMPLE COUNTER |     d_sample_counter = 0ULL;  // SAMPLE COUNTER | ||||||
| @@ -104,6 +107,8 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc( | |||||||
|     d_dump = dump; |     d_dump = dump; | ||||||
|     d_dump_filename = dump_filename; |     d_dump_filename = dump_filename; | ||||||
|  |  | ||||||
|  |     d_enable_monitor_output = enable_monitor_output; | ||||||
|  |  | ||||||
|     d_code_folded = std::vector<gr_complex>(d_fft_size, lv_cmake(0.0F, 0.0F)); |     d_code_folded = std::vector<gr_complex>(d_fft_size, lv_cmake(0.0F, 0.0F)); | ||||||
|     d_signal_folded.reserve(d_fft_size); |     d_signal_folded.reserve(d_fft_size); | ||||||
|     d_noise_floor_power = 0; |     d_noise_floor_power = 0; | ||||||
| @@ -228,7 +233,7 @@ void pcps_quicksync_acquisition_cc::set_state(int32_t state) | |||||||
|  |  | ||||||
| int pcps_quicksync_acquisition_cc::general_work(int noutput_items, | int pcps_quicksync_acquisition_cc::general_work(int noutput_items, | ||||||
|     gr_vector_int& ninput_items, gr_vector_const_void_star& input_items, |     gr_vector_int& ninput_items, gr_vector_const_void_star& input_items, | ||||||
|     gr_vector_void_star& output_items __attribute__((unused))) |     gr_vector_void_star& output_items) | ||||||
| { | { | ||||||
|     /* |     /* | ||||||
|      * By J.Arribas, L.Esteve and M.Molina |      * By J.Arribas, L.Esteve and M.Molina | ||||||
| @@ -507,6 +512,17 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items, | |||||||
|                 acquisition_message = 1; |                 acquisition_message = 1; | ||||||
|                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); |                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); | ||||||
|                 // DLOG(INFO) << "END CASE 2"; |                 // DLOG(INFO) << "END CASE 2"; | ||||||
|  |  | ||||||
|  |                 // Copy and push current Gnss_Synchro to monitor queue | ||||||
|  |                 if (d_enable_monitor_output) | ||||||
|  |                     { | ||||||
|  |                         auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); | ||||||
|  |                         Gnss_Synchro current_synchro_data = Gnss_Synchro(); | ||||||
|  |                         current_synchro_data = *d_gnss_synchro; | ||||||
|  |                         *out[0] = current_synchro_data; | ||||||
|  |                         noutput_items = 1;  // Number of Gnss_Synchro objects produced | ||||||
|  |                     } | ||||||
|  |  | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -76,7 +76,8 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc( | |||||||
|     int32_t samples_per_code, |     int32_t samples_per_code, | ||||||
|     bool bit_transition_flag, |     bool bit_transition_flag, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string& dump_filename); |     const std::string& dump_filename, | ||||||
|  |     bool enable_monitor_output); | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
|  * \brief This class implements a Parallel Code Phase Search Acquisition with |  * \brief This class implements a Parallel Code Phase Search Acquisition with | ||||||
| @@ -199,7 +200,8 @@ private: | |||||||
|         int32_t samples_per_ms, int32_t samples_per_code, |         int32_t samples_per_ms, int32_t samples_per_code, | ||||||
|         bool bit_transition_flag, |         bool bit_transition_flag, | ||||||
|         bool dump, |         bool dump, | ||||||
|         const std::string& dump_filename); |         const std::string& dump_filename, | ||||||
|  |         bool enable_monitor_output); | ||||||
|  |  | ||||||
|     pcps_quicksync_acquisition_cc(uint32_t folding_factor, |     pcps_quicksync_acquisition_cc(uint32_t folding_factor, | ||||||
|         uint32_t sampled_ms, uint32_t max_dwells, |         uint32_t sampled_ms, uint32_t max_dwells, | ||||||
| @@ -207,7 +209,8 @@ private: | |||||||
|         int32_t samples_per_ms, int32_t samples_per_code, |         int32_t samples_per_ms, int32_t samples_per_code, | ||||||
|         bool bit_transition_flag, |         bool bit_transition_flag, | ||||||
|         bool dump, |         bool dump, | ||||||
|         const std::string& dump_filename); |         const std::string& dump_filename, | ||||||
|  |         bool enable_monitor_output); | ||||||
|  |  | ||||||
|     void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, |     void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, | ||||||
|         int32_t doppler_offset); |         int32_t doppler_offset); | ||||||
| @@ -261,6 +264,7 @@ private: | |||||||
|     bool d_bit_transition_flag; |     bool d_bit_transition_flag; | ||||||
|     bool d_active; |     bool d_active; | ||||||
|     bool d_dump; |     bool d_dump; | ||||||
|  |     bool d_enable_monitor_output; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif  // GNSS_SDR_PCPS_QUICKSYNC_ACQUISITION_CC_H | #endif  // GNSS_SDR_PCPS_QUICKSYNC_ACQUISITION_CC_H | ||||||
|   | |||||||
| @@ -58,11 +58,13 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc( | |||||||
|     uint32_t tong_init_val, |     uint32_t tong_init_val, | ||||||
|     uint32_t tong_max_val, |     uint32_t tong_max_val, | ||||||
|     uint32_t tong_max_dwells, |     uint32_t tong_max_dwells, | ||||||
|     bool dump, const std::string &dump_filename) |     bool dump, | ||||||
|  |     const std::string &dump_filename, | ||||||
|  |     bool enable_monitor_output) | ||||||
| { | { | ||||||
|     return pcps_tong_acquisition_cc_sptr( |     return pcps_tong_acquisition_cc_sptr( | ||||||
|         new pcps_tong_acquisition_cc(sampled_ms, doppler_max, fs_in, samples_per_ms, samples_per_code, |         new pcps_tong_acquisition_cc(sampled_ms, doppler_max, fs_in, samples_per_ms, samples_per_code, | ||||||
|             tong_init_val, tong_max_val, tong_max_dwells, dump, dump_filename)); |             tong_init_val, tong_max_val, tong_max_dwells, dump, dump_filename, enable_monitor_output)); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -76,9 +78,10 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc( | |||||||
|     uint32_t tong_max_val, |     uint32_t tong_max_val, | ||||||
|     uint32_t tong_max_dwells, |     uint32_t tong_max_dwells, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string &dump_filename) : gr::block("pcps_tong_acquisition_cc", |     const std::string &dump_filename, | ||||||
|                                             gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)), |     bool enable_monitor_output) : gr::block("pcps_tong_acquisition_cc", | ||||||
|                                             gr::io_signature::make(0, 0, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms))) |                                   gr::io_signature::make(1, 1, static_cast<int>(sizeof(gr_complex) * sampled_ms * samples_per_ms)), | ||||||
|  |                                   gr::io_signature::make(0, 1, sizeof(Gnss_Synchro))) | ||||||
| { | { | ||||||
|     this->message_port_register_out(pmt::mp("events")); |     this->message_port_register_out(pmt::mp("events")); | ||||||
|     d_sample_counter = 0ULL;  // SAMPLE COUNTER |     d_sample_counter = 0ULL;  // SAMPLE COUNTER | ||||||
| @@ -112,6 +115,8 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc( | |||||||
|     d_dump = dump; |     d_dump = dump; | ||||||
|     d_dump_filename = dump_filename; |     d_dump_filename = dump_filename; | ||||||
|  |  | ||||||
|  |     d_enable_monitor_output = enable_monitor_output; | ||||||
|  |  | ||||||
|     d_doppler_resolution = 0; |     d_doppler_resolution = 0; | ||||||
|     d_threshold = 0; |     d_threshold = 0; | ||||||
|     d_doppler_step = 0; |     d_doppler_step = 0; | ||||||
| @@ -224,7 +229,7 @@ void pcps_tong_acquisition_cc::set_state(int32_t state) | |||||||
|  |  | ||||||
| int pcps_tong_acquisition_cc::general_work(int noutput_items, | int pcps_tong_acquisition_cc::general_work(int noutput_items, | ||||||
|     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, |     gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, | ||||||
|     gr_vector_void_star &output_items __attribute__((unused))) |     gr_vector_void_star &output_items) | ||||||
| { | { | ||||||
|     int32_t acquisition_message = -1;  // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL |     int32_t acquisition_message = -1;  // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL | ||||||
|  |  | ||||||
| @@ -401,6 +406,16 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items, | |||||||
|                 acquisition_message = 1; |                 acquisition_message = 1; | ||||||
|                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); |                 this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message)); | ||||||
|  |  | ||||||
|  |                 // Copy and push current Gnss_Synchro to monitor queue | ||||||
|  |                 if (d_enable_monitor_output) | ||||||
|  |                     { | ||||||
|  |                         auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); | ||||||
|  |                         Gnss_Synchro current_synchro_data = Gnss_Synchro(); | ||||||
|  |                         current_synchro_data = *d_gnss_synchro; | ||||||
|  |                         *out[0] = current_synchro_data; | ||||||
|  |                         noutput_items = 1;  // Number of Gnss_Synchro objects produced | ||||||
|  |                     } | ||||||
|  |  | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -73,7 +73,8 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc( | |||||||
|     uint32_t tong_max_val, |     uint32_t tong_max_val, | ||||||
|     uint32_t tong_max_dwells, |     uint32_t tong_max_dwells, | ||||||
|     bool dump, |     bool dump, | ||||||
|     const std::string& dump_filename); |     const std::string& dump_filename, | ||||||
|  |     bool enable_monitor_output); | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
|  * \brief This class implements a Parallel Code Phase Search Acquisition with |  * \brief This class implements a Parallel Code Phase Search Acquisition with | ||||||
| @@ -191,13 +192,13 @@ private: | |||||||
|         int64_t fs_in, int32_t samples_per_ms, |         int64_t fs_in, int32_t samples_per_ms, | ||||||
|         int32_t samples_per_code, uint32_t tong_init_val, |         int32_t samples_per_code, uint32_t tong_init_val, | ||||||
|         uint32_t tong_max_val, uint32_t tong_max_dwells, |         uint32_t tong_max_val, uint32_t tong_max_dwells, | ||||||
|         bool dump, const std::string& dump_filename); |         bool dump, const std::string& dump_filename, bool enable_monitor_output); | ||||||
|  |  | ||||||
|     pcps_tong_acquisition_cc(uint32_t sampled_ms, uint32_t doppler_max, |     pcps_tong_acquisition_cc(uint32_t sampled_ms, uint32_t doppler_max, | ||||||
|         int64_t fs_in, int32_t samples_per_ms, |         int64_t fs_in, int32_t samples_per_ms, | ||||||
|         int32_t samples_per_code, uint32_t tong_init_val, |         int32_t samples_per_code, uint32_t tong_init_val, | ||||||
|         uint32_t tong_max_val, uint32_t tong_max_dwells, |         uint32_t tong_max_val, uint32_t tong_max_dwells, | ||||||
|         bool dump, const std::string& dump_filename); |         bool dump, const std::string& dump_filename, bool enable_monitor_output); | ||||||
|  |  | ||||||
|     void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, |     void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, | ||||||
|         int32_t doppler_offset); |         int32_t doppler_offset); | ||||||
| @@ -246,6 +247,7 @@ private: | |||||||
|  |  | ||||||
|     bool d_active; |     bool d_active; | ||||||
|     bool d_dump; |     bool d_dump; | ||||||
|  |     bool d_enable_monitor_output; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif  // GNSS_SDR_PCPS_TONG_ACQUISITION_CC_H | #endif  // GNSS_SDR_PCPS_TONG_ACQUISITION_CC_H | ||||||
|   | |||||||
| @@ -56,6 +56,7 @@ Acq_Conf::Acq_Conf() | |||||||
|     resampler_ratio = 1.0; |     resampler_ratio = 1.0; | ||||||
|     resampled_fs = 0LL; |     resampled_fs = 0LL; | ||||||
|     resampler_latency_samples = 0U; |     resampler_latency_samples = 0U; | ||||||
|  |     enable_monitor_output = false; | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -121,6 +122,8 @@ void Acq_Conf::SetFromConfiguration(const ConfigurationInterface *configuration, | |||||||
|             use_CFAR_algorithm_flag = false; |             use_CFAR_algorithm_flag = false; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |     enable_monitor_output = configuration->property("AcquisitionMonitor.enable_monitor", false); | ||||||
|  |  | ||||||
|     SetDerivedParams(); |     SetDerivedParams(); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -67,6 +67,7 @@ public: | |||||||
|     bool blocking_on_standby;  // enable it only for unit testing to avoid sample consume on idle status |     bool blocking_on_standby;  // enable it only for unit testing to avoid sample consume on idle status | ||||||
|     bool make_2_steps; |     bool make_2_steps; | ||||||
|     bool use_automatic_resampler; |     bool use_automatic_resampler; | ||||||
|  |     bool enable_monitor_output; | ||||||
|  |  | ||||||
| private: | private: | ||||||
|     void SetDerivedParams(); |     void SetDerivedParams(); | ||||||
|   | |||||||
| @@ -174,6 +174,10 @@ gr::basic_block_sptr Channel::get_left_block_trk() | |||||||
|     return trk_->get_left_block(); |     return trk_->get_left_block(); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | gr::basic_block_sptr Channel::get_right_block_trk() | ||||||
|  | { | ||||||
|  |     return trk_->get_right_block(); | ||||||
|  | } | ||||||
|  |  | ||||||
| gr::basic_block_sptr Channel::get_left_block_acq() | gr::basic_block_sptr Channel::get_left_block_acq() | ||||||
| { | { | ||||||
| @@ -184,6 +188,10 @@ gr::basic_block_sptr Channel::get_left_block_acq() | |||||||
|     return acq_->get_left_block(); |     return acq_->get_left_block(); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | gr::basic_block_sptr Channel::get_right_block_acq() | ||||||
|  | { | ||||||
|  |     return acq_->get_right_block(); | ||||||
|  | } | ||||||
|  |  | ||||||
| gr::basic_block_sptr Channel::get_right_block() | gr::basic_block_sptr Channel::get_right_block() | ||||||
| { | { | ||||||
|   | |||||||
| @@ -69,7 +69,9 @@ public: | |||||||
|     void disconnect(gr::top_block_sptr top_block) override; |     void disconnect(gr::top_block_sptr top_block) override; | ||||||
|     gr::basic_block_sptr get_left_block() override; |     gr::basic_block_sptr get_left_block() override; | ||||||
|     gr::basic_block_sptr get_left_block_trk() override;  //!< Gets the GNU Radio tracking block input pointer |     gr::basic_block_sptr get_left_block_trk() override;  //!< Gets the GNU Radio tracking block input pointer | ||||||
|  |     gr::basic_block_sptr get_right_block_trk() override;  //!< Gets the GNU Radio tracking block output pointer | ||||||
|     gr::basic_block_sptr get_left_block_acq() override;  //!< Gets the GNU Radio acquisition block input pointer |     gr::basic_block_sptr get_left_block_acq() override;  //!< Gets the GNU Radio acquisition block input pointer | ||||||
|  |     gr::basic_block_sptr get_right_block_acq() override;  //!< Gets the GNU Radio acquisition block output pointer | ||||||
|     gr::basic_block_sptr get_right_block() override;     //!< Gets the GNU Radio channel block output pointer |     gr::basic_block_sptr get_right_block() override;     //!< Gets the GNU Radio channel block output pointer | ||||||
|  |  | ||||||
|     inline std::string role() override { return role_; } |     inline std::string role() override { return role_; } | ||||||
|   | |||||||
| @@ -1664,6 +1664,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) | |||||||
|     auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); |     auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); | ||||||
|     Gnss_Synchro current_synchro_data = Gnss_Synchro(); |     Gnss_Synchro current_synchro_data = Gnss_Synchro(); | ||||||
|     current_synchro_data.Flag_valid_symbol_output = false; |     current_synchro_data.Flag_valid_symbol_output = false; | ||||||
|  |     bool loss_of_lock = false; | ||||||
|  |  | ||||||
|     if (d_pull_in_transitory == true) |     if (d_pull_in_transitory == true) | ||||||
|         { |         { | ||||||
| @@ -1745,6 +1746,8 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) | |||||||
|                     { |                     { | ||||||
|                         clear_tracking_vars(); |                         clear_tracking_vars(); | ||||||
|                         d_state = 0;  // loss-of-lock detected |                         d_state = 0;  // loss-of-lock detected | ||||||
|  |                         loss_of_lock = true;  // Set the flag so that the negative indication can be generated | ||||||
|  |                         current_synchro_data = *d_acquisition_gnss_synchro;  // Fill in the Gnss_Synchro object with basic info | ||||||
|                     } |                     } | ||||||
|                 else |                 else | ||||||
|                     { |                     { | ||||||
| @@ -1904,6 +1907,8 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) | |||||||
|                     { |                     { | ||||||
|                         clear_tracking_vars(); |                         clear_tracking_vars(); | ||||||
|                         d_state = 0;  // loss-of-lock detected |                         d_state = 0;  // loss-of-lock detected | ||||||
|  |                         loss_of_lock = true;  // Set the flag so that the negative indication can be generated | ||||||
|  |                         current_synchro_data = *d_acquisition_gnss_synchro;  // Fill in the Gnss_Synchro object with basic info | ||||||
|                     } |                     } | ||||||
|                 else |                 else | ||||||
|                     { |                     { | ||||||
| @@ -1951,10 +1956,11 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) | |||||||
|         } |         } | ||||||
|     consume_each(d_current_prn_length_samples); |     consume_each(d_current_prn_length_samples); | ||||||
|     d_sample_counter += static_cast<uint64_t>(d_current_prn_length_samples); |     d_sample_counter += static_cast<uint64_t>(d_current_prn_length_samples); | ||||||
|     if (current_synchro_data.Flag_valid_symbol_output) |     if (current_synchro_data.Flag_valid_symbol_output || loss_of_lock) | ||||||
|         { |         { | ||||||
|             current_synchro_data.fs = static_cast<int64_t>(d_trk_parameters.fs_in); |             current_synchro_data.fs = static_cast<int64_t>(d_trk_parameters.fs_in); | ||||||
|             current_synchro_data.Tracking_sample_counter = d_sample_counter; |             current_synchro_data.Tracking_sample_counter = d_sample_counter; | ||||||
|  |             current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; | ||||||
|             *out[0] = current_synchro_data; |             *out[0] = current_synchro_data; | ||||||
|             return 1; |             return 1; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -283,6 +283,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri | |||||||
|     // process vars |     // process vars | ||||||
|     float carr_error_filt_hz = 0.0; |     float carr_error_filt_hz = 0.0; | ||||||
|     float code_error_filt_chips = 0.0; |     float code_error_filt_chips = 0.0; | ||||||
|  |     bool loss_of_lock = false; | ||||||
|  |  | ||||||
|     Tcp_Packet_Data tcp_data; |     Tcp_Packet_Data tcp_data; | ||||||
|     // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder |     // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder | ||||||
| @@ -420,6 +421,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri | |||||||
|  |  | ||||||
|                             d_carrier_lock_fail_counter = 0; |                             d_carrier_lock_fail_counter = 0; | ||||||
|                             d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine |                             d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine | ||||||
|  |                             loss_of_lock = true; | ||||||
|                         } |                         } | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
| @@ -433,7 +435,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri | |||||||
|             current_synchro_data.Carrier_phase_rads = static_cast<double>(d_acc_carrier_phase_rad); |             current_synchro_data.Carrier_phase_rads = static_cast<double>(d_acc_carrier_phase_rad); | ||||||
|             current_synchro_data.Carrier_Doppler_hz = static_cast<double>(d_carrier_doppler_hz); |             current_synchro_data.Carrier_Doppler_hz = static_cast<double>(d_carrier_doppler_hz); | ||||||
|             current_synchro_data.CN0_dB_hz = static_cast<double>(d_CN0_SNV_dB_Hz); |             current_synchro_data.CN0_dB_hz = static_cast<double>(d_CN0_SNV_dB_Hz); | ||||||
|             current_synchro_data.Flag_valid_symbol_output = true; |             current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; | ||||||
|             current_synchro_data.correlation_length_ms = 4; |             current_synchro_data.correlation_length_ms = 4; | ||||||
|         } |         } | ||||||
|     else |     else | ||||||
| @@ -524,7 +526,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri | |||||||
|     consume_each(d_current_prn_length_samples);        // this is needed in gr::block derivates |     consume_each(d_current_prn_length_samples);        // this is needed in gr::block derivates | ||||||
|     d_sample_counter += d_current_prn_length_samples;  // count for the processed samples |     d_sample_counter += d_current_prn_length_samples;  // count for the processed samples | ||||||
|  |  | ||||||
|     if (d_enable_tracking) |     if (d_enable_tracking || loss_of_lock) | ||||||
|         { |         { | ||||||
|             return 1; |             return 1; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -572,6 +572,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at | |||||||
|     double code_error_filt_secs_Ti = 0.0; |     double code_error_filt_secs_Ti = 0.0; | ||||||
|     double CURRENT_INTEGRATION_TIME_S = 0.0; |     double CURRENT_INTEGRATION_TIME_S = 0.0; | ||||||
|     double CORRECTED_INTEGRATION_TIME_S = 0.0; |     double CORRECTED_INTEGRATION_TIME_S = 0.0; | ||||||
|  |     bool loss_of_lock = false; | ||||||
|  |  | ||||||
|     if (d_enable_tracking == true) |     if (d_enable_tracking == true) | ||||||
|         { |         { | ||||||
| @@ -780,6 +781,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at | |||||||
|                                     this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock |                                     this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock | ||||||
|                                     d_carrier_lock_fail_counter = 0; |                                     d_carrier_lock_fail_counter = 0; | ||||||
|                                     d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine |                                     d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine | ||||||
|  |                                     loss_of_lock = true; | ||||||
|                                 } |                                 } | ||||||
|                             check_carrier_phase_coherent_initialization(); |                             check_carrier_phase_coherent_initialization(); | ||||||
|                         } |                         } | ||||||
| @@ -791,7 +793,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at | |||||||
|                     current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles; |                     current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles; | ||||||
|                     current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; |                     current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; | ||||||
|                     current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; |                     current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; | ||||||
|                     current_synchro_data.Flag_valid_symbol_output = true; |                     current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; | ||||||
|                     if (d_preamble_synchronized == true) |                     if (d_preamble_synchronized == true) | ||||||
|                         { |                         { | ||||||
|                             current_synchro_data.correlation_length_ms = d_extend_correlation_ms; |                             current_synchro_data.correlation_length_ms = d_extend_correlation_ms; | ||||||
|   | |||||||
| @@ -575,6 +575,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at | |||||||
|     double code_error_filt_secs_Ti = 0.0; |     double code_error_filt_secs_Ti = 0.0; | ||||||
|     double CURRENT_INTEGRATION_TIME_S = 0.0; |     double CURRENT_INTEGRATION_TIME_S = 0.0; | ||||||
|     double CORRECTED_INTEGRATION_TIME_S = 0.0; |     double CORRECTED_INTEGRATION_TIME_S = 0.0; | ||||||
|  |     bool loss_of_lock = false; | ||||||
|  |  | ||||||
|     if (d_enable_tracking == true) |     if (d_enable_tracking == true) | ||||||
|         { |         { | ||||||
| @@ -781,6 +782,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at | |||||||
|                                     this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock |                                     this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock | ||||||
|                                     d_carrier_lock_fail_counter = 0; |                                     d_carrier_lock_fail_counter = 0; | ||||||
|                                     d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine |                                     d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine | ||||||
|  |                                     loss_of_lock = true; | ||||||
|                                 } |                                 } | ||||||
|                             check_carrier_phase_coherent_initialization(); |                             check_carrier_phase_coherent_initialization(); | ||||||
|                         } |                         } | ||||||
| @@ -793,7 +795,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at | |||||||
|                     current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles; |                     current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles; | ||||||
|                     current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; |                     current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; | ||||||
|                     current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; |                     current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; | ||||||
|                     current_synchro_data.Flag_valid_symbol_output = true; |                     current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; | ||||||
|                     if (d_preamble_synchronized == true) |                     if (d_preamble_synchronized == true) | ||||||
|                         { |                         { | ||||||
|                             current_synchro_data.correlation_length_ms = d_extend_correlation_ms; |                             current_synchro_data.correlation_length_ms = d_extend_correlation_ms; | ||||||
|   | |||||||
| @@ -507,6 +507,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut | |||||||
|     double carr_error_filt_hz = 0.0; |     double carr_error_filt_hz = 0.0; | ||||||
|     double code_error_chips = 0.0; |     double code_error_chips = 0.0; | ||||||
|     double code_error_filt_chips = 0.0; |     double code_error_filt_chips = 0.0; | ||||||
|  |     bool loss_of_lock = false; | ||||||
|  |  | ||||||
|     // Block input data and block output stream pointers |     // Block input data and block output stream pointers | ||||||
|     const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);  // PRN start block alignment |     const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);  // PRN start block alignment | ||||||
| @@ -628,6 +629,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut | |||||||
|                             this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock |                             this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock | ||||||
|                             d_carrier_lock_fail_counter = 0; |                             d_carrier_lock_fail_counter = 0; | ||||||
|                             d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine |                             d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine | ||||||
|  |                             loss_of_lock = true; | ||||||
|                         } |                         } | ||||||
|                     check_carrier_phase_coherent_initialization(); |                     check_carrier_phase_coherent_initialization(); | ||||||
|                 } |                 } | ||||||
| @@ -639,7 +641,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut | |||||||
|             current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; |             current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; | ||||||
|             current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; |             current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; | ||||||
|             current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; |             current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; | ||||||
|             current_synchro_data.Flag_valid_symbol_output = true; |             current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; | ||||||
|             current_synchro_data.correlation_length_ms = 1; |             current_synchro_data.correlation_length_ms = 1; | ||||||
|         } |         } | ||||||
|     else |     else | ||||||
|   | |||||||
| @@ -571,6 +571,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at | |||||||
|     double code_error_filt_secs_Ti = 0.0; |     double code_error_filt_secs_Ti = 0.0; | ||||||
|     double CURRENT_INTEGRATION_TIME_S = 0.0; |     double CURRENT_INTEGRATION_TIME_S = 0.0; | ||||||
|     double CORRECTED_INTEGRATION_TIME_S = 0.0; |     double CORRECTED_INTEGRATION_TIME_S = 0.0; | ||||||
|  |     bool loss_of_lock = false; | ||||||
|  |  | ||||||
|     if (d_enable_tracking == true) |     if (d_enable_tracking == true) | ||||||
|         { |         { | ||||||
| @@ -779,6 +780,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at | |||||||
|                                     this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock |                                     this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock | ||||||
|                                     d_carrier_lock_fail_counter = 0; |                                     d_carrier_lock_fail_counter = 0; | ||||||
|                                     d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine |                                     d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine | ||||||
|  |                                     loss_of_lock = true; | ||||||
|                                 } |                                 } | ||||||
|                             check_carrier_phase_coherent_initialization(); |                             check_carrier_phase_coherent_initialization(); | ||||||
|                         } |                         } | ||||||
| @@ -790,7 +792,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at | |||||||
|                     current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles; |                     current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles; | ||||||
|                     current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; |                     current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; | ||||||
|                     current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; |                     current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; | ||||||
|                     current_synchro_data.Flag_valid_symbol_output = true; |                     current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; | ||||||
|                     if (d_preamble_synchronized == true) |                     if (d_preamble_synchronized == true) | ||||||
|                         { |                         { | ||||||
|                             current_synchro_data.correlation_length_ms = d_extend_correlation_ms; |                             current_synchro_data.correlation_length_ms = d_extend_correlation_ms; | ||||||
|   | |||||||
| @@ -573,6 +573,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at | |||||||
|     double code_error_filt_secs_Ti = 0.0; |     double code_error_filt_secs_Ti = 0.0; | ||||||
|     double CURRENT_INTEGRATION_TIME_S = 0.0; |     double CURRENT_INTEGRATION_TIME_S = 0.0; | ||||||
|     double CORRECTED_INTEGRATION_TIME_S = 0.0; |     double CORRECTED_INTEGRATION_TIME_S = 0.0; | ||||||
|  |     bool loss_of_lock = false; | ||||||
|  |  | ||||||
|     if (d_enable_tracking == true) |     if (d_enable_tracking == true) | ||||||
|         { |         { | ||||||
| @@ -779,6 +780,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at | |||||||
|                                     this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock |                                     this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock | ||||||
|                                     d_carrier_lock_fail_counter = 0; |                                     d_carrier_lock_fail_counter = 0; | ||||||
|                                     d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine |                                     d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine | ||||||
|  |                                     loss_of_lock = true; | ||||||
|                                 } |                                 } | ||||||
|                             check_carrier_phase_coherent_initialization(); |                             check_carrier_phase_coherent_initialization(); | ||||||
|                         } |                         } | ||||||
| @@ -791,7 +793,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at | |||||||
|                     current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles; |                     current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles; | ||||||
|                     current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; |                     current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; | ||||||
|                     current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; |                     current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; | ||||||
|                     current_synchro_data.Flag_valid_symbol_output = true; |                     current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; | ||||||
|                     if (d_preamble_synchronized == true) |                     if (d_preamble_synchronized == true) | ||||||
|                         { |                         { | ||||||
|                             current_synchro_data.correlation_length_ms = d_extend_correlation_ms; |                             current_synchro_data.correlation_length_ms = d_extend_correlation_ms; | ||||||
|   | |||||||
| @@ -509,6 +509,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut | |||||||
|     double carr_error_filt_hz = 0.0; |     double carr_error_filt_hz = 0.0; | ||||||
|     double code_error_chips = 0.0; |     double code_error_chips = 0.0; | ||||||
|     double code_error_filt_chips = 0.0; |     double code_error_filt_chips = 0.0; | ||||||
|  |     bool loss_of_lock = false; | ||||||
|  |  | ||||||
|     // Block input data and block output stream pointers |     // Block input data and block output stream pointers | ||||||
|     const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);  // PRN start block alignment |     const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);  // PRN start block alignment | ||||||
| @@ -630,6 +631,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut | |||||||
|                             this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock |                             this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock | ||||||
|                             d_carrier_lock_fail_counter = 0; |                             d_carrier_lock_fail_counter = 0; | ||||||
|                             d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine |                             d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine | ||||||
|  |                             loss_of_lock = true; | ||||||
|                         } |                         } | ||||||
|                     check_carrier_phase_coherent_initialization(); |                     check_carrier_phase_coherent_initialization(); | ||||||
|                 } |                 } | ||||||
| @@ -641,7 +643,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut | |||||||
|             current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; |             current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; | ||||||
|             current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; |             current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; | ||||||
|             current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; |             current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; | ||||||
|             current_synchro_data.Flag_valid_symbol_output = true; |             current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; | ||||||
|             current_synchro_data.correlation_length_ms = 1; |             current_synchro_data.correlation_length_ms = 1; | ||||||
|         } |         } | ||||||
|     else |     else | ||||||
|   | |||||||
| @@ -328,6 +328,8 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut | |||||||
|     double CORRECTED_INTEGRATION_TIME_S = 0.001; |     double CORRECTED_INTEGRATION_TIME_S = 0.001; | ||||||
|     double dll_code_error_secs_Ti = 0.0; |     double dll_code_error_secs_Ti = 0.0; | ||||||
|     double carr_phase_error_secs_Ti = 0.0; |     double carr_phase_error_secs_Ti = 0.0; | ||||||
|  |     bool loss_of_lock = false; | ||||||
|  |  | ||||||
|     if (d_enable_tracking == true) |     if (d_enable_tracking == true) | ||||||
|         { |         { | ||||||
|             // Fill the acquisition data |             // Fill the acquisition data | ||||||
| @@ -446,6 +448,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut | |||||||
|                             this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock |                             this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock | ||||||
|                             d_carrier_lock_fail_counter = 0; |                             d_carrier_lock_fail_counter = 0; | ||||||
|                             d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine |                             d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine | ||||||
|  |                             loss_of_lock = true; | ||||||
|                         } |                         } | ||||||
|                     check_carrier_phase_coherent_initialization(); |                     check_carrier_phase_coherent_initialization(); | ||||||
|                 } |                 } | ||||||
| @@ -458,7 +461,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut | |||||||
|             current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles; |             current_synchro_data.Carrier_phase_rads = TWO_PI * d_acc_carrier_phase_cycles; | ||||||
|             current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; |             current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; | ||||||
|             current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; |             current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; | ||||||
|             current_synchro_data.Flag_valid_symbol_output = true; |             current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; | ||||||
|             current_synchro_data.correlation_length_ms = 1; |             current_synchro_data.correlation_length_ms = 1; | ||||||
|         } |         } | ||||||
|     else |     else | ||||||
| @@ -545,7 +548,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut | |||||||
|     consume_each(d_correlation_length_samples);        // this is necessary in gr::block derivates |     consume_each(d_correlation_length_samples);        // this is necessary in gr::block derivates | ||||||
|     d_sample_counter += d_correlation_length_samples;  // count for the processed samples |     d_sample_counter += d_correlation_length_samples;  // count for the processed samples | ||||||
|  |  | ||||||
|     if (d_enable_tracking) |     if (d_enable_tracking || loss_of_lock) | ||||||
|         { |         { | ||||||
|             return 1; |             return 1; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -621,6 +621,7 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus | |||||||
|     d_carr_phase_error_rad = 0.0; |     d_carr_phase_error_rad = 0.0; | ||||||
|     code_error_chips = 0.0; |     code_error_chips = 0.0; | ||||||
|     code_error_filt_chips = 0.0; |     code_error_filt_chips = 0.0; | ||||||
|  |     bool loss_of_lock = false; | ||||||
|  |  | ||||||
|     // Block input data and block output stream pointers |     // Block input data and block output stream pointers | ||||||
|     const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); |     const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); | ||||||
| @@ -800,6 +801,7 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus | |||||||
|                             this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock |                             this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock | ||||||
|                             d_carrier_lock_fail_counter = 0; |                             d_carrier_lock_fail_counter = 0; | ||||||
|                             d_enable_tracking = false; |                             d_enable_tracking = false; | ||||||
|  |                             loss_of_lock = true; | ||||||
|                         } |                         } | ||||||
|                 } |                 } | ||||||
|             // ########### Output the tracking data to navigation and PVT ########## |             // ########### Output the tracking data to navigation and PVT ########## | ||||||
| @@ -810,7 +812,7 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus | |||||||
|             current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; |             current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; | ||||||
|             current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; |             current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; | ||||||
|             current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; |             current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; | ||||||
|             current_synchro_data.Flag_valid_symbol_output = true; |             current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; | ||||||
|             current_synchro_data.correlation_length_ms = 1; |             current_synchro_data.correlation_length_ms = 1; | ||||||
|  |  | ||||||
|             kf_iter++; |             kf_iter++; | ||||||
|   | |||||||
| @@ -312,6 +312,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib | |||||||
|     float carr_error = 0.0; |     float carr_error = 0.0; | ||||||
|     float code_error = 0.0; |     float code_error = 0.0; | ||||||
|     float code_nco = 0.0; |     float code_nco = 0.0; | ||||||
|  |     bool loss_of_lock = false; | ||||||
|  |  | ||||||
|     Tcp_Packet_Data tcp_data; |     Tcp_Packet_Data tcp_data; | ||||||
|     // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder |     // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder | ||||||
| @@ -452,6 +453,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib | |||||||
|                             this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock |                             this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock | ||||||
|                             d_carrier_lock_fail_counter = 0; |                             d_carrier_lock_fail_counter = 0; | ||||||
|                             d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine |                             d_enable_tracking = false;  // TODO: check if disabling tracking is consistent with the channel state machine | ||||||
|  |                             loss_of_lock = true; | ||||||
|                         } |                         } | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
| @@ -466,7 +468,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib | |||||||
|             current_synchro_data.Carrier_phase_rads = static_cast<double>(d_acc_carrier_phase_rad); |             current_synchro_data.Carrier_phase_rads = static_cast<double>(d_acc_carrier_phase_rad); | ||||||
|             current_synchro_data.Carrier_Doppler_hz = static_cast<double>(d_carrier_doppler_hz); |             current_synchro_data.Carrier_Doppler_hz = static_cast<double>(d_carrier_doppler_hz); | ||||||
|             current_synchro_data.CN0_dB_hz = static_cast<double>(d_CN0_SNV_dB_Hz); |             current_synchro_data.CN0_dB_hz = static_cast<double>(d_CN0_SNV_dB_Hz); | ||||||
|             current_synchro_data.Flag_valid_symbol_output = true; |             current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; | ||||||
|             current_synchro_data.correlation_length_ms = 1; |             current_synchro_data.correlation_length_ms = 1; | ||||||
|         } |         } | ||||||
|     else |     else | ||||||
| @@ -561,7 +563,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib | |||||||
|     d_sample_counter_seconds = d_sample_counter_seconds + (static_cast<double>(d_current_prn_length_samples) / static_cast<double>(d_fs_in)); |     d_sample_counter_seconds = d_sample_counter_seconds + (static_cast<double>(d_current_prn_length_samples) / static_cast<double>(d_fs_in)); | ||||||
|     d_sample_counter += d_current_prn_length_samples;  // count for the processed samples |     d_sample_counter += d_current_prn_length_samples;  // count for the processed samples | ||||||
|  |  | ||||||
|     if (d_enable_tracking) |     if (d_enable_tracking || loss_of_lock) | ||||||
|         { |         { | ||||||
|             return 1; |             return 1; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -41,7 +41,9 @@ class ChannelInterface : public GNSSBlockInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     virtual gr::basic_block_sptr get_left_block_trk() = 0; |     virtual gr::basic_block_sptr get_left_block_trk() = 0; | ||||||
|  |     virtual gr::basic_block_sptr get_right_block_trk() = 0; | ||||||
|     virtual gr::basic_block_sptr get_left_block_acq() = 0; |     virtual gr::basic_block_sptr get_left_block_acq() = 0; | ||||||
|  |     virtual gr::basic_block_sptr get_right_block_acq() = 0; | ||||||
|     virtual gr::basic_block_sptr get_left_block() = 0; |     virtual gr::basic_block_sptr get_left_block() = 0; | ||||||
|     virtual gr::basic_block_sptr get_right_block() = 0; |     virtual gr::basic_block_sptr get_right_block() = 0; | ||||||
|     virtual Gnss_Signal get_signal() const = 0; |     virtual Gnss_Signal get_signal() const = 0; | ||||||
|   | |||||||
| @@ -46,7 +46,7 @@ gnss_synchro_monitor::gnss_synchro_monitor(int n_channels, | |||||||
|     int decimation_factor, |     int decimation_factor, | ||||||
|     int udp_port, |     int udp_port, | ||||||
|     const std::vector<std::string>& udp_addresses, |     const std::vector<std::string>& udp_addresses, | ||||||
|     bool enable_protobuf) : gr::sync_block("gnss_synchro_monitor", |     bool enable_protobuf) : gr::block("gnss_synchro_monitor", | ||||||
|                                 gr::io_signature::make(n_channels, n_channels, sizeof(Gnss_Synchro)), |                                 gr::io_signature::make(n_channels, n_channels, sizeof(Gnss_Synchro)), | ||||||
|                                 gr::io_signature::make(0, 0, 0)) |                                 gr::io_signature::make(0, 0, 0)) | ||||||
| { | { | ||||||
| @@ -54,28 +54,46 @@ gnss_synchro_monitor::gnss_synchro_monitor(int n_channels, | |||||||
|     d_nchannels = n_channels; |     d_nchannels = n_channels; | ||||||
|  |  | ||||||
|     udp_sink_ptr = std::make_unique<Gnss_Synchro_Udp_Sink>(udp_addresses, udp_port, enable_protobuf); |     udp_sink_ptr = std::make_unique<Gnss_Synchro_Udp_Sink>(udp_addresses, udp_port, enable_protobuf); | ||||||
|  |  | ||||||
|     count = 0; |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | void gnss_synchro_monitor::forecast(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items_required) | ||||||
| int gnss_synchro_monitor::work(int noutput_items, gr_vector_const_void_star& input_items, |  | ||||||
|     gr_vector_void_star& output_items __attribute__((unused))) |  | ||||||
| { | { | ||||||
|     const auto** in = reinterpret_cast<const Gnss_Synchro**>(&input_items[0]);  // Get the input buffer pointer |     for (int32_t channel_index = 0; channel_index < d_nchannels; channel_index++) | ||||||
|     for (int epoch = 0; epoch < noutput_items; epoch++) |  | ||||||
|         { |         { | ||||||
|             count++; |             // Set the required number of inputs to 0 so that a lone input on any channel can be pushed to UDP | ||||||
|             if (count >= d_decimation_factor) |             ninput_items_required[channel_index] = 0; | ||||||
|                 { |  | ||||||
|                     for (int i = 0; i < d_nchannels; i++) |  | ||||||
|                         { |  | ||||||
|                             std::vector<Gnss_Synchro> stocks; |  | ||||||
|                             stocks.push_back(in[i][epoch]); |  | ||||||
|                             udp_sink_ptr->write_gnss_synchro(stocks); |  | ||||||
|                         } |  | ||||||
|                     count = 0; |  | ||||||
|                 } |  | ||||||
|         } |         } | ||||||
|     return noutput_items; | } | ||||||
|  |  | ||||||
|  | int gnss_synchro_monitor::general_work(int noutput_items __attribute__((unused)), gr_vector_int& ninput_items, | ||||||
|  |     gr_vector_const_void_star& input_items, gr_vector_void_star& output_items __attribute__((unused))) | ||||||
|  | { | ||||||
|  |     // Get the input buffer pointer | ||||||
|  |     const auto** in = reinterpret_cast<const Gnss_Synchro**>(&input_items[0]); | ||||||
|  |  | ||||||
|  |     // Loop through each input stream channel | ||||||
|  |     for (int channel_index = 0; channel_index < d_nchannels; channel_index++) | ||||||
|  |         { | ||||||
|  |             // Loop through each item in each input stream channel | ||||||
|  |             int count = 0; | ||||||
|  |             for (int item_index = 0; item_index < ninput_items[channel_index]; item_index++) | ||||||
|  |                 { | ||||||
|  |                     // Use the count variable to limit how many items are sent per channel | ||||||
|  |                     count++; | ||||||
|  |                     if (count >= d_decimation_factor) | ||||||
|  |                         { | ||||||
|  |                             // Convert to a vector and write to the UDP sink | ||||||
|  |                             std::vector<Gnss_Synchro> stocks; | ||||||
|  |                             stocks.push_back(in[channel_index][item_index]); | ||||||
|  |                             udp_sink_ptr->write_gnss_synchro(stocks); | ||||||
|  |                             // Reset count variable | ||||||
|  |                             count = 0; | ||||||
|  |                         } | ||||||
|  |                 } | ||||||
|  |             // Consume the number of items for the input stream channel | ||||||
|  |             consume(channel_index, ninput_items[channel_index]); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |     // Not producing any outputs | ||||||
|  |     return 0; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -25,7 +25,7 @@ | |||||||
|  |  | ||||||
| #include "gnss_synchro_udp_sink.h" | #include "gnss_synchro_udp_sink.h" | ||||||
| #include <gnuradio/runtime_types.h>  // for gr_vector_void_star | #include <gnuradio/runtime_types.h>  // for gr_vector_void_star | ||||||
| #include <gnuradio/sync_block.h> | #include <gnuradio/block.h> | ||||||
| #include <memory> | #include <memory> | ||||||
| #include <string> | #include <string> | ||||||
| #include <vector> | #include <vector> | ||||||
| @@ -54,13 +54,13 @@ gnss_synchro_monitor_sptr gnss_synchro_make_monitor(int n_channels, | |||||||
|  * a data stream with the receiver internal parameters (Gnss_Synchro objects) |  * a data stream with the receiver internal parameters (Gnss_Synchro objects) | ||||||
|  * to local or remote clients over UDP. |  * to local or remote clients over UDP. | ||||||
|  */ |  */ | ||||||
| class gnss_synchro_monitor : public gr::sync_block | class gnss_synchro_monitor : public gr::block | ||||||
| { | { | ||||||
| public: | public: | ||||||
|     ~gnss_synchro_monitor() = default;  //!< Default destructor |     ~gnss_synchro_monitor() = default;  //!< Default destructor | ||||||
|  |     void forecast(int noutput_items, gr_vector_int& ninput_items_required); | ||||||
|     int work(int noutput_items, gr_vector_const_void_star& input_items, |     int general_work(int noutput_items, gr_vector_int& ninput_items, | ||||||
|         gr_vector_void_star& output_items); |         gr_vector_const_void_star& input_items, gr_vector_void_star& output_items); | ||||||
|  |  | ||||||
| private: | private: | ||||||
|     friend gnss_synchro_monitor_sptr gnss_synchro_make_monitor(int n_channels, |     friend gnss_synchro_monitor_sptr gnss_synchro_make_monitor(int n_channels, | ||||||
| @@ -78,7 +78,6 @@ private: | |||||||
|     int d_nchannels; |     int d_nchannels; | ||||||
|     int d_decimation_factor; |     int d_decimation_factor; | ||||||
|     std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr; |     std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr; | ||||||
|     int count; |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -715,6 +715,44 @@ void GNSSFlowgraph::connect() | |||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |     // GNSS SYNCHRO ACQUISITION MONITOR | ||||||
|  |     if (enable_acquisition_monitor_) | ||||||
|  |         { | ||||||
|  |             try | ||||||
|  |                 { | ||||||
|  |                     for (int i = 0; i < channels_count_; i++) | ||||||
|  |                         { | ||||||
|  |                             top_block_->connect(channels_.at(i)->get_right_block_acq(), 0, GnssSynchroAcquisitionMonitor_, i); | ||||||
|  |                         } | ||||||
|  |                 } | ||||||
|  |             catch (const std::exception& e) | ||||||
|  |                 { | ||||||
|  |                     LOG(WARNING) << "Can't connect acquisition intermediate outputs to Monitor block"; | ||||||
|  |                     LOG(ERROR) << e.what(); | ||||||
|  |                     top_block_->disconnect_all(); | ||||||
|  |                     return; | ||||||
|  |                 } | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |     // GNSS SYNCHRO TRACKING MONITOR | ||||||
|  |     if (enable_tracking_monitor_) | ||||||
|  |         { | ||||||
|  |             try | ||||||
|  |                 { | ||||||
|  |                     for (int i = 0; i < channels_count_; i++) | ||||||
|  |                         { | ||||||
|  |                             top_block_->connect(channels_.at(i)->get_right_block_trk(), 0, GnssSynchroTrackingMonitor_, i); | ||||||
|  |                         } | ||||||
|  |                 } | ||||||
|  |             catch (const std::exception& e) | ||||||
|  |                 { | ||||||
|  |                     LOG(WARNING) << "Can't connect tracking outputs to Monitor block"; | ||||||
|  |                     LOG(ERROR) << e.what(); | ||||||
|  |                     top_block_->disconnect_all(); | ||||||
|  |                     return; | ||||||
|  |                 } | ||||||
|  |         } | ||||||
| #ifndef ENABLE_FPGA | #ifndef ENABLE_FPGA | ||||||
|     // Activate acquisition in enabled channels |     // Activate acquisition in enabled channels | ||||||
|     for (int i = 0; i < channels_count_; i++) |     for (int i = 0; i < channels_count_; i++) | ||||||
| @@ -957,6 +995,14 @@ void GNSSFlowgraph::disconnect() | |||||||
|                         { |                         { | ||||||
|                             top_block_->disconnect(observables_->get_right_block(), i, GnssSynchroMonitor_, i); |                             top_block_->disconnect(observables_->get_right_block(), i, GnssSynchroMonitor_, i); | ||||||
|                         } |                         } | ||||||
|  |                     if (enable_acquisition_monitor_) | ||||||
|  |                         { | ||||||
|  |                             top_block_->disconnect(channels_.at(i)->get_right_block_acq(), 0, GnssSynchroAcquisitionMonitor_, i); | ||||||
|  |                         } | ||||||
|  |                     if (enable_tracking_monitor_) | ||||||
|  |                         { | ||||||
|  |                             top_block_->disconnect(channels_.at(i)->get_right_block_trk(), 0, GnssSynchroTrackingMonitor_, i); | ||||||
|  |                         } | ||||||
|                     top_block_->msg_disconnect(channels_.at(i)->get_right_block(), pmt::mp("telemetry"), pvt_->get_left_block(), pmt::mp("telemetry")); |                     top_block_->msg_disconnect(channels_.at(i)->get_right_block(), pmt::mp("telemetry"), pvt_->get_left_block(), pmt::mp("telemetry")); | ||||||
|                 } |                 } | ||||||
|             top_block_->msg_disconnect(pvt_->get_left_block(), pmt::mp("pvt_to_observables"), observables_->get_right_block(), pmt::mp("pvt_to_observables")); |             top_block_->msg_disconnect(pvt_->get_left_block(), pmt::mp("pvt_to_observables"), observables_->get_right_block(), pmt::mp("pvt_to_observables")); | ||||||
| @@ -1595,23 +1641,72 @@ void GNSSFlowgraph::init() | |||||||
|      * Instantiate the receiver monitor block, if required |      * Instantiate the receiver monitor block, if required | ||||||
|      */ |      */ | ||||||
|     enable_monitor_ = configuration_->property("Monitor.enable_monitor", false); |     enable_monitor_ = configuration_->property("Monitor.enable_monitor", false); | ||||||
|     bool enable_protobuf = configuration_->property("Monitor.enable_protobuf", true); |  | ||||||
|     if (configuration_->property("PVT.enable_protobuf", false) == true) |  | ||||||
|         { |  | ||||||
|             enable_protobuf = true; |  | ||||||
|         } |  | ||||||
|     std::string address_string = configuration_->property("Monitor.client_addresses", std::string("127.0.0.1")); |  | ||||||
|     std::vector<std::string> udp_addr_vec = split_string(address_string, '_'); |  | ||||||
|     std::sort(udp_addr_vec.begin(), udp_addr_vec.end()); |  | ||||||
|     udp_addr_vec.erase(std::unique(udp_addr_vec.begin(), udp_addr_vec.end()), udp_addr_vec.end()); |  | ||||||
|  |  | ||||||
|     if (enable_monitor_) |     if (enable_monitor_) | ||||||
|         { |         { | ||||||
|  |             // Retrieve monitor properties | ||||||
|  |             bool enable_protobuf = configuration_->property("Monitor.enable_protobuf", true); | ||||||
|  |             if (configuration_->property("PVT.enable_protobuf", false) == true) | ||||||
|  |                 { | ||||||
|  |                     enable_protobuf = true; | ||||||
|  |                 } | ||||||
|  |             std::string address_string = configuration_->property("Monitor.client_addresses", std::string("127.0.0.1")); | ||||||
|  |             std::vector<std::string> udp_addr_vec = split_string(address_string, '_'); | ||||||
|  |             std::sort(udp_addr_vec.begin(), udp_addr_vec.end()); | ||||||
|  |             udp_addr_vec.erase(std::unique(udp_addr_vec.begin(), udp_addr_vec.end()), udp_addr_vec.end()); | ||||||
|  |  | ||||||
|  |             // Instantiate monitor object | ||||||
|             GnssSynchroMonitor_ = gnss_synchro_make_monitor(channels_count_, |             GnssSynchroMonitor_ = gnss_synchro_make_monitor(channels_count_, | ||||||
|                 configuration_->property("Monitor.decimation_factor", 1), |                 configuration_->property("Monitor.decimation_factor", 1), | ||||||
|                 configuration_->property("Monitor.udp_port", 1234), |                 configuration_->property("Monitor.udp_port", 1234), | ||||||
|                 udp_addr_vec, enable_protobuf); |                 udp_addr_vec, enable_protobuf); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |     /* | ||||||
|  |      * Instantiate the receiver acquisition monitor block, if required | ||||||
|  |      */ | ||||||
|  |     enable_acquisition_monitor_ = configuration_->property("AcquisitionMonitor.enable_monitor", false); | ||||||
|  |     if (enable_acquisition_monitor_) | ||||||
|  |         { | ||||||
|  |             // Retrieve monitor properties | ||||||
|  |             bool enable_protobuf = configuration_->property("AcquisitionMonitor.enable_protobuf", true); | ||||||
|  |             if (configuration_->property("PVT.enable_protobuf", false) == true) | ||||||
|  |                 { | ||||||
|  |                     enable_protobuf = true; | ||||||
|  |                 } | ||||||
|  |             std::string address_string = configuration_->property("AcquisitionMonitor.client_addresses", std::string("127.0.0.1")); | ||||||
|  |             std::vector<std::string> udp_addr_vec = split_string(address_string, '_'); | ||||||
|  |             std::sort(udp_addr_vec.begin(), udp_addr_vec.end()); | ||||||
|  |             udp_addr_vec.erase(std::unique(udp_addr_vec.begin(), udp_addr_vec.end()), udp_addr_vec.end()); | ||||||
|  |  | ||||||
|  |             GnssSynchroAcquisitionMonitor_ = gnss_synchro_make_monitor(channels_count_, | ||||||
|  |                 configuration_->property("AcquisitionMonitor.decimation_factor", 1), | ||||||
|  |                 configuration_->property("AcquisitionMonitor.udp_port", 1235), | ||||||
|  |                 udp_addr_vec, enable_protobuf); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |     /* | ||||||
|  |      * Instantiate the receiver tracking monitor block, if required | ||||||
|  |      */ | ||||||
|  |     enable_tracking_monitor_ = configuration_->property("TrackingMonitor.enable_monitor", false); | ||||||
|  |     if (enable_tracking_monitor_) | ||||||
|  |         { | ||||||
|  |             // Retrieve monitor properties | ||||||
|  |             bool enable_protobuf = configuration_->property("TrackingMonitor.enable_protobuf", true); | ||||||
|  |             if (configuration_->property("PVT.enable_protobuf", false) == true) | ||||||
|  |                 { | ||||||
|  |                     enable_protobuf = true; | ||||||
|  |                 } | ||||||
|  |             std::string address_string = configuration_->property("TrackingMonitor.client_addresses", std::string("127.0.0.1")); | ||||||
|  |             std::vector<std::string> udp_addr_vec = split_string(address_string, '_'); | ||||||
|  |             std::sort(udp_addr_vec.begin(), udp_addr_vec.end()); | ||||||
|  |             udp_addr_vec.erase(std::unique(udp_addr_vec.begin(), udp_addr_vec.end()), udp_addr_vec.end()); | ||||||
|  |  | ||||||
|  |             GnssSynchroTrackingMonitor_ = gnss_synchro_make_monitor(channels_count_, | ||||||
|  |                 configuration_->property("TrackingMonitor.decimation_factor", 1), | ||||||
|  |                 configuration_->property("TrackingMonitor.udp_port", 1236), | ||||||
|  |                 udp_addr_vec, enable_protobuf); | ||||||
|  |         } | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -191,6 +191,8 @@ private: | |||||||
|     std::vector<gr::blocks::null_sink::sptr> null_sinks_; |     std::vector<gr::blocks::null_sink::sptr> null_sinks_; | ||||||
|  |  | ||||||
|     gr::basic_block_sptr GnssSynchroMonitor_; |     gr::basic_block_sptr GnssSynchroMonitor_; | ||||||
|  |     gr::basic_block_sptr GnssSynchroAcquisitionMonitor_; | ||||||
|  |     gr::basic_block_sptr GnssSynchroTrackingMonitor_; | ||||||
|     channel_status_msg_receiver_sptr channels_status_;  // class that receives and stores the current status of the receiver channels |     channel_status_msg_receiver_sptr channels_status_;  // class that receives and stores the current status of the receiver channels | ||||||
|     gnss_sdr_sample_counter_sptr ch_out_sample_counter_; |     gnss_sdr_sample_counter_sptr ch_out_sample_counter_; | ||||||
| #if ENABLE_FPGA | #if ENABLE_FPGA | ||||||
| @@ -240,6 +242,8 @@ private: | |||||||
|     bool running_; |     bool running_; | ||||||
|     bool multiband_; |     bool multiband_; | ||||||
|     bool enable_monitor_; |     bool enable_monitor_; | ||||||
|  |     bool enable_acquisition_monitor_; | ||||||
|  |     bool enable_tracking_monitor_; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif  // GNSS_SDR_GNSS_FLOWGRAPH_H | #endif  // GNSS_SDR_GNSS_FLOWGRAPH_H | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user