diff --git a/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf b/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf index a1caf56c4..ed7b6dea6 100644 --- a/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf @@ -92,12 +92,12 @@ TelemetryDecoder_1C.dump=false TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables Observables.dump=false. Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=100 PVT.flag_averaging=false PVT.output_rate_ms=10 diff --git a/conf/gnss-sdr_GPS_L1_SPIR.conf b/conf/gnss-sdr_GPS_L1_SPIR.conf index 38a4ce838..7e515dee8 100644 --- a/conf/gnss-sdr_GPS_L1_SPIR.conf +++ b/conf/gnss-sdr_GPS_L1_SPIR.conf @@ -267,7 +267,7 @@ TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -278,7 +278,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=100 diff --git a/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf b/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf index 04e1d2786..c4963e1dc 100644 --- a/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf @@ -292,7 +292,7 @@ TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -303,7 +303,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 diff --git a/conf/gnss-sdr_GPS_L1_USRP_realtime.conf b/conf/gnss-sdr_GPS_L1_USRP_realtime.conf index 8fcb655f8..cd6a6cd7e 100644 --- a/conf/gnss-sdr_GPS_L1_USRP_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_USRP_realtime.conf @@ -333,7 +333,7 @@ TelemetryDecoder_GPS.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -344,7 +344,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 diff --git a/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf b/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf index cc3ba40a9..7fc947b46 100644 --- a/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf +++ b/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf @@ -256,7 +256,7 @@ TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -267,7 +267,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 diff --git a/conf/gnss-sdr_GPS_L1_gr_complex.conf b/conf/gnss-sdr_GPS_L1_gr_complex.conf index 14b57ff0a..1bb23c1f0 100644 --- a/conf/gnss-sdr_GPS_L1_gr_complex.conf +++ b/conf/gnss-sdr_GPS_L1_gr_complex.conf @@ -6,16 +6,16 @@ ;######### GLOBAL OPTIONS ################## ;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +GNSS-SDR.internal_fs_hz=2600000 ;######### SIGNAL_SOURCE CONFIG ############ SignalSource.implementation=File_Signal_Source -SignalSource.filename=/datalogger/signals/Agilent/New York/4msps.dat ; <- PUT YOUR FILE HERE -SignalSource.item_type=gr_complex -SignalSource.sampling_frequency=4000000 +SignalSource.filename=/home/javier/gnss/gnss-simulator/build/signal_out.bin ; <- PUT YOUR FILE HERE +SignalSource.item_type=byte +SignalSource.sampling_frequency=2600000 SignalSource.freq=1575420000 -SignalSource.samples=250000000 +SignalSource.samples=0 SignalSource.repeat=false SignalSource.dump=false SignalSource.dump_filename=../data/signal_source.dat @@ -23,8 +23,15 @@ SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -SignalConditioner.implementation=Pass_Through +SignalConditioner.implementation=Signal_Conditioner +;######### DATA_TYPE_ADAPTER CONFIG ############ +;## Changes the type of input data. Please disable it in this version. +;#implementation: [Pass_Through] disables this block +DataTypeAdapter.implementation=Ibyte_To_Complex +DataTypeAdapter.dump=false +;#dump_filename: Log path and filename. +DataTypeAdapter.dump_filename=../data/DataTypeAdapter.dat ;######### CHANNELS GLOBAL CONFIG ############ Channels_1C.count=8 @@ -39,19 +46,19 @@ Acquisition_1C.item_type=gr_complex Acquisition_1C.if=0 Acquisition_1C.sampled_ms=1 Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -Acquisition_1C.threshold=0.005 +Acquisition_1C.threshold=0.05 ;Acquisition_1C.pfa=0.01 Acquisition_1C.doppler_max=10000 -Acquisition_1C.doppler_step=500 +Acquisition_1C.doppler_step=250 ;######### TRACKING GLOBAL CONFIG ############ -Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking +Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking Tracking_1C.item_type=gr_complex Tracking_1C.if=0 Tracking_1C.dump=false Tracking_1C.dump_filename=../data/epl_tracking_ch_ -Tracking_1C.pll_bw_hz=45.0; -Tracking_1C.dll_bw_hz=2.0; +Tracking_1C.pll_bw_hz=25.0; +Tracking_1C.dll_bw_hz=1.0; Tracking_1C.order=3; ;######### TELEMETRY DECODER GPS CONFIG ############ @@ -60,17 +67,18 @@ TelemetryDecoder_1C.dump=false TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables +Observables.averaging_depth=1 Observables.dump=false Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=100 PVT.flag_averaging=false -PVT.output_rate_ms=10 -PVT.display_rate_ms=500 +PVT.output_rate_ms=1 +PVT.display_rate_ms=100 PVT.dump_filename=./PVT PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea; PVT.flag_nmea_tty_port=false; diff --git a/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf b/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf index 885bebd88..02f5a0e2d 100644 --- a/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf +++ b/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf @@ -60,13 +60,13 @@ TelemetryDecoder_1C.dump=false TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables Observables.dump=false Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=100 PVT.flag_averaging=false PVT.output_rate_ms=10 diff --git a/conf/gnss-sdr_GPS_L1_ishort.conf b/conf/gnss-sdr_GPS_L1_ishort.conf index 95abfc06b..1f65e4124 100644 --- a/conf/gnss-sdr_GPS_L1_ishort.conf +++ b/conf/gnss-sdr_GPS_L1_ishort.conf @@ -79,13 +79,13 @@ TelemetryDecoder_1C.dump=false TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables Observables.dump=false Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=100 PVT.flag_averaging=false PVT.output_rate_ms=10 diff --git a/conf/gnss-sdr_GPS_L1_nsr.conf b/conf/gnss-sdr_GPS_L1_nsr.conf index f7d4358d3..79c16f0bd 100644 --- a/conf/gnss-sdr_GPS_L1_nsr.conf +++ b/conf/gnss-sdr_GPS_L1_nsr.conf @@ -28,7 +28,7 @@ GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ SignalSource.implementation=Nsr_File_Signal_Source -SignalSource.filename=/datalogger/signals/ifen/E1L1_FE0_Band0.stream ; <- PUT YOUR FILE HERE +SignalSource.filename=/home/javier/Descargas/RoofTop_FE0_Band1.stream ; <- PUT YOUR FILE HERE SignalSource.item_type=byte SignalSource.sampling_frequency=20480000 SignalSource.freq=1575420000 @@ -68,7 +68,8 @@ InputFilter.band2_error=1.0 InputFilter.filter_type=bandpass InputFilter.grid_density=16 InputFilter.sampling_frequency=20480000 -InputFilter.IF=5499998.47412109 +#InputFilter.IF=5499998.47412109 +InputFilter.IF=5679999.2370605494 InputFilter.decimation_factor=8 @@ -81,9 +82,10 @@ Resampler.item_type=gr_complex ;######### CHANNELS GLOBAL CONFIG ############ ;#count: Number of available GPS satellite channels. -Channels_1C.count=8 +Channels_1C.count=0 +Channels_2S.count=8 Channels.in_acquisition=1 -Channel.signal=1C +#Channel.signal=1C ;######### GPS ACQUISITION CONFIG ############ @@ -98,6 +100,18 @@ Acquisition_1C.threshold=0.0075 Acquisition_1C.doppler_max=10000 Acquisition_1C.doppler_step=500 +Acquisition_2S.dump=false +Acquisition_2S.dump_filename=./acq_dump.dat +Acquisition_2S.item_type=gr_complex +Acquisition_2S.if=0 +Acquisition_2S.coherent_integration_time_ms=20 +Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition +Acquisition_2S.threshold=0.00045 +Acquisition_2S.doppler_max=5000 +Acquisition_2S.doppler_step=100 +Acquisition_2S.bit_transition_flag=false +Acquisition_2S.max_dwells=1 + ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking @@ -109,19 +123,44 @@ Tracking_1C.pll_bw_hz=45.0; Tracking_1C.dll_bw_hz=2.0; Tracking_1C.order=3; +;######### GPS L2C GENERIC TRACKING CONFIG ############ +Tracking_2S.implementation=GPS_L2_M_DLL_PLL_Tracking +Tracking_2S.item_type=gr_complex +Tracking_2S.if=0 +Tracking_2S.dump=true +Tracking_2S.dump_filename=../data/epl_tracking_ch_ +Tracking_2S.pll_bw_hz=1.5; +Tracking_2S.dll_bw_hz=0.4; +Tracking_2S.order=2; +Tracking_2S.early_late_space_chips=0.5; + + ;######### TELEMETRY DECODER GPS CONFIG ############ TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false TelemetryDecoder_1C.decimation_factor=1; +TelemetryDecoder_2S.implementation=GPS_L2C_Telemetry_Decoder +TelemetryDecoder_2S.dump=false +TelemetryDecoder_2S.decimation_factor=1; + ;######### OBSERVABLES CONFIG ############ -Observables.implementation=GPS_L1_CA_Observables +#Observables.implementation=GPS_L1_CA_Observables +#Observables.dump=false +#Observables.dump_filename=./observables.dat + +;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. +Observables.implementation=Hybrid_Observables + +;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false + +;#dump_filename: Log path and filename. Observables.dump_filename=./observables.dat - ;######### PVT CONFIG ############ -PVT.implementation=GPS_L1_CA_PVT +#PVT.implementation=Hybrid_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=100 PVT.flag_averaging=false PVT.output_rate_ms=10 diff --git a/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf b/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf index 06cbb8e7d..b26266e97 100644 --- a/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf +++ b/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf @@ -130,13 +130,13 @@ TelemetryDecoder_1C.dump=false TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables Observables.dump=false Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=100 PVT.flag_averaging=false PVT.output_rate_ms=10 diff --git a/conf/gnss-sdr_GPS_L1_pulse_blanking_gr_complex.conf b/conf/gnss-sdr_GPS_L1_pulse_blanking_gr_complex.conf index 9401dd8c8..8f8fca818 100644 --- a/conf/gnss-sdr_GPS_L1_pulse_blanking_gr_complex.conf +++ b/conf/gnss-sdr_GPS_L1_pulse_blanking_gr_complex.conf @@ -160,14 +160,14 @@ TelemetryDecoder_1C.dump=false TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables Observables.averaging_depth=1 Observables.dump=true Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=100 PVT.flag_averaging=false PVT.output_rate_ms=1 diff --git a/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf b/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf index 946176ce3..34f3546ad 100644 --- a/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf @@ -244,7 +244,7 @@ TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -255,7 +255,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 diff --git a/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf b/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf index 51f75907f..3894c1bc3 100644 --- a/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf @@ -120,14 +120,14 @@ TelemetryDecoder_1C.dump=false TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables Observables.dump=false Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 diff --git a/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf b/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf index 0f2521786..ec9cedbd2 100644 --- a/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf +++ b/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf @@ -113,13 +113,13 @@ TelemetryDecoder_1C.dump=false TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables Observables.dump=false Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=100 PVT.flag_averaging=false PVT.output_rate_ms=10 diff --git a/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf b/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf index 5fbe59f95..19daeb723 100644 --- a/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf @@ -62,12 +62,12 @@ TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ -Observables.implementation=Galileo_E1B_Observables +Observables.implementation=Hybrid_Observables Observables.dump=false Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GALILEO_E1_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=100 PVT.flag_averaging=false PVT.output_rate_ms=100; diff --git a/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf b/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf index 59059be2b..ebe0d1ba7 100644 --- a/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf +++ b/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf @@ -237,7 +237,7 @@ TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ ;#implementation: -Observables.implementation=Galileo_E1B_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -248,7 +248,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: -PVT.implementation=GALILEO_E1_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=100 diff --git a/conf/gnss-sdr_Galileo_E1_ishort.conf b/conf/gnss-sdr_Galileo_E1_ishort.conf index e26cdf15f..27ce0a1f1 100644 --- a/conf/gnss-sdr_Galileo_E1_ishort.conf +++ b/conf/gnss-sdr_Galileo_E1_ishort.conf @@ -240,7 +240,7 @@ TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=Galileo_E1B_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -251,7 +251,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GALILEO_E1_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=100 diff --git a/conf/gnss-sdr_Galileo_E1_nsr.conf b/conf/gnss-sdr_Galileo_E1_nsr.conf index a4b37d02e..cc8fa2e6d 100644 --- a/conf/gnss-sdr_Galileo_E1_nsr.conf +++ b/conf/gnss-sdr_Galileo_E1_nsr.conf @@ -106,13 +106,13 @@ TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ -Observables.implementation=Galileo_E1B_Observables +Observables.implementation=Hybrid_Observables Observables.dump=true Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GALILEO_E1_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=1 PVT.flag_averaging=false PVT.output_rate_ms=100 diff --git a/conf/gnss-sdr_Galileo_E5a.conf b/conf/gnss-sdr_Galileo_E5a.conf index fd4cfe55f..bd87765a6 100644 --- a/conf/gnss-sdr_Galileo_E5a.conf +++ b/conf/gnss-sdr_Galileo_E5a.conf @@ -286,8 +286,7 @@ TelemetryDecoder_5X.dump=false ;######### OBSERVABLES CONFIG ############ ;#implementation: -;Use [Galileo_E1B_Observables] for E5a also. -Observables.implementation=Galileo_E1B_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -298,8 +297,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: -;Use [GALILEO_E1_PVT] for E5a also. -PVT.implementation=GALILEO_E1_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=100 diff --git a/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf b/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf index f5c045cc6..bacd7320a 100644 --- a/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf +++ b/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf @@ -134,13 +134,13 @@ TelemetryDecoder_5X.implementation=Galileo_E5a_Telemetry_Decoder TelemetryDecoder_5X.dump=false ;######### OBSERVABLES CONFIG ############ -Observables.implementation=Galileo_E1B_Observables +Observables.implementation=Hybrid_Observables Observables.dump=false Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GALILEO_E1_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=100 PVT.flag_averaging=true PVT.output_rate_ms=100 diff --git a/conf/gnss-sdr_Hybrid_byte_sim.conf b/conf/gnss-sdr_Hybrid_byte_sim.conf index df7ae450a..823e3f149 100644 --- a/conf/gnss-sdr_Hybrid_byte_sim.conf +++ b/conf/gnss-sdr_Hybrid_byte_sim.conf @@ -309,7 +309,7 @@ TelemetryDecoder_1B.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -320,7 +320,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 diff --git a/conf/gnss-sdr_Hybrid_nsr.conf b/conf/gnss-sdr_Hybrid_nsr.conf index a87f44cc3..3ef5a0104 100644 --- a/conf/gnss-sdr_Hybrid_nsr.conf +++ b/conf/gnss-sdr_Hybrid_nsr.conf @@ -17,7 +17,7 @@ GNSS-SDR.internal_fs_hz=2560000 SignalSource.implementation=Nsr_File_Signal_Source ;#filename: path to file with the captured GNSS signal samples to be processed -SignalSource.filename=/datalogger/signals/ifen/E1L1_FE0_Band0.stream ; <- PUT YOUR FILE HERE +SignalSource.filename=/media/javier/SISTEMA/signals/ifen/E1L1_FE0_Band0.stream ; <- PUT YOUR FILE HERE ;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. SignalSource.item_type=byte 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 7879cb02c..41aa85d3c 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 @@ -294,7 +294,7 @@ TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -305,7 +305,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 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 2808b251d..73de71e58 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 @@ -301,7 +301,7 @@ TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -312,7 +312,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 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 f7a56a6ff..3a44b0e0b 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 @@ -299,7 +299,7 @@ TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -310,7 +310,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 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 9bd32b4ca..3c074a9b1 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 @@ -300,7 +300,7 @@ TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -311,7 +311,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 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 65cc26133..a86966d0c 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 @@ -295,7 +295,7 @@ TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -306,7 +306,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 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 b5e865ea8..828976e07 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf @@ -369,7 +369,7 @@ TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -380,7 +380,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 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 bfc6b40c9..d08e51610 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 @@ -29,7 +29,7 @@ GNSS-SDR.SUPL_CI=0x31b0 SignalSource.implementation=Flexiband_Signal_Source SignalSource.flag_read_file=true -SignalSource.signal_file=/datalogger/signals/Fraunhofer/L125_III1b_210s.usb ; <- PUT YOUR FILE HERE +SignalSource.signal_file=/media/javier/SISTEMA/signals/fraunhofer/L125_III1b_210s.usb ; <- PUT YOUR FILE HERE ;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. SignalSource.item_type=gr_complex @@ -267,13 +267,13 @@ Resampler2.implementation=Pass_Through ;######### CHANNELS GLOBAL CONFIG ############ ;#count: Number of available GPS satellite channels. -Channels_1C.count=1 +Channels_1C.count=8 Channels_2S.count=8 ;#GPS.prns=7,8 ;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver -Channels.in_acquisition=1 +Channels.in_acquisition=8 ;# signal: ;# "1C" GPS L1 C/A @@ -284,14 +284,22 @@ Channels.in_acquisition=1 ;# CHANNEL CONNECTION Channel0.RF_channel_ID=0 -Channel1.RF_channel_ID=1 -Channel2.RF_channel_ID=1 -Channel3.RF_channel_ID=1 -Channel4.RF_channel_ID=1 -Channel5.RF_channel_ID=1 -Channel6.RF_channel_ID=1 -Channel7.RF_channel_ID=1 -Channel8.RF_channel_ID=1 +Channel1.RF_channel_ID=0 +Channel2.RF_channel_ID=0 +Channel3.RF_channel_ID=0 +Channel4.RF_channel_ID=0 +Channel5.RF_channel_ID=0 +Channel6.RF_channel_ID=0 +Channel7.RF_channel_ID=0 +Channel8.RF_channel_ID=0 +Channel9.RF_channel_ID=1 +Channel10.RF_channel_ID=1 +Channel11.RF_channel_ID=1 +Channel12.RF_channel_ID=1 +Channel13.RF_channel_ID=1 +Channel14.RF_channel_ID=1 +Channel15.RF_channel_ID=1 + ;######### ACQUISITION GENERIC CONFIG ###### @@ -309,32 +317,19 @@ Acquisition_1C.doppler_step=250 Acquisition_1C.bit_transition_flag=false Acquisition_1C.max_dwells=1 +;# GPS L2C M Acquisition_2S.dump=false Acquisition_2S.dump_filename=./acq_dump.dat Acquisition_2S.item_type=gr_complex Acquisition_2S.if=0 -Acquisition_2S.coherent_integration_time_ms=1 Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition -Acquisition_2S.threshold=0.0005 +Acquisition_2S.threshold=0.0015 +;Acquisition_2S.pfa=0.001 Acquisition_2S.doppler_max=5000 -Acquisition_2S.doppler_step=100 -Acquisition_2S.bit_transition_flag=false +Acquisition_2S.doppler_min=-5000 +Acquisition_2S.doppler_step=60 Acquisition_2S.max_dwells=1 -;# channel specific config - -Acquisition_2S1.dump=false -Acquisition_2S1.dump_filename=./acq_dump.dat -Acquisition_2S1.item_type=gr_complex -Acquisition_2S1.if=0 -Acquisition_2S1.coherent_integration_time_ms=1 -Acquisition_2S1.implementation=GPS_L2_M_PCPS_Acquisition -Acquisition_2S1.threshold=0.0005 -Acquisition_2S1.doppler_max=5000 -Acquisition_2S1.doppler_step=100 -Acquisition_2S1.bit_transition_flag=false -Acquisition_2S1.max_dwells=1 - ;######### TRACKING CONFIG ############ @@ -342,7 +337,7 @@ Acquisition_2S1.max_dwells=1 Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking Tracking_1C.item_type=gr_complex Tracking_1C.if=0 -Tracking_1C.dump=true +Tracking_1C.dump=false Tracking_1C.dump_filename=../data/epl_tracking_ch_ Tracking_1C.pll_bw_hz=40.0; Tracking_1C.dll_bw_hz=3.0; @@ -355,23 +350,12 @@ Tracking_2S.implementation=GPS_L2_M_DLL_PLL_Tracking Tracking_2S.item_type=gr_complex Tracking_2S.if=0 Tracking_2S.dump=true -Tracking_2S.dump_filename=../data/epl_tracking_ch_ +Tracking_2S.dump_filename=./tracking_ch_ Tracking_2S.pll_bw_hz=2.0; -Tracking_2S.dll_bw_hz=0.5; +Tracking_2S.dll_bw_hz=0.25; Tracking_2S.order=2; Tracking_2S.early_late_space_chips=0.5; -;######### GPS L2C SPECIFIC CHANNEL TRACKING CONFIG ############ -Tracking_2S1.implementation=GPS_L2_M_DLL_PLL_Tracking -Tracking_2S1.item_type=gr_complex -Tracking_2S1.if=0 -Tracking_2S1.dump=true -Tracking_2S1.dump_filename=../data/epl_tracking_ch_ -Tracking_2S1.pll_bw_hz=2.0; -Tracking_2S1.dll_bw_hz=0.5; -Tracking_2S1.order=2; -Tracking_2S1.early_late_space_chips=0.5; - ;######### TELEMETRY DECODER CONFIG ############ TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder @@ -402,13 +386,13 @@ PVT.implementation=Hybrid_PVT PVT.averaging_depth=10 ;#flag_average: Enables the PVT averaging between output intervals (arithmetic mean) [true] or [false] -PVT.flag_averaging=true +PVT.flag_averaging=false ;#output_rate_ms: Period between two PVT outputs. Notice that the minimum period is equal to the tracking integration time (for GPS CA L1 is 1ms) [ms] -PVT.output_rate_ms=100 +PVT.output_rate_ms=1 ;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms. -PVT.display_rate_ms=500 +PVT.display_rate_ms=100 ;# KML, GeoJSON, NMEA and RTCM output configuration diff --git a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b_real.conf b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b_real.conf new file mode 100644 index 000000000..f70b55de3 --- /dev/null +++ b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b_real.conf @@ -0,0 +1,439 @@ +; Default configuration file +; You can define your own receiver and invoke it by doing +; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf +; + +[GNSS-SDR] + +;######### GLOBAL OPTIONS ################## +;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. +GNSS-SDR.internal_fs_hz=5000000 + + +;######### SUPL RRLP GPS assistance configuration ##### +; Check http://www.mcc-mnc.com/ +; On Android: https://play.google.com/store/apps/details?id=net.its_here.cellidinfo&hl=en +GNSS-SDR.SUPL_gps_enabled=false +GNSS-SDR.SUPL_read_gps_assistance_xml=true +GNSS-SDR.SUPL_gps_ephemeris_server=supl.google.com +GNSS-SDR.SUPL_gps_ephemeris_port=7275 +GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com +GNSS-SDR.SUPL_gps_acquisition_port=7275 +GNSS-SDR.SUPL_MCC=244 +GNSS-SDR.SUPL_MNS=5 +GNSS-SDR.SUPL_LAC=0x59e2 +GNSS-SDR.SUPL_CI=0x31b0 + +;######### SIGNAL_SOURCE CONFIG ############ +;#implementation: Use [File_Signal_Source] or [UHD_Signal_Source] or [GN3S_Signal_Source] (experimental) +SignalSource.implementation=Flexiband_Signal_Source + +SignalSource.flag_read_file=true +SignalSource.signal_file=/home/javier/signals/20140923_20-24-17_L125_roof_210s.usb ; <- PUT YOUR FILE HERE + +;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. +SignalSource.item_type=gr_complex + +;# FPGA firmware file +SignalSource.firmware_file=flexiband_III-1b.bit + +;#RF_channels: Number of RF channels present in the frontend device, must agree the FPGA firmware file +SignalSource.RF_channels=2 + +;#frontend channels gain. Not usable yet! +SignalSource.gain1=0 +SignalSource.gain2=0 +SignalSource.gain3=0 + +;#frontend channels AGC +SignalSource.AGC=true + +;# USB 3.0 packet buffer size (number of SuperSpeed packets) +SignalSource.usb_packet_buffer=128 + +;###################################################### +;######### RF CHANNEL 0 SIGNAL CONDITIONER ############ +;###################################################### + +;######### SIGNAL_CONDITIONER 0 CONFIG ############ +;## It holds blocks to change data type, filter and resample input data. +SignalConditioner0.implementation=Signal_Conditioner + +;######### DATA_TYPE_ADAPTER 0 CONFIG ############ +DataTypeAdapter0.implementation=Pass_Through +DataTypeAdapter0.item_type=gr_complex + +;######### INPUT_FILTER 0 CONFIG ############ +;## Filter the input data. Can be combined with frequency translation for IF signals + +;#implementation: Use [Pass_Through] or [Fir_Filter] or [Freq_Xlating_Fir_Filter] +;#[Pass_Through] disables this block +;#[Fir_Filter] enables a FIR Filter +;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation that shifts IF down to zero Hz. + +InputFilter0.implementation=Freq_Xlating_Fir_Filter + +;#dump: Dump the filtered data to a file. +InputFilter0.dump=false + +;#dump_filename: Log path and filename. +InputFilter0.dump_filename=../data/input_filter_ch0.dat + +;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. +;#These options are based on parameters of gnuradio's function: gr_remez. +;#These function calculates the optimal (in the Chebyshev/minimax sense) FIR filter inpulse reponse given a set of band edges, +;#the desired reponse on those bands, and the weight given to the error in those bands. + +;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version. +InputFilter0.input_item_type=gr_complex + +;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version. +InputFilter0.output_item_type=gr_complex + +;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. +InputFilter0.taps_item_type=float + +;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time +InputFilter0.number_of_taps=5 + +;#number_of _bands: Number of frequency bands in the filter. +InputFilter0.number_of_bands=2 + +;#bands: frequency at the band edges [ b1 e1 b2 e2 b3 e3 ...]. +;#Frequency is in the range [0, 1], with 1 being the Nyquist frequency (Fs/2) +;#The number of band_begin and band_end elements must match the number of bands + +InputFilter0.band1_begin=0.0 +InputFilter0.band1_end=0.45 +InputFilter0.band2_begin=0.55 +InputFilter0.band2_end=1.0 + +;#ampl: desired amplitude at the band edges [ a(b1) a(e1) a(b2) a(e2) ...]. +;#The number of ampl_begin and ampl_end elements must match the number of bands + +InputFilter0.ampl1_begin=1.0 +InputFilter0.ampl1_end=1.0 +InputFilter0.ampl2_begin=0.0 +InputFilter0.ampl2_end=0.0 + +;#band_error: weighting applied to each band (usually 1). +;#The number of band_error elements must match the number of bands +InputFilter0.band1_error=1.0 +InputFilter0.band2_error=1.0 + +;#filter_type: one of "bandpass", "hilbert" or "differentiator" +InputFilter0.filter_type=bandpass + +;#grid_density: determines how accurately the filter will be constructed. +;The minimum value is 16; higher values are slower to compute the filter. +InputFilter0.grid_density=16 + +;#The following options are used only in Freq_Xlating_Fir_Filter implementation. +;#InputFilter0.IF is the intermediate frequency (in Hz) shifted down to zero Hz +;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE +; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/ +InputFilter0.sampling_frequency=20000000 +;# IF deviation due to front-end LO inaccuracies [HZ] +InputFilter0.IF=0 + +;# Decimation factor after the frequency tranaslating block +InputFilter0.decimation_factor=4 + +;######### RESAMPLER CONFIG 0 ############ +;## Resamples the input data. +Resampler0.implementation=Pass_Through + +;###################################################### +;######### RF CHANNEL 1 SIGNAL CONDITIONER ############ +;###################################################### + +;######### SIGNAL_CONDITIONER 1 CONFIG ############ +;## It holds blocks to change data type, filter and resample input data. +SignalConditioner1.implementation=Signal_Conditioner + +;######### DATA_TYPE_ADAPTER 1 CONFIG ############ +DataTypeAdapter1.implementation=Pass_Through +DataTypeAdapter1.item_type=gr_complex + +;######### INPUT_FILTER 0 CONFIG ############ +;## Filter the input data. Can be combined with frequency translation for IF signals + +;#implementation: Use [Pass_Through] or [Fir_Filter] or [Freq_Xlating_Fir_Filter] +;#[Pass_Through] disables this block +;#[Fir_Filter] enables a FIR Filter +;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation that shifts IF down to zero Hz. + +InputFilter1.implementation=Freq_Xlating_Fir_Filter + +;#dump: Dump the filtered data to a file. +InputFilter1.dump=false + +;#dump_filename: Log path and filename. +InputFilter1.dump_filename=../data/input_filter_ch1.dat + +;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. +;#These options are based on parameters of gnuradio's function: gr_remez. +;#These function calculates the optimal (in the Chebyshev/minimax sense) FIR filter inpulse reponse given a set of band edges, +;#the desired reponse on those bands, and the weight given to the error in those bands. + +;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version. +InputFilter1.input_item_type=gr_complex + +;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version. +InputFilter1.output_item_type=gr_complex + +;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. +InputFilter1.taps_item_type=float + +;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time +InputFilter1.number_of_taps=5 + +;#number_of _bands: Number of frequency bands in the filter. +InputFilter1.number_of_bands=2 + +;#bands: frequency at the band edges [ b1 e1 b2 e2 b3 e3 ...]. +;#Frequency is in the range [0, 1], with 1 being the Nyquist frequency (Fs/2) +;#The number of band_begin and band_end elements must match the number of bands + +InputFilter1.band1_begin=0.0 +InputFilter1.band1_end=0.45 +InputFilter1.band2_begin=0.55 +InputFilter1.band2_end=1.0 + +;#ampl: desired amplitude at the band edges [ a(b1) a(e1) a(b2) a(e2) ...]. +;#The number of ampl_begin and ampl_end elements must match the number of bands + +InputFilter1.ampl1_begin=1.0 +InputFilter1.ampl1_end=1.0 +InputFilter1.ampl2_begin=0.0 +InputFilter1.ampl2_end=0.0 + +;#band_error: weighting applied to each band (usually 1). +;#The number of band_error elements must match the number of bands +InputFilter1.band1_error=1.0 +InputFilter1.band2_error=1.0 + +;#filter_type: one of "bandpass", "hilbert" or "differentiator" +InputFilter1.filter_type=bandpass + +;#grid_density: determines how accurately the filter will be constructed. +;The minimum value is 16; higher values are slower to compute the filter. +InputFilter1.grid_density=16 + +;#The following options are used only in Freq_Xlating_Fir_Filter implementation. +;#InputFilter0.IF is the intermediate frequency (in Hz) shifted down to zero Hz +;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE +; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/ +InputFilter1.sampling_frequency=20000000 +;# IF deviation due to front-end LO inaccuracies [HZ] +InputFilter1.IF=0 + +;# Decimation factor after the frequency tranaslating block +InputFilter1.decimation_factor=4 + + +;######### RESAMPLER CONFIG 1 ############ +;## Resamples the input data. +Resampler1.implementation=Pass_Through + +;######### SIGNAL_CONDITIONER 2 CONFIG ############ +;## It holds blocks to change data type, filter and resample input data. +SignalConditioner2.implementation=Pass_Through + +;######### DATA_TYPE_ADAPTER 2 CONFIG ############ +DataTypeAdapter2.implementation=Pass_Through +DataTypeAdapter2.item_type=gr_complex + +;######### INPUT_FILTER 2 CONFIG ############ +InputFilter2.implementation=Pass_Through + +;#dump: Dump the filtered data to a file. +InputFilter2.dump=false + +;#dump_filename: Log path and filename. +InputFilter2.dump_filename=../data/input_filter.dat + +;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version. +InputFilter2.input_item_type=gr_complex + +;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version. +InputFilter2.output_item_type=gr_complex + +;######### RESAMPLER CONFIG 2 ############ +;## Resamples the input data. +Resampler2.implementation=Pass_Through + + +;######### CHANNELS GLOBAL CONFIG ############ +;#count: Number of available GPS satellite channels. +Channels_1C.count=8 +Channels_2S.count=8 + +;#GPS.prns=7,8 + +;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver +Channels.in_acquisition=8 + +;# signal: +;# "1C" GPS L1 C/A +;# "2S" GPS L2 L2C (M) +;# "1B" GALILEO E1 B (I/NAV OS/CS/SoL) +;# "5X" GALILEO E5a I+Q +;# CHANNEL NUMBERING ORDER: GPS L1 C/A, GPS L2 L2C (M), GALILEO E1 B, GALILEO E5a + +;# CHANNEL CONNECTION +Channel0.RF_channel_ID=0 +Channel1.RF_channel_ID=0 +Channel2.RF_channel_ID=0 +Channel3.RF_channel_ID=0 +Channel4.RF_channel_ID=0 +Channel5.RF_channel_ID=0 +Channel6.RF_channel_ID=0 +Channel7.RF_channel_ID=0 +Channel8.RF_channel_ID=1 +Channel9.RF_channel_ID=1 +Channel10.RF_channel_ID=1 +Channel11.RF_channel_ID=1 +Channel12.RF_channel_ID=1 +Channel13.RF_channel_ID=1 +Channel14.RF_channel_ID=1 +Channel15.RF_channel_ID=1 + + + +;######### ACQUISITION GENERIC CONFIG ###### +;#The following options are specific to each channel and overwrite the generic options + +Acquisition_1C.dump=false +Acquisition_1C.dump_filename=./acq_dump.dat +Acquisition_1C.item_type=gr_complex +Acquisition_1C.if=0 +Acquisition_1C.coherent_integration_time_ms=1 +Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition +Acquisition_1C.threshold=0.005 +Acquisition_1C.doppler_max=5000 +Acquisition_1C.doppler_step=250 +Acquisition_1C.bit_transition_flag=false +Acquisition_1C.max_dwells=1 + +Acquisition_2S.dump=false +Acquisition_2S.dump_filename=./acq_dump.dat +Acquisition_2S.item_type=gr_complex +Acquisition_2S.if=0 +Acquisition_2S.coherent_integration_time_ms=1 +Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition +Acquisition_2S.threshold=0.0005 +Acquisition_2S.doppler_max=5000 +Acquisition_2S.doppler_step=100 +Acquisition_2S.bit_transition_flag=false +Acquisition_2S.max_dwells=1 + +;# channel specific config + +Acquisition_2S1.dump=false +Acquisition_2S1.dump_filename=./acq_dump.dat +Acquisition_2S1.item_type=gr_complex +Acquisition_2S1.if=0 +Acquisition_2S1.coherent_integration_time_ms=1 +Acquisition_2S1.implementation=GPS_L2_M_PCPS_Acquisition +Acquisition_2S1.threshold=0.0005 +Acquisition_2S1.doppler_max=5000 +Acquisition_2S1.doppler_step=100 +Acquisition_2S1.bit_transition_flag=false +Acquisition_2S1.max_dwells=1 + + +;######### TRACKING CONFIG ############ + +;######### GPS L1 C/A GENERIC TRACKING CONFIG ############ +Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking +Tracking_1C.item_type=gr_complex +Tracking_1C.if=0 +Tracking_1C.dump=true +Tracking_1C.dump_filename=../data/epl_tracking_ch_ +Tracking_1C.pll_bw_hz=40.0; +Tracking_1C.dll_bw_hz=3.0; +Tracking_1C.order=3; +Tracking_1C.early_late_space_chips=0.5; + + +;######### GPS L2C GENERIC TRACKING CONFIG ############ +Tracking_2S.implementation=GPS_L2_M_DLL_PLL_Tracking +Tracking_2S.item_type=gr_complex +Tracking_2S.if=0 +Tracking_2S.dump=true +Tracking_2S.dump_filename=../data/epl_tracking_ch_ +Tracking_2S.pll_bw_hz=2.0; +Tracking_2S.dll_bw_hz=0.5; +Tracking_2S.order=2; +Tracking_2S.early_late_space_chips=0.5; + +;######### GPS L2C SPECIFIC CHANNEL TRACKING CONFIG ############ +Tracking_2S1.implementation=GPS_L2_M_DLL_PLL_Tracking +Tracking_2S1.item_type=gr_complex +Tracking_2S1.if=0 +Tracking_2S1.dump=true +Tracking_2S1.dump_filename=../data/epl_tracking_ch_ +Tracking_2S1.pll_bw_hz=2.0; +Tracking_2S1.dll_bw_hz=0.5; +Tracking_2S1.order=2; +Tracking_2S1.early_late_space_chips=0.5; + + +;######### TELEMETRY DECODER CONFIG ############ +TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder +TelemetryDecoder_1C.dump=false +TelemetryDecoder_1C.decimation_factor=20; + +TelemetryDecoder_2S.implementation=GPS_L2C_Telemetry_Decoder +TelemetryDecoder_2S.dump=false +TelemetryDecoder_2S.decimation_factor=1; + + +;######### OBSERVABLES CONFIG ############ +;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. +Observables.implementation=Hybrid_Observables + +;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] +Observables.dump=false + +;#dump_filename: Log path and filename. +Observables.dump_filename=./observables.dat + + +;######### PVT CONFIG ############ +;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. +PVT.implementation=Hybrid_PVT + +;#averaging_depth: Number of PVT observations in the moving average algorithm +PVT.averaging_depth=10 + +;#flag_average: Enables the PVT averaging between output intervals (arithmetic mean) [true] or [false] +PVT.flag_averaging=true + +;#output_rate_ms: Period between two PVT outputs. Notice that the minimum period is equal to the tracking integration time (for GPS CA L1 is 1ms) [ms] +PVT.output_rate_ms=100 + +;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms. +PVT.display_rate_ms=500 + +;# KML, GeoJSON, NMEA and RTCM output configuration + +;#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 + +;#nmea_dump_filename: NMEA log path and filename +PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea; + +;#flag_nmea_tty_port: Enable or disable the NMEA log to a serial TTY port (Can be used with real hardware or virtual one) +PVT.flag_nmea_tty_port=false; + +;#nmea_dump_devname: serial device descriptor for NMEA logging +PVT.nmea_dump_devname=/dev/pts/4 + +PVT.flag_rtcm_server=false +PVT.flag_rtcm_tty_port=false +PVT.rtcm_dump_devname=/dev/pts/1 + +;#dump: Enable or disable the PVT internal binary data file logging [true] or [false] +PVT.dump=false diff --git a/src/algorithms/PVT/adapters/CMakeLists.txt b/src/algorithms/PVT/adapters/CMakeLists.txt index 3a7e524dd..bea1757e5 100644 --- a/src/algorithms/PVT/adapters/CMakeLists.txt +++ b/src/algorithms/PVT/adapters/CMakeLists.txt @@ -17,8 +17,6 @@ # set(PVT_ADAPTER_SOURCES - gps_l1_ca_pvt.cc - galileo_e1_pvt.cc hybrid_pvt.cc ) diff --git a/src/algorithms/PVT/adapters/galileo_e1_pvt.cc b/src/algorithms/PVT/adapters/galileo_e1_pvt.cc deleted file mode 100644 index e2c75df27..000000000 --- a/src/algorithms/PVT/adapters/galileo_e1_pvt.cc +++ /dev/null @@ -1,141 +0,0 @@ -/*! - * \file galileo_e1_pvt.cc - * \brief Implementation of an adapter of a GALILEO E1 PVT solver block to a - * PvtInterface - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * - * - * ------------------------------------------------------------------------- - * - * 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 "galileo_e1_pvt.h" -#include -#include -#include "configuration_interface.h" - - -using google::LogMessage; - -GalileoE1Pvt::GalileoE1Pvt(ConfigurationInterface* configuration, - std::string role, - unsigned int in_streams, - unsigned int out_streams) : - role_(role), - in_streams_(in_streams), - out_streams_(out_streams) -{ - // dump parameters - std::string default_dump_filename = "./pvt.dat"; - std::string default_nmea_dump_filename = "./nmea_pvt.nmea"; - std::string default_nmea_dump_devname = "/dev/tty1"; - std::string default_rtcm_dump_devname = "/dev/pts/1"; - DLOG(INFO) << "role " << role; - - dump_ = configuration->property(role + ".dump", false); - dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); - - // moving average depth parameters - int averaging_depth = configuration->property(role + ".averaging_depth", 10); - bool flag_averaging = configuration->property(role + ".flag_averaging", false); - - // output rate - int output_rate_ms = configuration->property(role + ".output_rate_ms", 500); - - // display rate - int display_rate_ms = configuration->property(role + ".display_rate_ms", 500); - - // NMEA Printer settings - bool flag_nmea_tty_port = configuration->property(role + ".flag_nmea_tty_port", false); - std::string nmea_dump_filename = configuration->property(role + ".nmea_dump_filename", default_nmea_dump_filename); - std::string nmea_dump_devname = configuration->property(role + ".nmea_dump_devname", default_nmea_dump_devname); - - // RTCM Printer settings - bool flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false); - std::string rtcm_dump_devname = configuration->property(role + ".rtcm_dump_devname", default_rtcm_dump_devname); - bool flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false); - unsigned short rtcm_tcp_port = configuration->property(role + ".rtcm_tcp_port", 2101); - unsigned short rtcm_station_id = configuration->property(role + ".rtcm_station_id", 1234); - // RTCM message rates: least common multiple with output_rate_ms - int rtcm_MT1045_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1045_rate_ms", 5000), output_rate_ms); - int rtcm_MSM_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MSM_rate_ms", 1000), output_rate_ms); - std::map rtcm_msg_rate_ms; - rtcm_msg_rate_ms[1045] = rtcm_MT1045_rate_ms; - for (int k = 1091; k < 1098; k++) // All Galileo MSM - { - rtcm_msg_rate_ms[k] = rtcm_MSM_rate_ms; - } - - // make PVT object - pvt_ = galileo_e1_make_pvt_cc(in_streams_, - dump_, - dump_filename_, - averaging_depth, - flag_averaging, - output_rate_ms, - display_rate_ms, - flag_nmea_tty_port, - nmea_dump_filename, - nmea_dump_devname, - flag_rtcm_server, - flag_rtcm_tty_port, - rtcm_tcp_port, - rtcm_station_id, - rtcm_msg_rate_ms, - rtcm_dump_devname); - - DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")"; -} - - -GalileoE1Pvt::~GalileoE1Pvt() -{} - - -void GalileoE1Pvt::connect(gr::top_block_sptr top_block) -{ - if(top_block) { /* top_block is not null */}; - // Nothing to connect internally - DLOG(INFO) << "nothing to connect internally"; -} - - -void GalileoE1Pvt::disconnect(gr::top_block_sptr top_block) -{ - if(top_block) { /* top_block is not null */}; - // Nothing to disconnect -} - -gr::basic_block_sptr GalileoE1Pvt::get_left_block() -{ - return pvt_; -} - - -gr::basic_block_sptr GalileoE1Pvt::get_right_block() -{ - return pvt_; -} - diff --git a/src/algorithms/PVT/adapters/galileo_e1_pvt.h b/src/algorithms/PVT/adapters/galileo_e1_pvt.h deleted file mode 100644 index 3614c123a..000000000 --- a/src/algorithms/PVT/adapters/galileo_e1_pvt.h +++ /dev/null @@ -1,94 +0,0 @@ -/*! - * \file galileo_e1_pvt.h - * \brief Interface of an adapter of a GALILEO E1 PVT solver block to a - * PvtInterface. - * \author Javier Arribas, 2013. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * 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_GALILEO_E1_PVT_H_ -#define GNSS_SDR_GALILEO_E1_PVT_H_ - -#include -#include "pvt_interface.h" -#include "galileo_e1_pvt_cc.h" - - -class ConfigurationInterface; - -/*! - * \brief This class implements a PvtInterface for Galileo E1 - */ -class GalileoE1Pvt : public PvtInterface -{ -public: - GalileoE1Pvt(ConfigurationInterface* configuration, - std::string role, - unsigned int in_streams, - unsigned int out_streams); - - virtual ~GalileoE1Pvt(); - - std::string role() - { - return role_; - } - - //! Returns "GALILEO_E1_PVT" - std::string implementation() - { - return "GALILEO_E1_PVT"; - } - - 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 reset() - { - return; - } - - //! All blocks must have an item_size() function implementation. Returns sizeof(gr_complex) - size_t item_size() - { - return sizeof(gr_complex); - } - -private: - galileo_e1_pvt_cc_sptr pvt_; - bool dump_; - //unsigned int fs_in_; - std::string dump_filename_; - std::string role_; - unsigned int in_streams_; - unsigned int out_streams_; -}; - -#endif diff --git a/src/algorithms/PVT/adapters/gps_l1_ca_pvt.cc b/src/algorithms/PVT/adapters/gps_l1_ca_pvt.cc deleted file mode 100644 index ba244b5ae..000000000 --- a/src/algorithms/PVT/adapters/gps_l1_ca_pvt.cc +++ /dev/null @@ -1,250 +0,0 @@ -/*! - * \file gps_l1_ca_pvt.cc - * \brief Implementation of an adapter of a GPS L1 C/A PVT solver block to a - * PvtInterface - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * - * - * ------------------------------------------------------------------------- - * - * 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_pvt.h" -#include -#include -#include -#include -#include -#include "configuration_interface.h" - -using google::LogMessage; - -GpsL1CaPvt::GpsL1CaPvt(ConfigurationInterface* configuration, - std::string role, - unsigned int in_streams, - unsigned int out_streams) : - role_(role), - in_streams_(in_streams), - out_streams_(out_streams) -{ - // dump parameters - std::string default_dump_filename = "./pvt.dat"; - std::string default_nmea_dump_filename = "./nmea_pvt.nmea"; - std::string default_nmea_dump_devname = "/dev/tty1"; - std::string default_rtcm_dump_devname = "/dev/pts/1"; - DLOG(INFO) << "role " << role; - dump_ = configuration->property(role + ".dump", false); - dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); - // moving average depth parameters - int averaging_depth = configuration->property(role + ".averaging_depth", 10); - bool flag_averaging = configuration->property(role + ".flag_averaging", false); - - // output rate - int output_rate_ms = configuration->property(role + ".output_rate_ms", 500); - - // display rate - int display_rate_ms = configuration->property(role + ".display_rate_ms", 500); - - // NMEA Printer settings - bool flag_nmea_tty_port = configuration->property(role + ".flag_nmea_tty_port", false); - std::string nmea_dump_filename = configuration->property(role + ".nmea_dump_filename", default_nmea_dump_filename); - std::string nmea_dump_devname = configuration->property(role + ".nmea_dump_devname", default_nmea_dump_devname); - - // RTCM Printer settings - bool flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false); - std::string rtcm_dump_devname = configuration->property(role + ".rtcm_dump_devname", default_rtcm_dump_devname); - bool flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false); - unsigned short rtcm_tcp_port = configuration->property(role + ".rtcm_tcp_port", 2101); - unsigned short rtcm_station_id = configuration->property(role + ".rtcm_station_id", 1234); - // RTCM message rates: least common multiple with output_rate_ms - int rtcm_MT1019_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1019_rate_ms", 5000), output_rate_ms); - int rtcm_MSM_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MSM_rate_ms", 1000), output_rate_ms); - std::map rtcm_msg_rate_ms; - rtcm_msg_rate_ms[1019] = rtcm_MT1019_rate_ms; - for (int k = 1071; k < 1078; k++) // All GPS MSM - { - rtcm_msg_rate_ms[k] = rtcm_MSM_rate_ms; - } - - // getting names from the config file, if available - // default filename for assistance data - const std::string eph_default_xml_filename = "./gps_ephemeris.xml"; - eph_xml_filename_= configuration->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename); - - //const std::string utc_default_xml_filename = "./gps_utc_model.xml"; - //const std::string iono_default_xml_filename = "./gps_iono.xml"; - //const std::string ref_time_default_xml_filename = "./gps_ref_time.xml"; - //const std::string ref_location_default_xml_filename = "./gps_ref_location.xml"; - - //std::string utc_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_utc_model.xml", utc_default_xml_filename); - //std::string iono_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_iono_xml", iono_default_xml_filename); - //std::string ref_time_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_time_xml", ref_time_default_xml_filename); - //std::string ref_location_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_location_xml", ref_location_default_xml_filename); - - // RINEX version - int conf_rinex_version; - conf_rinex_version = configuration->property(role + ".rinex_version", 0); - - // make PVT object - pvt_ = gps_l1_ca_make_pvt_cc(in_streams_, - dump_, - dump_filename_, - averaging_depth, - flag_averaging, - output_rate_ms, - display_rate_ms, - flag_nmea_tty_port, - nmea_dump_filename, - nmea_dump_devname, - flag_rtcm_server, - flag_rtcm_tty_port, - rtcm_tcp_port, - rtcm_station_id, - rtcm_msg_rate_ms, - rtcm_dump_devname, - conf_rinex_version ); - - DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")"; -} - - -bool GpsL1CaPvt::save_assistance_to_XML() -{ - // return variable (true == succeeded) - bool ret = false; - - LOG(INFO) << "SUPL: Try to save GPS ephemeris to XML file " << eph_xml_filename_; - std::map eph_map = pvt_->get_GPS_L1_ephemeris_map(); - - if (eph_map.size() > 0) - { - try - { - std::ofstream ofs(eph_xml_filename_.c_str(), std::ofstream::trunc | std::ofstream::out); - boost::archive::xml_oarchive xml(ofs); - xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", eph_map); - ofs.close(); - LOG(INFO) << "Saved GPS L1 Ephemeris map data"; - } - catch (std::exception& e) - { - LOG(WARNING) << e.what(); - return false; - } - return true; - } - else - { - LOG(WARNING) << "Failed to save Ephemeris, map is empty"; - return false; - } - // Only try to save {utc, iono, ref time, ref location} if SUPL is enabled - // bool enable_gps_supl_assistance = configuration_->property("GNSS-SDR.SUPL_gps_enabled", false); - // if (enable_gps_supl_assistance == true) - // { - // // try to save utc model xml file - // std::map utc_copy = global_gps_utc_model_map.get_map_copy(); - // if (supl_client_acquisition_.save_utc_map_xml(utc_xml_filename, utc_copy) == true) - // { - // LOG(INFO) << "SUPL: Successfully saved UTC Model XML file"; - // //ret = true; - // } - // else - // { - // LOG(INFO) << "SUPL: Error while trying to save utc XML file"; - // //ret = false; - // } - // // try to save iono model xml file - // std::map iono_copy = global_gps_iono_map.get_map_copy(); - // if (supl_client_acquisition_.save_iono_map_xml(iono_xml_filename, iono_copy) == true) - // { - // LOG(INFO) << "SUPL: Successfully saved IONO Model XML file"; - // //ret = true; - // } - // else - // { - // LOG(INFO) << "SUPL: Error while trying to save iono XML file"; - // //ret = false; - // } - // // try to save ref time xml file - // std::map ref_time_copy = global_gps_ref_time_map.get_map_copy(); - // if (supl_client_acquisition_.save_ref_time_map_xml(ref_time_xml_filename, ref_time_copy) == true) - // { - // LOG(INFO) << "SUPL: Successfully saved Ref Time XML file"; - // //ret = true; - // } - // else - // { - // LOG(INFO) << "SUPL: Error while trying to save ref time XML file"; - // //ref = false; - // } - // // try to save ref location xml file - // std::map ref_location_copy = global_gps_ref_location_map.get_map_copy(); - // if (supl_client_acquisition_.save_ref_location_map_xml(ref_location_xml_filename, ref_location_copy) == true) - // { - // LOG(INFO) << "SUPL: Successfully saved Ref Location XML file"; - // //ref = true; - // } - // else - // { - // LOG(INFO) << "SUPL: Error while trying to save ref location XML file"; - // //ret = false; - // } - // } - return ret; -} - - -GpsL1CaPvt::~GpsL1CaPvt() -{ - save_assistance_to_XML(); -} - - -void GpsL1CaPvt::connect(gr::top_block_sptr top_block) -{ - if(top_block) { /* top_block is not null */}; - // Nothing to connect internally - DLOG(INFO) << "nothing to connect internally"; -} - - -void GpsL1CaPvt::disconnect(gr::top_block_sptr top_block) -{ - if(top_block) { /* top_block is not null */}; - // Nothing to disconnect -} - - -gr::basic_block_sptr GpsL1CaPvt::get_left_block() -{ - return pvt_; -} - - -gr::basic_block_sptr GpsL1CaPvt::get_right_block() -{ - return pvt_; -} diff --git a/src/algorithms/PVT/adapters/gps_l1_ca_pvt.h b/src/algorithms/PVT/adapters/gps_l1_ca_pvt.h deleted file mode 100644 index 4787f94bd..000000000 --- a/src/algorithms/PVT/adapters/gps_l1_ca_pvt.h +++ /dev/null @@ -1,98 +0,0 @@ -/*! - * \file gps_l1_ca_pvt.h - * \brief Interface of an adapter of a GPS L1 C/A PVT solver block to a - * PvtInterface - * Position Velocity and Time - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * - * - * ------------------------------------------------------------------------- - * - * 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_PVT_H_ -#define GNSS_SDR_GPS_L1_CA_PVT_H_ - -#include -#include "pvt_interface.h" -#include "gps_l1_ca_pvt_cc.h" - - -class ConfigurationInterface; - -/*! - * \brief This class implements a PvtInterface for GPS L1 C/A - */ -class GpsL1CaPvt : public PvtInterface -{ -public: - GpsL1CaPvt(ConfigurationInterface* configuration, - std::string role, - unsigned int in_streams, - unsigned int out_streams); - - virtual ~GpsL1CaPvt(); - - std::string role() - { - return role_; - } - - //! Returns "GPS_L1_CA_PVT" - std::string implementation() - { - return "GPS_L1_CA_PVT"; - } - - 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 reset() - { - return; - } - - //! All blocks must have an item_size() function implementation. Returns sizeof(gr_complex) - size_t item_size() - { - return sizeof(gr_complex); - } - -private: - gps_l1_ca_pvt_cc_sptr pvt_; - bool dump_; - std::string dump_filename_; - std::string role_; - unsigned int in_streams_; - unsigned int out_streams_; - - std::string eph_xml_filename_; - bool save_assistance_to_XML(); -}; - -#endif diff --git a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt index 1eb1eaf1c..07a4d18f1 100644 --- a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt @@ -17,8 +17,6 @@ # set(PVT_GR_BLOCKS_SOURCES - gps_l1_ca_pvt_cc.cc - galileo_e1_pvt_cc.cc hybrid_pvt_cc.cc ) diff --git a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc deleted file mode 100644 index e7c1f9813..000000000 --- a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc +++ /dev/null @@ -1,424 +0,0 @@ -/*! - * \file galileo_e1_pvt_cc.cc - * \brief Implementation of a Position Velocity and Time computation block for GPS L1 C/A - * \author Javier Arribas, 2013. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * 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 "galileo_e1_pvt_cc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "concurrent_map.h" - -using google::LogMessage; - - -galileo_e1_pvt_cc_sptr galileo_e1_make_pvt_cc(unsigned int nchannels, 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, unsigned short rtcm_tcp_port, - unsigned short rtcm_station_id, std::map rtcm_msg_rate_ms, std::string rtcm_dump_devname) -{ - return galileo_e1_pvt_cc_sptr(new galileo_e1_pvt_cc(nchannels, dump, dump_filename, averaging_depth, - flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, - flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_msg_rate_ms, rtcm_dump_devname)); -} - - -void galileo_e1_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg) -{ - try { - if( pmt::any_ref(msg).type() == typeid(std::shared_ptr) ) - { - // ### Galileo EPHEMERIS ### - std::shared_ptr galileo_eph; - galileo_eph = boost::any_cast>(pmt::any_ref(msg)); - // insert new ephemeris record - DLOG(INFO) << "Galileo New Ephemeris record inserted in global map with TOW =" << galileo_eph->TOW_5 - << ", GALILEO Week Number =" << galileo_eph->WN_5 - << " and Ephemeris IOD = " << galileo_eph->IOD_ephemeris; - // update/insert new ephemeris record to the global ephemeris map - d_ls_pvt->galileo_ephemeris_map[galileo_eph->i_satellite_PRN] = *galileo_eph; - } - else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr) ) - { - // ### Galileo IONO ### - std::shared_ptr galileo_iono; - galileo_iono = boost::any_cast>(pmt::any_ref(msg)); - d_ls_pvt->galileo_iono = *galileo_iono; - DLOG(INFO) << "New IONO record has arrived "; - } - else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr) ) - { - // ### Galileo UTC MODEL ### - std::shared_ptr galileo_utc_model; - galileo_utc_model = boost::any_cast>(pmt::any_ref(msg)); - d_ls_pvt->galileo_utc_model = *galileo_utc_model; - DLOG(INFO) << "New UTC record has arrived "; - } - else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr) ) - { - // ### Galileo Almanac ### - std::shared_ptr galileo_almanac; - galileo_almanac = boost::any_cast>(pmt::any_ref(msg)); - // update/insert new ephemeris record to the global ephemeris map - d_ls_pvt->galileo_almanac = *galileo_almanac; - DLOG(INFO) << "New Galileo Almanac has arrived "; - } - else - { - LOG(WARNING) << "msg_handler_telemetry unknown object type!"; - } - - } - catch(boost::bad_any_cast& e) - { - LOG(WARNING) << "msg_handler_telemetry Bad any cast!\n"; - } -} - - -galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, 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, unsigned short rtcm_tcp_port, - unsigned short rtcm_station_id, std::map rtcm_msg_rate_ms, std::string rtcm_dump_devname) : - gr::block("galileo_e1_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), gr::io_signature::make(0, 0, sizeof(gr_complex))) -{ - d_output_rate_ms = output_rate_ms; - d_display_rate_ms = display_rate_ms; - d_dump = dump; - d_nchannels = nchannels; - d_dump_filename = dump_filename; - std::string dump_ls_pvt_filename = dump_filename; - - // GPS Ephemeris data message port in - this->message_port_register_in(pmt::mp("telemetry")); - this->set_msg_handler(pmt::mp("telemetry"), boost::bind(&galileo_e1_pvt_cc::msg_handler_telemetry, this, _1)); - - //initialize kml_printer - std::string kml_dump_filename; - kml_dump_filename = d_dump_filename; - d_kml_dump = std::make_shared(); - d_kml_dump->set_headers(kml_dump_filename); - - //initialize geojson_printer - std::string geojson_dump_filename; - geojson_dump_filename = d_dump_filename; - d_geojson_printer = std::make_shared(); - d_geojson_printer->set_headers(geojson_dump_filename); - - //initialize nmea_printer - d_nmea_printer = std::make_shared(nmea_dump_filename, flag_nmea_tty_port, nmea_dump_devname); - - //initialize rtcm_printer - std::string rtcm_dump_filename; - rtcm_dump_filename = d_dump_filename; - unsigned short _port = rtcm_tcp_port; - unsigned short _station_id = rtcm_station_id; - d_rtcm_printer = std::make_shared(rtcm_dump_filename, flag_rtcm_server, flag_rtcm_tty_port, _port, _station_id, rtcm_dump_devname); - if(rtcm_msg_rate_ms.find(1045) != rtcm_msg_rate_ms.end()) - { - d_rtcm_MT1045_rate_ms = rtcm_msg_rate_ms[1045]; - } - else - { - d_rtcm_MT1045_rate_ms = boost::math::lcm(5000, d_output_rate_ms); // default value if not set - } - if(rtcm_msg_rate_ms.find(1091) != rtcm_msg_rate_ms.end()) // whatever between 1091 and 1097 - { - d_rtcm_MSM_rate_ms = rtcm_msg_rate_ms[1091]; - } - else - { - d_rtcm_MSM_rate_ms = boost::math::lcm(1000, d_output_rate_ms); // default value if not set - } - b_rtcm_writing_started = false; - - d_dump_filename.append("_raw.dat"); - dump_ls_pvt_filename.append("_ls_pvt.dat"); - d_averaging_depth = averaging_depth; - d_flag_averaging = flag_averaging; - - d_ls_pvt = std::make_shared(nchannels, dump_ls_pvt_filename, d_dump); - d_ls_pvt->set_averaging_depth(d_averaging_depth); - - d_sample_counter = 0; - d_last_sample_nav_output = 0; - d_rx_time = 0.0; - - b_rinex_header_written = false; - b_rinex_header_updated = false; - - rp = std::make_shared(); - - d_last_status_print_seg = 0; - - // ############# ENABLE DATA FILE LOG ################# - if (d_dump == true) - { - if (d_dump_file.is_open() == false) - { - try - { - 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) << "PVT dump enabled Log file: " << d_dump_filename.c_str(); - } - catch (const std::ifstream::failure& e) - { - LOG(WARNING) << "Exception opening PVT dump file " << e.what(); - } - } - } - - // Create Sys V message queue - first_fix = true; - sysv_msg_key = 1101; - int msgflg = IPC_CREAT | 0666; - if ((sysv_msqid = msgget(sysv_msg_key, msgflg )) == -1) - { - std::cout << "GNSS-SDR can not create message queues!" << std::endl; - throw new std::exception(); - } -} - - - -galileo_e1_pvt_cc::~galileo_e1_pvt_cc() -{ - msgctl(sysv_msqid, IPC_RMID, NULL); -} - - -void galileo_e1_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; - } -} - - -bool galileo_e1_pvt_cc::send_sys_v_ttff_msg(ttff_msgbuf ttff) -{ - /* Fill Sys V message structures */ - int msgsend_size; - ttff_msgbuf msg; - msg.ttff = ttff.ttff; - msgsend_size = sizeof(msg.ttff); - msg.mtype = 1; /* default message ID */ - - /* SEND SOLUTION OVER A MESSAGE QUEUE */ - /* non-blocking Sys V message send */ - msgsnd(sysv_msqid, &msg, msgsend_size, IPC_NOWAIT); - return true; -} - -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++; - - std::map gnss_observables_map; - - Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; //Get the input pointer - - print_receiver_status(in); - - // ############ 1. READ PSEUDORANGES #### - for (unsigned int i = 0; i < d_nchannels; i++) - { - if (in[i][0].Flag_valid_pseudorange == true) - { - gnss_observables_map.insert(std::pair(in[i][0].PRN, in[i][0])); // store valid pseudoranges in a map - d_rx_time = in[i][0].d_TOW_at_current_symbol; // all the channels have the same RX timestamp (common RX time pseudoranges) - if(d_ls_pvt->galileo_ephemeris_map.size() > 0) - { - std::map::iterator tmp_eph_iter = d_ls_pvt->galileo_ephemeris_map.find(in[i][0].PRN); - if(tmp_eph_iter != d_ls_pvt->galileo_ephemeris_map.end()) - { - d_rtcm_printer->lock_time(d_ls_pvt->galileo_ephemeris_map.find(in[i][0].PRN)->second, d_rx_time, in[i][0]); // keep track of locking time - } - } - } - } - - // ############ 2 COMPUTE THE PVT ################################ - if (gnss_observables_map.size() > 0 and d_ls_pvt->galileo_ephemeris_map.size() > 0) - { - // compute on the fly PVT solution - if ((d_sample_counter % d_output_rate_ms) == 0) - { - bool pvt_result; - pvt_result = d_ls_pvt->get_PVT(gnss_observables_map, d_rx_time, d_flag_averaging); - - if (pvt_result == true) - { - // correct the observable to account for the receiver clock offset - for (std::map::iterator it = gnss_observables_map.begin(); it != gnss_observables_map.end(); ++it) - { - it->second.Pseudorange_m = it->second.Pseudorange_m - d_ls_pvt->d_rx_dt_s * GPS_C_m_s; - } - if( first_fix == true) - { - std::cout << "First position fix at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d - << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl; - ttff_msgbuf ttff; - ttff.mtype = 1; - ttff.ttff = d_sample_counter; - send_sys_v_ttff_msg(ttff); - first_fix = false; - } - d_kml_dump->print_position(d_ls_pvt, d_flag_averaging); - d_geojson_printer->print_position(d_ls_pvt, d_flag_averaging); - d_nmea_printer->Print_Nmea_Line(d_ls_pvt, d_flag_averaging); - - if (!b_rinex_header_written) - { - std::map::iterator galileo_ephemeris_iter; - galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); - if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) - { - rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time); - rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); - b_rinex_header_written = true; // do not write header anymore - } - } - if(b_rinex_header_written) // Put here another condition to separate annotations (e.g 30 s) - { - // Limit the RINEX navigation output rate to 1/6 seg - // Notice that d_sample_counter period is 4ms (for Galileo correlators) - if ((d_sample_counter - d_last_sample_nav_output) >= 6000) - { - rp->log_rinex_nav(rp->navGalFile, d_ls_pvt->galileo_ephemeris_map); - d_last_sample_nav_output = d_sample_counter; - } - std::map::iterator galileo_ephemeris_iter; - galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); - if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) - { - rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map); - } - if (!b_rinex_header_updated && (d_ls_pvt->galileo_utc_model.A0_6 != 0)) - { - rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); - rp->update_obs_header(rp->obsFile, d_ls_pvt->galileo_utc_model); - b_rinex_header_updated = true; - } - } - - if(b_rtcm_writing_started) - { - if((d_sample_counter % (d_rtcm_MT1045_rate_ms / 4) ) == 0) - { - for(std::map::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end(); gal_ephemeris_iter++ ) - { - d_rtcm_printer->Print_Rtcm_MT1045(gal_ephemeris_iter->second); - } - } - if((d_sample_counter % (d_rtcm_MSM_rate_ms / 4) ) == 0) - { - std::map::iterator gal_ephemeris_iter; - gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); - if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) - { - d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); - } - } - } - if(!b_rtcm_writing_started) // the first time - { - for(std::map::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end(); gal_ephemeris_iter++ ) - { - d_rtcm_printer->Print_Rtcm_MT1045(gal_ephemeris_iter->second); - } - - std::map::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); - - if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) - { - d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); - } - b_rtcm_writing_started = true; - } - } - } - - // DEBUG MESSAGE: Display position in console output - if (((d_sample_counter % d_display_rate_ms) == 0) and d_ls_pvt->b_valid_position == true) - { - std::cout << "Galileo Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d - << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl; - - LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d - << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]"; - - LOG(INFO) << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " is HDOP = " << d_ls_pvt->d_HDOP << " VDOP = " - << d_ls_pvt->d_VDOP <<" TDOP = " << d_ls_pvt->d_TDOP - << " GDOP = " << d_ls_pvt->d_GDOP; - } - - // MULTIPLEXED FILE RECORDING - Record results to file - if(d_dump == true) - { - try - { - double tmp_double; - for (unsigned int i = 0; i < d_nchannels; i++) - { - tmp_double = in[i][0].Pseudorange_m; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - tmp_double = 0; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - d_dump_file.write((char*)&d_rx_time, sizeof(double)); - } - } - catch (const std::ifstream::failure& e) - { - LOG(WARNING) << "Exception writing observables dump file " << e.what(); - } - } - } - - consume_each(1); //one by one - 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 deleted file mode 100644 index 6a16dd566..000000000 --- a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.h +++ /dev/null @@ -1,155 +0,0 @@ -/*! - * \file galileo_e1_pvt_cc.h - * \brief Interface of a Position Velocity and Time computation block for Galileo E1 - * \author Javier Arribas, 2013. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * 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_GALILEO_E1_PVT_CC_H -#define GNSS_SDR_GALILEO_E1_PVT_CC_H - -#include -#include -#include -#include -#include -#include -#include -#include "nmea_printer.h" -#include "kml_printer.h" -#include "rinex_printer.h" -#include "geojson_printer.h" -#include "rtcm_printer.h" -#include "galileo_e1_ls_pvt.h" - - -class galileo_e1_pvt_cc; - -typedef boost::shared_ptr galileo_e1_pvt_cc_sptr; - -galileo_e1_pvt_cc_sptr galileo_e1_make_pvt_cc(unsigned int n_channels, - 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, - unsigned short rtcm_tcp_port, - unsigned short rtcm_station_id, - std::map rtcm_msg_rate_ms, - std::string rtcm_dump_devname); - -/*! - * \brief This class implements a block that computes the PVT solution with Galileo E1 signals - */ -class galileo_e1_pvt_cc : public gr::block -{ -private: - friend galileo_e1_pvt_cc_sptr galileo_e1_make_pvt_cc(unsigned int nchannels, - 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, - unsigned short rtcm_tcp_port, - unsigned short rtcm_station_id, - std::map rtcm_msg_rate_ms, - std::string rtcm_dump_devname); - galileo_e1_pvt_cc(unsigned int nchannels, - 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, - unsigned short rtcm_tcp_port, - unsigned short rtcm_station_id, - std::map rtcm_msg_rate_ms, - std::string rtcm_dump_devname); - - void msg_handler_telemetry(pmt::pmt_t msg); - - bool d_dump; - bool b_rinex_header_written; - 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; - int d_averaging_depth; - bool d_flag_averaging; - int d_output_rate_ms; - int d_display_rate_ms; - long unsigned int d_sample_counter; - long unsigned int d_last_sample_nav_output; - int d_rtcm_MT1045_rate_ms; - int d_rtcm_MSM_rate_ms; - - std::shared_ptr rp; - std::shared_ptr d_kml_dump; - std::shared_ptr d_nmea_printer; - std::shared_ptr d_geojson_printer; - std::shared_ptr d_rtcm_printer; - - double d_rx_time; - std::shared_ptr d_ls_pvt; - - bool first_fix; - key_t sysv_msg_key; - int sysv_msqid; - typedef struct { - long mtype;//required by sys v message - double ttff; - } ttff_msgbuf; - bool send_sys_v_ttff_msg(ttff_msgbuf ttff); - -public: - ~galileo_e1_pvt_cc (); //!< Default destructor - - int general_work (int noutput_items, gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); //!< PVT Signal Processing -}; - -#endif 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 deleted file mode 100644 index dddb3ee16..000000000 --- a/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc +++ /dev/null @@ -1,505 +0,0 @@ -/*! - * \file gps_l1_ca_pvt_cc.cc - * \brief Implementation of a Position Velocity and Time computation block for GPS L1 C/A - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * ------------------------------------------------------------------------- - * - * 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_pvt_cc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "concurrent_map.h" -#include "sbas_telemetry_data.h" -#include "sbas_ionospheric_correction.h" - -using google::LogMessage; - -gps_l1_ca_pvt_cc_sptr -gps_l1_ca_make_pvt_cc(unsigned int nchannels, - 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, - unsigned short rtcm_tcp_port, - unsigned short rtcm_station_id, - std::map rtcm_msg_rate_ms, - std::string rtcm_dump_devname, - int rinex_version) -{ - return gps_l1_ca_pvt_cc_sptr(new gps_l1_ca_pvt_cc(nchannels, - dump, - dump_filename, - averaging_depth, - flag_averaging, - output_rate_ms, - display_rate_ms, - flag_nmea_tty_port, - nmea_dump_filename, - nmea_dump_devname, - flag_rtcm_server, - flag_rtcm_tty_port, - rtcm_tcp_port, - rtcm_station_id, - rtcm_msg_rate_ms, - rtcm_dump_devname, - rinex_version)); -} - - -void gps_l1_ca_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg) -{ - try { - if( pmt::any_ref(msg).type() == typeid(std::shared_ptr) ) - { - // ### GPS EPHEMERIS ### - std::shared_ptr gps_eph; - gps_eph = boost::any_cast>(pmt::any_ref(msg)); - DLOG(INFO) << "Ephemeris record has arrived from SAT ID " - << gps_eph->i_satellite_PRN << " (Block " - << gps_eph->satelliteBlock[gps_eph->i_satellite_PRN] << ")" - << "inserted with Toe="<< gps_eph->d_Toe<<" and GPS Week=" - << gps_eph->i_GPS_week; - // update/insert new ephemeris record to the global ephemeris map - d_ls_pvt->gps_ephemeris_map[gps_eph->i_satellite_PRN] = *gps_eph; - } - else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr) ) - { - // ### GPS IONO ### - std::shared_ptr gps_iono; - gps_iono = boost::any_cast>(pmt::any_ref(msg)); - d_ls_pvt->gps_iono = *gps_iono; - DLOG(INFO) << "New IONO record has arrived "; - } - else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr) ) - { - // ### GPS UTC MODEL ### - std::shared_ptr gps_utc_model; - gps_utc_model = boost::any_cast>(pmt::any_ref(msg)); - d_ls_pvt->gps_utc_model = *gps_utc_model; - DLOG(INFO) << "New UTC record has arrived "; - } - else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr) ) - { - // ### SBAS IONO ### - std::shared_ptr sbas_iono; - sbas_iono = boost::any_cast>(pmt::any_ref(msg)); - d_ls_pvt->sbas_iono = *sbas_iono; - DLOG(INFO) << "New SBAS IONO record has arrived "; - } - - //TODO: add SBAS correction maps here - //d_ls_pvt->sbas_sat_corr_map = global_sbas_sat_corr_map.get_map_copy(); - //d_ls_pvt->sbas_ephemeris_map = global_sbas_ephemeris_map.get_map_copy(); - - else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr) ) - { - std::shared_ptr sbas_raw_msg_ptr; - sbas_raw_msg_ptr = boost::any_cast>(pmt::any_ref(msg)); - Sbas_Raw_Msg sbas_raw_msg = *sbas_raw_msg_ptr; - // read SBAS raw messages directly from queue and write them into rinex file - // create the header of not yet done - if(!b_rinex_sbs_header_written) - { - rp->rinex_sbs_header(rp->sbsFile); - b_rinex_sbs_header_written = true; - } - - // Define the RX time of the SBAS message by using the GPS time. - // It has only an effect if there has not been yet a SBAS MT12 available - // when the message was received. - if(sbas_raw_msg.get_rx_time_obj().is_related() == false - && gnss_observables_map.size() > 0 - && d_ls_pvt->gps_ephemeris_map.size() > 0) - { - // doesn't matter which channel/satellite we choose - Gnss_Synchro gs = gnss_observables_map.begin()->second; - Gps_Ephemeris eph = d_ls_pvt->gps_ephemeris_map.begin()->second; - - double relative_rx_time = gs.Tracking_timestamp_secs; - int gps_week = eph.i_GPS_week; - double gps_sec = gs.d_TOW_at_current_symbol; - - Sbas_Time_Relation time_rel(relative_rx_time, gps_week, gps_sec); - sbas_raw_msg.relate(time_rel); - } - - // send the message to the rinex logger if it has a valid GPS time stamp - if(sbas_raw_msg.get_rx_time_obj().is_related()) - { - rp->log_rinex_sbs(rp->sbsFile, sbas_raw_msg); - } - } - else - { - LOG(WARNING) << "msg_handler_telemetry unknown object type!"; - } - } - catch(boost::bad_any_cast& e) - { - LOG(WARNING) << "msg_handler_telemetry Bad any cast!\n"; - } -} - - -std::map gps_l1_ca_pvt_cc::get_GPS_L1_ephemeris_map() -{ - return d_ls_pvt->gps_ephemeris_map; -} - -bool gps_l1_ca_pvt_cc::send_sys_v_ttff_msg(ttff_msgbuf ttff) -{ - /* Fill Sys V message structures */ - int msgsend_size; - ttff_msgbuf msg; - msg.ttff = ttff.ttff; - msgsend_size = sizeof(msg.ttff); - msg.mtype = 1; /* default message ID */ - - /* SEND SOLUTION OVER A MESSAGE QUEUE */ - /* non-blocking Sys V message send */ - msgsnd(sysv_msqid, &msg, msgsend_size, IPC_NOWAIT); - return true; -} - -gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels, - 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, - unsigned short rtcm_tcp_port, - unsigned short rtcm_station_id, - std::map rtcm_msg_rate_ms, - std::string rtcm_dump_devname, - int rinex_version) : - gr::block("gps_l1_ca_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), - gr::io_signature::make(0, 0, sizeof(gr_complex)) ) -{ - d_output_rate_ms = output_rate_ms; - d_display_rate_ms = display_rate_ms; - d_dump = dump; - d_nchannels = nchannels; - d_dump_filename = dump_filename; - std::string dump_ls_pvt_filename = dump_filename; - - // GPS Ephemeris data message port in - this->message_port_register_in(pmt::mp("telemetry")); - this->set_msg_handler(pmt::mp("telemetry"), - boost::bind(&gps_l1_ca_pvt_cc::msg_handler_telemetry, this, _1)); - - // initialize kml_printer - std::string kml_dump_filename; - kml_dump_filename = d_dump_filename; - d_kml_printer = std::make_shared(); - d_kml_printer->set_headers(kml_dump_filename); - - // initialize geojson_printer - std::string geojson_dump_filename; - geojson_dump_filename = d_dump_filename; - d_geojson_printer = std::make_shared(); - d_geojson_printer->set_headers(geojson_dump_filename); - - // initialize nmea_printer - d_nmea_printer = std::make_shared(nmea_dump_filename, flag_nmea_tty_port, nmea_dump_devname); - - // initialize rtcm_printer - std::string rtcm_dump_filename; - rtcm_dump_filename = d_dump_filename; - d_rtcm_tcp_port = rtcm_tcp_port; - d_rtcm_station_id = rtcm_station_id; - d_rtcm_printer = std::make_shared(rtcm_dump_filename, flag_rtcm_server, flag_rtcm_tty_port, d_rtcm_tcp_port, d_rtcm_station_id, rtcm_dump_devname); - if(rtcm_msg_rate_ms.find(1019) != rtcm_msg_rate_ms.end()) - { - d_rtcm_MT1019_rate_ms = rtcm_msg_rate_ms[1019]; - } - else - { - d_rtcm_MT1019_rate_ms = boost::math::lcm(5000, d_output_rate_ms); // default value if not set - } - if(rtcm_msg_rate_ms.find(1071) != rtcm_msg_rate_ms.end()) // whatever between 1071 and 1077 - { - d_rtcm_MSM_rate_ms = rtcm_msg_rate_ms[1071]; - } - else - { - d_rtcm_MSM_rate_ms = boost::math::lcm(1000, d_output_rate_ms); // default value if not set - } - b_rtcm_writing_started = false; - - d_dump_filename.append("_raw.dat"); - dump_ls_pvt_filename.append("_ls_pvt.dat"); - d_averaging_depth = averaging_depth; - d_flag_averaging = flag_averaging; - - d_ls_pvt = std::make_shared((int)nchannels, dump_ls_pvt_filename, d_dump); - d_ls_pvt->set_averaging_depth(d_averaging_depth); - - d_sample_counter = 0; - d_last_sample_nav_output = 0; - d_rx_time = 0.0; - - d_last_status_print_seg = 0; - - b_rinex_header_written = false; - b_rinex_header_updated = false; - b_rinex_sbs_header_written = false; - rp = std::make_shared(rinex_version); - - // ############# ENABLE DATA FILE LOG ################# - if (d_dump == true) - { - if (d_dump_file.is_open() == false) - { - try - { - 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) << "PVT dump enabled Log file: " << d_dump_filename.c_str(); - } - catch (const std::ifstream::failure & e) - { - LOG(INFO) << "Exception opening PVT dump file " << e.what(); - } - } - } - - // Create Sys V message queue - first_fix = true; - sysv_msg_key = 1101; - int msgflg = IPC_CREAT | 0666; - if ((sysv_msqid = msgget(sysv_msg_key, msgflg )) == -1) - { - std::cout << "GNSS-SDR can not create message queues!" << std::endl; - throw new std::exception(); - } -} - - -gps_l1_ca_pvt_cc::~gps_l1_ca_pvt_cc() -{ - msgctl(sysv_msqid, IPC_RMID, NULL); -} - - -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]"; - } -} - - -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))) -{ - gnss_observables_map.clear(); - d_sample_counter++; - Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; // Get the input pointer - - print_receiver_status(in); - - // ############ 1. READ PSEUDORANGES #### - for (unsigned int i = 0; i < d_nchannels; i++) - { - if (in[i][0].Flag_valid_pseudorange == true) - { - gnss_observables_map.insert(std::pair(in[i][0].PRN, in[i][0])); // store valid pseudoranges in a map - d_rx_time = in[i][0].d_TOW_at_current_symbol; // all the channels have the same RX timestamp (common RX time pseudoranges) - if(d_ls_pvt->gps_ephemeris_map.size() > 0) - { - std::map::iterator tmp_eph_iter = d_ls_pvt->gps_ephemeris_map.find(in[i][0].PRN); - if(tmp_eph_iter != d_ls_pvt->gps_ephemeris_map.end()) - { - d_rtcm_printer->lock_time(d_ls_pvt->gps_ephemeris_map.find(in[i][0].PRN)->second, d_rx_time, in[i][0]); // keep track of locking time - } - } - } - } - - // ############ 2 COMPUTE THE PVT ################################ - if (gnss_observables_map.size() > 0 and d_ls_pvt->gps_ephemeris_map.size() > 0) - { - // compute on the fly PVT solution - if ((d_sample_counter % d_output_rate_ms) == 0) - { - bool pvt_result; - pvt_result = d_ls_pvt->get_PVT(gnss_observables_map, d_rx_time, d_flag_averaging); - if (pvt_result == true) - { - // correct the observable to account for the receiver clock offset - for (std::map::iterator it = gnss_observables_map.begin(); it != gnss_observables_map.end(); ++it) - { - it->second.Pseudorange_m = it->second.Pseudorange_m - d_ls_pvt->d_rx_dt_s * GPS_C_m_s; - } - if(first_fix == true) - { - std::cout << "First position fix at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d - << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl; - ttff_msgbuf ttff; - ttff.mtype = 1; - ttff.ttff = d_sample_counter; - send_sys_v_ttff_msg(ttff); - first_fix = false; - } - d_kml_printer->print_position(d_ls_pvt, d_flag_averaging); - d_geojson_printer->print_position(d_ls_pvt, d_flag_averaging); - d_nmea_printer->Print_Nmea_Line(d_ls_pvt, d_flag_averaging); - - if (!b_rinex_header_written) - { - std::map::iterator gps_ephemeris_iter; - gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); - if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) - { - rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, d_rx_time); - rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model); - b_rinex_header_written = true; // do not write header anymore - } - } - if(b_rinex_header_written) - { - // Limit the RINEX navigation output rate to 1/6 seg - // Notice that d_sample_counter period is 1ms (for GPS correlators) - if ((d_sample_counter - d_last_sample_nav_output) >= 6000) - { - rp->log_rinex_nav(rp->navFile, d_ls_pvt->gps_ephemeris_map); - d_last_sample_nav_output = d_sample_counter; - } - std::map::iterator gps_ephemeris_iter; - gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); - if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) - { - rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, d_rx_time, gnss_observables_map); - } - if (!b_rinex_header_updated && (d_ls_pvt->gps_utc_model.d_A0 != 0)) - { - rp->update_obs_header(rp->obsFile, d_ls_pvt->gps_utc_model); - rp->update_nav_header(rp->navFile, d_ls_pvt->gps_utc_model, d_ls_pvt->gps_iono); - b_rinex_header_updated = true; - } - } - if(b_rtcm_writing_started) - { - if((d_sample_counter % d_rtcm_MT1019_rate_ms) == 0) - { - for(std::map::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ ) - { - d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second); - } - } - if((d_sample_counter % d_rtcm_MSM_rate_ms) == 0) - { - std::map::iterator gps_ephemeris_iter; - gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); - if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) - { - d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); - } - } - } - - if(!b_rtcm_writing_started) // the first time - { - for(std::map::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ ) - { - d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second); - } - - std::map::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); - - if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) - { - d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); - } - b_rtcm_writing_started = true; - } - } - } - - // DEBUG MESSAGE: Display position in console output - if (((d_sample_counter % d_display_rate_ms) == 0) and d_ls_pvt->b_valid_position == true) - { - std::cout << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d - << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl; - - LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d - << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]"; - - LOG(INFO) << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " is HDOP = " << d_ls_pvt->d_HDOP << " VDOP = " - << d_ls_pvt->d_VDOP <<" TDOP = " << d_ls_pvt->d_TDOP << " GDOP = " << d_ls_pvt->d_GDOP; - } - // MULTIPLEXED FILE RECORDING - Record results to file - if(d_dump == true) - { - try - { - double tmp_double; - for (unsigned int i = 0; i < d_nchannels ; i++) - { - tmp_double = in[i][0].Pseudorange_m; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - tmp_double = 0; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - d_dump_file.write((char*)&d_rx_time, sizeof(double)); - } - } - catch (const std::ifstream::failure & e) - { - LOG(WARNING) << "Exception writing observables dump file " << e.what(); - } - } - } - - consume_each(1); //one by one - 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 deleted file mode 100644 index 07f9d8607..000000000 --- a/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.h +++ /dev/null @@ -1,170 +0,0 @@ -/*! - * \file gps_l1_ca_pvt_cc.h - * \brief Interface of a Position Velocity and Time computation block for GPS L1 C/A - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * ------------------------------------------------------------------------- - * - * 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_PVT_CC_H -#define GNSS_SDR_GPS_L1_CA_PVT_CC_H - -#include -#include -#include -#include -#include -#include -#include "nmea_printer.h" -#include "kml_printer.h" -#include "rinex_printer.h" -#include "geojson_printer.h" -#include "rtcm_printer.h" -#include "gps_l1_ca_ls_pvt.h" - - -class gps_l1_ca_pvt_cc; - -typedef boost::shared_ptr gps_l1_ca_pvt_cc_sptr; - -gps_l1_ca_pvt_cc_sptr gps_l1_ca_make_pvt_cc(unsigned int n_channels, - 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, - unsigned short rtcm_tcp_port, - unsigned short rtcm_station_id, - std::map rtcm_msg_rate_ms, - std::string rtcm_dump_devname, - int rinex_version -); - -/*! - * \brief This class implements a block that computes the PVT solution - */ -class gps_l1_ca_pvt_cc : public gr::block -{ -private: - friend gps_l1_ca_pvt_cc_sptr gps_l1_ca_make_pvt_cc(unsigned int nchannels, - 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, - unsigned short rtcm_tcp_port, - unsigned short rtcm_station_id, - std::map rtcm_msg_rate_ms, - std::string rtcm_dump_devname, - int rinex_version); - gps_l1_ca_pvt_cc(unsigned int nchannels, - 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, - unsigned short rtcm_tcp_port, - unsigned short rtcm_station_id, - std::map rtcm_msg_rate_ms, - std::string rtcm_dump_devname, - int rinex_version); - - void msg_handler_telemetry(pmt::pmt_t msg); - - bool d_dump; - bool b_rinex_header_written; - bool b_rinex_sbs_header_written; - bool b_rinex_header_updated; - bool b_rtcm_writing_started; - unsigned short d_rtcm_tcp_port; - unsigned short d_rtcm_station_id; - int d_rtcm_MT1019_rate_ms; - int d_rtcm_MSM_rate_ms; - - 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; - int d_averaging_depth; - bool d_flag_averaging; - int d_output_rate_ms; - int d_display_rate_ms; - long unsigned int d_sample_counter; - long unsigned int d_last_sample_nav_output; - - std::shared_ptr rp; - std::shared_ptr d_kml_printer; - std::shared_ptr d_nmea_printer; - std::shared_ptr d_geojson_printer; - std::shared_ptr d_rtcm_printer; - double d_rx_time; - std::shared_ptr d_ls_pvt; - - std::map gnss_observables_map; - - bool first_fix; - key_t sysv_msg_key; - int sysv_msqid; - typedef struct { - long mtype;//required by sys v message - double ttff; - } ttff_msgbuf; - bool send_sys_v_ttff_msg(ttff_msgbuf ttff); - -public: - - /*! - * \brief Get latest set of GPS L1 ephemeris from PVT block - * - * It is used to save the assistance data at the receiver shutdown - */ - std::map get_GPS_L1_ephemeris_map(); - - ~gps_l1_ca_pvt_cc (); //!< Default destructor - - int general_work (int noutput_items, gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); //!< PVT Signal Processing -}; - -#endif diff --git a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc index 04d8ab6d4..5ba437384 100644 --- a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc @@ -457,7 +457,7 @@ int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_v gnss_observables_map.insert(std::pair(i, in[i][0])); // store valid observables in a map. //d_rx_time = in[i][0].d_TOW_at_current_symbol; // all the channels have the same RX timestamp (common RX time pseudoranges) d_TOW_at_curr_symbol_constellation = in[i][0].d_TOW_at_current_symbol; // d_TOW_at_current_symbol not corrected by delta t (just for debug) - d_rx_time = in[i][0].d_TOW_hybrid_at_current_symbol; // hybrid rx time, all the channels have the same RX timestamp (common RX time pseudoranges) + d_rx_time = in[i][0].d_TOW_at_current_symbol; // hybrid rx time, all the channels have the same RX timestamp (common RX time pseudoranges) if(d_ls_pvt->gps_ephemeris_map.size() > 0) { std::map::iterator tmp_eph_iter = d_ls_pvt->gps_ephemeris_map.find(in[i][0].PRN); diff --git a/src/algorithms/PVT/libs/CMakeLists.txt b/src/algorithms/PVT/libs/CMakeLists.txt index b3b323d16..26d8eead1 100644 --- a/src/algorithms/PVT/libs/CMakeLists.txt +++ b/src/algorithms/PVT/libs/CMakeLists.txt @@ -21,8 +21,6 @@ add_definitions( -DGNSS_SDR_VERSION="${VERSION}" ) set(PVT_LIB_SOURCES pvt_solution.cc ls_pvt.cc - gps_l1_ca_ls_pvt.cc - galileo_e1_ls_pvt.cc hybrid_ls_pvt.cc kml_printer.cc rinex_printer.cc diff --git a/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc b/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc deleted file mode 100644 index 48b7d4db7..000000000 --- a/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc +++ /dev/null @@ -1,257 +0,0 @@ -/*! - * \file galileo_e1_ls_pvt.cc - * \brief Implementation of a Least Squares Position, Velocity, and Time - * (PVT) solver, based on K.Borre's Matlab receiver. - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * 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 "galileo_e1_ls_pvt.h" -#include -#include "Galileo_E1.h" - - -using google::LogMessage; - -galileo_e1_ls_pvt::galileo_e1_ls_pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file) : Ls_Pvt() -{ - // init empty ephemeris for all the available GNSS channels - d_nchannels = nchannels; - d_ephemeris = new Galileo_Navigation_Message[nchannels]; - d_dump_filename = dump_filename; - d_flag_dump_enabled = flag_dump_to_file; - d_galileo_current_time = 0; - d_flag_averaging = false; - - // ############# ENABLE DATA FILE LOG ################# - if (d_flag_dump_enabled == true) - { - if (d_dump_file.is_open() == false) - { - try - { - 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) << "PVT lib dump enabled Log file: " << d_dump_filename.c_str(); - } - catch (const std::ifstream::failure &e) - { - LOG(WARNING) << "Exception opening PVT lib dump file " << e.what(); - } - } - } -} - - -galileo_e1_ls_pvt::~galileo_e1_ls_pvt() -{ - d_dump_file.close(); - delete[] d_ephemeris; -} - - - -bool galileo_e1_ls_pvt::get_PVT(std::map gnss_pseudoranges_map, double galileo_current_time, bool flag_averaging) -{ - std::map::iterator gnss_pseudoranges_iter; - std::map::iterator galileo_ephemeris_iter; - - arma::vec W; // channels weight vector - arma::vec obs; // pseudoranges observation vector - arma::mat satpos; // satellite positions matrix - - int Galileo_week_number = 0; - double utc = 0.0; - double GST = 0.0; - double TX_time_corrected_s = 0.0; - double SV_clock_bias_s = 0.0; - - d_flag_averaging = flag_averaging; - - // ******************************************************************************** - // ****** PREPARE THE LEAST SQUARES DATA (SV POSITIONS MATRIX AND OBS VECTORS) **** - // ******************************************************************************** - int valid_obs = 0; //valid observations counter - - for(gnss_pseudoranges_iter = gnss_pseudoranges_map.begin(); - gnss_pseudoranges_iter != gnss_pseudoranges_map.end(); - gnss_pseudoranges_iter++) - { - // 1- find the ephemeris for the current SV observation. The SV PRN ID is the map key - galileo_ephemeris_iter = galileo_ephemeris_map.find(gnss_pseudoranges_iter->first); - if (galileo_ephemeris_iter != galileo_ephemeris_map.end()) - { - /*! - * \todo Place here the satellite CN0 (power level, or weight factor) - */ - W.resize(valid_obs + 1, 1); - W(valid_obs) = 1; - - // COMMON RX TIME PVT ALGORITHM - double Rx_time = galileo_current_time; - double Tx_time = Rx_time - gnss_pseudoranges_iter->second.Pseudorange_m / GALILEO_C_m_s; - - // 2- compute the clock drift using the clock model (broadcast) for this SV, including relativistic effect - SV_clock_bias_s = galileo_ephemeris_iter->second.sv_clock_drift(Tx_time); - - // 3- compute the current ECEF position for this SV using corrected TX time - TX_time_corrected_s = Tx_time - SV_clock_bias_s; - galileo_ephemeris_iter->second.satellitePosition(TX_time_corrected_s); - - //store satellite positions in a matrix - satpos.resize(3, valid_obs + 1); - satpos(0, valid_obs) = galileo_ephemeris_iter->second.d_satpos_X; - satpos(1, valid_obs) = galileo_ephemeris_iter->second.d_satpos_Y; - satpos(2, valid_obs) = galileo_ephemeris_iter->second.d_satpos_Z; - - // 4- fill the observations vector with the corrected pseudoranges - obs.resize(valid_obs + 1, 1); - obs(valid_obs) = gnss_pseudoranges_iter->second.Pseudorange_m + SV_clock_bias_s * GALILEO_C_m_s - d_rx_dt_s * GALILEO_C_m_s; - d_visible_satellites_IDs[valid_obs] = galileo_ephemeris_iter->second.i_satellite_PRN; - d_visible_satellites_CN0_dB[valid_obs] = gnss_pseudoranges_iter->second.CN0_dB_hz; - - - Galileo_week_number = galileo_ephemeris_iter->second.WN_5; //for GST - GST = galileo_ephemeris_map.find(gnss_pseudoranges_iter->first)->second.Galileo_System_Time(Galileo_week_number, galileo_current_time); - - // SV ECEF DEBUG OUTPUT - DLOG(INFO) << "ECEF satellite SV ID=" << galileo_ephemeris_iter->second.i_satellite_PRN - << " X=" << galileo_ephemeris_iter->second.d_satpos_X - << " [m] Y=" << galileo_ephemeris_iter->second.d_satpos_Y - << " [m] Z=" << galileo_ephemeris_iter->second.d_satpos_Z - << " [m] PR_obs=" << obs(valid_obs) << " [m]"; - - valid_obs++; - } - else // the ephemeris are not available for this SV - { - DLOG(INFO) << "No ephemeris data for SV "<< gnss_pseudoranges_iter->first; - } - } - - // ******************************************************************************** - // ****** SOLVE LEAST SQUARES****************************************************** - // ******************************************************************************** - d_valid_observations = valid_obs; - LOG(INFO) << "Galileo PVT: valid observations=" << valid_obs; - - if (valid_obs >= 4) - { - arma::vec rx_position_and_time; - DLOG(INFO) << "satpos=" << satpos; - DLOG(INFO) << "obs="<< obs; - DLOG(INFO) << "W=" << W; - try - { - // check if this is the initial position computation - if (d_rx_dt_s == 0) - { - // execute Bancroft's algorithm to estimate initial receiver position and time - DLOG(INFO) << " Executing Bancroft algorithm..."; - rx_position_and_time = bancroftPos(satpos.t(), obs); - d_rx_pos = rx_position_and_time.rows(0, 2); // save ECEF position for the next iteration - d_rx_dt_s = rx_position_and_time(3) / GALILEO_C_m_s; // save time for the next iteration [meters]->[seconds] - } - // Execute WLS using previous position as the initialization point - rx_position_and_time = leastSquarePos(satpos, obs, W); - - d_rx_pos = rx_position_and_time.rows(0, 2); // save ECEF position for the next iteration - d_rx_dt_s += rx_position_and_time(3) / GALILEO_C_m_s; // accumulate the rx time error for the next iteration [meters]->[seconds] - - // Compute Gregorian time - utc = galileo_utc_model.GST_to_UTC_time(GST, Galileo_week_number); - // get time string Gregorian calendar - boost::posix_time::time_duration t = boost::posix_time::seconds(utc); - // 22 August 1999 00:00 last Galileo start GST epoch (ICD sec 5.1.2) - boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t); - d_position_UTC_time = p_time; - - DLOG(INFO) << "Galileo Position at TOW=" << galileo_current_time << " in ECEF (X,Y,Z) = " << rx_position_and_time; - - cart2geo(static_cast(rx_position_and_time(0)), static_cast(rx_position_and_time(1)), static_cast(rx_position_and_time(2)), 4); - d_rx_dt_s = rx_position_and_time(3)/GALILEO_C_m_s; // Convert RX time offset from meters to seconds - DLOG(INFO) << "Galileo Position at " << boost::posix_time::to_simple_string(p_time) - << " is Lat = " << d_latitude_d << " [deg], Long = " << d_longitude_d - << " [deg], Height= " << d_height_m << " [m]" << " RX time offset= " << d_rx_dt_s << " [s]"; - - // ###### Compute DOPs ######## - compute_DOP(); - - // ######## LOG FILE ######### - if(d_flag_dump_enabled == true) - { - // MULTIPLEXED FILE RECORDING - Record results to file - try - { - double tmp_double; - // PVT GPS time - tmp_double = galileo_current_time; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // ECEF User Position East [m] - tmp_double = rx_position_and_time(0); - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // ECEF User Position North [m] - tmp_double = rx_position_and_time(1); - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // ECEF User Position Up [m] - tmp_double = rx_position_and_time(2); - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // User clock offset [s] - tmp_double = rx_position_and_time(3); - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // GEO user position Latitude [deg] - tmp_double = d_latitude_d; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // GEO user position Longitude [deg] - tmp_double = d_longitude_d; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // GEO user position Height [m] - tmp_double = d_height_m; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - } - catch (const std::ifstream::failure& e) - { - LOG(WARNING) << "Exception writing PVT LS dump file "<< e.what(); - } - } - - // MOVING AVERAGE PVT - galileo_e1_ls_pvt::pos_averaging(flag_averaging); - } - catch(const std::exception & e) - { - d_rx_dt_s = 0; //reset rx time estimation - LOG(WARNING) << "Problem with the solver, invalid solution!" << e.what(); - b_valid_position = false; - } - } - else - { - b_valid_position = false; - } - return b_valid_position; -} - diff --git a/src/algorithms/PVT/libs/galileo_e1_ls_pvt.h b/src/algorithms/PVT/libs/galileo_e1_ls_pvt.h deleted file mode 100644 index 2220847e5..000000000 --- a/src/algorithms/PVT/libs/galileo_e1_ls_pvt.h +++ /dev/null @@ -1,74 +0,0 @@ -/*! - * \file galileo_e1_ls_pvt.h - * \brief Interface of a Least Squares Position, Velocity, and Time (PVT) - * solver, based on K.Borre's Matlab receiver. - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * 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_GALILEO_E1_LS_PVT_H_ -#define GNSS_SDR_GALILEO_E1_LS_PVT_H_ - -#include -#include -#include -#include -#include "ls_pvt.h" -#include "galileo_navigation_message.h" -#include "gnss_synchro.h" -#include "galileo_ephemeris.h" -#include "galileo_utc_model.h" - - -/*! - * \brief This class implements a simple PVT Least Squares solution - */ -class galileo_e1_ls_pvt : public Ls_Pvt -{ -public: - galileo_e1_ls_pvt(int nchannels,std::string dump_filename, bool flag_dump_to_file); - ~galileo_e1_ls_pvt(); - - bool get_PVT(std::map gnss_pseudoranges_map, double galileo_current_time, bool flag_averaging); - - int d_nchannels; //!< Number of available channels for positioning - - Galileo_Navigation_Message* d_ephemeris; - std::map galileo_ephemeris_map; //!< Map storing new Galileo_Ephemeris - Galileo_Utc_Model galileo_utc_model; - Galileo_Iono galileo_iono; - Galileo_Almanac galileo_almanac; - - double d_galileo_current_time; - - bool d_flag_dump_enabled; - bool d_flag_averaging; - - std::string d_dump_filename; - std::ofstream d_dump_file; -}; - -#endif diff --git a/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc b/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc deleted file mode 100644 index 9fec55e7a..000000000 --- a/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc +++ /dev/null @@ -1,263 +0,0 @@ -/*! - * \file gps_l1_ca_ls_pvt.cc - * \brief Implementation of a Least Squares Position, Velocity, and Time - * (PVT) solver, based on K.Borre's Matlab receiver. - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * ------------------------------------------------------------------------- - * - * 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_ls_pvt.h" -#include -#include - - -using google::LogMessage; - - -gps_l1_ca_ls_pvt::gps_l1_ca_ls_pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file) : Ls_Pvt() -{ - // init empty ephemeris for all the available GNSS channels - d_nchannels = nchannels; - d_ephemeris = new Gps_Navigation_Message[nchannels]; - d_dump_filename = dump_filename; - d_flag_dump_enabled = flag_dump_to_file; - d_flag_averaging = false; - d_GPS_current_time = 0; - - // ############# ENABLE DATA FILE LOG ################# - if (d_flag_dump_enabled == true) - { - if (d_dump_file.is_open() == false) - { - try - { - 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) << "PVT lib dump enabled Log file: " << d_dump_filename.c_str(); - } - catch (const std::ifstream::failure &e) - { - LOG(WARNING) << "Exception opening PVT lib dump file " << e.what(); - } - } - } -} - - - -gps_l1_ca_ls_pvt::~gps_l1_ca_ls_pvt() -{ - d_dump_file.close(); - delete[] d_ephemeris; -} - - - -bool gps_l1_ca_ls_pvt::get_PVT(std::map gnss_pseudoranges_map, double GPS_current_time, bool flag_averaging) -{ - std::map::iterator gnss_pseudoranges_iter; - std::map::iterator gps_ephemeris_iter; - - arma::vec W; // channels weight vector - arma::vec obs; // pseudoranges observation vector - arma::mat satpos; // satellite positions matrix - - int GPS_week = 0; - double utc = 0.0; - double TX_time_corrected_s; - double SV_clock_bias_s = 0.0; - - d_flag_averaging = flag_averaging; - - // ******************************************************************************** - // ****** PREPARE THE LEAST SQUARES DATA (SV POSITIONS MATRIX AND OBS VECTORS) **** - // ******************************************************************************** - int valid_obs = 0; //valid observations counter - for(gnss_pseudoranges_iter = gnss_pseudoranges_map.begin(); - gnss_pseudoranges_iter != gnss_pseudoranges_map.end(); - gnss_pseudoranges_iter++) - { - // 1- find the ephemeris for the current SV observation. The SV PRN ID is the map key - gps_ephemeris_iter = gps_ephemeris_map.find(gnss_pseudoranges_iter->first); - if (gps_ephemeris_iter != gps_ephemeris_map.end()) - { - /*! - * \todo Place here the satellite CN0 (power level, or weight factor) - */ - W.resize(valid_obs + 1, 1); - W(valid_obs) = 1; - - // COMMON RX TIME PVT ALGORITHM MODIFICATION (Like RINEX files) - // first estimate of transmit time - double Rx_time = GPS_current_time; - double Tx_time = Rx_time - gnss_pseudoranges_iter->second.Pseudorange_m / GPS_C_m_s; - - // 2- compute the clock drift using the clock model (broadcast) for this SV, not including relativistic effect - SV_clock_bias_s = gps_ephemeris_iter->second.sv_clock_drift(Tx_time); //- gps_ephemeris_iter->second.d_TGD; - - // 3- compute the current ECEF position for this SV using corrected TX time and obtain clock bias including relativistic effect - TX_time_corrected_s = Tx_time - SV_clock_bias_s; - double dtr = gps_ephemeris_iter->second.satellitePosition(TX_time_corrected_s); - - //store satellite positions in a matrix - satpos.resize(3, valid_obs + 1); - satpos(0, valid_obs) = gps_ephemeris_iter->second.d_satpos_X; - satpos(1, valid_obs) = gps_ephemeris_iter->second.d_satpos_Y; - satpos(2, valid_obs) = gps_ephemeris_iter->second.d_satpos_Z; - - // 4- fill the observations vector with the corrected pseudoranges - obs.resize(valid_obs + 1, 1); - obs(valid_obs) = gnss_pseudoranges_iter->second.Pseudorange_m + dtr * GPS_C_m_s - d_rx_dt_s * GPS_C_m_s; - d_visible_satellites_IDs[valid_obs] = gps_ephemeris_iter->second.i_satellite_PRN; - d_visible_satellites_CN0_dB[valid_obs] = gnss_pseudoranges_iter->second.CN0_dB_hz; - - // SV ECEF DEBUG OUTPUT - DLOG(INFO) << "(new)ECEF satellite SV ID=" << gps_ephemeris_iter->second.i_satellite_PRN - << " X=" << gps_ephemeris_iter->second.d_satpos_X - << " [m] Y=" << gps_ephemeris_iter->second.d_satpos_Y - << " [m] Z=" << gps_ephemeris_iter->second.d_satpos_Z - << " [m] PR_obs=" << obs(valid_obs) << " [m]"; - - valid_obs++; - // compute the UTC time for this SV (just to print the associated UTC timestamp) - GPS_week = gps_ephemeris_iter->second.i_GPS_week; - utc = gps_utc_model.utc_time(TX_time_corrected_s, GPS_week); - } - else // the ephemeris are not available for this SV - { - DLOG(INFO) << "No ephemeris data for SV " << gnss_pseudoranges_iter->first; - } - } - - // ******************************************************************************** - // ****** SOLVE LEAST SQUARES****************************************************** - // ******************************************************************************** - d_valid_observations = valid_obs; - DLOG(INFO) << "(new)PVT: valid observations=" << valid_obs; - - if (valid_obs >= 4) - { - arma::vec rx_position_and_time; - DLOG(INFO) << "satpos=" << satpos; - DLOG(INFO) << "obs=" << obs; - DLOG(INFO) << "W=" << W; - - try - { - // check if this is the initial position computation - if (d_rx_dt_s == 0) - { - // execute Bancroft's algorithm to estimate initial receiver position and time - DLOG(INFO) << " Executing Bancroft algorithm..."; - rx_position_and_time = bancroftPos(satpos.t(), obs); - d_rx_pos = rx_position_and_time.rows(0, 2); // save ECEF position for the next iteration - d_rx_dt_s = rx_position_and_time(3) / GPS_C_m_s; // save time for the next iteration [meters]->[seconds] - } - - // Execute WLS using previous position as the initialization point - rx_position_and_time = leastSquarePos(satpos, obs, W); - - d_rx_pos = rx_position_and_time.rows(0, 2); // save ECEF position for the next iteration - d_rx_dt_s += rx_position_and_time(3) / GPS_C_m_s; // accumulate the rx time error for the next iteration [meters]->[seconds] - - DLOG(INFO) << "(new)Position at TOW=" << GPS_current_time << " in ECEF (X,Y,Z,t[meters]) = " << rx_position_and_time; - DLOG(INFO) << "Accumulated rx clock error=" << d_rx_dt_s << " clock error for this iteration=" << rx_position_and_time(3) / GPS_C_m_s << " [s]"; - - cart2geo(static_cast(rx_position_and_time(0)), static_cast(rx_position_and_time(1)), static_cast(rx_position_and_time(2)), 4); - - // Compute UTC time and print PVT solution - double secondsperweek = 604800.0; // number of seconds in one week (7*24*60*60) - boost::posix_time::time_duration t = boost::posix_time::seconds(utc + secondsperweek * static_cast(GPS_week)); - // 22 August 1999 last GPS time roll over - boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t); - d_position_UTC_time = p_time; - DLOG(INFO) << "Position at " << boost::posix_time::to_simple_string(p_time) - << " is Lat = " << d_latitude_d << " [deg], Long = " << d_longitude_d - << " [deg], Height= " << d_height_m << " [m]" << " RX time offset= " << d_rx_dt_s << " [s]"; - - // ###### Compute DOPs ######## - compute_DOP(); - - // ######## LOG FILE ######### - if(d_flag_dump_enabled == true) - { - // MULTIPLEXED FILE RECORDING - Record results to file - try - { - double tmp_double; - // PVT GPS time - tmp_double = GPS_current_time; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // ECEF User Position East [m] - tmp_double = d_rx_pos(0); - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // ECEF User Position North [m] - tmp_double = d_rx_pos(1); - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // ECEF User Position Up [m] - tmp_double = d_rx_pos(2); - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // User clock offset [s] - tmp_double = d_rx_dt_s; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // GEO user position Latitude [deg] - tmp_double = d_latitude_d; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // GEO user position Longitude [deg] - tmp_double = d_longitude_d; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - // GEO user position Height [m] - tmp_double = d_height_m; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - } - catch (const std::ifstream::failure &e) - { - LOG(WARNING) << "Exception writing PVT LS dump file " << e.what(); - } - } - - // MOVING AVERAGE PVT - pos_averaging(flag_averaging); - - } - catch(const std::exception & e) - { - d_rx_dt_s = 0; //reset rx time estimation - LOG(WARNING) << "Problem with the solver, invalid solution!" << e.what(); - LOG(WARNING) << "satpos=" << satpos; - LOG(WARNING) << "obs=" << obs; - LOG(WARNING) << "W=" << W; - b_valid_position = false; - } - } - else - { - b_valid_position = false; - } - return b_valid_position; -} - - diff --git a/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.h b/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.h deleted file mode 100644 index c926d24c4..000000000 --- a/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.h +++ /dev/null @@ -1,81 +0,0 @@ -/*! - * \file gps_l1_ca_ls_pvt.h - * \brief Interface of a Least Squares Position, Velocity, and Time (PVT) - * solver for GPS L1 C/A, based on K.Borre's Matlab receiver. - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * ------------------------------------------------------------------------- - * - * 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_LS_PVT_H_ -#define GNSS_SDR_GPS_L1_CA_LS_PVT_H_ - -#include -#include -#include -#include "ls_pvt.h" -#include "GPS_L1_CA.h" -#include "gnss_synchro.h" -#include "gps_ephemeris.h" -#include "gps_navigation_message.h" -#include "gps_utc_model.h" -#include "sbas_telemetry_data.h" -#include "sbas_ionospheric_correction.h" -#include "sbas_satellite_correction.h" -#include "sbas_ephemeris.h" - - -/*! - * \brief This class implements a simple PVT Least Squares solution for GPS L1 C/A signals - */ -class gps_l1_ca_ls_pvt : public Ls_Pvt -{ -public: - gps_l1_ca_ls_pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file); - ~gps_l1_ca_ls_pvt(); - - bool get_PVT(std::map gnss_pseudoranges_map, double GPS_current_time, bool flag_averaging); - int d_nchannels; //!< Number of available channels for positioning - - Gps_Navigation_Message* d_ephemeris; - - // new ephemeris storage - std::map gps_ephemeris_map; //!< Map storing new Gps_Ephemeris - Gps_Utc_Model gps_utc_model; - Gps_Iono gps_iono; - - Sbas_Ionosphere_Correction sbas_iono; - std::map sbas_sat_corr_map; - std::map sbas_ephemeris_map; - - double d_GPS_current_time; - - bool d_flag_dump_enabled; - bool d_flag_averaging; - - std::string d_dump_filename; - std::ofstream d_dump_file; -}; - -#endif diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc index 5c8888723..5ad9db77b 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc @@ -279,7 +279,6 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou // ****** SOLVE LEAST SQUARES****************************************************** // ******************************************************************************** d_valid_observations = valid_obs; - LOG(INFO) << "HYBRID PVT: valid observations=" << valid_obs; if(valid_obs >= 4) @@ -288,6 +287,7 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou DLOG(INFO) << "satpos=" << satpos; DLOG(INFO) << "obs=" << obs; DLOG(INFO) << "W=" << W; + try { // check if this is the initial position computation @@ -332,7 +332,7 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou << " [deg], Height= " << d_height_m << " [m]" << " RX time offset= " << d_rx_dt_s << " [s]"; // ###### Compute DOPs ######## - hybrid_ls_pvt::compute_DOP(); + compute_DOP(); // ######## LOG FILE ######### if(d_flag_dump_enabled == true) @@ -379,6 +379,9 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou { d_rx_dt_s = 0; //reset rx time estimation LOG(WARNING) << "Problem with the solver, invalid solution!" << e.what(); + LOG(WARNING) << "satpos=" << satpos; + LOG(WARNING) << "obs=" << obs; + LOG(WARNING) << "W=" << W; b_valid_position = false; } } 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 d62fefd6b..106c959ac 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 @@ -275,7 +275,6 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::init() d_gnss_synchro->Flag_valid_symbol_output = false; d_gnss_synchro->Flag_valid_pseudorange = false; d_gnss_synchro->Flag_valid_word = false; - d_gnss_synchro->Flag_preamble = false; d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; 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 b2ebba1df..ab2d501b9 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 @@ -153,7 +153,6 @@ void galileo_pcps_8ms_acquisition_cc::init() d_gnss_synchro->Flag_valid_symbol_output = false; d_gnss_synchro->Flag_valid_pseudorange = false; d_gnss_synchro->Flag_valid_word = false; - d_gnss_synchro->Flag_preamble = false; d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc index c7910ff97..5196acec5 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc @@ -193,7 +193,6 @@ void pcps_acquisition_cc::init() d_gnss_synchro->Flag_valid_symbol_output = false; d_gnss_synchro->Flag_valid_pseudorange = false; d_gnss_synchro->Flag_valid_word = false; - d_gnss_synchro->Flag_preamble = false; d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; 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 6200efeda..d61d89f66 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 @@ -165,7 +165,6 @@ void pcps_acquisition_fine_doppler_cc::init() d_gnss_synchro->Flag_valid_symbol_output = false; d_gnss_synchro->Flag_valid_pseudorange = false; d_gnss_synchro->Flag_valid_word = false; - d_gnss_synchro->Flag_preamble = false; d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_sc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_sc.cc index 40201b0ba..92466e159 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_sc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_sc.cc @@ -190,7 +190,6 @@ void pcps_acquisition_sc::init() d_gnss_synchro->Flag_valid_symbol_output = false; d_gnss_synchro->Flag_valid_pseudorange = false; d_gnss_synchro->Flag_valid_word = false; - d_gnss_synchro->Flag_preamble = false; d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc index 5504e6676..cb671a2dd 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc @@ -158,7 +158,6 @@ void pcps_assisted_acquisition_cc::init() d_gnss_synchro->Flag_valid_symbol_output = false; d_gnss_synchro->Flag_valid_pseudorange = false; d_gnss_synchro->Flag_valid_word = false; - d_gnss_synchro->Flag_preamble = false; d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc index e03d6c2d5..4b9a775ee 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc @@ -166,7 +166,6 @@ void pcps_cccwsr_acquisition_cc::init() d_gnss_synchro->Flag_valid_symbol_output = false; d_gnss_synchro->Flag_valid_pseudorange = false; d_gnss_synchro->Flag_valid_word = false; - d_gnss_synchro->Flag_preamble = false; d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_multithread_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_multithread_acquisition_cc.cc index 2cf411d32..a4f03815b 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_multithread_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_multithread_acquisition_cc.cc @@ -156,7 +156,6 @@ void pcps_multithread_acquisition_cc::init() d_gnss_synchro->Flag_valid_symbol_output = false; d_gnss_synchro->Flag_valid_pseudorange = false; d_gnss_synchro->Flag_valid_word = false; - d_gnss_synchro->Flag_preamble = false; d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.cc index b0a17c830..de7584ac5 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.cc @@ -293,7 +293,6 @@ void pcps_opencl_acquisition_cc::init() d_gnss_synchro->Flag_valid_symbol_output = false; d_gnss_synchro->Flag_valid_pseudorange = false; d_gnss_synchro->Flag_valid_word = false; - d_gnss_synchro->Flag_preamble = false; d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc index 1d5bd8566..8c9d053df 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc @@ -197,7 +197,6 @@ void pcps_quicksync_acquisition_cc::init() d_gnss_synchro->Flag_valid_symbol_output = false; d_gnss_synchro->Flag_valid_pseudorange = false; d_gnss_synchro->Flag_valid_word = false; - d_gnss_synchro->Flag_preamble = false; //DLOG(INFO) << "START init"; d_gnss_synchro->Acq_delay_samples = 0.0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc index 8810a23d0..1e3a0118c 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc @@ -167,7 +167,6 @@ void pcps_tong_acquisition_cc::init() d_gnss_synchro->Flag_valid_symbol_output = false; d_gnss_synchro->Flag_valid_pseudorange = false; d_gnss_synchro->Flag_valid_word = false; - d_gnss_synchro->Flag_preamble = false; d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; diff --git a/src/algorithms/observables/adapters/CMakeLists.txt b/src/algorithms/observables/adapters/CMakeLists.txt index dcb40e527..087302d8c 100644 --- a/src/algorithms/observables/adapters/CMakeLists.txt +++ b/src/algorithms/observables/adapters/CMakeLists.txt @@ -17,10 +17,6 @@ # set(OBS_ADAPTER_SOURCES - gps_l1_ca_observables.cc - gps_l2c_observables.cc - galileo_e1_observables.cc - galileo_e5a_observables.cc hybrid_observables.cc ) diff --git a/src/algorithms/observables/adapters/galileo_e1_observables.cc b/src/algorithms/observables/adapters/galileo_e1_observables.cc deleted file mode 100644 index 28edee2d5..000000000 --- a/src/algorithms/observables/adapters/galileo_e1_observables.cc +++ /dev/null @@ -1,95 +0,0 @@ -/*! - * \file galileo_e1_observables.cc - * \brief Implementation of an adapter of a Galileo E1 observables block - * to a ObservablesInterface - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * 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 "galileo_e1_observables.h" -#include -#include "configuration_interface.h" -#include "Galileo_E1.h" - -using google::LogMessage; - -GalileoE1Observables::GalileoE1Observables(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_dump_filename = "./observables.dat"; - DLOG(INFO) << "role " << role; - dump_ = configuration->property(role + ".dump", false); - dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); - unsigned int history_deep = configuration->property(role + ".averaging_depth", GALILEO_E1_HISTORY_DEEP); - observables_ = galileo_e1_make_observables_cc(in_streams_, dump_, dump_filename_, history_deep); - DLOG(INFO) << "pseudorange(" << observables_->unique_id() << ")"; -} - - - - -GalileoE1Observables::~GalileoE1Observables() -{} - - - - -void GalileoE1Observables::connect(gr::top_block_sptr top_block) -{ - if(top_block) { /* top_block is not null */}; - // Nothing to connect internally - DLOG(INFO) << "nothing to connect internally"; -} - - - -void GalileoE1Observables::disconnect(gr::top_block_sptr top_block) -{ - if(top_block) { /* top_block is not null */}; - // Nothing to disconnect -} - - - - -gr::basic_block_sptr GalileoE1Observables::get_left_block() -{ - return observables_; -} - - - - -gr::basic_block_sptr GalileoE1Observables::get_right_block() -{ - return observables_; -} diff --git a/src/algorithms/observables/adapters/galileo_e1_observables.h b/src/algorithms/observables/adapters/galileo_e1_observables.h deleted file mode 100644 index 8aad5b142..000000000 --- a/src/algorithms/observables/adapters/galileo_e1_observables.h +++ /dev/null @@ -1,89 +0,0 @@ -/*! - * \file galileo_e1_observables.h - * \brief Implementation of an adapter of a Galileo E1 observables block - * to a ObservablesInterface - * \author Mara Branzanti 2013. mara.branzanti(at)gmail.com - * \author Javier Arribas 2013. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * 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_GALILEO_E1_OBSERVABLES_H_ -#define GNSS_SDR_GALILEO_E1_OBSERVABLES_H_ - -#include -#include "observables_interface.h" -#include "galileo_e1_observables_cc.h" - - -class ConfigurationInterface; - -/*! - * \brief This class implements an ObservablesInterface for Galileo E1B - */ -class GalileoE1Observables : public ObservablesInterface -{ -public: - GalileoE1Observables(ConfigurationInterface* configuration, - std::string role, - unsigned int in_streams, - unsigned int out_streams); - virtual ~GalileoE1Observables(); - std::string role() - { - return role_; - } - - //! Returns "Galileo_E1B_Observables" - std::string implementation() - { - return "Galileo_E1B_Observables"; - } - 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 reset() - { - return; - } - - //! All blocks must have an item_size() function implementation - size_t item_size() - { - return sizeof(gr_complex); - } - -private: - galileo_e1_observables_cc_sptr observables_; - bool dump_; - std::string dump_filename_; - std::string role_; - unsigned int in_streams_; - unsigned int out_streams_; -}; - -#endif diff --git a/src/algorithms/observables/adapters/galileo_e5a_observables.cc b/src/algorithms/observables/adapters/galileo_e5a_observables.cc deleted file mode 100644 index 239b4b17d..000000000 --- a/src/algorithms/observables/adapters/galileo_e5a_observables.cc +++ /dev/null @@ -1,96 +0,0 @@ -/*! - * \file galileo_e5a_observables.cc - * \brief Implementation of an adapter of a Galileo E5a observables block - * to a ObservablesInterface - * \author Carles Fernandez 2016. carles.fernandez(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * Copyright (C) 2010-2016 (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 "galileo_e5a_observables.h" - #include "configuration_interface.h" - #include - #include "Galileo_E5a.h" - - using google::LogMessage; - - GalileoE5aObservables::GalileoE5aObservables(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_dump_filename = "./observables.dat"; - DLOG(INFO) << "role " << role; - dump_ = configuration->property(role + ".dump", false); - dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); - unsigned int default_depth = GALILEO_E5A_HISTORY_DEEP; - unsigned int history_deep = configuration->property(role + ".averaging_depth", default_depth); - observables_ = hybrid_make_observables_cc(in_streams_, dump_, dump_filename_, history_deep); - DLOG(INFO) << "pseudorange(" << observables_->unique_id() << ")"; - } - - - - - GalileoE5aObservables::~GalileoE5aObservables() - {} - - - - - void GalileoE5aObservables::connect(gr::top_block_sptr top_block) - { - if(top_block) { /* top_block is not null */}; - // Nothing to connect internally - DLOG(INFO) << "nothing to connect internally"; - } - - - - void GalileoE5aObservables::disconnect(gr::top_block_sptr top_block) - { - if(top_block) { /* top_block is not null */}; - // Nothing to disconnect - } - - - - - gr::basic_block_sptr GalileoE5aObservables::get_left_block() - { - return observables_; - } - - - - - gr::basic_block_sptr GalileoE5aObservables::get_right_block() - { - return observables_; - } diff --git a/src/algorithms/observables/adapters/galileo_e5a_observables.h b/src/algorithms/observables/adapters/galileo_e5a_observables.h deleted file mode 100644 index 89898c99a..000000000 --- a/src/algorithms/observables/adapters/galileo_e5a_observables.h +++ /dev/null @@ -1,88 +0,0 @@ -/*! - * \file galileo_e5a_observables.h - * \brief Implementation of an adapter of a Galileo E5a observables block - * to a ObservablesInterface - * \author Carles Fernandez 2016. carles.fernandez(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * Copyright (C) 2010-2016 (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_GALILEO_E5A_OBSERVABLES_H_ -#define GNSS_SDR_GALILEO_E5A_OBSERVABLES_H_ - -#include -#include "observables_interface.h" -#include "hybrid_observables_cc.h" - - -class ConfigurationInterface; - -/*! - * \brief This class implements an ObservablesInterface for Galileo E5A - */ -class GalileoE5aObservables : public ObservablesInterface -{ -public: - GalileoE5aObservables(ConfigurationInterface* configuration, - std::string role, - unsigned int in_streams, - unsigned int out_streams); - virtual ~GalileoE5aObservables(); - std::string role() - { - return role_; - } - - //! Returns "Galileo_E5A_Observables" - std::string implementation() - { - return "Galileo_E5A_Observables"; - } - 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 reset() - { - return; - } - - //! All blocks must have an item_size() function implementation - size_t item_size() - { - return sizeof(gr_complex); - } - -private: - hybrid_observables_cc_sptr observables_; - bool dump_; - std::string dump_filename_; - std::string role_; - unsigned int in_streams_; - unsigned int out_streams_; -}; - -#endif diff --git a/src/algorithms/observables/adapters/gps_l1_ca_observables.cc b/src/algorithms/observables/adapters/gps_l1_ca_observables.cc deleted file mode 100644 index b75f1c3ef..000000000 --- a/src/algorithms/observables/adapters/gps_l1_ca_observables.cc +++ /dev/null @@ -1,95 +0,0 @@ -/*! - * \file gps_l1_ca_observables.cc - * \brief Implementation of an adapter of a GPS L1 C/A observables block - * to a ObservablesInterface - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * 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_observables.h" -#include "configuration_interface.h" -#include -#include "GPS_L1_CA.h" - -using google::LogMessage; - -GpsL1CaObservables::GpsL1CaObservables(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_dump_filename = "./observables.dat"; - DLOG(INFO) << "role " << role; - dump_ = configuration->property(role + ".dump", false); - dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); - unsigned int history_deep = configuration->property(role + ".averaging_depth", GPS_L1_CA_HISTORY_DEEP); - observables_ = gps_l1_ca_make_observables_cc(in_streams_, dump_, dump_filename_, history_deep); - DLOG(INFO) << "pseudorange(" << observables_->unique_id() << ")"; -} - - - - -GpsL1CaObservables::~GpsL1CaObservables() -{} - - - - -void GpsL1CaObservables::connect(gr::top_block_sptr top_block) -{ - if(top_block) { /* top_block is not null */}; - // Nothing to connect internally - DLOG(INFO) << "nothing to connect internally"; -} - - - -void GpsL1CaObservables::disconnect(gr::top_block_sptr top_block) -{ - if(top_block) { /* top_block is not null */}; - // Nothing to disconnect -} - - - - -gr::basic_block_sptr GpsL1CaObservables::get_left_block() -{ - return observables_; -} - - - - -gr::basic_block_sptr GpsL1CaObservables::get_right_block() -{ - return observables_; -} diff --git a/src/algorithms/observables/adapters/gps_l1_ca_observables.h b/src/algorithms/observables/adapters/gps_l1_ca_observables.h deleted file mode 100644 index cf83be10d..000000000 --- a/src/algorithms/observables/adapters/gps_l1_ca_observables.h +++ /dev/null @@ -1,89 +0,0 @@ -/*! - * \file gps_l1_ca_observables.h - * \brief Interface of an adapter of a GPS L1 C/A observables block - * to a ObservablesInterface - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * 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_OBSERVABLES_H_ -#define GNSS_SDR_GPS_L1_CA_OBSERVABLES_H_ - -#include -#include "observables_interface.h" -#include "gps_l1_ca_observables_cc.h" - - -class ConfigurationInterface; - -/*! - * \brief This class implements an ObservablesInterface for GPS L1 C/A - */ -class GpsL1CaObservables : public ObservablesInterface -{ -public: - GpsL1CaObservables(ConfigurationInterface* configuration, - std::string role, - unsigned int in_streams, - unsigned int out_streams); - virtual ~GpsL1CaObservables(); - std::string role() - { - return role_; - } - - //! Returns "GPS_L1_CA_Observables" - std::string implementation() - { - return "GPS_L1_CA_Observables"; - } - 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 reset() - { - return; - } - - //! All blocks must have an item_size() function implementation - size_t item_size() - { - return sizeof(gr_complex); - } - -private: - gps_l1_ca_observables_cc_sptr observables_; - bool dump_; - //unsigned int fs_in_; - std::string dump_filename_; - std::string role_; - unsigned int in_streams_; - unsigned int out_streams_; -}; - -#endif diff --git a/src/algorithms/observables/adapters/gps_l2c_observables.cc b/src/algorithms/observables/adapters/gps_l2c_observables.cc deleted file mode 100644 index 4ceffd1a1..000000000 --- a/src/algorithms/observables/adapters/gps_l2c_observables.cc +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * \file gps_l2c_observables.cc - * \brief Implementation of an adapter of a GPS L2 C(M) observables block - * to a ObservablesInterface - * \author Carles Fernandez 2016. carles.fernandez(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * Copyright (C) 2010-2016 (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_l2c_observables.h" -#include "configuration_interface.h" -#include -#include "GPS_L2C.h" - -using google::LogMessage; - -GpsL2CObservables::GpsL2CObservables(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_dump_filename = "./observables.dat"; - DLOG(INFO) << "role " << role; - dump_ = configuration->property(role + ".dump", false); - dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); - unsigned int default_depth = GPS_L2C_HISTORY_DEEP; - unsigned int history_deep = configuration->property(role + ".averaging_depth", default_depth); - observables_ = hybrid_make_observables_cc(in_streams_, dump_, dump_filename_, history_deep); - DLOG(INFO) << "pseudorange(" << observables_->unique_id() << ")"; -} - - -GpsL2CObservables::~GpsL2CObservables() -{} - - -void GpsL2CObservables::connect(gr::top_block_sptr top_block) -{ - if(top_block) { /* top_block is not null */}; - // Nothing to connect internally - DLOG(INFO) << "nothing to connect internally"; -} - - -void GpsL2CObservables::disconnect(gr::top_block_sptr top_block) -{ - if(top_block) { /* top_block is not null */}; - // Nothing to disconnect -} - - -gr::basic_block_sptr GpsL2CObservables::get_left_block() -{ - return observables_; -} - - -gr::basic_block_sptr GpsL2CObservables::get_right_block() -{ - return observables_; -} diff --git a/src/algorithms/observables/adapters/gps_l2c_observables.h b/src/algorithms/observables/adapters/gps_l2c_observables.h deleted file mode 100644 index aee598f73..000000000 --- a/src/algorithms/observables/adapters/gps_l2c_observables.h +++ /dev/null @@ -1,88 +0,0 @@ -/*! - * \file gps_l2c_observables.h - * \brief Implementation of an adapter of a GPS L2C(M) observables block - * to a ObservablesInterface - * \author Carles Fernandez 2016. carles.fernandez(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * Copyright (C) 2010-2016 (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_L2C_OBSERVABLES_H_ -#define GNSS_SDR_GPS_L2C_OBSERVABLES_H_ - -#include -#include "observables_interface.h" -#include "hybrid_observables_cc.h" - - -class ConfigurationInterface; - -/*! - * \brief This class implements an ObservablesInterface for GPS L2C - */ -class GpsL2CObservables : public ObservablesInterface -{ -public: - GpsL2CObservables(ConfigurationInterface* configuration, - std::string role, - unsigned int in_streams, - unsigned int out_streams); - virtual ~GpsL2CObservables(); - std::string role() - { - return role_; - } - - //! Returns "GPS_L2C_Observables" - std::string implementation() - { - return "GPS_L2C_Observables"; - } - 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 reset() - { - return; - } - - //! All blocks must have an item_size() function implementation - size_t item_size() - { - return sizeof(gr_complex); - } - -private: - hybrid_observables_cc_sptr observables_; - bool dump_; - std::string dump_filename_; - std::string role_; - unsigned int in_streams_; - unsigned int out_streams_; -}; - -#endif diff --git a/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt b/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt index aad359d18..ec5247aab 100644 --- a/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt @@ -17,8 +17,6 @@ # set(OBS_GR_BLOCKS_SOURCES - gps_l1_ca_observables_cc.cc - galileo_e1_observables_cc.cc hybrid_observables_cc.cc ) diff --git a/src/algorithms/observables/gnuradio_blocks/galileo_e1_observables_cc.cc b/src/algorithms/observables/gnuradio_blocks/galileo_e1_observables_cc.cc deleted file mode 100644 index aab1e30c8..000000000 --- a/src/algorithms/observables/gnuradio_blocks/galileo_e1_observables_cc.cc +++ /dev/null @@ -1,281 +0,0 @@ -/*! - * \file galileo_e1_observables_cc.cc - * \brief Implementation of the pseudorange computation block for Galileo E1 - * \author Mara Branzanti 2013. mara.branzanti(at)gmail.com - * \author Javier Arribas 2013. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * 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 "galileo_e1_observables_cc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "gnss_synchro.h" -#include "Galileo_E1.h" -#include "galileo_navigation_message.h" - - - -using google::LogMessage; - - -galileo_e1_observables_cc_sptr -galileo_e1_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, unsigned int deep_history) -{ - return galileo_e1_observables_cc_sptr(new galileo_e1_observables_cc(nchannels, dump, dump_filename, deep_history)); -} - - -galileo_e1_observables_cc::galileo_e1_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, unsigned int deep_history) : - gr::block("galileo_e1_observables_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), - gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro))) -{ - // initialize internal vars - d_dump = dump; - d_nchannels = nchannels; - d_dump_filename = dump_filename; - history_deep = deep_history; - - for (unsigned int i = 0; i < d_nchannels; i++) - { - d_acc_carrier_phase_queue_rads.push_back(std::deque(d_nchannels)); - d_carrier_doppler_queue_hz.push_back(std::deque(d_nchannels)); - d_symbol_TOW_queue_s.push_back(std::deque(d_nchannels)); - } - - // ############# ENABLE DATA FILE LOG ################# - if (d_dump == true) - { - if (d_dump_file.is_open() == false) - { - try - { - 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) << "Observables dump enabled Log file: " << d_dump_filename.c_str(); - } - catch (const std::ifstream::failure & e) - { - LOG(WARNING) << "Exception opening observables dump file " << e.what(); - } - } - } -} - - - -galileo_e1_observables_cc::~galileo_e1_observables_cc() -{ - d_dump_file.close(); -} - - - -bool Galileo_pairCompare_gnss_synchro_Prn_delay_ms(const std::pair& a, const std::pair& b) -{ - return (a.second.Prn_timestamp_ms) < (b.second.Prn_timestamp_ms); -} - - - -bool Galileo_pairCompare_gnss_synchro_d_TOW_at_current_symbol(const std::pair& a, const std::pair& b) -{ - return (a.second.d_TOW_at_current_symbol) < (b.second.d_TOW_at_current_symbol); -} - - - -int galileo_e1_observables_cc::general_work (int noutput_items, gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) -{ - Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; // Get the input pointer - Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; // Get the output pointer - - Gnss_Synchro current_gnss_synchro[d_nchannels]; - std::map current_gnss_synchro_map; - std::map::iterator gnss_synchro_iter; - if (d_nchannels != ninput_items.size()) - { - LOG(WARNING) << "The Observables block is not well connected"; - } - - /* - * 1. Read the GNSS SYNCHRO objects from available channels - */ - for (unsigned int i = 0; i < d_nchannels; i++) - { - //Copy the telemetry decoder data to local copy - current_gnss_synchro[i] = in[i][0]; - /* - * 1.2 Assume no valid pseudoranges - */ - current_gnss_synchro[i].Flag_valid_pseudorange = false; - current_gnss_synchro[i].Pseudorange_m = 0.0; - - if (current_gnss_synchro[i].Flag_valid_word) //if this channel have valid word - { - //record the word structure in a map for pseudorange computation - current_gnss_synchro_map.insert(std::pair(current_gnss_synchro[i].Channel_ID, current_gnss_synchro[i])); - - //################### SAVE DOPPLER AND ACC CARRIER PHASE HISTORIC DATA FOR INTERPOLATION IN OBSERVABLE MODULE ####### - d_carrier_doppler_queue_hz[i].push_back(current_gnss_synchro[i].Carrier_Doppler_hz); - d_acc_carrier_phase_queue_rads[i].push_back(current_gnss_synchro[i].Carrier_phase_rads); - // save TOW history - d_symbol_TOW_queue_s[i].push_back(current_gnss_synchro[i].d_TOW_at_current_symbol); - - if (d_carrier_doppler_queue_hz[i].size() > history_deep) - { - d_carrier_doppler_queue_hz[i].pop_front(); - } - if (d_acc_carrier_phase_queue_rads[i].size() > history_deep) - { - d_acc_carrier_phase_queue_rads[i].pop_front(); - } - if (d_symbol_TOW_queue_s[i].size() > history_deep) - { - d_symbol_TOW_queue_s[i].pop_front(); - } - } - else - { - // Clear the observables history for this channel - if (d_symbol_TOW_queue_s[i].size() > 0) - { - d_symbol_TOW_queue_s[i].clear(); - d_carrier_doppler_queue_hz[i].clear(); - d_acc_carrier_phase_queue_rads[i].clear(); - } - } - } - - /* - * 2. Compute RAW pseudoranges using COMMON RECEPTION TIME algorithm. Use only the valid channels (channels that are tracking a satellite) - */ - if(current_gnss_synchro_map.size() > 0) - { - /* - * 2.1 Use CURRENT set of measurements and find the nearest satellite - * common RX time algorithm - */ - // what is the most recent symbol TOW in the current set? -> this will be the reference symbol - gnss_synchro_iter = max_element(current_gnss_synchro_map.begin(), current_gnss_synchro_map.end(), Galileo_pairCompare_gnss_synchro_d_TOW_at_current_symbol); - double d_TOW_reference = gnss_synchro_iter->second.d_TOW_at_current_symbol; - double d_ref_PRN_rx_time_ms = gnss_synchro_iter->second.Prn_timestamp_ms; - //int reference_channel= gnss_synchro_iter->second.Channel_ID; - - // Now compute RX time differences due to the PRN alignment in the correlators - double traveltime_ms; - double pseudorange_m; - double delta_rx_time_ms; - arma::vec symbol_TOW_vec_s; - arma::vec dopper_vec_hz; - arma::vec dopper_vec_interp_hz; - arma::vec acc_phase_vec_rads; - arma::vec acc_phase_vec_interp_rads; - arma::vec desired_symbol_TOW(1); - for(gnss_synchro_iter = current_gnss_synchro_map.begin(); gnss_synchro_iter != current_gnss_synchro_map.end(); gnss_synchro_iter++) - { - // compute the required symbol history shift in order to match the reference symbol - delta_rx_time_ms = gnss_synchro_iter->second.Prn_timestamp_ms - d_ref_PRN_rx_time_ms; - //compute the pseudorange - traveltime_ms = (d_TOW_reference-gnss_synchro_iter->second.d_TOW_at_current_symbol) * 1000.0 + delta_rx_time_ms + GALILEO_STARTOFFSET_ms; - pseudorange_m = traveltime_ms * GALILEO_C_m_ms; // [m] - // update the pseudorange object - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID] = gnss_synchro_iter->second; - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Pseudorange_m = pseudorange_m; - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Flag_valid_pseudorange = true; - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].d_TOW_at_current_symbol = round(d_TOW_reference * 1000.0) / 1000.0 + GALILEO_STARTOFFSET_ms / 1000.0; - - if (d_symbol_TOW_queue_s[gnss_synchro_iter->second.Channel_ID].size() >= history_deep) - { - // compute interpolated observation values for Doppler and Accumulate carrier phase - symbol_TOW_vec_s = arma::vec(std::vector(d_symbol_TOW_queue_s[gnss_synchro_iter->second.Channel_ID].begin(), d_symbol_TOW_queue_s[gnss_synchro_iter->second.Channel_ID].end())); - acc_phase_vec_rads = arma::vec(std::vector(d_acc_carrier_phase_queue_rads[gnss_synchro_iter->second.Channel_ID].begin(), d_acc_carrier_phase_queue_rads[gnss_synchro_iter->second.Channel_ID].end())); - dopper_vec_hz = arma::vec(std::vector(d_carrier_doppler_queue_hz[gnss_synchro_iter->second.Channel_ID].begin(), d_carrier_doppler_queue_hz[gnss_synchro_iter->second.Channel_ID].end())); - desired_symbol_TOW[0] = symbol_TOW_vec_s[history_deep - 1] + delta_rx_time_ms / 1000.0; - // Curve fitting to cuadratic function - arma::mat A = arma::ones(history_deep, 2); - A.col(1) = symbol_TOW_vec_s; - //A.col(2)=symbol_TOW_vec_s % symbol_TOW_vec_s; - arma::mat coef_acc_phase(1,3); - arma::mat pinv_A = arma::pinv(A.t() * A) * A.t(); - coef_acc_phase = pinv_A * acc_phase_vec_rads; - arma::mat coef_doppler(1,3); - coef_doppler = pinv_A * dopper_vec_hz; - arma::vec acc_phase_lin; - arma::vec carrier_doppler_lin; - acc_phase_lin = coef_acc_phase[0] + coef_acc_phase[1] * desired_symbol_TOW[0];//+coef_acc_phase[2]*desired_symbol_TOW[0]*desired_symbol_TOW[0]; - carrier_doppler_lin = coef_doppler[0] + coef_doppler[1] * desired_symbol_TOW[0];//+coef_doppler[2]*desired_symbol_TOW[0]*desired_symbol_TOW[0]; - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Carrier_phase_rads = acc_phase_lin[0]; - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Carrier_Doppler_hz = carrier_doppler_lin[0]; - } - } - } - - if(d_dump == true) - { - // MULTIPLEXED FILE RECORDING - Record results to file - try - { - double tmp_double; - for (unsigned int i = 0; i < d_nchannels ; i++) - { - tmp_double = current_gnss_synchro[i].d_TOW_at_current_symbol; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - tmp_double = current_gnss_synchro[i].Carrier_Doppler_hz; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - tmp_double = current_gnss_synchro[i].Carrier_phase_rads/GALILEO_TWO_PI; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - tmp_double = current_gnss_synchro[i].Pseudorange_m; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - tmp_double = current_gnss_synchro[i].PRN; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - } - } - catch (const std::ifstream::failure& e) - { - LOG(WARNING) << "Exception writing observables dump file " << e.what(); - } - } - - consume_each(1); //one by one - for (unsigned int i = 0; i < d_nchannels ; i++) - { - *out[i] = current_gnss_synchro[i]; - } - if (noutput_items == 0) - { - LOG(WARNING) << "noutput_items = 0"; - } - return 1; -} diff --git a/src/algorithms/observables/gnuradio_blocks/galileo_e1_observables_cc.h b/src/algorithms/observables/gnuradio_blocks/galileo_e1_observables_cc.h deleted file mode 100644 index 1cb3ef4c4..000000000 --- a/src/algorithms/observables/gnuradio_blocks/galileo_e1_observables_cc.h +++ /dev/null @@ -1,78 +0,0 @@ -/*! - * \file galileo_e1_observables_cc.h - * \brief Interface of the observables computation block for Galileo E1 - * \author Mara Branzanti 2013. mara.branzanti(at)gmail.com - * \author Javier Arribas 2013. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * 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_GALILEO_E1_OBSERVABLES_CC_H -#define GNSS_SDR_GALILEO_E1_OBSERVABLES_CC_H - - -#include -#include -#include - - -class galileo_e1_observables_cc; - -typedef boost::shared_ptr galileo_e1_observables_cc_sptr; - -galileo_e1_observables_cc_sptr -galileo_e1_make_observables_cc(unsigned int n_channels, bool dump, std::string dump_filename, unsigned int deep_history); - -/*! - * \brief This class implements a block that computes Galileo observables - */ -class galileo_e1_observables_cc : public gr::block -{ -public: - ~galileo_e1_observables_cc (); - - int general_work (int noutput_items, gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); - -private: - friend galileo_e1_observables_cc_sptr - galileo_e1_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, unsigned int deep_history); - galileo_e1_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, unsigned int deep_history); - - //Tracking observable history - std::vector> d_acc_carrier_phase_queue_rads; - std::vector> d_carrier_doppler_queue_hz; - std::vector> d_symbol_TOW_queue_s; - - // class private vars - bool d_dump; - unsigned int d_nchannels; - unsigned int history_deep; - std::string d_dump_filename; - std::ofstream d_dump_file; -}; - -#endif diff --git a/src/algorithms/observables/gnuradio_blocks/gps_l1_ca_observables_cc.cc b/src/algorithms/observables/gnuradio_blocks/gps_l1_ca_observables_cc.cc deleted file mode 100644 index db73b50dc..000000000 --- a/src/algorithms/observables/gnuradio_blocks/gps_l1_ca_observables_cc.cc +++ /dev/null @@ -1,278 +0,0 @@ -/*! - * \file gps_l1_ca_observables_cc.cc - * \brief Implementation of the pseudorange computation block for GPS L1 C/A - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * ------------------------------------------------------------------------- - * - * 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_observables_cc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "control_message_factory.h" -#include "gnss_synchro.h" -#include "GPS_L1_CA.h" - - - -using google::LogMessage; - - -gps_l1_ca_observables_cc_sptr -gps_l1_ca_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, unsigned int deep_history) -{ - return gps_l1_ca_observables_cc_sptr(new gps_l1_ca_observables_cc(nchannels, dump, dump_filename, deep_history)); -} - - -gps_l1_ca_observables_cc::gps_l1_ca_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, unsigned int deep_history) : - gr::block("gps_l1_ca_observables_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), - gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro))) -{ - - // initialize internal vars - d_dump = dump; - d_nchannels = nchannels; - d_dump_filename = dump_filename; - history_deep = deep_history; - - for (unsigned int i = 0; i < d_nchannels; i++) - { - d_acc_carrier_phase_queue_rads.push_back(std::deque(d_nchannels)); - d_carrier_doppler_queue_hz.push_back(std::deque(d_nchannels)); - d_symbol_TOW_queue_s.push_back(std::deque(d_nchannels)); - } - - // ############# ENABLE DATA FILE LOG ################# - if (d_dump == true) - { - if (d_dump_file.is_open() == false) - { - try - { - 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) << "Observables dump enabled Log file: " << d_dump_filename.c_str(); - } - catch (const std::ifstream::failure & e) - { - LOG(WARNING) << "Exception opening observables dump file " << e.what(); - } - } - } -} - - - -gps_l1_ca_observables_cc::~gps_l1_ca_observables_cc() -{ - d_dump_file.close(); -} - -bool pairCompare_gnss_synchro_Prn_delay_ms(const std::pair& a, const std::pair& b) -{ - return (a.second.Prn_timestamp_ms) < (b.second.Prn_timestamp_ms); -} - - -bool pairCompare_gnss_synchro_d_TOW_at_current_symbol(const std::pair& a, const std::pair& b) -{ - return (a.second.d_TOW_at_current_symbol) < (b.second.d_TOW_at_current_symbol); -} - - -int gps_l1_ca_observables_cc::general_work (int noutput_items, gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) -{ - Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; // Get the input pointer - Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; // Get the output pointer - - Gnss_Synchro current_gnss_synchro[d_nchannels]; - std::map current_gnss_synchro_map; - std::map::iterator gnss_synchro_iter; - - if (d_nchannels != ninput_items.size()) - { - LOG(WARNING) << "The Observables block is not well connected"; - } - - /* - * 1. Read the GNSS SYNCHRO objects from available channels - */ - for (unsigned int i = 0; i < d_nchannels; i++) - { - //Copy the telemetry decoder data to local copy - current_gnss_synchro[i] = in[i][0]; - /* - * 1.2 Assume no valid pseudoranges - */ - current_gnss_synchro[i].Flag_valid_pseudorange = false; - current_gnss_synchro[i].Pseudorange_m = 0.0; - if (current_gnss_synchro[i].Flag_valid_word) //if this channel have valid word - { - //record the word structure in a map for pseudorange computation - current_gnss_synchro_map.insert(std::pair(current_gnss_synchro[i].Channel_ID, current_gnss_synchro[i])); - - //################### SAVE DOPPLER AND ACC CARRIER PHASE HISTORIC DATA FOR INTERPOLATION IN OBSERVABLE MODULE ####### - d_carrier_doppler_queue_hz[i].push_back(current_gnss_synchro[i].Carrier_Doppler_hz); - d_acc_carrier_phase_queue_rads[i].push_back(current_gnss_synchro[i].Carrier_phase_rads); - // save TOW history - d_symbol_TOW_queue_s[i].push_back(current_gnss_synchro[i].d_TOW_at_current_symbol); - - if (d_carrier_doppler_queue_hz[i].size() > history_deep) - { - d_carrier_doppler_queue_hz[i].pop_front(); - } - if (d_acc_carrier_phase_queue_rads[i].size() > history_deep) - { - d_acc_carrier_phase_queue_rads[i].pop_front(); - } - if (d_symbol_TOW_queue_s[i].size() > history_deep) - { - d_symbol_TOW_queue_s[i].pop_front(); - } - } - else - { - // Clear the observables history for this channel - if (d_symbol_TOW_queue_s[i].size() > 0) - { - d_symbol_TOW_queue_s[i].clear(); - d_carrier_doppler_queue_hz[i].clear(); - d_acc_carrier_phase_queue_rads[i].clear(); - } - } - } - - /* - * 2. Compute RAW pseudoranges using COMMON RECEPTION TIME algorithm. Use only the valid channels (channels that are tracking a satellite) - */ - if(current_gnss_synchro_map.size() > 0) - { - /* - * 2.1 Use CURRENT set of measurements and find the nearest satellite - * common RX time algorithm - */ - // what is the most recent symbol TOW in the current set? -> this will be the reference symbol - gnss_synchro_iter = max_element(current_gnss_synchro_map.begin(), current_gnss_synchro_map.end(), pairCompare_gnss_synchro_d_TOW_at_current_symbol); - double d_TOW_reference = gnss_synchro_iter->second.d_TOW_at_current_symbol; - double d_ref_PRN_rx_time_ms = gnss_synchro_iter->second.Prn_timestamp_ms; - - // Now compute RX time differences due to the PRN alignment in the correlators - double traveltime_ms; - double pseudorange_m; - double delta_rx_time_ms; - arma::vec symbol_TOW_vec_s; - arma::vec dopper_vec_hz; - arma::vec dopper_vec_interp_hz; - arma::vec acc_phase_vec_rads; - arma::vec acc_phase_vec_interp_rads; - arma::vec desired_symbol_TOW(1); - for(gnss_synchro_iter = current_gnss_synchro_map.begin(); gnss_synchro_iter != current_gnss_synchro_map.end(); gnss_synchro_iter++) - { - // compute the required symbol history shift in order to match the reference symbol - delta_rx_time_ms = gnss_synchro_iter->second.Prn_timestamp_ms - d_ref_PRN_rx_time_ms; - //compute the pseudorange - traveltime_ms = (d_TOW_reference - gnss_synchro_iter->second.d_TOW_at_current_symbol) * 1000.0 + delta_rx_time_ms + GPS_STARTOFFSET_ms; - //convert to meters and remove the receiver time offset in meters - pseudorange_m = traveltime_ms * GPS_C_m_ms; // [m] - // update the pseudorange object - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID] = gnss_synchro_iter->second; - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Pseudorange_m = pseudorange_m; - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Flag_valid_pseudorange = true; - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].d_TOW_at_current_symbol = d_TOW_reference + GPS_STARTOFFSET_ms / 1000.0; - - if (d_symbol_TOW_queue_s[gnss_synchro_iter->second.Channel_ID].size() >= history_deep) - { - // compute interpolated observation values for Doppler and Accumulate carrier phase - symbol_TOW_vec_s = arma::vec(std::vector(d_symbol_TOW_queue_s[gnss_synchro_iter->second.Channel_ID].begin(), d_symbol_TOW_queue_s[gnss_synchro_iter->second.Channel_ID].end())); - acc_phase_vec_rads = arma::vec(std::vector(d_acc_carrier_phase_queue_rads[gnss_synchro_iter->second.Channel_ID].begin(), d_acc_carrier_phase_queue_rads[gnss_synchro_iter->second.Channel_ID].end())); - dopper_vec_hz = arma::vec(std::vector(d_carrier_doppler_queue_hz[gnss_synchro_iter->second.Channel_ID].begin(), d_carrier_doppler_queue_hz[gnss_synchro_iter->second.Channel_ID].end())); - - desired_symbol_TOW[0] = symbol_TOW_vec_s[history_deep - 1] + delta_rx_time_ms / 1000.0; - // arma::interp1(symbol_TOW_vec_s,dopper_vec_hz,desired_symbol_TOW,dopper_vec_interp_hz); - // arma::interp1(symbol_TOW_vec_s,acc_phase_vec_rads,desired_symbol_TOW,acc_phase_vec_interp_rads); - // Curve fitting to quadratic function - arma::mat A = arma::ones (history_deep, 2); - A.col(1) = symbol_TOW_vec_s; - - arma::mat coef_acc_phase(1,3); - arma::mat pinv_A = arma::pinv(A.t() * A) * A.t(); - coef_acc_phase = pinv_A * acc_phase_vec_rads; - arma::mat coef_doppler(1,3); - coef_doppler = pinv_A * dopper_vec_hz; - arma::vec acc_phase_lin; - arma::vec carrier_doppler_lin; - acc_phase_lin = coef_acc_phase[0] + coef_acc_phase[1] * desired_symbol_TOW[0]; - carrier_doppler_lin = coef_doppler[0] + coef_doppler[1] * desired_symbol_TOW[0]; - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Carrier_phase_rads = acc_phase_lin[0]; - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Carrier_Doppler_hz = carrier_doppler_lin[0]; - } - } - } - - if(d_dump == true) - { - // MULTIPLEXED FILE RECORDING - Record results to file - try - { - double tmp_double; - for (unsigned int i = 0; i < d_nchannels; i++) - { - tmp_double = current_gnss_synchro[i].d_TOW_at_current_symbol; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - tmp_double = current_gnss_synchro[i].Carrier_Doppler_hz; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - tmp_double = current_gnss_synchro[i].Carrier_phase_rads/GPS_TWO_PI; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - tmp_double = current_gnss_synchro[i].Pseudorange_m; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - tmp_double = current_gnss_synchro[i].PRN; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - } - } - catch (const std::ifstream::failure& e) - { - LOG(WARNING) << "Exception writing observables dump file " << e.what(); - } - } - - consume_each(1); //one by one - for (unsigned int i = 0; i < d_nchannels; i++) - { - *out[i] = current_gnss_synchro[i]; - } - if (noutput_items == 0) - { - LOG(WARNING) << "noutput_items = 0"; - } - return 1; -} diff --git a/src/algorithms/observables/gnuradio_blocks/gps_l1_ca_observables_cc.h b/src/algorithms/observables/gnuradio_blocks/gps_l1_ca_observables_cc.h deleted file mode 100644 index 38a1e7f4d..000000000 --- a/src/algorithms/observables/gnuradio_blocks/gps_l1_ca_observables_cc.h +++ /dev/null @@ -1,79 +0,0 @@ -/*! - * \file gps_l1_ca_observables_cc.h - * \brief Interface of the pseudorange computation block for GPS L1 C/A - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * ------------------------------------------------------------------------- - * - * 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_OBSERVABLES_CC_H -#define GNSS_SDR_GPS_L1_CA_OBSERVABLES_CC_H - -#include -#include -#include -#include -#include -#include - - -class gps_l1_ca_observables_cc; - -typedef boost::shared_ptr gps_l1_ca_observables_cc_sptr; - -gps_l1_ca_observables_cc_sptr -gps_l1_ca_make_observables_cc(unsigned int n_channels, bool dump, std::string dump_filename, unsigned int deep_history); - -/*! - * \brief This class implements a block that computes GPS L1 C/A observables - */ -class gps_l1_ca_observables_cc : public gr::block -{ -public: - ~gps_l1_ca_observables_cc (); - //void set_fs_in(unsigned long int fs_in) {d_fs_in = fs_in;}; - int general_work (int noutput_items, gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); - -private: - friend gps_l1_ca_observables_cc_sptr - gps_l1_ca_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, unsigned int deep_history); - gps_l1_ca_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, unsigned int deep_history); - - - //Tracking observable history - std::vector> d_acc_carrier_phase_queue_rads; - std::vector> d_carrier_doppler_queue_hz; - std::vector> d_symbol_TOW_queue_s; - - // class private vars - bool d_dump; - unsigned int d_nchannels; - unsigned int history_deep; - std::string d_dump_filename; - std::ofstream d_dump_file; -}; - -#endif diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc index 4366093ba..579109dd2 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc @@ -34,8 +34,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -98,9 +98,9 @@ hybrid_observables_cc::~hybrid_observables_cc() } -bool Hybrid_pairCompare_gnss_synchro_d_TOW_hybrid_at_current_symbol(const std::pair& a, const std::pair& b) +bool Hybrid_pairCompare_gnss_synchro_d_TOW_at_current_symbol(const std::pair& a, const std::pair& b) { - return (a.second.d_TOW_hybrid_at_current_symbol) < (b.second.d_TOW_hybrid_at_current_symbol); + return (a.second.d_TOW_at_current_symbol) < (b.second.d_TOW_at_current_symbol); } @@ -170,19 +170,6 @@ int hybrid_observables_cc::general_work (int noutput_items, /* * 2. Compute RAW pseudoranges using COMMON RECEPTION TIME algorithm. Use only the valid channels (channels that are tracking a satellite) */ - DLOG(INFO) << "gnss_synchro set size=" << current_gnss_synchro_map.size(); - double traveltime_ms; - double pseudorange_m; - double delta_rx_time_ms; - double delta_TOW_ms; - arma::vec symbol_TOW_vec_s; - arma::vec dopper_vec_hz; - arma::vec dopper_vec_interp_hz; - arma::vec acc_phase_vec_rads; - arma::vec acc_phase_vec_interp_rads; - arma::vec desired_symbol_TOW(1); - double start_offset_ms = 0.0; - if(current_gnss_synchro_map.size() > 0) { /* @@ -190,52 +177,49 @@ int hybrid_observables_cc::general_work (int noutput_items, * common RX time algorithm */ // what is the most recent symbol TOW in the current set? -> this will be the reference symbol - gnss_synchro_iter = max_element(current_gnss_synchro_map.begin(), current_gnss_synchro_map.end(), Hybrid_pairCompare_gnss_synchro_d_TOW_hybrid_at_current_symbol); - //gnss_synchro_iter = max_element(current_gnss_synchro_map_gps_only.begin(), current_gnss_synchro_map_gps_only.end(), Hybrid_pairCompare_gnss_synchro_d_TOW_hybrid_at_current_symbol); - double d_TOW_reference = gnss_synchro_iter->second.d_TOW_hybrid_at_current_symbol; - DLOG(INFO) << "d_TOW_hybrid_reference [ms] = " << d_TOW_reference * 1000; + gnss_synchro_iter = max_element(current_gnss_synchro_map.begin(), current_gnss_synchro_map.end(), Hybrid_pairCompare_gnss_synchro_d_TOW_at_current_symbol); + double d_TOW_reference = gnss_synchro_iter->second.d_TOW_at_current_symbol; double d_ref_PRN_rx_time_ms = gnss_synchro_iter->second.Prn_timestamp_ms; - DLOG(INFO) << "ref_PRN_rx_time_ms [ms] = " << d_ref_PRN_rx_time_ms; // Now compute RX time differences due to the PRN alignment in the correlators + double traveltime_ms; + double pseudorange_m; + double delta_rx_time_ms; + for(gnss_synchro_iter = current_gnss_synchro_map.begin(); gnss_synchro_iter != current_gnss_synchro_map.end(); gnss_synchro_iter++) { - // check and correct synchronization in cross-system pseudoranges! - delta_rx_time_ms = gnss_synchro_iter->second.Prn_timestamp_ms - d_ref_PRN_rx_time_ms; - delta_TOW_ms = (d_TOW_reference - gnss_synchro_iter->second.d_TOW_hybrid_at_current_symbol) * 1000.0; - if(gnss_synchro_iter->second.System == 'E') - { - start_offset_ms = GALILEO_STARTOFFSET_ms; - } - if(gnss_synchro_iter->second.System == 'G') - { - start_offset_ms = GPS_STARTOFFSET_ms; - } - //compute the pseudorange - traveltime_ms = delta_TOW_ms + delta_rx_time_ms + start_offset_ms; - pseudorange_m = traveltime_ms * GALILEO_C_m_ms; // [m] - DLOG(INFO) << "CH " << gnss_synchro_iter->second.Channel_ID << " tracking GNSS System " - << gnss_synchro_iter->second.System << " has PRN start at= " << gnss_synchro_iter->second.Prn_timestamp_ms - << " [ms], d_TOW_at_current_symbol = " << (gnss_synchro_iter->second.d_TOW_at_current_symbol) * 1000 - << " [ms], d_TOW_hybrid_at_current_symbol = "<< (gnss_synchro_iter->second.d_TOW_hybrid_at_current_symbol) * 1000 - << "[ms], delta_rx_time_ms = " << delta_rx_time_ms << "[ms], travel_time = " << traveltime_ms - << ", pseudorange[m] = "<< pseudorange_m; + delta_rx_time_ms = gnss_synchro_iter->second.Prn_timestamp_ms - d_ref_PRN_rx_time_ms; + //compute the pseudorange (no rx time offset correction) + traveltime_ms = (d_TOW_reference - gnss_synchro_iter->second.d_TOW_at_current_symbol) * 1000.0 + + delta_rx_time_ms + + GPS_STARTOFFSET_ms; + //convert to meters + pseudorange_m = traveltime_ms * GPS_C_m_ms; // [m] // update the pseudorange object - //current_gnss_synchro[gnss_synchro_iter->second.Channel_ID] = gnss_synchro_iter->second; + current_gnss_synchro[gnss_synchro_iter->second.Channel_ID] = gnss_synchro_iter->second; current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Pseudorange_m = pseudorange_m; current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Flag_valid_pseudorange = true; - current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].d_TOW_hybrid_at_current_symbol = round(d_TOW_reference * 1000) / 1000 + start_offset_ms / 1000.0; + //todo: check this + current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].d_TOW_at_current_symbol = d_TOW_reference + GPS_STARTOFFSET_ms / 1000.0; + if (d_symbol_TOW_queue_s[gnss_synchro_iter->second.Channel_ID].size() >= history_deep) { + arma::vec symbol_TOW_vec_s; + arma::vec dopper_vec_hz; + arma::vec dopper_vec_interp_hz; + arma::vec acc_phase_vec_rads; + arma::vec acc_phase_vec_interp_rads; + arma::vec desired_symbol_TOW(1); // compute interpolated observation values for Doppler and Accumulate carrier phase symbol_TOW_vec_s = arma::vec(std::vector(d_symbol_TOW_queue_s[gnss_synchro_iter->second.Channel_ID].begin(), d_symbol_TOW_queue_s[gnss_synchro_iter->second.Channel_ID].end())); acc_phase_vec_rads = arma::vec(std::vector(d_acc_carrier_phase_queue_rads[gnss_synchro_iter->second.Channel_ID].begin(), d_acc_carrier_phase_queue_rads[gnss_synchro_iter->second.Channel_ID].end())); dopper_vec_hz = arma::vec(std::vector(d_carrier_doppler_queue_hz[gnss_synchro_iter->second.Channel_ID].begin(), d_carrier_doppler_queue_hz[gnss_synchro_iter->second.Channel_ID].end())); desired_symbol_TOW[0] = symbol_TOW_vec_s[history_deep - 1] + delta_rx_time_ms / 1000.0; - - // Curve fitting to cuadratic function + // arma::interp1(symbol_TOW_vec_s,dopper_vec_hz,desired_symbol_TOW,dopper_vec_interp_hz); + // arma::interp1(symbol_TOW_vec_s,acc_phase_vec_rads,desired_symbol_TOW,acc_phase_vec_interp_rads); + // Curve fitting to quadratic function arma::mat A = arma::ones (history_deep, 2); A.col(1) = symbol_TOW_vec_s; @@ -260,11 +244,10 @@ int hybrid_observables_cc::general_work (int noutput_items, try { double tmp_double; - for (unsigned int i = 0; i < d_nchannels ; i++) + for (unsigned int i = 0; i < d_nchannels; i++) { tmp_double = current_gnss_synchro[i].d_TOW_at_current_symbol; d_dump_file.write((char*)&tmp_double, sizeof(double)); - //tmp_double = current_gnss_synchro[i].Prn_timestamp_ms; tmp_double = current_gnss_synchro[i].Carrier_Doppler_hz; d_dump_file.write((char*)&tmp_double, sizeof(double)); tmp_double = current_gnss_synchro[i].Carrier_phase_rads/GPS_TWO_PI; @@ -273,7 +256,6 @@ int hybrid_observables_cc::general_work (int noutput_items, d_dump_file.write((char*)&tmp_double, sizeof(double)); tmp_double = current_gnss_synchro[i].PRN; d_dump_file.write((char*)&tmp_double, sizeof(double)); - } } catch (const std::ifstream::failure& e) @@ -282,13 +264,11 @@ int hybrid_observables_cc::general_work (int noutput_items, } } - consume_each(1); //consume one by one - - for (unsigned int i = 0; i < d_nchannels ; i++) + consume_each(1); //one by one + for (unsigned int i = 0; i < d_nchannels; i++) { *out[i] = current_gnss_synchro[i]; } - if (noutput_items == 0) { LOG(WARNING) << "noutput_items = 0"; 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 93e02e3fa..0f5bb7413 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 @@ -458,10 +458,8 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items __attribut current_synchro_data.Flag_valid_word = false; } - current_synchro_data.d_TOW = d_TOW_at_Preamble; current_synchro_data.d_TOW_at_current_symbol = d_TOW_at_current_symbol; - current_synchro_data.d_TOW_hybrid_at_current_symbol = current_synchro_data.d_TOW_at_current_symbol - delta_t; //delta_t = t_gal - t_gps ----> t_gps = t_gal -delta_t - current_synchro_data.Flag_preamble = d_flag_preamble; + //todo: move to observables: current_synchro_data.d_TOW_hybrid_at_current_symbol = current_synchro_data.d_TOW_at_current_symbol - delta_t; //delta_t = t_gal - t_gps ----> t_gps = t_gal -delta_t current_synchro_data.Prn_timestamp_ms = in[0][0].Tracking_timestamp_secs * 1000.0; current_synchro_data.Prn_timestamp_at_preamble_ms = Prn_timestamp_at_preamble_ms; 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 ed37a2a35..41da30df6 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 @@ -538,9 +538,7 @@ int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items __attribut current_synchro_data.Flag_valid_word = false; } - current_synchro_data.d_TOW = d_TOW_at_Preamble; current_synchro_data.d_TOW_at_current_symbol = d_TOW_at_current_symbol; - current_synchro_data.Flag_preamble = d_flag_preamble; current_synchro_data.Prn_timestamp_ms = in[0][0].Tracking_timestamp_secs * 1000.0; current_synchro_data.Prn_timestamp_at_preamble_ms = Prn_timestamp_at_preamble_ms; 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 482e4b6af..345d571b3 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 @@ -351,11 +351,8 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attribute_ d_TOW_at_current_symbol = d_TOW_at_current_symbol + GPS_L1_CA_CODE_PERIOD; } - current_synchro_data.d_TOW = d_TOW_at_Preamble; current_synchro_data.d_TOW_at_current_symbol = d_TOW_at_current_symbol; - current_synchro_data.d_TOW_hybrid_at_current_symbol = current_synchro_data.d_TOW_at_current_symbol; // to be used in the hybrid configuration current_synchro_data.Flag_valid_word = flag_TOW_set;//(d_flag_frame_sync == true and d_flag_parity == true and flag_TOW_set == true); - current_synchro_data.Flag_preamble = d_flag_preamble; current_synchro_data.Prn_timestamp_ms = in[0][0].Tracking_timestamp_secs * 1000.0; current_synchro_data.Prn_timestamp_at_preamble_ms = Prn_timestamp_at_preamble_ms; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc index b7119a7a5..65ca0b3d2 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc @@ -150,12 +150,9 @@ int gps_l2c_telemetry_decoder_cc::general_work (int noutput_items __attribute__( //update TOW at the preamble instant double Prn_timestamp_at_preamble_ms = (in[0].Tracking_timestamp_secs * 1000.0); d_TOW_at_Preamble=(int)msg.tow; - current_synchro_data.d_TOW = d_TOW_at_Preamble; std::cout<<"["<<(int)msg.prn<<"] deco delay: "< GNSSBlockFactory::GetBlock( } // OBSERVABLES ----------------------------------------------------------------- - else if (implementation.compare("GPS_L1_CA_Observables") == 0) - { - std::unique_ptr block_(new GpsL1CaObservables(configuration.get(), role, in_streams, - out_streams)); - block = std::move(block_); - } - else if (implementation.compare("GPS_L2C_Observables") == 0) - { - std::unique_ptr block_(new GpsL2CObservables(configuration.get(), role, in_streams, - out_streams)); - block = std::move(block_); - } - else if (implementation.compare("Galileo_E1B_Observables") == 0) - { - std::unique_ptr block_(new GalileoE1Observables(configuration.get(), role, in_streams, - out_streams)); - block = std::move(block_); - } - else if (implementation.compare("Galileo_E5A_Observables") == 0) - { - std::unique_ptr block_(new GalileoE5aObservables(configuration.get(), role, in_streams, - out_streams)); - block = std::move(block_); - } else if (implementation.compare("Hybrid_Observables") == 0) { std::unique_ptr block_(new HybridObservables(configuration.get(), role, in_streams, @@ -1096,18 +1066,6 @@ std::unique_ptr GNSSBlockFactory::GetBlock( block = std::move(block_); } // PVT ------------------------------------------------------------------------- - else if (implementation.compare("GPS_L1_CA_PVT") == 0) - { - std::unique_ptr block_(new GpsL1CaPvt(configuration.get(), role, in_streams, - out_streams)); - block = std::move(block_); - } - else if (implementation.compare("GALILEO_E1_PVT") == 0) - { - std::unique_ptr block_(new GalileoE1Pvt(configuration.get(), role, in_streams, - out_streams)); - block = std::move(block_); - } else if (implementation.compare("Hybrid_PVT") == 0) { std::unique_ptr block_(new HybridPvt(configuration.get(), role, in_streams, diff --git a/src/core/system_parameters/gnss_synchro.h b/src/core/system_parameters/gnss_synchro.h index 62974e73f..b8d0c087b 100644 --- a/src/core/system_parameters/gnss_synchro.h +++ b/src/core/system_parameters/gnss_synchro.h @@ -68,10 +68,7 @@ public: double Prn_timestamp_at_preamble_ms; //!< Set by Telemetry Decoder processing block bool Flag_valid_word; //!< Set by Telemetry Decoder processing block - bool Flag_preamble; //!< Set by Telemetry Decoder processing block - double d_TOW; //!< Set by Telemetry Decoder processing block - double d_TOW_at_current_symbol; - double d_TOW_hybrid_at_current_symbol; //Galileo TOW is expressed in the GPS time scale (it will be the same for any other constellation) + double d_TOW_at_current_symbol; //!< Set by Telemetry Decoder processing block // Pseudorange double Pseudorange_m;