[hamradio-commits] [gnss-sdr] 43/60: Updated multichannel frontend support.

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Sun Mar 22 11:15:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch next
in repository gnss-sdr.

commit 9afff479b1c4ebe580a6d98a160da18ace70b4a0
Author: Javier <jarribas at cttc.es>
Date:   Wed Mar 4 19:00:57 2015 +0100

    Updated multichannel frontend support.
---
 ...sdr_multichannel_GPS_L1_Flexiband_realtime.conf | 78 ++++++++++++++++++++--
 conf/gnss-sdr_multisource_Hybrid_short.conf        |  8 +--
 .../adapters/flexiband_signal_source.cc            |  9 ++-
 src/core/receiver/gnss_flowgraph.cc                | 20 +++++-
 4 files changed, 99 insertions(+), 16 deletions(-)

diff --git a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime.conf b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime.conf
index 48e72ca..afc27f9 100644
--- a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime.conf
@@ -7,7 +7,7 @@
 
 ;######### GLOBAL OPTIONS ##################
 ;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz].
-GNSS-SDR.internal_fs_hz=4000000
+GNSS-SDR.internal_fs_hz=2000000
 
 ;######### CONTROL_THREAD CONFIG ############
 ControlThread.wait_for_flowgraph=false
@@ -50,14 +50,21 @@ SignalSource.usb_packet_buffer=128
 
 ;######### SIGNAL_CONDITIONER 0 CONFIG ############
 ;## It holds blocks to change data type, filter and resample input data. 
-SignalConditioner0.implementation=Pass_Through
+SignalConditioner0.implementation=Signal_Conditioner
 
 ;######### DATA_TYPE_ADAPTER 0 CONFIG ############
 DataTypeAdapter0.implementation=Pass_Through
 DataTypeAdapter0.item_type=gr_complex
 
 ;######### INPUT_FILTER 0 CONFIG ############
-InputFilter0.implementation=Pass_Through
+;## Filter the input data. Can be combined with frequency translation for IF signals
+
+;#implementation: Use [Pass_Through] or [Fir_Filter] or [Freq_Xlating_Fir_Filter]
+;#[Pass_Through] disables this block
+;#[Fir_Filter] enables a FIR Filter
+;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation that shifts IF down to zero Hz.
+
+InputFilter0.implementation=Freq_Xlating_Fir_Filter
 
 ;#dump: Dump the filtered data to a file.
 InputFilter0.dump=false
@@ -65,12 +72,65 @@ InputFilter0.dump=false
 ;#dump_filename: Log path and filename.
 InputFilter0.dump_filename=../data/input_filter.dat
 
+;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. 
+;#These options are based on parameters of gnuradio's function: gr_remez.
+;#These function calculates the optimal (in the Chebyshev/minimax sense) FIR filter inpulse reponse given a set of band edges, the desired reponse on those bands, and the weight given to the error in those bands.
+
 ;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
 InputFilter0.input_item_type=gr_complex
 
 ;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
 InputFilter0.output_item_type=gr_complex
 
+;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version.
+InputFilter0.taps_item_type=float
+
+;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time
+InputFilter0.number_of_taps=5
+
+;#number_of _bands: Number of frequency bands in the filter.
+InputFilter0.number_of_bands=2
+
+;#bands: frequency at the band edges [ b1 e1 b2 e2 b3 e3 ...].
+;#Frequency is in the range [0, 1], with 1 being the Nyquist frequency (Fs/2)
+;#The number of band_begin and band_end elements must match the number of bands
+
+InputFilter0.band1_begin=0.0
+InputFilter0.band1_end=0.45
+InputFilter0.band2_begin=0.55
+InputFilter0.band2_end=1.0
+
+;#ampl: desired amplitude at the band edges [ a(b1) a(e1) a(b2) a(e2) ...].
+;#The number of ampl_begin and ampl_end elements must match the number of bands
+
+InputFilter0.ampl1_begin=1.0
+InputFilter0.ampl1_end=1.0
+InputFilter0.ampl2_begin=0.0
+InputFilter0.ampl2_end=0.0
+
+;#band_error: weighting applied to each band (usually 1).
+;#The number of band_error elements must match the number of bands
+InputFilter0.band1_error=1.0
+InputFilter0.band2_error=1.0
+
+;#filter_type: one of "bandpass", "hilbert" or "differentiator" 
+InputFilter0.filter_type=bandpass
+
+;#grid_density: determines how accurately the filter will be constructed.
+;The minimum value is 16; higher values are slower to compute the filter.
+InputFilter0.grid_density=16
+
+;#The following options are used only in Freq_Xlating_Fir_Filter implementation.
+;#InputFilter0.IF is the intermediate frequency (in Hz) shifted down to zero Hz
+;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE
+; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/
+InputFilter0.sampling_frequency=40000000
+;# IF deviation due to front-end LO inaccuracies [HZ]
+InputFilter0.IF=205000
+
+;# Decimation factor after the frequency tranaslating block
+InputFilter0.decimation_factor=20
+
 ;######### RESAMPLER CONFIG 0 ############
 ;## Resamples the input data. 
 Resampler0.implementation=Pass_Through
@@ -131,7 +191,7 @@ Resampler2.implementation=Pass_Through
 
 ;######### CHANNELS GLOBAL CONFIG ############
 ;#count: Number of available GPS satellite channels.
-Channels_GPS.count=2
+Channels_GPS.count=1
 ;#count: Number of available Galileo satellite channels.
 Channels_Galileo.count=0
 ;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver
@@ -143,6 +203,12 @@ Channel.system=GPS
 ;# CHANNEL CONNECTION
 Channel0.RF_channel_ID=0
 Channel1.RF_channel_ID=0
+Channel2.RF_channel_ID=0
+Channel3.RF_channel_ID=0
+Channel4.RF_channel_ID=0
+Channel5.RF_channel_ID=0
+Channel6.RF_channel_ID=0
+Channel7.RF_channel_ID=0
 
 ;#signal: 
 ;#if the option is disabled by default is assigned "1C" GPS L1 C/A
@@ -167,11 +233,11 @@ Acquisition_GPS.coherent_integration_time_ms=1
 ;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
 Acquisition_GPS.implementation=GPS_L1_CA_PCPS_Acquisition
 ;#threshold: Acquisition threshold. It will be ignored if pfa is defined.
-Acquisition_GPS.threshold=0.02
+Acquisition_GPS.threshold=0.007
 ;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
 ;Acquisition_GPS.pfa=0.0001
 ;#doppler_max: Maximum expected Doppler shift [Hz]
-Acquisition_GPS.doppler_max=8000
+Acquisition_GPS.doppler_max=10000
 ;#doppler_max: Doppler step in the grid search [Hz]
 Acquisition_GPS.doppler_step=500
 ;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take
diff --git a/conf/gnss-sdr_multisource_Hybrid_short.conf b/conf/gnss-sdr_multisource_Hybrid_short.conf
index 08a9c59..a0199b9 100644
--- a/conf/gnss-sdr_multisource_Hybrid_short.conf
+++ b/conf/gnss-sdr_multisource_Hybrid_short.conf
@@ -307,10 +307,10 @@ Channels.in_acquisition=1
 Channel.system=GPS, Galileo
 
 ;# CHANNEL CONNECTION
-Channel0.SignalSource_ID=0
-Channel1.SignalSource_ID=0
-Channel2.SignalSource_ID=1
-Channel3.SignalSource_ID=1
+Channel0.RF_channel_ID=0
+Channel1.RF_channel_ID=0
+Channel2.RF_channel_ID=1
+Channel3.RF_channel_ID=1
 ;#signal: 
 ;#if the option is disabled by default is assigned "1C" GPS L1 C/A
 Channel.signal=1B
diff --git a/src/algorithms/signal_source/adapters/flexiband_signal_source.cc b/src/algorithms/signal_source/adapters/flexiband_signal_source.cc
index 4e5b670..9fec7f2 100644
--- a/src/algorithms/signal_source/adapters/flexiband_signal_source.cc
+++ b/src/algorithms/signal_source/adapters/flexiband_signal_source.cc
@@ -67,7 +67,6 @@ FlexibandSignalSource::FlexibandSignalSource(ConfigurationInterface* configurati
             for (int n=0;n<(RF_channels_*2);n++)
             {
                 char_to_float.push_back(gr::blocks::char_to_float::make());
-                float_to_complex_.push_back(gr::blocks::float_to_complex::make());
             }
 
             for (int n=0;n<(RF_channels_);n++)
@@ -102,8 +101,8 @@ void FlexibandSignalSource::connect(gr::top_block_sptr top_block)
     }
     for (int n=0;n<RF_channels_;n++)
     {
-    	  top_block->connect(char_to_float.at(n*2), 0, float_to_complex_.at(n*2), 0);
-    	  top_block->connect(char_to_float.at(n*2+1), 0, float_to_complex_.at(n*2+1), 0);
+    	  top_block->connect(char_to_float.at(n*2), 0, float_to_complex_.at(n), 0);
+    	  top_block->connect(char_to_float.at(n*2+1), 0, float_to_complex_.at(n), 1);
     	  DLOG(INFO) << "connected char_to_float to float_to_complex_ CH"<<n;
     }
 
@@ -120,8 +119,8 @@ void FlexibandSignalSource::disconnect(gr::top_block_sptr top_block)
     }
     for (int n=0;n<RF_channels_;n++)
     {
-    	  top_block->disconnect(char_to_float.at(n*2), 0, float_to_complex_.at(n*2), 0);
-    	  top_block->disconnect(char_to_float.at(n*2+1), 0, float_to_complex_.at(n*2+1), 0);
+    	top_block->disconnect(char_to_float.at(n*2), 0, float_to_complex_.at(n), 0);
+    	top_block->disconnect(char_to_float.at(n*2+1), 0, float_to_complex_.at(n), 1);
     	  DLOG(INFO) << "disconnect char_to_float to float_to_complex_ CH"<<n;
     }
 }
diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc
index f2986d9..2183330 100644
--- a/src/core/receiver/gnss_flowgraph.cc
+++ b/src/core/receiver/gnss_flowgraph.cc
@@ -227,7 +227,25 @@ void GNSSFlowgraph::connect()
                             for (int j = 0; j < RF_Channels; j++)
                                 {
                                     //Connect the multichannel signal source to multiple signal conditioners
-                                    top_block_->connect(sig_source_.at(i)->get_right_block(), j, sig_conditioner_.at(signal_conditioner_ID)->get_left_block(), 0);
+                            	    // check number of signal source output ports todo!
+                            		if (sig_source_.at(i)->get_right_block()->input_signature()->max_streams()>1)
+                            		{
+                                        top_block_->connect(sig_source_.at(i)->get_right_block(), j, sig_conditioner_.at(signal_conditioner_ID)->get_left_block(), 0);
+                                        //std::cout<<"connect sig_source_ "<<i<<" stream "<<j<<" to conditioner "<<j<<std::endl;
+                            		}else{
+                            			if (j==0)
+                            			{
+                            				// RF_channel 0 backward compatibility with single channel sources
+                                            top_block_->connect(sig_source_.at(i)->get_right_block(), 0, sig_conditioner_.at(signal_conditioner_ID)->get_left_block(), 0);
+                                            //std::cout<<"connect sig_source_ "<<i<<" stream "<<0<<" to conditioner "<<j<<std::endl;
+                            			}else{
+                            				// Multiple channel sources using multiple output blocks of single channel (requires RF_channel selector in call)
+                                            top_block_->connect(sig_source_.at(i)->get_right_block(j), 0, sig_conditioner_.at(signal_conditioner_ID)->get_left_block(), 0);
+                                            //std::cout<<"connect sig_source_ "<<i<<" stream "<<j<<" to conditioner "<<j<<std::endl;
+                            			}
+
+                            		}
+
                                     signal_conditioner_ID++;
                                 }
                         }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list