diff --git a/README.md b/README.md
index dc419957d..6381ed9ca 100644
--- a/README.md
+++ b/README.md
@@ -1180,19 +1180,6 @@ $ gnss-sdr --RTCM_Port=12345 --RTCM_Ref_Station_ID=10
In order to get well-formatted GeoJSON, KML and RINEX files, always terminate ```gnss-sdr``` execution by pressing key ```q``` and then key ```ENTER```. Those files will be automatically deleted if no position fix have been obtained during the execution of the software receiver.
-#### Output filter
-
-Implements a sink for the signal stream.
-
-~~~~~~
-;######### OUTPUT_FILTER CONFIG ############
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
-~~~~~~
-
-
-
About the software license
==========================
diff --git a/conf/gnss-sdr.conf b/conf/gnss-sdr.conf
index abd8a47be..e959a0319 100644
--- a/conf/gnss-sdr.conf
+++ b/conf/gnss-sdr.conf
@@ -313,8 +313,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf b/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf
index b5f2c8c3b..27004e825 100644
--- a/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf
+++ b/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf
@@ -113,6 +113,3 @@ PVT.flag_rtcm_server=false
PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
-;######### OUTPUT_FILTER CONFIG ############
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_SPIR.conf b/conf/gnss-sdr_GPS_L1_SPIR.conf
index 9881e4d88..9229290e1 100644
--- a/conf/gnss-sdr_GPS_L1_SPIR.conf
+++ b/conf/gnss-sdr_GPS_L1_SPIR.conf
@@ -316,8 +316,3 @@ PVT.nmea_dump_devname=/dev/pts/4
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf b/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf
index 17d1ad4a4..04a3c38fc 100644
--- a/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf
+++ b/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf
@@ -382,8 +382,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_USRP_X300_realtime_new.conf b/conf/gnss-sdr_GPS_L1_USRP_X300_realtime_new.conf
index da410de20..88efbae58 100644
--- a/conf/gnss-sdr_GPS_L1_USRP_X300_realtime_new.conf
+++ b/conf/gnss-sdr_GPS_L1_USRP_X300_realtime_new.conf
@@ -398,8 +398,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_USRP_realtime.conf b/conf/gnss-sdr_GPS_L1_USRP_realtime.conf
index 7f0ce9063..38adb7669 100644
--- a/conf/gnss-sdr_GPS_L1_USRP_realtime.conf
+++ b/conf/gnss-sdr_GPS_L1_USRP_realtime.conf
@@ -383,8 +383,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf b/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf
index c0d58615d..7ef0bab5d 100644
--- a/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf
+++ b/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf
@@ -300,8 +300,3 @@ PVT.flag_rtcm_server=false
PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_gr_complex.conf b/conf/gnss-sdr_GPS_L1_gr_complex.conf
index ed637880e..235a80943 100644
--- a/conf/gnss-sdr_GPS_L1_gr_complex.conf
+++ b/conf/gnss-sdr_GPS_L1_gr_complex.conf
@@ -82,6 +82,3 @@ PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf b/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf
index 0b1f83156..48a00fbcd 100644
--- a/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf
+++ b/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf
@@ -295,8 +295,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_ishort.conf b/conf/gnss-sdr_GPS_L1_ishort.conf
index bbea10058..06c5d4991 100644
--- a/conf/gnss-sdr_GPS_L1_ishort.conf
+++ b/conf/gnss-sdr_GPS_L1_ishort.conf
@@ -82,6 +82,3 @@ PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_nsr.conf b/conf/gnss-sdr_GPS_L1_nsr.conf
index ef1457f73..64e08a61c 100644
--- a/conf/gnss-sdr_GPS_L1_nsr.conf
+++ b/conf/gnss-sdr_GPS_L1_nsr.conf
@@ -135,6 +135,3 @@ PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
PVT.dump=true
-;######### OUTPUT_FILTER CONFIG ############
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf b/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf
index c3087fecd..365a5a8d8 100644
--- a/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf
+++ b/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf
@@ -150,6 +150,3 @@ PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
PVT.dump=true
-;######### OUTPUT_FILTER CONFIG ############
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf b/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf
index 1e3d3b3c3..1c3b4e901 100644
--- a/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf
+++ b/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf
@@ -293,9 +293,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=true
-
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf b/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf
index 181ec894d..72fa2cccf 100644
--- a/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf
+++ b/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf
@@ -146,7 +146,3 @@ PVT.flag_rtcm_server=false
PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf b/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf
index 8a638f560..fc3b6a1c6 100644
--- a/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf
+++ b/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf
@@ -134,6 +134,3 @@ PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf b/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf
index a312d3cfa..9c15c8b09 100644
--- a/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf
+++ b/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf
@@ -204,8 +204,3 @@ PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf b/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf
index ff0f0bdf5..1ff5a370e 100644
--- a/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf
+++ b/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf
@@ -161,8 +161,3 @@ PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf b/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf
index 055962e31..e868ca8c2 100644
--- a/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf
+++ b/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf
@@ -84,6 +84,3 @@ PVT.flag_rtcm_server=true
PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
-;######### OUTPUT_FILTER CONFIG ############
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf b/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf
index 9774d7de5..290e4b58c 100644
--- a/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf
+++ b/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf
@@ -299,8 +299,3 @@ PVT.flag_rtcm_tty_port=false;
;#rtcm_dump_devname: serial device descriptor for RTCM logging
PVT.rtcm_dump_devname=/dev/pts/1
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_Galileo_E1_nsr.conf b/conf/gnss-sdr_Galileo_E1_nsr.conf
index 73a7bb1ef..20f314d17 100644
--- a/conf/gnss-sdr_Galileo_E1_nsr.conf
+++ b/conf/gnss-sdr_Galileo_E1_nsr.conf
@@ -129,6 +129,3 @@ PVT.flag_rtcm_server=false
PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
-;######### OUTPUT_FILTER CONFIG ############
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_Galileo_E1_short.conf b/conf/gnss-sdr_Galileo_E1_short.conf
index 62919ace1..4b9d58469 100644
--- a/conf/gnss-sdr_Galileo_E1_short.conf
+++ b/conf/gnss-sdr_Galileo_E1_short.conf
@@ -294,8 +294,3 @@ PVT.flag_rtcm_tty_port=false;
;#rtcm_dump_devname: serial device descriptor for RTCM logging
PVT.rtcm_dump_devname=/dev/pts/1
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_Galileo_E5a.conf b/conf/gnss-sdr_Galileo_E5a.conf
index 6fb907813..65c6bdd42 100644
--- a/conf/gnss-sdr_Galileo_E5a.conf
+++ b/conf/gnss-sdr_Galileo_E5a.conf
@@ -344,8 +344,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf b/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf
index 89be9e4f8..3978e72d5 100644
--- a/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf
+++ b/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf
@@ -26,7 +26,7 @@ ControlThread.wait_for_flowgraph=false
;######### SIGNAL_SOURCE CONFIG ############
SignalSource.implementation=File_Signal_Source
-SignalSource.filename=/datalogger/captures/Galileo_E5ab_IFEN_CTTC_run1.dat
+SignalSource.filename=/media/javier/SISTEMA/signals/captura Generador IFEN CTTC Gal E5ab/Galileo_E5ab_IFEN_CTTC_run1.dat
SignalSource.item_type=gr_complex
SignalSource.sampling_frequency=50000000
SignalSource.freq=1176450000
@@ -76,7 +76,7 @@ Resampler.dump_filename=../data/resampler.dat
;######### CHANNELS GLOBAL CONFIG ############
-Channels_5X.count=4
+Channels_5X.count=1
Channels.in_acquisition=1
Channel.signal=5X
@@ -154,7 +154,3 @@ PVT.flag_rtcm_server=true
PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_Hybrid_byte.conf b/conf/gnss-sdr_Hybrid_byte.conf
index 3f3e7931b..729c2cb52 100644
--- a/conf/gnss-sdr_Hybrid_byte.conf
+++ b/conf/gnss-sdr_Hybrid_byte.conf
@@ -343,8 +343,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
PVT.dump_filename=./PVT
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_Hybrid_byte_sim.conf b/conf/gnss-sdr_Hybrid_byte_sim.conf
index ce26c3629..7208a89d9 100644
--- a/conf/gnss-sdr_Hybrid_byte_sim.conf
+++ b/conf/gnss-sdr_Hybrid_byte_sim.conf
@@ -353,8 +353,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
PVT.dump_filename=./PVT
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_Hybrid_gr_complex.conf b/conf/gnss-sdr_Hybrid_gr_complex.conf
index 213710eaf..ea60c1836 100644
--- a/conf/gnss-sdr_Hybrid_gr_complex.conf
+++ b/conf/gnss-sdr_Hybrid_gr_complex.conf
@@ -346,8 +346,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
PVT.dump_filename=./PVT
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_Hybrid_nsr.conf b/conf/gnss-sdr_Hybrid_nsr.conf
index e6435579c..c47317473 100644
--- a/conf/gnss-sdr_Hybrid_nsr.conf
+++ b/conf/gnss-sdr_Hybrid_nsr.conf
@@ -200,7 +200,7 @@ Acquisition_1C.threshold=0.0075
;#doppler_max: Maximum expected Doppler shift [Hz]
Acquisition_1C.doppler_max=5000
;#doppler_max: Doppler step in the grid search [Hz]
-Acquisition_1C.doppler_step=500
+Acquisition_1C.doppler_step=250
;######### GALILEO ACQUISITION CONFIG ############
@@ -228,8 +228,8 @@ Acquisition_1B.doppler_step=125
;######### TRACKING GPS CONFIG ############
-;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking] or [GPS_L1_CA_TCP_CONNECTOR_Tracking] or [Galileo_E1_DLL_PLL_VEML_Tracking]
-Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
+;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_PLL_C_Aid_Tracking] or [GPS_L1_CA_TCP_CONNECTOR_Tracking] or [Galileo_E1_DLL_PLL_VEML_Tracking]
+Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking
;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version.
Tracking_1C.item_type=gr_complex
@@ -237,7 +237,7 @@ Tracking_1C.item_type=gr_complex
Tracking_1C.if=0
;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false]
-Tracking_1C.dump=false
+Tracking_1C.dump=true
;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number.
Tracking_1C.dump_filename=../data/epl_tracking_ch_
@@ -246,7 +246,7 @@ Tracking_1C.dump_filename=../data/epl_tracking_ch_
;# Valid values are: [1,2,4,5,10,20] (integer divisors of the GPS L1 CA bit period (20 ms) )
;# Longer integration period require more stable front-end LO
-Tracking_1C.extend_correlation_ms=10
+Tracking_1C.extend_correlation_ms=1
;#pll_bw_hz: PLL loop filter bandwidth [Hz]
@@ -265,7 +265,7 @@ Tracking_1C.order=3;
;######### TRACKING GALILEO CONFIG ############
-;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking] or [GPS_L1_CA_TCP_CONNECTOR_Tracking] or [Galileo_E1_DLL_PLL_VEML_Tracking]
+;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_PLL_C_Aid_Tracking] or [GPS_L1_CA_TCP_CONNECTOR_Tracking] or [Galileo_E1_DLL_PLL_VEML_Tracking]
Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking
;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version.
Tracking_1B.item_type=gr_complex
@@ -348,8 +348,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
PVT.dump_filename=./PVT
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_Hybrid_short.conf b/conf/gnss-sdr_Hybrid_short.conf
index a0e8bae92..878bf2850 100644
--- a/conf/gnss-sdr_Hybrid_short.conf
+++ b/conf/gnss-sdr_Hybrid_short.conf
@@ -354,8 +354,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
PVT.dump_filename=./PVT
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_bin_file_III_1a.conf b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_bin_file_III_1a.conf
index 6e9f1d2a8..8767b2113 100644
--- a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_bin_file_III_1a.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_bin_file_III_1a.conf
@@ -342,8 +342,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1a.conf b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1a.conf
index 94b34d55f..f5fd7cdec 100644
--- a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1a.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1a.conf
@@ -350,8 +350,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1b.conf
index d71f5882d..00cf01b37 100644
--- a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1b.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1b.conf
@@ -348,8 +348,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_II_3b.conf b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_II_3b.conf
index 2b787f259..660aa89d2 100644
--- a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_II_3b.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_II_3b.conf
@@ -349,8 +349,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_I_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_I_1b.conf
index 39f2cecc8..12fc2baf5 100644
--- a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_I_1b.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_I_1b.conf
@@ -344,8 +344,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf
index 36859a7dd..9824f47df 100644
--- a/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf
@@ -494,8 +494,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_realtime_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_realtime_III_1b.conf
index bf3bb57fb..41017b821 100644
--- a/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_realtime_III_1b.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_realtime_III_1b.conf
@@ -540,8 +540,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf b/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf
index 49f36b44d..ab5a9abd0 100644
--- a/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf
@@ -418,8 +418,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1a.conf b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1a.conf
index a2edd7b6e..08c178866 100644
--- a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1a.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1a.conf
@@ -441,8 +441,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf
index a2943a616..259425e4b 100644
--- a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf
@@ -655,8 +655,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multisource_Hybrid_nsr.conf b/conf/gnss-sdr_multisource_Hybrid_nsr.conf
index d2aceef93..58e8709ff 100644
--- a/conf/gnss-sdr_multisource_Hybrid_nsr.conf
+++ b/conf/gnss-sdr_multisource_Hybrid_nsr.conf
@@ -490,8 +490,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
PVT.dump_filename=./PVT
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/conf/gnss-sdr_multisource_Hybrid_short.conf b/conf/gnss-sdr_multisource_Hybrid_short.conf
index f063619da..2ef42559a 100644
--- a/conf/gnss-sdr_multisource_Hybrid_short.conf
+++ b/conf/gnss-sdr_multisource_Hybrid_short.conf
@@ -476,8 +476,3 @@ PVT.rtcm_dump_devname=/dev/pts/1
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
PVT.dump_filename=./PVT
-;######### OUTPUT_FILTER CONFIG ############
-;# Receiver output filter: Leave this block disabled in this version
-OutputFilter.implementation=Null_Sink_Output_Filter
-OutputFilter.filename=data/gnss-sdr.dat
-OutputFilter.item_type=gr_complex
diff --git a/docs/doxygen/other/main_page.dox b/docs/doxygen/other/main_page.dox
index 35f027422..c1043c431 100644
--- a/docs/doxygen/other/main_page.dox
+++ b/docs/doxygen/other/main_page.dox
@@ -53,7 +53,6 @@ More details on GNSS-SDR signal processing blocks:
\li \ref observables
\li \ref pvt
-\li \ref output_filter
\section overview Overview
@@ -125,7 +124,6 @@ This will create a folder named gnss-sdr with the following structure:
|-------input_filter
|-------libs
|-------observables
- |-------output_filter
|-------resampler
|-------signal_source
|-------telemetry_decoder
@@ -585,9 +583,6 @@ PVT.dump=false ; Enable or disable the PVT internal binary data file logging [tr
PVT.dump_filename=./PVT ; Log path and filename without extension.
\endverbatim
-\subsection output_filter Output filter
-
-(To be completed)
\section license About the software license
GNSS-SDR is released under the General Public License (GPL) v3, thus securing practical usability, inspection,
diff --git a/src/algorithms/CMakeLists.txt b/src/algorithms/CMakeLists.txt
index 75a3b3c4b..d6f0521dc 100644
--- a/src/algorithms/CMakeLists.txt
+++ b/src/algorithms/CMakeLists.txt
@@ -23,7 +23,6 @@ add_subdirectory(conditioner)
add_subdirectory(data_type_adapter)
add_subdirectory(observables)
add_subdirectory(telemetry_decoder)
-add_subdirectory(output_filter)
add_subdirectory(resampler)
add_subdirectory(signal_generator)
add_subdirectory(signal_source)
diff --git a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc
index eca8f01b2..c57513da8 100644
--- a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc
+++ b/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc
@@ -54,7 +54,7 @@ galileo_e1_make_pvt_cc(unsigned int nchannels, boost::shared_ptr
galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, boost::shared_ptr queue, bool dump, std::string dump_filename, int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname) :
gr::block("galileo_e1_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
- gr::io_signature::make(1, 1, sizeof(gr_complex)))
+ gr::io_signature::make(0, 0, sizeof(gr_complex)))
{
d_output_rate_ms = output_rate_ms;
@@ -102,6 +102,8 @@ galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, boost::shared_ptr();
+ d_last_status_print_seg=0;
+
// ############# ENABLE DATA FILE LOG #################
if (d_dump == true)
{
@@ -134,9 +136,21 @@ bool galileo_e1_pvt_cc::pseudoranges_pairCompare_min(const std::pairPRN)
+ // << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
+ }
+}
-int galileo_e1_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
+int galileo_e1_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
+ gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused)))
{
d_sample_counter++;
@@ -144,6 +158,8 @@ int galileo_e1_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_it
Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; //Get the input pointer
+ print_receiver_status(in);
+
for (unsigned int i = 0; i < d_nchannels; i++)
{
if (in[i][0].Flag_valid_pseudorange == true)
@@ -344,11 +360,6 @@ int galileo_e1_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_it
}
consume_each(1); //one by one
- output_items.clear(); // removes a warning
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
return 1;
}
diff --git a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.h b/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.h
index 766aedf64..3b9e7e881 100644
--- a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.h
+++ b/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.h
@@ -102,6 +102,9 @@ private:
bool b_rinex_header_updated;
bool b_rtcm_writing_started;
+ void print_receiver_status(Gnss_Synchro** channels_synchronization_data);
+ int d_last_status_print_seg; //for status printer
+
unsigned int d_nchannels;
std::string d_dump_filename;
std::ofstream d_dump_file;
diff --git a/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc
index 194a02d1a..75d7e51b6 100644
--- a/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc
+++ b/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc
@@ -72,7 +72,7 @@ gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
bool flag_rtcm_tty_port,
std::string rtcm_dump_devname) :
gr::block("gps_l1_ca_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
- gr::io_signature::make(1, 1, sizeof(gr_complex)) )
+ gr::io_signature::make(0, 0, sizeof(gr_complex)) )
{
d_output_rate_ms = output_rate_ms;
d_display_rate_ms = display_rate_ms;
@@ -115,6 +115,8 @@ gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
d_last_sample_nav_output = 0;
d_rx_time = 0.0;
+ d_last_status_print_seg = 0;
+
b_rinex_header_writen = false;
b_rinex_header_updated = false;
b_rinex_sbs_header_writen = false;
@@ -131,7 +133,7 @@ gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "PVT dump enabled Log file: " << d_dump_filename.c_str();
}
- catch (std::ifstream::failure e)
+ catch (const std::ifstream::failure & e)
{
LOG(INFO) << "Exception opening PVT dump file " << e.what();
}
@@ -152,9 +154,21 @@ bool pseudoranges_pairCompare_min(const std::pair& a, const st
}
+void gps_l1_ca_pvt_cc::print_receiver_status(Gnss_Synchro** channels_synchronization_data)
+{
+ // Print the current receiver status using std::cout every second
+ int current_rx_seg=floor(channels_synchronization_data[0][0].Tracking_timestamp_secs);
+ if ( current_rx_seg!= d_last_status_print_seg)
+ {
+ d_last_status_print_seg = current_rx_seg;
+ std::cout << "Current input signal time = " << current_rx_seg << " [s]" << std::endl<< std::flush;
+ //DLOG(INFO) << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
+ // << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
+ }
+}
-int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
+int gps_l1_ca_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
+ gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused)))
{
d_sample_counter++;
@@ -163,6 +177,8 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; //Get the input pointer
//Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; //Get the output pointer
+ print_receiver_status(in);
+
// ############ 1. READ EPHEMERIS FROM GLOBAL MAP ####
d_ls_pvt->gps_ephemeris_map = global_gps_ephemeris_map.get_map_copy();
@@ -381,7 +397,7 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
d_dump_file.write((char*)&d_rx_time, sizeof(double));
}
}
- catch (std::ifstream::failure e)
+ catch (const std::ifstream::failure & e)
{
LOG(WARNING) << "Exception writing observables dump file " << e.what();
}
@@ -389,11 +405,6 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
}
consume_each(1); //one by one
- output_items.clear(); // removes a warning
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
return 1;
}
diff --git a/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.h b/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.h
index 47394682f..c2c8a7b9e 100644
--- a/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.h
+++ b/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.h
@@ -103,6 +103,9 @@ private:
bool b_rinex_header_updated;
bool b_rtcm_writing_started;
+ void print_receiver_status(Gnss_Synchro** channels_synchronization_data);
+ int d_last_status_print_seg; //for status printer
+
unsigned int d_nchannels;
std::string d_dump_filename;
std::ofstream d_dump_file;
diff --git a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
index e1aebd792..d11e6039b 100644
--- a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
+++ b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
@@ -58,7 +58,7 @@ hybrid_make_pvt_cc(unsigned int nchannels, boost::shared_ptr queu
hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, boost::shared_ptr queue, bool dump, std::string dump_filename, int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname) :
gr::block("hybrid_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
- gr::io_signature::make(1, 1, sizeof(gr_complex)))
+ gr::io_signature::make(0, 0, sizeof(gr_complex)))
{
d_output_rate_ms = output_rate_ms;
@@ -105,6 +105,8 @@ hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, boost::shared_ptr();
+ d_last_status_print_seg=0;
+
// ############# ENABLE DATA FILE LOG #################
if (d_dump == true)
{
@@ -137,9 +139,21 @@ bool hybrid_pvt_cc::pseudoranges_pairCompare_min(const std::pairPRN)
+ // << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
+ }
+}
-int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
+int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
+ gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused)))
{
d_sample_counter++;
bool arrived_galileo_almanac = false;
@@ -148,6 +162,8 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; //Get the input pointer
+ print_receiver_status(in);
+
for (unsigned int i = 0; i < d_nchannels; i++)
{
if (in[i][0].Flag_valid_pseudorange == true)
@@ -370,11 +386,6 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
}
consume_each(1); //one by one
- output_items.clear(); // removes a warning
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
return 1;
}
diff --git a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.h b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.h
index b95928c57..89d728317 100644
--- a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.h
+++ b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.h
@@ -101,6 +101,9 @@ private:
bool b_rinex_header_writen;
bool b_rinex_header_updated;
+ void print_receiver_status(Gnss_Synchro** channels_synchronization_data);
+ int d_last_status_print_seg; //for status printer
+
unsigned int d_nchannels;
std::string d_dump_filename;
std::ofstream d_dump_file;
diff --git a/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc
index 786cf7198..123ce5ce3 100644
--- a/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc
+++ b/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc
@@ -342,7 +342,7 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_state(int state)
int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
+ gr_vector_void_star &output_items __attribute__((unused)))
{
/*
* By J.Arribas, L.Esteve, M.Molina and M.Sales
@@ -806,7 +806,6 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
}
}
- output_items.clear(); // removes a warning
return noutput_items;
}
diff --git a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc
index c4fbb93ac..58ff25804 100644
--- a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc
+++ b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc
@@ -206,7 +206,7 @@ void galileo_pcps_8ms_acquisition_cc::set_state(int state)
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_void_star &output_items)
+ gr_vector_void_star &output_items __attribute__((unused)))
{
int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
@@ -416,6 +416,5 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
}
}
- output_items.clear(); // removes a warning
return noutput_items;
}
diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc
index 07f3e6b4e..699ba060f 100644
--- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc
+++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc
@@ -226,7 +226,7 @@ void pcps_acquisition_cc::set_state(int state)
int pcps_acquisition_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
+ gr_vector_void_star &output_items __attribute__((unused)))
{
/*
* By J.Arribas, L.Esteve and M.Molina
@@ -472,7 +472,6 @@ int pcps_acquisition_cc::general_work(int noutput_items,
}
}
- output_items.clear(); // removes a warning
return noutput_items;
}
diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc
index 9d63da86d..4744c16c6 100644
--- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc
+++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc
@@ -427,7 +427,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler(gr_vector_const_void_star
int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
+ gr_vector_void_star &output_items __attribute__((unused)))
{
/*!
@@ -525,6 +525,5 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
//DLOG(INFO)<<"d_sample_counter="<.
-#
-
-add_subdirectory(adapters)
\ No newline at end of file
diff --git a/src/algorithms/output_filter/adapters/CMakeLists.txt b/src/algorithms/output_filter/adapters/CMakeLists.txt
deleted file mode 100644
index 6656b1b02..000000000
--- a/src/algorithms/output_filter/adapters/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (C) 2012-2015 (see AUTHORS file for a list of contributors)
-#
-# This file is part of GNSS-SDR.
-#
-# GNSS-SDR is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# GNSS-SDR is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNSS-SDR. If not, see .
-#
-
-set(OUTPUTFILTER_ADAPTER_SOURCES
- file_output_filter.cc
- null_sink_output_filter.cc
-)
-
-include_directories(
- $(CMAKE_CURRENT_SOURCE_DIR)
- ${CMAKE_SOURCE_DIR}/src/core/interfaces
- ${CMAKE_SOURCE_DIR}/src/core/receiver
- ${GLOG_INCLUDE_DIRS}
- ${GFlags_INCLUDE_DIRS}
- ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-)
-
-file(GLOB OUTPUTFILTER_ADAPTER_HEADERS "*.h")
-add_library(out_adapters ${OUTPUTFILTER_ADAPTER_SOURCES} ${OUTPUTFILTER_ADAPTER_HEADERS})
-source_group(Headers FILES ${OUTPUTFILTER_ADAPTER_HEADERS})
-add_dependencies(out_adapters glog-${glog_RELEASE})
-target_link_libraries(out_adapters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES})
diff --git a/src/algorithms/output_filter/adapters/file_output_filter.cc b/src/algorithms/output_filter/adapters/file_output_filter.cc
deleted file mode 100644
index 86cde40f7..000000000
--- a/src/algorithms/output_filter/adapters/file_output_filter.cc
+++ /dev/null
@@ -1,105 +0,0 @@
-/*!
- * \file file_output_filter.cc
- * \brief Implementation of an adapter of a file output filter block
- * to an OutputFilterInterface
- * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
- *
- * -------------------------------------------------------------------------
- *
- * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
- *
- * GNSS-SDR is a software defined Global Navigation
- * Satellite Systems receiver
- *
- * This file is part of GNSS-SDR.
- *
- * GNSS-SDR is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GNSS-SDR is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNSS-SDR. If not, see .
- *
- * -------------------------------------------------------------------------
- */
-
-#include "file_output_filter.h"
-#include
-#include
-#include "configuration_interface.h"
-
-using google::LogMessage;
-
-FileOutputFilter::FileOutputFilter(ConfigurationInterface* configuration,
- std::string role,
- unsigned int in_streams,
- unsigned int out_streams) :
- role_(role),
- in_streams_(in_streams),
- out_streams_(out_streams)
-{
- std::string default_filename = "./output.dat";
- std::string default_item_type = "short";
- filename_ = configuration->property(role + ".filename", default_filename);
- item_type_ = configuration->property(role + ".item_type", default_item_type);
- if(item_type_.compare("gr_complex") == 0)
- {
- item_size_ = sizeof(gr_complex);
- }
- else if(item_type_.compare("float") == 0)
- {
- item_size_ = sizeof(float);
- }
- else if(item_type_.compare("short") == 0)
- {
- item_size_ = sizeof(short);
- }
- else
- {
- LOG(WARNING) << item_type_ << " Unrecognized item type. Using short.";
- item_size_ = sizeof(short);
- }
- file_sink_ = gr::blocks::file_sink::make(item_size_, filename_.c_str());
- DLOG(INFO) << "file sink(" << file_sink_->unique_id() << ")";
-}
-
-
-
-FileOutputFilter::~FileOutputFilter()
-{}
-
-
-
-void FileOutputFilter::connect(gr::top_block_sptr top_block)
-{
- if(top_block) { /* top_block is not null */};
- DLOG(INFO) << "nothing to connect internally";
-}
-
-
-void FileOutputFilter::disconnect(gr::top_block_sptr top_block)
-{
- if(top_block) { /* top_block is not null */};
- // Nothing to disconnect internally
-}
-
-
-
-gr::basic_block_sptr FileOutputFilter::get_left_block()
-{
- return file_sink_;
-}
-
-
-
-gr::basic_block_sptr FileOutputFilter::get_right_block()
-{
- //return file_sink_;//gr_block_sptr();
- return gr::blocks::file_sink::sptr();
-}
diff --git a/src/algorithms/output_filter/adapters/file_output_filter.h b/src/algorithms/output_filter/adapters/file_output_filter.h
deleted file mode 100644
index 87052a629..000000000
--- a/src/algorithms/output_filter/adapters/file_output_filter.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*!
- * \file file_output_filter.h
- * \brief Interface of an adapter of a file output filter block to an
- * OutputFilterInterface
- * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
- *
- *
- * -------------------------------------------------------------------------
- *
- * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
- *
- * GNSS-SDR is a software defined Global Navigation
- * Satellite Systems receiver
- *
- * This file is part of GNSS-SDR.
- *
- * GNSS-SDR is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GNSS-SDR is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNSS-SDR. If not, see .
- *
- * -------------------------------------------------------------------------
- */
-
-#ifndef GNSS_SDR_FILE_OUTPUT_FILTER_H_
-#define GNSS_SDR_FILE_OUTPUT_FILTER_H_
-
-#include
-#include
-#include "gnss_block_interface.h"
-
-
-class ConfigurationInterface;
-
-/*!
- * \brief An output filter that sends its output
- * to a file without any change in the data format.
- */
-class FileOutputFilter : public GNSSBlockInterface
-{
-public:
- FileOutputFilter(ConfigurationInterface* configuration,
- std::string role,
- unsigned int in_streams,
- unsigned int out_streams);
-
- virtual ~FileOutputFilter();
- std::string role()
- {
- return role_;
- }
- std::string implementation()
- {
- return "File_Output_Filter";
- }
- size_t item_size()
- {
- return item_size_;
- }
- void connect(gr::top_block_sptr top_block);
- void disconnect(gr::top_block_sptr top_block);
- gr::basic_block_sptr get_left_block();
- gr::basic_block_sptr get_right_block();
-
-private:
- gr::blocks::file_sink::sptr file_sink_;
- size_t item_size_;
- std::string filename_;
- std::string item_type_;
- std::string role_;
- unsigned int in_streams_;
- unsigned int out_streams_;
-};
-
-#endif /*GNSS_SDR_FILE_OUTPUT_FILTER_H_*/
diff --git a/src/algorithms/output_filter/adapters/null_sink_output_filter.cc b/src/algorithms/output_filter/adapters/null_sink_output_filter.cc
deleted file mode 100644
index 51263baaf..000000000
--- a/src/algorithms/output_filter/adapters/null_sink_output_filter.cc
+++ /dev/null
@@ -1,105 +0,0 @@
-/*!
- * \file null_sink_output_filter.cc
- * \brief Implementation of an adapter of a null sink output filter block to an
- * OutputFilterInterface
- * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
- *
- * -------------------------------------------------------------------------
- *
- * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
- *
- * GNSS-SDR is a software defined Global Navigation
- * Satellite Systems receiver
- *
- * This file is part of GNSS-SDR.
- *
- * GNSS-SDR is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GNSS-SDR is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNSS-SDR. If not, see .
- *
- * -------------------------------------------------------------------------
- */
-
-#include "null_sink_output_filter.h"
-#include
-#include
-#include "configuration_interface.h"
-
-using google::LogMessage;
-
-NullSinkOutputFilter::NullSinkOutputFilter(ConfigurationInterface* configuration,
- std::string role,
- unsigned int in_streams,
- unsigned int out_streams) :
- role_(role),
- in_streams_(in_streams),
- out_streams_(out_streams)
-{
- std::string default_item_type = "short";
- item_type_ = configuration->property(role + ".item_type", default_item_type);
- if(item_type_.compare("gr_complex") == 0)
- {
- item_size_ = sizeof(gr_complex);
- }
- else if(item_type_.compare("short") == 0)
- {
- item_size_ = sizeof(short);
- }
- else if(item_type_.compare("float") == 0)
- {
- item_size_ = sizeof(float);
- }
- else
- {
- LOG(WARNING) << item_type_ << " unrecognized item type. Using float";
- item_size_ = sizeof(float);
- }
- sink_ = gr::blocks::null_sink::make(item_size_);
- DLOG(INFO) << "null_sink(" << sink_->unique_id() << ")";
-}
-
-
-
-NullSinkOutputFilter::~NullSinkOutputFilter()
-{}
-
-
-
-void NullSinkOutputFilter::connect(gr::top_block_sptr top_block)
-{
- if(top_block) { /* top_block is not null */};
- DLOG(INFO) << "nothing to connect internally";
-}
-
-
-
-void NullSinkOutputFilter::disconnect(gr::top_block_sptr top_block)
-{
- if(top_block) { /* top_block is not null */};
- // Nothing to connect
-}
-
-
-
-gr::basic_block_sptr NullSinkOutputFilter::get_left_block()
-{
- return sink_;
-}
-
-
-
-gr::basic_block_sptr NullSinkOutputFilter::get_right_block()
-{
- LOG(WARNING) << "Right block of a signal sink should not be retrieved";
- //return gr::blocks::sptr::make();
- return sink_;
-}
diff --git a/src/algorithms/output_filter/adapters/null_sink_output_filter.h b/src/algorithms/output_filter/adapters/null_sink_output_filter.h
deleted file mode 100644
index c4016ab75..000000000
--- a/src/algorithms/output_filter/adapters/null_sink_output_filter.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*!
- * \file null_sink_output_filter.h
- * \brief Interface of an adapter of a null sink output filter block to an
- * OutputFilterInterface
- * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
- *
- * This class represents an implementation of an output filter that
- * sends its input to a null sink.
- *
- * -------------------------------------------------------------------------
- *
- * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
- *
- * GNSS-SDR is a software defined Global Navigation
- * Satellite Systems receiver
- *
- * This file is part of GNSS-SDR.
- *
- * GNSS-SDR is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GNSS-SDR is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNSS-SDR. If not, see .
- *
- * -------------------------------------------------------------------------
- */
-
-#ifndef GNSS_SDR_NULL_SINK_OUTPUT_FILTER_H_
-#define GNSS_SDR_NULL_SINK_OUTPUT_FILTER_H_
-
-#include
-#include
-#include "gnss_block_interface.h"
-
-
-class ConfigurationInterface;
-
-/*!
- * \brief This class implements a null sink output filter
- */
-class NullSinkOutputFilter : public GNSSBlockInterface
-{
-public:
- NullSinkOutputFilter(ConfigurationInterface* configuration,
- std::string role,
- unsigned int in_streams,
- unsigned int out_streams);
-
- virtual ~NullSinkOutputFilter();
- std::string item_type()
- {
- return item_type_;
- }
- std::string role()
- {
- return role_;
- }
- //! Returns "Null_Sink_Output_Filter"
- std::string implementation()
- {
- return "Null_Sink_Output_Filter";
- }
- size_t item_size()
- {
- return item_size_;
- }
- void connect(gr::top_block_sptr top_block);
- void disconnect(gr::top_block_sptr top_block);
- gr::basic_block_sptr get_left_block();
- gr::basic_block_sptr get_right_block();
-
-private:
- gr::blocks::null_sink::sptr sink_;
- size_t item_size_;
- std::string item_type_;
- std::string role_;
- unsigned int in_streams_;
- unsigned int out_streams_;
-};
-
-#endif /*GNSS_SDR_NULL_SINK_OUTPUT_FILTER_H_*/
diff --git a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc
index 8c95cb55b..27b1dd75a 100644
--- a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc
+++ b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc
@@ -250,9 +250,9 @@ signal_generator_c::~signal_generator_c()
}
-int signal_generator_c::general_work (int noutput_items,
- gr_vector_int &ninput_items,
-gr_vector_const_void_star &input_items,
+int signal_generator_c::general_work (int noutput_items __attribute__((unused)),
+ gr_vector_int &ninput_items __attribute__((unused)),
+gr_vector_const_void_star &input_items __attribute__((unused)),
gr_vector_void_star &output_items)
{
gr_complex *out = (gr_complex *) output_items[0];
@@ -388,11 +388,6 @@ gr_vector_void_star &output_items)
}
}
- if((noutput_items == 0) || (ninput_items.size() != 0) || input_items[0] == 0)
- {
- // do nothing
- }
-
// Tell runtime system how many output items we produced.
return 1;
}
diff --git a/src/algorithms/signal_source/adapters/gen_signal_source.h b/src/algorithms/signal_source/adapters/gen_signal_source.h
index 0c8e7f7f4..b607f0320 100644
--- a/src/algorithms/signal_source/adapters/gen_signal_source.h
+++ b/src/algorithms/signal_source/adapters/gen_signal_source.h
@@ -64,7 +64,6 @@ public:
size_t item_size(){ return 0; }
GNSSBlockInterface *signal_generator(){ return signal_generator_; }
- GNSSBlockInterface *output_filter(){ return filter_; }
private:
GNSSBlockInterface *signal_generator_;
diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc
index a6708eb96..0e0ca0507 100644
--- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc
+++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc
@@ -290,7 +290,7 @@ void galileo_e1b_telemetry_decoder_cc::decode_word(double *page_part_symbols,int
-int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
+int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
int corr_value = 0;
@@ -494,10 +494,7 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
}
//todo: implement averaging
d_average_count++;
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
+
if (d_average_count == d_decimation_output_factor)
{
d_average_count = 0;
diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc
index 1765cb13c..df0ee2927 100644
--- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc
+++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e5a_telemetry_decoder_cc.cc
@@ -274,7 +274,7 @@ galileo_e5a_telemetry_decoder_cc::~galileo_e5a_telemetry_decoder_cc()
}
-int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
+int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
//
@@ -340,16 +340,6 @@ int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
// **** Attempt Preamble correlation ****
bool corr_flag=true;
int corr_sign = 0; // sequence can be found inverted
- // corr_sign = d_preamble_bits[0] * d_page_symbols[d_symbol_counter - GALILEO_FNAV_PREAMBLE_LENGTH_BITS];
- // for (int i = 1; i < GALILEO_FNAV_PREAMBLE_LENGTH_BITS; i++)
- // {
- // if ((d_preamble_bits[i] * d_page_symbols[i + d_symbol_counter - GALILEO_FNAV_PREAMBLE_LENGTH_BITS]) != corr_sign)
- // {
- // //exit for if one bit doesn't correlate
- // corr_flag = false;
- // break;
- // }
- // }
// check if the preamble starts positive correlated or negative correlated
if (d_page_symbols[d_symbol_counter - GALILEO_FNAV_PREAMBLE_LENGTH_BITS] < 0) // symbols clipping
{
@@ -583,10 +573,6 @@ int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
d_sample_counter++; //count for the processed samples
//3. Make the output (copy the object contents to the GNURadio reserved memory)
*out[0] = current_synchro_data;
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
return 1;
}
diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc
index be09af2be..f7162c58c 100644
--- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc
+++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc
@@ -49,7 +49,7 @@ gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<
return gps_l1_ca_telemetry_decoder_cc_sptr(new gps_l1_ca_telemetry_decoder_cc(satellite, queue, dump));
}
-void gps_l1_ca_telemetry_decoder_cc::forecast (int noutput_items, gr_vector_int &ninput_items_required)
+void gps_l1_ca_telemetry_decoder_cc::forecast (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items_required)
{
ninput_items_required[0] = GPS_CA_PREAMBLE_LENGTH_SYMBOLS; //set the required sample history
}
@@ -142,7 +142,7 @@ bool gps_l1_ca_telemetry_decoder_cc::gps_word_parityCheck(unsigned int gpsword)
}
-int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
+int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
int corr_value = 0;
@@ -234,7 +234,7 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
d_symbol_accumulator += in[0][0].Prompt_I; // accumulate the input value in d_symbol_accumulator
d_symbol_accumulator_counter += in[0][0].correlation_length_ms;
}
- if (d_symbol_accumulator_counter == 20)
+ if (d_symbol_accumulator_counter >= 20)
{
if (d_symbol_accumulator > 0)
{ //symbol to bit
@@ -348,10 +348,6 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
//todo: implement averaging
d_average_count++;
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
if (d_average_count == d_decimation_output_factor)
{
d_average_count = 0;
diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc
index a49d3cfa7..adeb22711 100644
--- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc
+++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc
@@ -57,7 +57,7 @@ gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr queue,
+ boost::shared_ptr queue __attribute__((unused)),
bool dump) :
gr::block("gps_l2_m_telemetry_decoder_cc",
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
@@ -110,7 +110,7 @@ void gps_l2_m_telemetry_decoder_cc::set_decimation(int decimation)
}
-int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
+int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
// get pointers on in- and output gnss-synchro objects
@@ -118,7 +118,7 @@ int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_in
Gnss_Synchro *out = (Gnss_Synchro *) output_items[0]; // output
// store the time stamp of the first sample in the processed sample block
- double sample_stamp = in[0].Tracking_timestamp_secs;
+ //double sample_stamp = in[0].Tracking_timestamp_secs;
bool flag_new_cnav_frame = false;
int last_frame_preamble_start = 0;
@@ -152,7 +152,8 @@ int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_in
// and obtain the bits by decoding the symbols (viterbi decoder)
// they can be already aligned or shifted by one position
std::vector bits;
- bool symbol_alignment = d_symbol_aligner_and_decoder.get_bits(d_sample_buf, bits);
+
+ //bool symbol_alignment = d_symbol_aligner_and_decoder.get_bits(d_sample_buf, bits);
//std::stringstream ss;
//for (std::vector::const_iterator bit_it = bits.begin(); bit_it < bits.end(); ++bit_it)
@@ -260,10 +261,6 @@ int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_in
}
d_average_count++;
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
if (d_average_count == d_decimation_output_factor)
{
d_average_count = 0;
diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc
index 026167790..b7c772888 100644
--- a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc
+++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc
@@ -57,7 +57,7 @@ sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr queue,
+ boost::shared_ptr queue __attribute__((unused)),
bool dump) :
gr::block("sbas_l1_telemetry_decoder_cc",
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
@@ -93,7 +93,7 @@ void sbas_l1_telemetry_decoder_cc::forecast (int noutput_items, gr_vector_int &n
-int sbas_l1_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
+int sbas_l1_telemetry_decoder_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
VLOG(FLOW) << "general_work(): " << "noutput_items=" << noutput_items << "\toutput_items real size=" << output_items.size() << "\tninput_items size=" << ninput_items.size() << "\tinput_items real size=" << input_items.size() << "\tninput_items[0]=" << ninput_items[0];
@@ -182,10 +182,6 @@ int sbas_l1_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_int
current_synchro_data[i].Flag_valid_word = false; // indicate to observable block that this synchro object isn't valid for pseudorange computation
}
consume_each(noutput_items); // tell scheduler input items consumed
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
return noutput_items; // tell scheduler output items produced
}
diff --git a/src/algorithms/tracking/adapters/CMakeLists.txt b/src/algorithms/tracking/adapters/CMakeLists.txt
index 3d146f646..c9841612c 100644
--- a/src/algorithms/tracking/adapters/CMakeLists.txt
+++ b/src/algorithms/tracking/adapters/CMakeLists.txt
@@ -24,7 +24,6 @@ endif(ENABLE_CUDA)
set(TRACKING_ADAPTER_SOURCES
galileo_e1_dll_pll_veml_tracking.cc
galileo_e1_tcp_connector_tracking.cc
- gps_l1_ca_dll_fll_pll_tracking.cc
gps_l1_ca_dll_pll_tracking.cc
gps_l1_ca_dll_pll_c_aid_tracking.cc
gps_l1_ca_tcp_connector_tracking.cc
diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_fll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_fll_pll_tracking.cc
deleted file mode 100644
index 265b3eedb..000000000
--- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_fll_pll_tracking.cc
+++ /dev/null
@@ -1,163 +0,0 @@
-/*!
- * \file gps_l1_ca_dll_fll_pll_tracking.cc
- * \brief Implementation of an adapter of a code DLL + carrier FLL/PLL tracking
- * loop for GPS L1 C/A to a TrackingInterface
- * \author Javier Arribas, 2011. jarribas(at)cttc.es
- *
- * This file implements the code Delay Locked Loop (DLL) + carrier Phase
- * Locked Loop (PLL) helped with a carrier Frequency Locked Loop (FLL)
- * according to the algorithms described in:
- * E.D. Kaplan and C. Hegarty, Understanding GPS. Principles and
- * Applications, Second Edition, Artech House Publishers, 2005.
- *
- * -------------------------------------------------------------------------
- *
- * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
- *
- * GNSS-SDR is a software defined Global Navigation
- * Satellite Systems receiver
- *
- * This file is part of GNSS-SDR.
- *
- * GNSS-SDR is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GNSS-SDR is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNSS-SDR. If not, see .
- *
- * -------------------------------------------------------------------------
- */
-
-#include "gps_l1_ca_dll_fll_pll_tracking.h"
-#include
-#include "GPS_L1_CA.h"
-#include "configuration_interface.h"
-
-
-using google::LogMessage;
-
-GpsL1CaDllFllPllTracking::GpsL1CaDllFllPllTracking(
- ConfigurationInterface* configuration,
- std::string role,
- unsigned int in_streams, unsigned int
- out_streams,
- boost::shared_ptr queue) :
- role_(role),
- in_streams_(in_streams),
- out_streams_(out_streams),
- queue_(queue)
-{
- DLOG(INFO) << "role " << role;
- //################# CONFIGURATION PARAMETERS ########################
- int fs_in;
- int vector_length;
- int f_if;
- bool dump;
- std::string dump_filename;
- std::string item_type;
- std::string default_item_type = "gr_complex";
- float pll_bw_hz;
- float fll_bw_hz;
- float dll_bw_hz;
- float early_late_space_chips;
- int order;
- item_type = configuration->property(role + ".item_type",default_item_type);
- //vector_length = configuration->property(role + ".vector_length", 2048);
- fs_in = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
- f_if = configuration->property(role + ".if", 0);
- dump = configuration->property(role + ".dump", false);
- order = configuration->property(role + ".order", 2);
- pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
- fll_bw_hz = configuration->property(role + ".fll_bw_hz", 100.0);
- dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
- early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
- std::string default_dump_filename = "./track_ch";
- dump_filename = configuration->property(role + ".dump_filename",
- default_dump_filename); //unused!
- vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
-
- //################# MAKE TRACKING GNURadio object ###################
- if (item_type.compare("gr_complex") == 0)
- {
- item_size_ = sizeof(gr_complex);
- tracking_ = gps_l1_ca_dll_fll_pll_make_tracking_cc(
- f_if,
- fs_in,
- vector_length,
- queue_,
- dump,
- dump_filename,
- order,
- fll_bw_hz,
- pll_bw_hz,
- dll_bw_hz,
- early_late_space_chips);
- }
- else
- {
- item_size_ = sizeof(gr_complex);
- LOG(WARNING) << item_type << " unknown tracking item type.";
- }
- channel_ = 0;
- channel_internal_queue_ = 0;
-
- DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")";
-}
-
-
-GpsL1CaDllFllPllTracking::~GpsL1CaDllFllPllTracking()
-{}
-
-
-void GpsL1CaDllFllPllTracking::start_tracking()
-{
- tracking_->start_tracking();
-}
-
-void GpsL1CaDllFllPllTracking::set_channel(unsigned int channel)
-{
- channel_ = channel;
- tracking_->set_channel(channel);
-}
-
-void GpsL1CaDllFllPllTracking::set_channel_queue(
- concurrent_queue *channel_internal_queue)
-{
- channel_internal_queue_ = channel_internal_queue;
- tracking_->set_channel_queue(channel_internal_queue_);
-}
-
-void GpsL1CaDllFllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
-{
- return tracking_->set_gnss_synchro(p_gnss_synchro);
-}
-
-void GpsL1CaDllFllPllTracking::connect(gr::top_block_sptr top_block)
-{
- if(top_block) { /* top_block is not null */};
- //nothing to connect, now the tracking uses gr_sync_decimator
-}
-
-void GpsL1CaDllFllPllTracking::disconnect(gr::top_block_sptr top_block)
-{
- if(top_block) { /* top_block is not null */};
- //nothing to disconnect, now the tracking uses gr_sync_decimator
-}
-
-gr::basic_block_sptr GpsL1CaDllFllPllTracking::get_left_block()
-{
- return tracking_;
-}
-
-gr::basic_block_sptr GpsL1CaDllFllPllTracking::get_right_block()
-{
- return tracking_;
-}
-
diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_fll_pll_tracking.h b/src/algorithms/tracking/adapters/gps_l1_ca_dll_fll_pll_tracking.h
deleted file mode 100644
index 7fd84a9d7..000000000
--- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_fll_pll_tracking.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*!
- * \file gps_l1_ca_dll_fll_pll_tracking.h
- * \brief Interface of an adapter of a code DLL + carrier FLL/PLL tracking
- * loop for GPS L1 C/A to a TrackingInterface
- * \author Javier Arribas, 2011. jarribas(at)cttc.es
- *
- * This is the interface of a code Delay Locked Loop (DLL) + carrier
- * Phase Locked Loop (PLL) helped with a carrier Frequency Locked Loop (FLL)
- * according to the algorithms described in:
- * E.D. Kaplan and C. Hegarty, Understanding GPS. Principles and
- * Applications, Second Edition, Artech House Publishers, 2005.
- *
- * -------------------------------------------------------------------------
- *
- * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
- *
- * GNSS-SDR is a software defined Global Navigation
- * Satellite Systems receiver
- *
- * This file is part of GNSS-SDR.
- *
- * GNSS-SDR is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GNSS-SDR is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNSS-SDR. If not, see .
- *
- * -------------------------------------------------------------------------
- */
-
-#ifndef GNSS_SDR_GPS_L1_CA_DLL_FLL_PLL_TRACKING_H_
-#define GNSS_SDR_GPS_L1_CA_DLL_FLL_PLL_TRACKING_H_
-
-#include
-#include
-#include "tracking_interface.h"
-#include "gps_l1_ca_dll_fll_pll_tracking_cc.h"
-
-
-class ConfigurationInterface;
-
-/*!
- * \brief This class implements a code DLL + carrier PLL/FLL Assisted tracking loop
- */
-class GpsL1CaDllFllPllTracking : public TrackingInterface
-{
-public:
- GpsL1CaDllFllPllTracking(ConfigurationInterface* configuration,
- std::string role,
- unsigned int in_streams,
- unsigned int out_streams,
- boost::shared_ptr queue);
-
- virtual ~GpsL1CaDllFllPllTracking();
-
- std::string role()
- {
- return role_;
- }
-
- //! Returns "GPS_L1_CA_DLL_FLL_PLL_Tracking"
- std::string implementation()
- {
- return "GPS_L1_CA_DLL_FLL_PLL_Tracking";
- }
- size_t item_size()
- {
- return item_size_;
- }
-
- void connect(gr::top_block_sptr top_block);
- void disconnect(gr::top_block_sptr top_block);
- gr::basic_block_sptr get_left_block();
- gr::basic_block_sptr get_right_block();
-
- void set_channel(unsigned int channel);
- void set_channel_queue(concurrent_queue *channel_internal_queue);
- void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro);
- void start_tracking();
-
-private:
- gps_l1_ca_dll_fll_pll_tracking_cc_sptr tracking_;
- size_t item_size_;
- unsigned int channel_;
- std::string role_;
- unsigned int in_streams_;
- unsigned int out_streams_;
- boost::shared_ptr queue_;
- concurrent_queue *channel_internal_queue_;
-};
-
-#endif // GPS_L1_CA_DLL_FLL_PLL_TRACKING_H_
diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc
index f21e73b94..0ca1c9142 100644
--- a/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc
+++ b/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc
@@ -59,8 +59,6 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking(
std::string dump_filename;
std::string item_type;
std::string default_item_type = "gr_complex";
- float pll_bw_hz;
- float dll_bw_hz;
float early_late_space_chips;
size_t port_ch0;
item_type = configuration->property(role + ".item_type",default_item_type);
@@ -68,8 +66,6 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking(
fs_in = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
f_if = configuration->property(role + ".if", 0);
dump = configuration->property(role + ".dump", false);
- pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
- dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
port_ch0 = configuration->property(role + ".port_ch0", 2060);
std::string default_dump_filename = "./track_ch";
@@ -87,8 +83,6 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking(
queue_,
dump,
dump_filename,
- pll_bw_hz,
- dll_bw_hz,
early_late_space_chips,
port_ch0);
}
diff --git a/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt
index 3a583b7b0..1e2fe27b2 100644
--- a/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt
+++ b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt
@@ -25,7 +25,6 @@ endif(ENABLE_CUDA)
set(TRACKING_GR_BLOCKS_SOURCES
galileo_e1_dll_pll_veml_tracking_cc.cc
galileo_e1_tcp_connector_tracking_cc.cc
- gps_l1_ca_dll_fll_pll_tracking_cc.cc
gps_l1_ca_dll_pll_tracking_cc.cc
gps_l1_ca_tcp_connector_tracking_cc.cc
galileo_e5a_dll_pll_tracking_cc.cc
diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc
index 46f25fc08..343ec972a 100755
--- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc
+++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc
@@ -42,7 +42,7 @@
#include
#include
#include
-#include
+#include
#include "galileo_e1_signal_processing.h"
#include "tracking_discriminators.h"
#include "lock_detectors.h"
@@ -129,11 +129,11 @@ galileo_e1_dll_pll_veml_tracking_cc::galileo_e1_dll_pll_veml_tracking_cc(
// Initialization of local code replica
// Get space for a vector with the sinboc(1,1) replica sampled 2x/chip
- d_ca_code = static_cast(volk_gnsssdr_malloc((2*Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
+ d_ca_code = static_cast(volk_malloc((2*Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_get_alignment()));
// correlator outputs (scalar)
d_n_correlator_taps = 5; // Very-Early, Early, Prompt, Late, Very-Late
- d_correlator_outs = static_cast(volk_gnsssdr_malloc(d_n_correlator_taps*sizeof(gr_complex), volk_gnsssdr_get_alignment()));
+ d_correlator_outs = static_cast(volk_malloc(d_n_correlator_taps*sizeof(gr_complex), volk_get_alignment()));
for (int n = 0; n < d_n_correlator_taps; n++)
{
d_correlator_outs[n] = gr_complex(0,0);
@@ -145,7 +145,7 @@ galileo_e1_dll_pll_veml_tracking_cc::galileo_e1_dll_pll_veml_tracking_cc(
d_Late = &d_correlator_outs[3];
d_Very_Late = &d_correlator_outs[4];
- d_local_code_shift_chips = static_cast(volk_gnsssdr_malloc(d_n_correlator_taps * sizeof(float), volk_gnsssdr_get_alignment()));
+ d_local_code_shift_chips = static_cast(volk_malloc(d_n_correlator_taps * sizeof(float), volk_get_alignment()));
// Set TAPs delay values [chips]
d_local_code_shift_chips[0] = - d_very_early_late_spc_chips * 2.0;
d_local_code_shift_chips[1] = - d_very_early_late_spc_chips;
@@ -172,7 +172,6 @@ galileo_e1_dll_pll_veml_tracking_cc::galileo_e1_dll_pll_veml_tracking_cc(
d_enable_tracking = false;
d_pull_in = false;
- d_last_seg = 0;
d_current_prn_length_samples = static_cast(d_vector_length);
@@ -253,9 +252,9 @@ galileo_e1_dll_pll_veml_tracking_cc::~galileo_e1_dll_pll_veml_tracking_cc()
{
d_dump_file.close();
- volk_gnsssdr_free(d_local_code_shift_chips);
- volk_gnsssdr_free(d_correlator_outs);
- volk_gnsssdr_free(d_ca_code);
+ volk_free(d_local_code_shift_chips);
+ volk_free(d_correlator_outs);
+ volk_free(d_ca_code);
delete[] d_Prompt_buffer;
multicorrelator_cpu.free();
@@ -263,7 +262,7 @@ galileo_e1_dll_pll_veml_tracking_cc::~galileo_e1_dll_pll_veml_tracking_cc()
-int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
+int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
double carr_error_hz = 0.0;
@@ -416,49 +415,9 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items, gr_vec
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
current_synchro_data.Flag_valid_pseudorange = false;
*out[0] = current_synchro_data;
-
- // ########## DEBUG OUTPUT
- /*!
- * \todo The stop timer has to be moved to the signal source!
- */
- // stream to collect cout calls to improve thread safety
- std::stringstream tmp_str_stream;
- if (std::floor(d_sample_counter / d_fs_in) != d_last_seg)
- {
- d_last_seg = std::floor(d_sample_counter / d_fs_in);
-
- if (d_channel == 0)
- {
- // debug: Second counter in channel 0
- tmp_str_stream << "Current input signal time = " << d_last_seg << " [s]" << std::endl << std::flush;
- std::cout << tmp_str_stream.rdbuf() << std::flush;
- }
-
- tmp_str_stream << "Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
- << ", Doppler=" << d_carrier_doppler_hz << " [Hz] CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
- LOG(INFO) << tmp_str_stream.rdbuf() << std::flush;
- //if (d_channel == 0 || d_last_seg==5) d_carrier_lock_fail_counter=500; //DEBUG: force unlock!
- }
}
else
{
- // ########## DEBUG OUTPUT (TIME ONLY for channel 0 when tracking is disabled)
- /*!
- * \todo The stop timer has to be moved to the signal source!
- */
- // stream to collect cout calls to improve thread safety
- std::stringstream tmp_str_stream;
- if (std::floor(d_sample_counter / d_fs_in) != d_last_seg)
- {
- d_last_seg = std::floor(d_sample_counter / d_fs_in);
-
- if (d_channel == 0)
- {
- // debug: Second counter in channel 0
- tmp_str_stream << "Current input signal time = " << d_last_seg << " [s]" << std::endl << std::flush;
- std::cout << tmp_str_stream.rdbuf() << std::flush;
- }
- }
*d_Early = gr_complex(0,0);
*d_Prompt = gr_complex(0,0);
*d_Late = gr_complex(0,0);
@@ -526,7 +485,7 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items, gr_vec
tmp_double = static_cast(d_sample_counter + d_current_prn_length_samples);
d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double));
}
- catch (std::ifstream::failure e)
+ catch (const std::ifstream::failure &e)
{
LOG(WARNING) << "Exception writing trk dump file " << e.what() << std::endl;
}
@@ -534,10 +493,6 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items, gr_vec
consume_each(d_current_prn_length_samples); // this is required for gr_block derivates
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}
@@ -560,7 +515,7 @@ void galileo_e1_dll_pll_veml_tracking_cc::set_channel(unsigned int channel)
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str();
}
- catch (std::ifstream::failure e)
+ catch (const std::ifstream::failure &e)
{
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what() << std::endl;
}
diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h
index 5d073ca6f..f443f561a 100755
--- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h
+++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h
@@ -119,7 +119,6 @@ private:
Gnss_Synchro* d_acquisition_gnss_synchro;
unsigned int d_channel;
- int d_last_seg;
long d_if_freq;
long d_fs_in;
diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc
index e84b01fc1..49848e409 100644
--- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc
+++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc
@@ -100,8 +100,8 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
boost::shared_ptr queue,
bool dump,
std::string dump_filename,
- float pll_bw_hz,
- float dll_bw_hz,
+ float pll_bw_hz __attribute__((unused)),
+ float dll_bw_hz __attribute__((unused)),
float early_late_space_chips,
float very_early_late_space_chips,
size_t port_ch0):
@@ -133,22 +133,33 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
// Initialization of local code replica
// Get space for a vector with the sinboc(1,1) replica sampled 2x/chip
- d_ca_code = static_cast(volk_malloc(((2 * Galileo_E1_B_CODE_LENGTH_CHIPS + 4)) * sizeof(gr_complex), volk_get_alignment()));
-
- d_very_early_code = static_cast(volk_malloc(2 * d_vector_length * sizeof(gr_complex), volk_get_alignment()));
- d_early_code = static_cast(volk_malloc(2 * d_vector_length * sizeof(gr_complex), volk_get_alignment()));
- d_prompt_code = static_cast(volk_malloc(2 * d_vector_length * sizeof(gr_complex), volk_get_alignment()));
- d_late_code = static_cast(volk_malloc(2 * d_vector_length * sizeof(gr_complex), volk_get_alignment()));
- d_very_late_code = static_cast(volk_malloc(2 * d_vector_length * sizeof(gr_complex), volk_get_alignment()));
- d_carr_sign = static_cast(volk_malloc(2 * d_vector_length * sizeof(gr_complex), volk_get_alignment()));
+ d_ca_code = static_cast(volk_malloc((2*Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_get_alignment()));
// correlator outputs (scalar)
+ d_n_correlator_taps = 5; // Very-Early, Early, Prompt, Late, Very-Late
+ d_correlator_outs = static_cast(volk_malloc(d_n_correlator_taps*sizeof(gr_complex), volk_get_alignment()));
+ for (int n = 0; n < d_n_correlator_taps; n++)
+ {
+ d_correlator_outs[n] = gr_complex(0,0);
+ }
+ // map memory pointers of correlator outputs
+ d_Very_Early = &d_correlator_outs[0];
+ d_Early = &d_correlator_outs[1];
+ d_Prompt = &d_correlator_outs[2];
+ d_Late = &d_correlator_outs[3];
+ d_Very_Late = &d_correlator_outs[4];
- d_Very_Early = static_cast(volk_malloc(sizeof(gr_complex), volk_get_alignment()));
- d_Early = static_cast(volk_malloc(sizeof(gr_complex), volk_get_alignment()));
- d_Prompt = static_cast(volk_malloc(sizeof(gr_complex), volk_get_alignment()));
- d_Late = static_cast(volk_malloc(sizeof(gr_complex), volk_get_alignment()));
- d_Very_Late = static_cast(volk_malloc(sizeof(gr_complex), volk_get_alignment()));
+ d_local_code_shift_chips = static_cast(volk_malloc(d_n_correlator_taps * sizeof(float), volk_get_alignment()));
+ // Set TAPs delay values [chips]
+ d_local_code_shift_chips[0] = - d_very_early_late_spc_chips * 2.0;
+ d_local_code_shift_chips[1] = - d_very_early_late_spc_chips;
+ d_local_code_shift_chips[2] = 0.0;
+ d_local_code_shift_chips[3] = d_very_early_late_spc_chips;
+ d_local_code_shift_chips[4] = d_very_early_late_spc_chips * 2.0;
+
+ d_correlation_length_samples=d_vector_length;
+
+ multicorrelator_cpu.init(2 * d_correlation_length_samples, d_n_correlator_taps);
//--- Perform initializations ------------------------------
// define initial code frequency basis of NCO
@@ -164,7 +175,6 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
d_enable_tracking = false;
d_pull_in = false;
- d_last_seg = 0;
d_current_prn_length_samples = (int)d_vector_length;
@@ -198,18 +208,19 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::start_tracking()
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
- // generate local reference ALWAYS starting at chip 2 (2 samples per chip)
- galileo_e1_code_gen_complex_sampled(&d_ca_code[2],
+ // generate local reference ALWAYS starting at chip 1 (2 samples per chip)
+ galileo_e1_code_gen_complex_sampled(d_ca_code,
d_acquisition_gnss_synchro->Signal,
false,
d_acquisition_gnss_synchro->PRN,
- 2*Galileo_E1_CODE_CHIP_RATE_HZ,
+ 2 * Galileo_E1_CODE_CHIP_RATE_HZ,
0);
- // Fill head and tail
- d_ca_code[0] = d_ca_code[(int)(2*Galileo_E1_B_CODE_LENGTH_CHIPS)];
- d_ca_code[1] = d_ca_code[(int)(2*Galileo_E1_B_CODE_LENGTH_CHIPS+1)];
- d_ca_code[(int)(2*Galileo_E1_B_CODE_LENGTH_CHIPS+2)] = d_ca_code[2];
- d_ca_code[(int)(2*Galileo_E1_B_CODE_LENGTH_CHIPS+3)] = d_ca_code[3];
+
+ multicorrelator_cpu.set_local_code_and_taps(static_cast(2*Galileo_E1_B_CODE_LENGTH_CHIPS), d_ca_code, d_local_code_shift_chips);
+ for (int n = 0; n < d_n_correlator_taps; n++)
+ {
+ d_correlator_outs[n] = gr_complex(0,0);
+ }
d_carrier_lock_fail_counter = 0;
d_rem_code_phase_samples = 0.0;
@@ -235,82 +246,21 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::start_tracking()
}
-void Galileo_E1_Tcp_Connector_Tracking_cc::update_local_code()
-{
- double tcode_half_chips;
- float rem_code_phase_half_chips;
- int associated_chip_index;
- int code_length_half_chips = (int)(2*Galileo_E1_B_CODE_LENGTH_CHIPS);
- double code_phase_step_chips;
- double code_phase_step_half_chips;
- int early_late_spc_samples;
- int very_early_late_spc_samples;
- int epl_loop_length_samples;
-
- // unified loop for VE, E, P, L, VL code vectors
- code_phase_step_chips = ((double)d_code_freq_chips) / ((double)d_fs_in);
- code_phase_step_half_chips = (2.0*(double)d_code_freq_chips) / ((double)d_fs_in);
-
- rem_code_phase_half_chips = d_rem_code_phase_samples * (2*d_code_freq_chips / d_fs_in);
- tcode_half_chips = -(double)rem_code_phase_half_chips;
-
- early_late_spc_samples = round(d_early_late_spc_chips / code_phase_step_chips);
- very_early_late_spc_samples = round(d_very_early_late_spc_chips / code_phase_step_chips);
-
- epl_loop_length_samples = d_current_prn_length_samples + very_early_late_spc_samples*2;
-
- for (int i = 0; i < epl_loop_length_samples; i++)
- {
- associated_chip_index = 2 + round(fmod(tcode_half_chips - 2*d_very_early_late_spc_chips, code_length_half_chips));
- d_very_early_code[i] = d_ca_code[associated_chip_index];
- tcode_half_chips = tcode_half_chips + code_phase_step_half_chips;
- }
- memcpy(d_early_code, &d_very_early_code[very_early_late_spc_samples - early_late_spc_samples], d_current_prn_length_samples* sizeof(gr_complex));
- memcpy(d_prompt_code, &d_very_early_code[very_early_late_spc_samples], d_current_prn_length_samples* sizeof(gr_complex));
- memcpy(d_late_code, &d_very_early_code[2*very_early_late_spc_samples - early_late_spc_samples], d_current_prn_length_samples* sizeof(gr_complex));
- memcpy(d_very_late_code, &d_very_early_code[2*very_early_late_spc_samples], d_current_prn_length_samples* sizeof(gr_complex));
-}
-
-
-void Galileo_E1_Tcp_Connector_Tracking_cc::update_local_carrier()
-{
- float phase_rad, phase_step_rad;
- // Compute the carrier phase step for the K-1 carrier Doppler estimation
- phase_step_rad = (float)GPS_TWO_PI*d_carrier_doppler_hz / (float)d_fs_in;
- // Initialize the carrier phase with the remnant carrier phase of the K-2 loop
- phase_rad = d_rem_carr_phase_rad;
- for(int i = 0; i < d_current_prn_length_samples; i++)
- {
- d_carr_sign[i] = gr_complex(cos(phase_rad), -sin(phase_rad));
- phase_rad += phase_step_rad;
- }
-}
-
-
Galileo_E1_Tcp_Connector_Tracking_cc::~Galileo_E1_Tcp_Connector_Tracking_cc()
{
d_dump_file.close();
- volk_free(d_very_early_code);
- volk_free(d_early_code);
- volk_free(d_prompt_code);
- volk_free(d_late_code);
- volk_free(d_very_late_code);
- volk_free(d_carr_sign);
- volk_free(d_Very_Early);
- volk_free(d_Early);
- volk_free(d_Prompt);
- volk_free(d_Late);
- volk_free(d_Very_Late);
- volk_free(d_ca_code);
-
delete[] d_Prompt_buffer;
+ volk_free(d_ca_code);
+ volk_free(d_local_code_shift_chips);
+ volk_free(d_correlator_outs);
d_tcp_com.close_tcp_connection(d_port);
+ multicorrelator_cpu.free();
}
-int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
+int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
// process vars
@@ -346,24 +296,19 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_ve
const gr_complex* in = (gr_complex*) input_items[0];
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0];
- // Generate local code and carrier replicas (using \hat{f}_d(k-1))
- update_local_code();
- update_local_carrier();
+ // ################# CARRIER WIPEOFF AND CORRELATORS ##############################
+ // perform carrier wipe-off and compute Early, Prompt and Late correlation
+ multicorrelator_cpu.set_input_output_vectors(d_correlator_outs,in);
- // perform Early, Prompt and Late correlation
- d_correlator.Carrier_wipeoff_and_VEPL_volk(d_current_prn_length_samples,
- in,
- d_carr_sign,
- d_very_early_code,
- d_early_code,
- d_prompt_code,
- d_late_code,
- d_very_late_code,
- d_Very_Early,
- d_Early,
- d_Prompt,
- d_Late,
- d_Very_Late);
+ double carr_phase_step_rad = GALILEO_TWO_PI * d_carrier_doppler_hz / static_cast(d_fs_in);
+ double code_phase_step_half_chips = (2.0 * d_code_freq_chips) / (static_cast(d_fs_in));
+ double rem_code_phase_half_chips = d_rem_code_phase_samples * (2.0*d_code_freq_chips / d_fs_in);
+ multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(
+ d_rem_carr_phase_rad,
+ carr_phase_step_rad,
+ rem_code_phase_half_chips,
+ code_phase_step_half_chips,
+ d_correlation_length_samples);
// ################## TCP CONNECTOR ##########################################################
//! Variable used for control
@@ -474,52 +419,9 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_ve
current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz;
current_synchro_data.Flag_valid_pseudorange = false;
*out[0] = current_synchro_data;
-
- // ########## DEBUG OUTPUT
- /*!
- * \todo The stop timer has to be moved to the signal source!
- */
- // debug: Second counter in channel 0
- if (d_channel == 0)
- {
- if (floor(d_sample_counter / d_fs_in) != d_last_seg)
- {
- d_last_seg = floor(d_sample_counter / d_fs_in);
- std::cout << "Current input signal time = " << d_last_seg << " [s]" << std::endl;
- LOG(INFO) << "Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
- << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]";
- }
- }
- else
- {
- if (floor(d_sample_counter / d_fs_in) != d_last_seg)
- {
- d_last_seg = floor(d_sample_counter / d_fs_in);
- LOG(INFO) << "Tracking CH " << d_channel
- << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
- << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]";
- }
- }
}
else
{
- // ########## DEBUG OUTPUT (TIME ONLY for channel 0 when tracking is disabled)
- /*!
- * \todo The stop timer has to be moved to the signal source!
- */
- // stream to collect cout calls to improve thread safety
- std::stringstream tmp_str_stream;
- if (floor(d_sample_counter / d_fs_in) != d_last_seg)
- {
- d_last_seg = floor(d_sample_counter / d_fs_in);
-
- if (d_channel == 0)
- {
- // debug: Second counter in channel 0
- tmp_str_stream << "Current input signal time = " << d_last_seg << " [s]" << std::endl << std::flush;
- std::cout << tmp_str_stream.rdbuf() << std::flush;
- }
- }
*d_Early = gr_complex(0,0);
*d_Prompt = gr_complex(0,0);
*d_Late = gr_complex(0,0);
@@ -588,17 +490,14 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_ve
tmp_double = (double)(d_sample_counter+d_current_prn_length_samples);
d_dump_file.write((char*)&tmp_double, sizeof(double));
}
- catch (std::ifstream::failure e)
+ catch (const std::ifstream::failure &e)
{
LOG(WARNING) << "Exception writing trk dump file " << e.what();
}
}
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
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
+
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}
@@ -621,7 +520,7 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::set_channel(unsigned int channel)
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str();
}
- catch (std::ifstream::failure e)
+ catch (const std::ifstream::failure &e)
{
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
}
diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h
index e57586d61..7c9f4acf4 100644
--- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h
+++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h
@@ -46,7 +46,8 @@
#include
#include "concurrent_queue.h"
#include "gnss_synchro.h"
-#include "correlator.h"
+#include
+#include "cpu_multicorrelator.h"
#include "tcp_communication.h"
@@ -123,22 +124,17 @@ private:
Gnss_Synchro* d_acquisition_gnss_synchro;
unsigned int d_channel;
- int d_last_seg;
+
long d_if_freq;
long d_fs_in;
+ int d_correlation_length_samples;
+ int d_n_correlator_taps;
float d_early_late_spc_chips;
float d_very_early_late_spc_chips;
gr_complex* d_ca_code;
- gr_complex* d_very_early_code;
- gr_complex* d_early_code;
- gr_complex* d_prompt_code;
- gr_complex* d_late_code;
- gr_complex* d_very_late_code;
- gr_complex* d_carr_sign;
-
gr_complex *d_Very_Early;
gr_complex *d_Early;
gr_complex *d_Prompt;
@@ -155,7 +151,9 @@ private:
float d_acq_carrier_doppler_hz;
// correlator
- Correlator d_correlator;
+ float* d_local_code_shift_chips;
+ gr_complex* d_correlator_outs;
+ cpu_multicorrelator multicorrelator_cpu;
// tracking vars
double d_code_freq_chips;
@@ -172,7 +170,6 @@ private:
//PRN period in samples
int d_current_prn_length_samples;
int d_next_prn_length_samples;
- //double d_sample_counter_seconds;
//processing samples counters
unsigned long int d_sample_counter;
diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc
index 09c4b0d45..4722bd0d2 100644
--- a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc
+++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.cc
@@ -137,20 +137,34 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc(
// Initialization of local code replica
// Get space for a vector with the E5a primary code replicas sampled 1x/chip
- d_codeQ = new gr_complex[static_cast(Galileo_E5a_CODE_LENGTH_CHIPS) + 2];
- d_codeI = new gr_complex[static_cast(Galileo_E5a_CODE_LENGTH_CHIPS) + 2];
+ d_codeQ = static_cast(volk_malloc(Galileo_E5a_CODE_LENGTH_CHIPS * sizeof(gr_complex), volk_get_alignment()));
+ d_codeI = static_cast(volk_malloc(Galileo_E5a_CODE_LENGTH_CHIPS * sizeof(gr_complex), volk_get_alignment()));
- d_early_code = static_cast(volk_malloc(2 * d_vector_length * sizeof(gr_complex), volk_get_alignment()));
- d_late_code = static_cast(volk_malloc(2 * d_vector_length * sizeof(gr_complex), volk_get_alignment()));
- d_prompt_code = static_cast(volk_malloc(2 * d_vector_length * sizeof(gr_complex), volk_get_alignment()));
- d_prompt_data_code = static_cast(volk_malloc(2 * d_vector_length * sizeof(gr_complex), volk_get_alignment()));
- d_carr_sign = static_cast(volk_malloc(2 * d_vector_length * sizeof(gr_complex), volk_get_alignment()));
+ // correlator Q outputs (scalar)
+ d_n_correlator_taps = 3; // Early, Prompt, Late
+ d_correlator_outs = static_cast(volk_malloc(d_n_correlator_taps*sizeof(gr_complex), volk_get_alignment()));
+ for (int n = 0; n < d_n_correlator_taps; n++)
+ {
+ d_correlator_outs[n] = gr_complex(0,0);
+ }
- // correlator outputs (complex number)
- d_Early = gr_complex(0, 0);
- d_Prompt = gr_complex(0, 0);
- d_Late = gr_complex(0, 0);
- d_Prompt_data = gr_complex(0, 0);
+ // map memory pointers of correlator outputs
+ d_Single_Early = &d_correlator_outs[0];
+ d_Single_Prompt = &d_correlator_outs[1];
+ d_Single_Late = &d_correlator_outs[2];
+
+ d_local_code_shift_chips = static_cast(volk_malloc(d_n_correlator_taps * sizeof(float), volk_get_alignment()));
+ // Set TAPs delay values [chips]
+ d_local_code_shift_chips[0] = - d_early_late_spc_chips;
+ d_local_code_shift_chips[1] = 0.0;
+ d_local_code_shift_chips[2] = d_early_late_spc_chips;
+
+ multicorrelator_cpu_Q.init(2 * d_vector_length, d_n_correlator_taps);
+
+ // correlator I single output for data (scalar)
+ d_Single_Prompt_data=static_cast(volk_malloc(sizeof(gr_complex), volk_get_alignment()));
+ *d_Single_Prompt_data = gr_complex(0,0);
+ multicorrelator_cpu_I.init(2 * d_vector_length, 1); // single correlator for data channel
//--- Perform initializations ------------------------------
// define initial code frequency basis of NCO
@@ -164,7 +178,6 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc(
// sample synchronization
d_sample_counter = 0;
d_acq_sample_stamp = 0;
- d_last_seg = 0;
d_first_transition = false;
d_secondary_lock = false;
@@ -203,14 +216,18 @@ Galileo_E5a_Dll_Pll_Tracking_cc::~Galileo_E5a_Dll_Pll_Tracking_cc ()
{
d_dump_file.close();
- volk_free(d_prompt_code);
- volk_free(d_late_code);
- volk_free(d_early_code);
- volk_free(d_carr_sign);
- volk_free(d_prompt_data_code);
delete[] d_codeI;
delete[] d_codeQ;
delete[] d_Prompt_buffer;
+
+ d_dump_file.close();
+
+ volk_free(d_local_code_shift_chips);
+ volk_free(d_correlator_outs);
+ volk_free(d_Single_Prompt_data);
+
+ multicorrelator_cpu_Q.free();
+ multicorrelator_cpu_I.free();
}
@@ -268,14 +285,10 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::start_tracking()
// generate local reference ALWAYS starting at chip 1 (1 sample per chip)
char sig[3];
strcpy(sig,"5Q");
- galileo_e5_a_code_gen_complex_primary(&d_codeQ[1], d_acquisition_gnss_synchro->PRN, sig);
- d_codeQ[0] = d_codeQ[static_cast(Galileo_E5a_CODE_LENGTH_CHIPS)];
- d_codeQ[static_cast(Galileo_E5a_CODE_LENGTH_CHIPS) + 1] = d_codeQ[1];
+ galileo_e5_a_code_gen_complex_primary(d_codeQ, d_acquisition_gnss_synchro->PRN, sig);
strcpy(sig,"5I");
- galileo_e5_a_code_gen_complex_primary(&d_codeI[1], d_acquisition_gnss_synchro->PRN, sig);
- d_codeI[0] = d_codeI[static_cast(Galileo_E5a_CODE_LENGTH_CHIPS)];
- d_codeI[static_cast(Galileo_E5a_CODE_LENGTH_CHIPS) + 1] = d_codeI[1];
+ galileo_e5_a_code_gen_complex_primary(d_codeI, d_acquisition_gnss_synchro->PRN, sig);
d_carrier_lock_fail_counter = 0;
d_rem_code_phase_samples = 0;
@@ -299,6 +312,7 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::start_tracking()
LOG(INFO) << "PULL-IN Doppler [Hz]=" << d_carrier_doppler_hz
<< " Code Phase correction [samples]=" << delay_correction_samples
<< " PULL-IN Code Phase [samples]=" << d_acq_code_phase_samples;
+
}
@@ -355,57 +369,7 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary()
}
-void Galileo_E5a_Dll_Pll_Tracking_cc::update_local_code()
-{
- double tcode_chips;
- double rem_code_phase_chips;
- int associated_chip_index;
- int associated_chip_index_data;
- int code_length_chips = static_cast(Galileo_E5a_CODE_LENGTH_CHIPS);
- double code_phase_step_chips;
- int early_late_spc_samples;
- int epl_loop_length_samples;
-
- // unified loop for E, P, L code vectors
- code_phase_step_chips = d_code_freq_chips / static_cast(d_fs_in);
- rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / d_fs_in);
- tcode_chips = -rem_code_phase_chips;
-
- // Alternative EPL code generation (40% of speed improvement!)
- early_late_spc_samples = round(d_early_late_spc_chips / code_phase_step_chips);
- epl_loop_length_samples = d_current_prn_length_samples + early_late_spc_samples * 2;
-
- for (int i = 0; i < epl_loop_length_samples; i++)
- {
- associated_chip_index = 1 + round(fmod(tcode_chips - d_early_late_spc_chips, code_length_chips));
- associated_chip_index_data = 1 + round(fmod(tcode_chips, code_length_chips));
- d_early_code[i] = d_codeQ[associated_chip_index];
- d_prompt_data_code[i] = d_codeI[associated_chip_index_data];
- tcode_chips = tcode_chips + code_phase_step_chips;
- }
- memcpy(d_prompt_code, &d_early_code[early_late_spc_samples], d_current_prn_length_samples * sizeof(gr_complex));
- memcpy(d_late_code, &d_early_code[early_late_spc_samples * 2], d_current_prn_length_samples * sizeof(gr_complex));
-
-}
-
-
-void Galileo_E5a_Dll_Pll_Tracking_cc::update_local_carrier()
-{
- float sin_f, cos_f;
- float phase_step_rad = static_cast(2.0 * GALILEO_PI * d_carrier_doppler_hz / static_cast(d_fs_in));
- int phase_step_rad_i = gr::fxpt::float_to_fixed(phase_step_rad);
- int phase_rad_i = gr::fxpt::float_to_fixed(d_rem_carr_phase_rad);
-
- for(int i = 0; i < d_current_prn_length_samples; i++)
- {
- gr::fxpt::sincos(phase_rad_i, &sin_f, &cos_f);
- d_carr_sign[i] = std::complex(cos_f, -sin_f);
- phase_rad_i += phase_step_rad_i;
- }
-}
-
-
-int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
+int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
// process vars
@@ -431,23 +395,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_
{
case 0:
{
- // ########## DEBUG OUTPUT (TIME ONLY for channel 0 when tracking is disabled)
- /*!
- * \todo The stop timer has to be moved to the signal source!
- */
- // stream to collect cout calls to improve thread safety
- std::stringstream tmp_str_stream;
- if (floor(d_sample_counter / d_fs_in) != d_last_seg)
- {
- d_last_seg = floor(d_sample_counter / d_fs_in);
- if (d_channel == 0)
- {
- // debug: Second counter in channel 0
- tmp_str_stream << "Current input signal time = " << d_last_seg << " [s]" << std::endl << std::flush;
- std::cout << tmp_str_stream.rdbuf() << std::flush;
- }
- }
d_Early = gr_complex(0,0);
d_Prompt = gr_complex(0,0);
d_Late = gr_complex(0,0);
@@ -512,59 +460,50 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_
//Generate local code and carrier replicas (using \hat{f}_d(k-1))
if (d_integration_counter == 0)
{
- update_local_code();
- update_local_carrier();
// Reset accumulated values
d_Early = gr_complex(0,0);
d_Prompt = gr_complex(0,0);
d_Late = gr_complex(0,0);
}
- gr_complex single_early;
- gr_complex single_prompt;
- gr_complex single_late;
// perform carrier wipe-off and compute Early, Prompt and Late
// correlation of 1 primary code
- d_correlator.Carrier_wipeoff_and_EPL_volk_IQ(d_current_prn_length_samples,
- in,
- d_carr_sign,
- d_early_code,
- d_prompt_code,
- d_late_code,
- d_prompt_data_code,
- &single_early,
- &single_prompt,
- &single_late,
- &d_Prompt_data);
+
+ multicorrelator_cpu_Q.set_local_code_and_taps(d_current_prn_length_samples, d_codeQ, d_local_code_shift_chips);
+ multicorrelator_cpu_I.set_local_code_and_taps(d_current_prn_length_samples, d_codeI, &d_local_code_shift_chips[1]);
+
+
+ // ################# CARRIER WIPEOFF AND CORRELATORS ##############################
+ // perform carrier wipe-off and compute Early, Prompt and Late correlation
+ multicorrelator_cpu_Q.set_input_output_vectors(d_correlator_outs,in);
+ multicorrelator_cpu_I.set_input_output_vectors(d_Single_Prompt_data,in);
+
+ double carr_phase_step_rad = GALILEO_TWO_PI * d_carrier_doppler_hz / static_cast(d_fs_in);
+ double code_phase_step_chips = d_code_freq_chips / (static_cast(d_fs_in));
+ double rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / d_fs_in);
+ multicorrelator_cpu_Q.Carrier_wipeoff_multicorrelator_resampler(
+ d_rem_carr_phase_rad,
+ carr_phase_step_rad,
+ rem_code_phase_chips,
+ code_phase_step_chips,
+ d_current_prn_length_samples);
+
+ multicorrelator_cpu_I.Carrier_wipeoff_multicorrelator_resampler(
+ d_rem_carr_phase_rad,
+ carr_phase_step_rad,
+ rem_code_phase_chips,
+ code_phase_step_chips,
+ d_current_prn_length_samples);
+
// Accumulate results (coherent integration since there are no bit transitions in pilot signal)
- d_Early += single_early * sec_sign_Q;
- d_Prompt += single_prompt * sec_sign_Q;
- d_Late += single_late * sec_sign_Q;
+ d_Early += (*d_Single_Early) * sec_sign_Q;
+ d_Prompt += (*d_Single_Prompt) * sec_sign_Q;
+ d_Late += (*d_Single_Late) * sec_sign_Q;
+ d_Prompt_data=(*d_Single_Prompt_data);
d_Prompt_data *= sec_sign_I;
d_integration_counter++;
- // check for samples consistency (this should be done before in the receiver / here only if the source is a file)
- if (std::isnan((d_Prompt).real()) == true or std::isnan((d_Prompt).imag()) == true ) // or std::isinf(in[i].real())==true or std::isinf(in[i].imag())==true)
- {
- const int samples_available = ninput_items[0];
- d_sample_counter = d_sample_counter + samples_available;
- LOG(WARNING) << "Detected NaN samples at sample number " << d_sample_counter;
- consume_each(samples_available);
-
- // make an output to not stop the rest of the processing blocks
- current_synchro_data.Prompt_I = 0.0;
- current_synchro_data.Prompt_Q = 0.0;
- current_synchro_data.Tracking_timestamp_secs = static_cast(d_sample_counter) / static_cast(d_fs_in);
- current_synchro_data.Carrier_phase_rads = 0.0;
- current_synchro_data.Code_phase_secs = 0.0;
- current_synchro_data.CN0_dB_hz = 0.0;
- current_synchro_data.Flag_valid_tracking = false;
-
- *out[0] = current_synchro_data;
-
- return 1;
- }
// ################## PLL ##########################################################
// PLL discriminator
if (d_integration_counter == d_current_ti_ms)
@@ -709,33 +648,6 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
current_synchro_data.Flag_valid_tracking = false;
- // ########## DEBUG OUTPUT
- /*!
- * \todo The stop timer has to be moved to the signal source!
- */
- // debug: Second counter in channel 0
- if (d_channel == 0)
- {
- if (floor(d_sample_counter / d_fs_in) != d_last_seg)
- {
- d_last_seg = floor(d_sample_counter / d_fs_in);
- std::cout << "Current input signal time = " << d_last_seg << " [s]" << std::endl;
- std::cout << "Galileo E5 Tracking CH " << d_channel << ": Satellite "
- << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz] "<<"Doppler="<PRN)
- << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz] "<<"Doppler="<(&tmp_double), sizeof(double));
}
- catch (std::ifstream::failure e)
+ catch (const std::ifstream::failure & e)
{
LOG(WARNING) << "Exception writing trk dump file " << e.what();
}
@@ -832,10 +727,6 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_
d_secondary_delay = (d_secondary_delay + 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH;
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}
@@ -857,7 +748,7 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::set_channel(unsigned int channel)
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << std::endl;
}
- catch (std::ifstream::failure e)
+ catch (const std::ifstream::failure &e)
{
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what() << std::endl;
}
diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.h
index ae06357c0..e79623509 100644
--- a/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.h
+++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e5a_dll_pll_tracking_cc.h
@@ -46,7 +46,7 @@
#include "gnss_synchro.h"
#include "tracking_2nd_DLL_filter.h"
#include "tracking_2nd_PLL_filter.h"
-#include "correlator.h"
+#include "cpu_multicorrelator.h"
class Galileo_E5a_Dll_Pll_Tracking_cc;
@@ -114,8 +114,6 @@ private:
float dll_bw_init_hz,
int ti_ms,
float early_late_space_chips);
- void update_local_code();
- void update_local_carrier();
void acquire_secondary();
// tracking configuration vars
boost::shared_ptr d_queue;
@@ -128,7 +126,6 @@ private:
Gnss_Synchro* d_acquisition_gnss_synchro;
unsigned int d_channel;
- int d_last_seg;
long d_if_freq;
long d_fs_in;
@@ -141,22 +138,23 @@ private:
gr_complex* d_codeQ;
gr_complex* d_codeI;
- gr_complex* d_early_code;
- gr_complex* d_late_code;
- gr_complex* d_prompt_code;
- gr_complex* d_prompt_data_code;
- gr_complex* d_carr_sign;
-
gr_complex d_Early;
gr_complex d_Prompt;
gr_complex d_Late;
gr_complex d_Prompt_data;
+ gr_complex* d_Single_Early;
+ gr_complex* d_Single_Prompt;
+ gr_complex* d_Single_Late;
+ gr_complex* d_Single_Prompt_data;
+
+
float tmp_E;
float tmp_P;
float tmp_L;
// remaining code phase and carrier phase between tracking loops
double d_rem_code_phase_samples;
+ double d_rem_code_phase_chips;
double d_rem_carr_phase_rad;
// PLL and DLL filter library
@@ -167,7 +165,11 @@ private:
double d_acq_code_phase_samples;
double d_acq_carrier_doppler_hz;
// correlator
- Correlator d_correlator;
+ int d_n_correlator_taps;
+ float* d_local_code_shift_chips;
+ gr_complex* d_correlator_outs;
+ cpu_multicorrelator multicorrelator_cpu_I;
+ cpu_multicorrelator multicorrelator_cpu_Q;
// tracking vars
double d_code_freq_chips;
@@ -176,6 +178,9 @@ private:
double d_code_phase_samples;
double d_acc_code_phase_secs;
double d_code_error_filt_secs;
+ double d_code_phase_step_chips;
+ double d_carrier_phase_step_rad;
+
//PRN period in samples
int d_current_prn_length_samples;
diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_fll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_fll_pll_tracking_cc.cc
deleted file mode 100644
index 7d8216886..000000000
--- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_fll_pll_tracking_cc.cc
+++ /dev/null
@@ -1,690 +0,0 @@
-/*!
- * \file gps_l1_ca_dll_fll_pll_tracking_cc.cc
- * \brief Implementation of a code DLL + carrier FLL/PLL tracking block
- * \author Javier Arribas, 2011. jarribas(at)cttc.es
- *
- * This file implements the code Delay Locked Loop (DLL) + carrier
- * Phase Locked Loop (PLL) helped with a carrier Frequency Locked Loop (FLL)
- * according to the algorithms described in:
- * E.D. Kaplan and C. Hegarty, Understanding GPS. Principles and
- * Applications, Second Edition, Artech House Publishers, 2005.
- *
- * -------------------------------------------------------------------------
- *
- * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
- *
- * GNSS-SDR is a software defined Global Navigation
- * Satellite Systems receiver
- *
- * This file is part of GNSS-SDR.
- *
- * GNSS-SDR is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GNSS-SDR is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNSS-SDR. If not, see .
- *
- * -------------------------------------------------------------------------
- */
-
-#include "gps_l1_ca_dll_fll_pll_tracking_cc.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include "gps_sdr_signal_processing.h"
-#include "GPS_L1_CA.h"
-#include "tracking_discriminators.h"
-#include "lock_detectors.h"
-#include "control_message_factory.h"
-
-
-/*!
- * \todo Include in definition header file
- */
-#define CN0_ESTIMATION_SAMPLES 20
-#define MINIMUM_VALID_CN0 25
-#define MAXIMUM_LOCK_FAIL_COUNTER 50
-#define CARRIER_LOCK_THRESHOLD 0.85
-
-using google::LogMessage;
-
-gps_l1_ca_dll_fll_pll_tracking_cc_sptr gps_l1_ca_dll_fll_pll_make_tracking_cc(
- long if_freq,
- long fs_in,
- unsigned
- int vector_length,
- boost::shared_ptr queue,
- bool dump, std::string dump_filename,
- int order,
- float fll_bw_hz,
- float pll_bw_hz,
- float dll_bw_hz,
- float early_late_space_chips)
-{
- return gps_l1_ca_dll_fll_pll_tracking_cc_sptr(new Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc(if_freq,
- fs_in, vector_length, queue, dump, dump_filename, order, fll_bw_hz, pll_bw_hz,dll_bw_hz,
- early_late_space_chips));
-}
-
-
-
-
-void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::forecast (int noutput_items, gr_vector_int &ninput_items_required)
-{
- if (noutput_items != 0)
- {
- ninput_items_required[0] = d_vector_length * 2; //set the required available samples in each call
- }
-}
-
-
-Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc(
- long if_freq,
- long fs_in,
- unsigned int vector_length,
- boost::shared_ptr queue,
- bool dump,
- std::string dump_filename,
- int order,
- float fll_bw_hz,
- float pll_bw_hz,
- float dll_bw_hz,
- float early_late_space_chips) :
- gr::block("Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)),
- gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
-{
- // Telemetry bit synchronization message port input
- this->message_port_register_in(pmt::mp("preamble_timestamp_s"));
- // initialize internal vars
- d_queue = queue;
- d_dump = dump;
-
- d_acquisition_gnss_synchro = NULL;
-
- d_if_freq = static_cast(if_freq);
- d_fs_in = static_cast(fs_in);
- d_vector_length = vector_length;
- d_early_late_spc_chips = static_cast(early_late_space_chips); // Define early-late offset (in chips)
- d_dump_filename = dump_filename;
-
- // Initialize tracking variables ==========================================
- d_carrier_loop_filter.set_params(fll_bw_hz, pll_bw_hz,order);
-
- d_code_loop_filter = Tracking_2nd_DLL_filter(GPS_L1_CA_CODE_PERIOD);
- d_code_loop_filter.set_DLL_BW(dll_bw_hz);
-
- // Get space for a vector with the C/A code replica sampled 1x/chip
- d_ca_code = static_cast(volk_malloc((GPS_L1_CA_CODE_LENGTH_CHIPS + 2) * sizeof(gr_complex), volk_get_alignment()));
-
- // Get space for the resampled early / prompt / late local replicas
- d_early_code = static_cast(volk_malloc(2*d_vector_length * sizeof(gr_complex), volk_get_alignment()));
- d_prompt_code = static_cast(volk_malloc(2*d_vector_length * sizeof(gr_complex), volk_get_alignment()));
- d_late_code = static_cast(volk_malloc(2*d_vector_length * sizeof(gr_complex), volk_get_alignment()));
-
- // space for carrier wipeoff and signal baseband vectors
- d_carr_sign = static_cast(volk_malloc(2*d_vector_length * sizeof(gr_complex), volk_get_alignment()));
-
- // correlator outputs (scalar)
- d_Early = static_cast(volk_malloc(sizeof(gr_complex), volk_get_alignment()));
- d_Prompt = static_cast(volk_malloc(sizeof(gr_complex), volk_get_alignment()));
- d_Late = static_cast(volk_malloc(sizeof(gr_complex), volk_get_alignment()));
-
- // sample synchronization
- d_sample_counter = 0;
- d_acq_sample_stamp = 0;
- d_last_seg = 0;// this is for debug output only
- d_code_phase_samples = 0;
- d_enable_tracking = false;
- d_current_prn_length_samples = static_cast(d_vector_length);
-
- // CN0 estimation and lock detector buffers
- d_cn0_estimation_counter = 0;
- d_Prompt_buffer = new gr_complex[CN0_ESTIMATION_SAMPLES];
- d_carrier_lock_test = 1;
- d_CN0_SNV_dB_Hz = 0;
- d_carrier_lock_fail_counter = 0;
- d_carrier_lock_threshold = CARRIER_LOCK_THRESHOLD;
-
- systemName["G"] = std::string("GPS");
- systemName["R"] = std::string("GLONASS");
- systemName["S"] = std::string("SBAS");
- systemName["E"] = std::string("Galileo");
- systemName["C"] = std::string("Compass");
-
- d_channel_internal_queue = 0;
- //d_acquisition_gnss_synchro = 0;
- d_channel = 0;
- d_acq_carrier_doppler_hz = 0.0;
- d_carrier_doppler_hz = 0;
- d_code_freq_hz = 0.0;
- d_rem_carr_phase = 0.0;
- d_rem_code_phase_samples = 0.0;
- d_acq_code_phase_samples = 0;
- d_acq_carrier_doppler_hz = 0.0;
- d_acc_carrier_phase_rad = 0.0;
- d_acc_code_phase_samples = 0;
- d_FLL_discriminator_hz = 0.0;
- d_pull_in = false;
- d_FLL_wait = 1;
-}
-
-
-
-
-void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::start_tracking()
-{
- /*
- * correct the code phase according to the delay between acq and trk
- */
- d_acq_code_phase_samples = d_acquisition_gnss_synchro->Acq_delay_samples;
- d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
- d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
-
- long int acq_trk_diff_samples;
- float acq_trk_diff_seconds;
- acq_trk_diff_samples = static_cast(d_sample_counter) - static_cast(d_acq_sample_stamp);
- acq_trk_diff_seconds = static_cast(acq_trk_diff_samples) / d_fs_in;
- //doppler effect
- // Fd=(C/(C+Vr))*F
- double radial_velocity;
- radial_velocity = (GPS_L1_FREQ_HZ + d_acq_carrier_doppler_hz) / GPS_L1_FREQ_HZ;
- // new chip and prn sequence periods based on acq Doppler
- double T_chip_mod_seconds;
- double T_prn_mod_seconds;
- double T_prn_mod_samples;
- d_code_freq_hz = radial_velocity * GPS_L1_CA_CODE_RATE_HZ;
- T_chip_mod_seconds = 1 / d_code_freq_hz;
- T_prn_mod_seconds = T_chip_mod_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS;
- T_prn_mod_samples = T_prn_mod_seconds * d_fs_in;
- d_current_prn_length_samples = round(T_prn_mod_samples);
-
- double T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_HZ;
- double T_prn_true_samples = T_prn_true_seconds * d_fs_in;
- double T_prn_diff_seconds;
- T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
- double N_prn_diff;
- N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
- double corrected_acq_phase_samples, delay_correction_samples;
- corrected_acq_phase_samples = fmod((d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * d_fs_in), T_prn_true_samples);
-
- if (corrected_acq_phase_samples < 0)
- {
- corrected_acq_phase_samples = T_prn_mod_samples + corrected_acq_phase_samples;
- }
- delay_correction_samples = d_acq_code_phase_samples - corrected_acq_phase_samples;
- d_acq_code_phase_samples = corrected_acq_phase_samples;
-
- d_carrier_doppler_hz = d_acq_carrier_doppler_hz;
- // DLL/PLL filter initialization
- d_carrier_loop_filter.initialize(d_acq_carrier_doppler_hz);
- d_FLL_wait = 1;
-
- // generate local reference ALWAYS starting at chip 1 (1 sample per chip)
- gps_l1_ca_code_gen_complex(&d_ca_code[1], d_acquisition_gnss_synchro->PRN, 0);
-
- d_ca_code[0] = d_ca_code[static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS)];
- d_ca_code[static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS) + 1] = d_ca_code[1];
-
- d_carrier_lock_fail_counter = 0;
- d_Prompt_prev = 0;
- d_rem_code_phase_samples = 0;
- d_rem_carr_phase = 0;
- d_FLL_discriminator_hz = 0;
- d_rem_code_phase_samples = 0;
- d_acc_carrier_phase_rad = 0;
-
- std::string sys_ = &d_acquisition_gnss_synchro->System;
- sys = sys_.substr(0,1);
-
- // DEBUG OUTPUT
- std::cout << "Tracking start on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
- LOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
-
- // enable tracking Gnss_Satellite(systemName[&d_acquisition_gnss_synchro->System], d_acquisition_gnss_synchro->PRN)
- d_pull_in = true;
- d_enable_tracking = true;
-
- LOG(INFO) << "PULL-IN Doppler [Hz]= " << d_carrier_doppler_hz
- << " Code Phase correction [samples]=" << delay_correction_samples
- << " PULL-IN Code Phase [samples]= " << d_acq_code_phase_samples << std::endl;
-}
-
-
-
-
-
-void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::update_local_code()
-{
- double tcode_chips;
- double rem_code_phase_chips;
- double code_phase_step_chips;
- int early_late_spc_samples;
- int epl_loop_length_samples;
-
- int associated_chip_index;
- int code_length_chips = static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS);
- code_phase_step_chips = d_code_freq_hz / d_fs_in;
- rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_hz / d_fs_in);
- // unified loop for E, P, L code vectors
- tcode_chips = -rem_code_phase_chips;
- // Alternative EPL code generation (40% of speed improvement!)
- early_late_spc_samples = round(d_early_late_spc_chips/code_phase_step_chips);
- epl_loop_length_samples = d_current_prn_length_samples + early_late_spc_samples*2;
- for (int i = 0; i < epl_loop_length_samples; i++)
- {
- associated_chip_index = 1 + round(fmod(tcode_chips - d_early_late_spc_chips, code_length_chips));
- d_early_code[i] = d_ca_code[associated_chip_index];
- tcode_chips = tcode_chips + code_phase_step_chips;
- }
-
- memcpy(d_prompt_code, &d_early_code[early_late_spc_samples], d_current_prn_length_samples * sizeof(gr_complex));
- memcpy(d_late_code, &d_early_code[early_late_spc_samples*2], d_current_prn_length_samples * sizeof(gr_complex));
-}
-
-
-
-
-
-void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::update_local_carrier()
-{
- double phase, phase_step;
- phase_step = GPS_TWO_PI * d_carrier_doppler_hz / d_fs_in;
- phase = d_rem_carr_phase;
- for(int i = 0; i < d_current_prn_length_samples; i++)
- {
- d_carr_sign[i] = gr_complex(cos(phase), -sin(phase));
- phase += phase_step;
- }
- d_rem_carr_phase = fmod(phase, GPS_TWO_PI);
- d_acc_carrier_phase_rad -= d_acc_carrier_phase_rad + phase;
-}
-
-
-
-Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::~Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc()
-{
- d_dump_file.close();
-
- volk_free(d_ca_code);
- volk_free(d_prompt_code);
- volk_free(d_late_code);
- volk_free(d_early_code);
- volk_free(d_carr_sign);
- volk_free(d_Early);
- volk_free(d_Prompt);
- volk_free(d_Late);
-
- delete[] d_Prompt_buffer;
-}
-
-
-
-int Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
-{
- double code_error_chips = 0;
- double code_error_filt_chips = 0;
- double correlation_time_s = 0;
- double PLL_discriminator_hz = 0;
- double carr_nco_hz = 0;
- // get the sample in and out pointers
- const gr_complex* in = (gr_complex*) input_items[0]; // block input samples pointer
- Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; // block output streams pointer
-
- d_Prompt_prev = *d_Prompt; // for the FLL discriminator
-
- if (d_enable_tracking == true)
- {
- // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
- Gnss_Synchro current_synchro_data;
- // Fill the acquisition data
- current_synchro_data = *d_acquisition_gnss_synchro;
- /*
- * Receiver signal alignment
- */
- if (d_pull_in == true)
- {
- int samples_offset;
- double acq_trk_shif_correction_samples;
- int acq_to_trk_delay_samples;
- acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
- acq_trk_shif_correction_samples = d_current_prn_length_samples - fmod(static_cast(acq_to_trk_delay_samples), static_cast(d_current_prn_length_samples));
- samples_offset = round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
- // /todo: Check if the sample counter sent to the next block as a time reference should be incremented AFTER sended or BEFORE
- d_sample_counter = d_sample_counter + samples_offset; //count for the processed samples
- d_pull_in = false;
- consume_each(samples_offset); //shift input to perform alignment with local replica
-
- // make an output to not stop the rest of the processing blocks
- current_synchro_data.Prompt_I = 0.0;
- current_synchro_data.Prompt_Q = 0.0;
- current_synchro_data.Tracking_timestamp_secs = static_cast(d_sample_counter) / d_fs_in;
- current_synchro_data.Carrier_phase_rads = 0.0;
- current_synchro_data.Code_phase_secs = 0.0;
- current_synchro_data.CN0_dB_hz = 0.0;
- current_synchro_data.Flag_valid_tracking = false;
- current_synchro_data.Flag_valid_pseudorange = false;
-
- *out[0] = current_synchro_data;
-
- return 1;
- }
-
- update_local_code();
- update_local_carrier();
-
- // perform Early, Prompt and Late correlation
- d_correlator.Carrier_wipeoff_and_EPL_volk(d_current_prn_length_samples,
- in,
- d_carr_sign,
- d_early_code,
- d_prompt_code,
- d_late_code,
- d_Early,
- d_Prompt,
- d_Late);
- // check for samples consistency (this should be done before in the receiver / here only if the source is a file)
- if (std::isnan((*d_Prompt).real()) == true or std::isnan((*d_Prompt).imag()) == true )// or std::isinf(in[i].real())==true or std::isinf(in[i].imag())==true)
- {
- const int samples_available = ninput_items[0];
- d_sample_counter = d_sample_counter + samples_available;
- LOG(WARNING) << "Detected NaN samples at sample number " << d_sample_counter;
- consume_each(samples_available);
-
- // make an output to not stop the rest of the processing blocks
- current_synchro_data.Prompt_I = 0.0;
- current_synchro_data.Prompt_Q = 0.0;
- current_synchro_data.Tracking_timestamp_secs = static_cast(d_sample_counter) / d_fs_in;
- current_synchro_data.Carrier_phase_rads = 0.0;
- current_synchro_data.Code_phase_secs = 0.0;
- current_synchro_data.CN0_dB_hz = 0.0;
- current_synchro_data.Flag_valid_tracking = false;
- current_synchro_data.Flag_valid_pseudorange = false;
-
- *out[0] = current_synchro_data;
-
- return 1;
- }
-
- /*
- * DLL, FLL, and PLL discriminators
- */
- // Compute DLL error
- code_error_chips = dll_nc_e_minus_l_normalized(*d_Early, *d_Late);
- // Compute DLL filtered error
- code_error_filt_chips = d_code_loop_filter.get_code_nco(code_error_chips);
-
- //compute FLL error
- correlation_time_s = (static_cast(d_current_prn_length_samples)) / d_fs_in;
- if (d_FLL_wait == 1)
- {
- d_Prompt_prev = *d_Prompt;
- d_FLL_discriminator_hz = 0.0;
- d_FLL_wait = 0;
- }
- else
- {
- d_FLL_discriminator_hz = fll_four_quadrant_atan(d_Prompt_prev, *d_Prompt, 0, correlation_time_s) / GPS_TWO_PI;
- d_Prompt_prev = *d_Prompt;
- d_FLL_wait = 1;
- }
-
- // Compute PLL error
- PLL_discriminator_hz = pll_cloop_two_quadrant_atan(*d_Prompt) / GPS_TWO_PI;
-
- /*
- * DLL and FLL+PLL filter and get current carrier Doppler and code frequency
- */
- carr_nco_hz = d_carrier_loop_filter.get_carrier_error(d_FLL_discriminator_hz, PLL_discriminator_hz, correlation_time_s);
- d_carrier_doppler_hz = d_if_freq + carr_nco_hz;
-
- d_code_freq_hz = GPS_L1_CA_CODE_RATE_HZ + (((d_carrier_doppler_hz + d_if_freq) * GPS_L1_CA_CODE_RATE_HZ) / GPS_L1_FREQ_HZ);
-
- /*!
- * \todo Improve the lock detection algorithm!
- */
- // ####### CN0 ESTIMATION AND LOCK DETECTORS ######
- if (d_cn0_estimation_counter < CN0_ESTIMATION_SAMPLES)
- {
- // fill buffer with prompt correlator output values
- d_Prompt_buffer[d_cn0_estimation_counter] = *d_Prompt;
- d_cn0_estimation_counter++;
- }
- else
- {
- d_cn0_estimation_counter = 0;
- //d_CN0_SNV_dB_Hz = gps_l1_ca_CN0_SNV(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in);
- d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES, d_fs_in, GPS_L1_CA_CODE_LENGTH_CHIPS);
-
- d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, CN0_ESTIMATION_SAMPLES);
- // ###### TRACKING UNLOCK NOTIFICATION #####
- if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < MINIMUM_VALID_CN0)
- {
- d_carrier_lock_fail_counter++;
- }
- else
- {
- if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--;
- }
- if (d_carrier_lock_fail_counter > MAXIMUM_LOCK_FAIL_COUNTER)
- {
- std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
- LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
- std::unique_ptr cmf(new ControlMessageFactory());
- if (d_queue != gr::msg_queue::sptr())
- {
- d_queue->handle(cmf->GetQueueMessage(d_channel, 2));
- }
- d_carrier_lock_fail_counter = 0;
- d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine
- }
- }
-
- // ########## DEBUG OUTPUT
- /*!
- * \todo The stop timer has to be moved to the signal source!
- */
- // debug: Second counter in channel 0
- if (d_channel == 0)
- {
- if (floor(d_sample_counter/d_fs_in) != d_last_seg)
- {
- d_last_seg = floor(d_sample_counter / d_fs_in);
- std::cout << "Current input signal time = " << d_last_seg << " [s]" << std::endl;
- LOG(INFO) << "Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]";
- }
- }
- else
- {
- if (floor(d_sample_counter/d_fs_in) != d_last_seg)
- {
- d_last_seg = floor(d_sample_counter/d_fs_in);
- LOG(INFO) << "Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]";
- }
- }
-
- //predict the next loop PRN period length prediction
- double T_chip_seconds;
- double T_prn_seconds;
- double T_prn_samples;
- double K_blk_samples;
- T_chip_seconds = 1 / static_cast(d_code_freq_hz);
- T_prn_seconds = T_chip_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS;
- T_prn_samples = T_prn_seconds * d_fs_in;
-
- float code_error_filt_samples;
- code_error_filt_samples = GPS_L1_CA_CODE_PERIOD * code_error_filt_chips * GPS_L1_CA_CHIP_PERIOD * static_cast(d_fs_in); //[seconds]
- d_acc_code_phase_samples = d_acc_code_phase_samples + code_error_filt_samples;
-
- K_blk_samples = T_prn_samples + d_rem_code_phase_samples + code_error_filt_samples;
- d_current_prn_length_samples = round(K_blk_samples); //round to a discrete sample
- //d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; //rounding error
-
- // ########### Output the tracking data to navigation and PVT ##########
- current_synchro_data.Prompt_I = static_cast((*d_Prompt).real());
- current_synchro_data.Prompt_Q = static_cast((*d_Prompt).imag());
- // Tracking_timestamp_secs is aligned with the PRN start sample
- //current_synchro_data.Tracking_timestamp_secs = ((double)d_sample_counter + (double)d_current_prn_length_samples + (double)d_rem_code_phase_samples) / (double)d_fs_in;
- current_synchro_data.Tracking_timestamp_secs = (static_cast(d_sample_counter) + static_cast(d_rem_code_phase_samples))/static_cast(d_fs_in);
- d_rem_code_phase_samples = K_blk_samples - d_current_prn_length_samples; //rounding error < 1 sample
- // This tracking block aligns the Tracking_timestamp_secs with the start sample of the PRN, Code_phase_secs=0
- current_synchro_data.Code_phase_secs = 0;
- current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad;
- current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
- current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
- current_synchro_data.Flag_valid_tracking = true;
- current_synchro_data.Flag_valid_symbol_output = true;
- current_synchro_data.correlation_length_ms = 1;
- current_synchro_data.Flag_valid_pseudorange = false;
- *out[0] = current_synchro_data;
- }
- else
- {
- // ########## DEBUG OUTPUT (TIME ONLY for channel 0 when tracking is disabled)
- /*!
- * \todo The stop timer has to be moved to the signal source!
- */
- // stream to collect cout calls to improve thread safety
- std::stringstream tmp_str_stream;
- if (floor(d_sample_counter / d_fs_in) != d_last_seg)
- {
- d_last_seg = floor(d_sample_counter / d_fs_in);
-
- if (d_channel == 0)
- {
- // debug: Second counter in channel 0
- tmp_str_stream << "Current input signal time = " << d_last_seg << " [s]" << std::endl << std::flush;
- std::cout << tmp_str_stream.rdbuf() << std::flush;
- }
- }
- *d_Early = gr_complex(0,0);
- *d_Prompt = gr_complex(0,0);
- *d_Late = gr_complex(0,0);
-
- Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; //block output streams pointer
- d_acquisition_gnss_synchro->Flag_valid_pseudorange = false;
- d_acquisition_gnss_synchro->Flag_valid_symbol_output = false;
- *out[0] = *d_acquisition_gnss_synchro;
- }
-
-
- if(d_dump)
- {
- // MULTIPLEXED FILE RECORDING - Record results to file
- float prompt_I;
- float prompt_Q;
- float tmp_E, tmp_P, tmp_L;
- float tmp_float;
- double tmp_double;
- prompt_I = (*d_Prompt).real();
- prompt_Q = (*d_Prompt).imag();
- tmp_E = std::abs(*d_Early);
- tmp_P = std::abs(*d_Prompt);
- tmp_L = std::abs(*d_Late);
- try
- {
- // EPR
- d_dump_file.write((char*)&tmp_E, sizeof(float));
- d_dump_file.write((char*)&tmp_P, sizeof(float));
- d_dump_file.write((char*)&tmp_L, sizeof(float));
- // PROMPT I and Q (to analyze navigation symbols)
- d_dump_file.write((char*)&prompt_I, sizeof(float));
- d_dump_file.write((char*)&prompt_Q, sizeof(float));
- // PRN start sample stamp
- d_dump_file.write((char*)&d_sample_counter, sizeof(unsigned long int));
- // accumulated carrier phase
- tmp_float = (float)d_acc_carrier_phase_rad;
- d_dump_file.write((char*)&tmp_float, sizeof(float));
-
- // carrier and code frequency
- tmp_float = (float)d_carrier_doppler_hz;
- d_dump_file.write((char*)&tmp_float, sizeof(float));
- tmp_float = (float)d_code_freq_hz;
- d_dump_file.write((char*)&tmp_float, sizeof(float));
-
- //PLL commands
- tmp_float = (float)PLL_discriminator_hz;
- d_dump_file.write((char*)&tmp_float, sizeof(float));
- tmp_float = (float)carr_nco_hz;
- d_dump_file.write((char*)&tmp_float, sizeof(float));
-
- //DLL commands
- tmp_float = (float)code_error_chips;
- d_dump_file.write((char*)&tmp_float, sizeof(float));
- tmp_float = (float)code_error_filt_chips;
- d_dump_file.write((char*)&tmp_float, sizeof(float));
-
- // CN0 and carrier lock test
- tmp_float = (float)d_CN0_SNV_dB_Hz;
- d_dump_file.write((char*)&tmp_float, sizeof(float));
- tmp_float = (float)d_carrier_lock_test;
- d_dump_file.write((char*)&tmp_float, sizeof(float));
-
- // AUX vars (for debug purposes)
- tmp_float = (float)d_rem_code_phase_samples;
- d_dump_file.write((char*)&tmp_float, sizeof(float));
- tmp_double = (double)(d_sample_counter + d_current_prn_length_samples);
- d_dump_file.write((char*)&tmp_double, sizeof(double));
- }
- catch (std::ifstream::failure e)
- {
- LOG(INFO) << "Exception writing trk dump file "<< e.what() << std::endl;
- }
- }
- consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
- d_sample_counter += d_current_prn_length_samples; //count for the processed samples
- if((noutput_items == 0) || (ninput_items[0] == 0))
- {
- LOG(WARNING) << "noutput_items = 0";
- }
- return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
-}
-
-
-void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::set_channel(unsigned int channel)
-{
- d_channel = channel;
- LOG(INFO) << "Tracking Channel set to " << d_channel;
- // ############# ENABLE DATA FILE LOG #################
- if (d_dump == true)
- {
- if (d_dump_file.is_open() == false)
- {
- try
- {
- d_dump_filename.append(boost::lexical_cast(d_channel));
- d_dump_filename.append(".dat");
- d_dump_file.exceptions ( std::ifstream::failbit | std::ifstream::badbit );
- d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
- LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str();
- }
- catch (std::ifstream::failure e)
- {
- LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
- }
- }
- }
-}
-
-
-
-void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::set_channel_queue(concurrent_queue *channel_internal_queue)
-{
- d_channel_internal_queue = channel_internal_queue;
-}
-
-void Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
-{
- d_acquisition_gnss_synchro=p_gnss_synchro;
-}
diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_fll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_fll_pll_tracking_cc.h
deleted file mode 100644
index 3213821cf..000000000
--- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_fll_pll_tracking_cc.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*!
- * \file gps_l1_ca_dll_fll_pll_tracking_cc.h
- * \brief Interface of a code DLL + carrier FLL/PLL tracking block
- * \author Javier Arribas, 2011. jarribas(at)cttc.es
- *
- * This is the interface of a code Delay Locked Loop (DLL) +
- * carrier Phase Locked Loop (PLL) helped with a carrier Frequency Locked
- * Loop (FLL) according to the algorithms described in:
- * E.D. Kaplan and C. Hegarty, Understanding GPS. Principles and
- * Applications, Second Edition, Artech House Publishers, 2005.
- *
- * -------------------------------------------------------------------------
- *
- * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
- *
- * GNSS-SDR is a software defined Global Navigation
- * Satellite Systems receiver
- *
- * This file is part of GNSS-SDR.
- *
- * GNSS-SDR is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GNSS-SDR is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNSS-SDR. If not, see .
- *
- * -------------------------------------------------------------------------
- */
-
-#ifndef GNSS_SDR_GPS_L1_CA_DLL_FLL_PLL_TRACKING_CC_H
-#define GNSS_SDR_GPS_L1_CA_DLL_FLL_PLL_TRACKING_CC_H
-
-#include
-#include