diff --git a/conf/front-end-cal.conf b/conf/front-end-cal.conf index 72c9be845..6ef6ec846 100644 --- a/conf/front-end-cal.conf +++ b/conf/front-end-cal.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; Default configuration file ; You can define your own front-end calibration tool configuration and invoke it by doing ; ./front-end-cal --config_file=my_GNSS_SDR_configuration.conf diff --git a/conf/gnss-sdr.conf b/conf/gnss-sdr.conf index 0c456f075..e9a05e798 100644 --- a/conf/gnss-sdr.conf +++ b/conf/gnss-sdr.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; Default configuration file ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf @@ -25,149 +28,63 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource.filename=/datalogger/signals/CTTC/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE -;#item_type: Type and resolution for each of the signal samples. SignalSource.item_type=ishort -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=4000000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner -;SignalConditioner.implementation=Pass_Through ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter.implementation=Ishort_To_Complex -;DataTypeAdapter.implementation=Pass_Through ;######### INPUT_FILTER 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. +InputFilter.implementation=Pass_Through ; or Fir_Filter -;InputFilter.implementation=Fir_Filter -;InputFilter.implementation=Freq_Xlating_Fir_Filter -InputFilter.implementation=Pass_Through - -;#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 GNU Radio's function: gr_remez. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. InputFilter.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 - InputFilter.band1_begin=0.0 InputFilter.band1_end=0.44 InputFilter.band2_begin=0.55 InputFilter.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 - InputFilter.ampl1_begin=1.0 InputFilter.ampl1_end=1.0 InputFilter.ampl2_begin=0.0 InputFilter.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 InputFilter.band1_error=1.0 InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" InputFilter.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. InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - InputFilter.sampling_frequency=4000000 InputFilter.IF=0 - -;#dump: Dump the filtered data to a file. InputFilter.dump=false - -;#dump_filename: Log path and filename. InputFilter.dump_filename=../data/input_filter.dat ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neighborhood interpolation -;Resampler.implementation=Direct_Resampler Resampler.implementation=Pass_Through -;#item_type: Type and resolution for each of the signal samples. -Resampler.item_type=gr_complex -;#sample_freq_in: the sample frequency of the input signal -Resampler.sample_freq_in=4000000 -;#sample_freq_out: the desired sample frequency of the output signal -Resampler.sample_freq_out=2000000 -;#dump: Dump the resampled data to a file. Resampler.dump=false -;#dump_filename: Log path and filename. Resampler.dump_filename=../data/resampler.dat ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS L1 C/A satellite channels. Channels_1C.count=6 -;#count: Number of available Galileo E1B satellite channels. Channels_1B.count=0 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 -;#if the option is disabled by default is assigned "1C" GPS L1 C/A -Channel.signal=1C - - ;######### SPECIFIC CHANNELS CONFIG ###### -;#The following options are specific to each channel and overwrite the generic options ;######### CHANNEL 0 CONFIG ############ ;Channel0.signal=1C -;#satellite: Satellite PRN ID for this channel. Disable this option for random search ;Channel0.satellite=11 ;######### CHANNEL 1 CONFIG ############ @@ -176,90 +93,52 @@ Channel.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fine_Doppler -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 -;#threshold: Acquisition threshold +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.005 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.0001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Maximum expected Doppler shift [Hz] -Acquisition_1C.doppler_min=-10000 -;#doppler_step Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=500 -;#maximum dwells Acquisition_1C.max_dwells=5 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=45.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=3.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad PVT.AR_GPS=PPP-AR ; options: OFF, Continuous, Instantaneous, Fix-and-Hold, PPP-AR -;#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=10 -;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms <= display_rate_ms. PVT.display_rate_ms=500 -PVT.positioning_mode=PPP_Static -;# KML, GeoJSON, NMEA and RTCM output configuration -;#nmea_dump_filename: NMEA log path and filename PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea -;#flag_nmea_tty_port: Enables or disables the NMEA log to a serial TTY port (Can be used with real hardware or virtual one) PVT.flag_nmea_tty_port=true -;#nmea_dump_devname: serial device descriptor for NMEA logging PVT.nmea_dump_devname=/dev/pts/4 -;#flag_rtcm_server: Enables or disables a TCP/IP server transmitting RTCM 3.2 messages (accepts multiple clients, port 2101 by default) PVT.flag_rtcm_server=true -;#flag_rtcm_tty_port: Enables or disables the RTCM log to a serial TTY port (Can be used with real hardware or virtual one) PVT.flag_rtcm_tty_port=false -;#rtcm_dump_devname: serial device descriptor for RTCM logging PVT.rtcm_dump_devname=/dev/pts/1 -;#dump: Enable or disable the PVT internal binary data file logging [true] or [false] PVT.dump=false -;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump, ".kml" and ".geojson" to GIS-friendly formats. PVT.dump_filename=./PVT diff --git a/conf/gnss-sdr_GLONASS_L1_CA_GPS_L1_CA_ibyte.conf b/conf/gnss-sdr_GLONASS_L1_CA_GPS_L1_CA_ibyte.conf index 53d903ba3..f042def9c 100644 --- a/conf/gnss-sdr_GLONASS_L1_CA_GPS_L1_CA_ibyte.conf +++ b/conf/gnss-sdr_GLONASS_L1_CA_GPS_L1_CA_ibyte.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## @@ -79,7 +82,6 @@ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition Acquisition_1C.item_type=gr_complex Acquisition_1C.threshold=0.0 Acquisition_1C.pfa=0.00001 -Acquisition_1C.if=0 Acquisition_1C.doppler_max=10000 Acquisition_1C.doppler_step=250 Acquisition_1C.dump=false; @@ -90,7 +92,6 @@ Acquisition_1G.implementation=GLONASS_L1_CA_PCPS_Acquisition Acquisition_1G.item_type=gr_complex Acquisition_1G.threshold=0.0 Acquisition_1G.pfa=0.00001 -Acquisition_1G.if=0 Acquisition_1G.doppler_max=10000 Acquisition_1G.doppler_step=250 Acquisition_1G.dump=false; @@ -100,7 +101,6 @@ Acquisition_1G.dump_filename=/archive/glo_acquisition.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking Tracking_1C.item_type=gr_complex -Tracking_1C.if=0 Tracking_1C.early_late_space_chips=0.5 Tracking_1C.pll_bw_hz=20.0; Tracking_1C.dll_bw_hz=2.0; @@ -109,7 +109,6 @@ Tracking_1C.dump_filename=/archive/gps_tracking_ch_ Tracking_1G.implementation=GLONASS_L1_CA_DLL_PLL_Tracking Tracking_1G.item_type=gr_complex -Tracking_1G.if=0 Tracking_1G.early_late_space_chips=0.5 Tracking_1G.pll_bw_hz=25.0; Tracking_1G.dll_bw_hz=3.0; diff --git a/conf/gnss-sdr_GLONASS_L1_CA_GPS_L2C_ibyte.conf b/conf/gnss-sdr_GLONASS_L1_CA_GPS_L2C_ibyte.conf index cc9ba010f..09bddfb46 100644 --- a/conf/gnss-sdr_GLONASS_L1_CA_GPS_L2C_ibyte.conf +++ b/conf/gnss-sdr_GLONASS_L1_CA_GPS_L2C_ibyte.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## @@ -82,7 +85,6 @@ Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition Acquisition_2S.item_type=gr_complex Acquisition_2S.threshold=0.0 Acquisition_2S.pfa=0.00001 -Acquisition_2S.if=0 Acquisition_2S.doppler_max=10000 Acquisition_2S.doppler_step=60 Acquisition_2S.max_dwells=1 @@ -91,7 +93,6 @@ Acquisition_1G.implementation=GLONASS_L1_CA_PCPS_Acquisition Acquisition_1G.item_type=gr_complex Acquisition_1G.threshold=0.0 Acquisition_1G.pfa=0.00001 -Acquisition_1G.if=0 Acquisition_1G.doppler_max=10000 Acquisition_1G.doppler_step=250 Acquisition_1G.dump=false; @@ -100,7 +101,6 @@ Acquisition_1G.dump_filename=/archive/glo_acquisition.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_2S.implementation=GPS_L2_M_DLL_PLL_Tracking Tracking_2S.item_type=gr_complex -Tracking_2S.if=0 Tracking_2S.early_late_space_chips=0.5 Tracking_2S.pll_bw_hz=2.0; Tracking_2S.dll_bw_hz=0.250; @@ -110,7 +110,6 @@ Tracking_2S.dump_filename=/archive/gps_tracking_ch_ Tracking_1G.implementation=GLONASS_L1_CA_DLL_PLL_Tracking Tracking_1G.item_type=gr_complex -Tracking_1G.if=0 Tracking_1G.early_late_space_chips=0.5 Tracking_1G.pll_bw_hz=25.0; Tracking_1G.dll_bw_hz=3.0; diff --git a/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf b/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf index b95b93551..077d3dd1e 100644 --- a/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf +++ b/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## @@ -36,7 +39,6 @@ Acquisition_1G.implementation=GLONASS_L1_CA_PCPS_Acquisition Acquisition_1G.item_type=gr_complex Acquisition_1G.threshold=0.0 Acquisition_1G.pfa=0.0001 -Acquisition_1G.if=0 Acquisition_1G.doppler_max=10000 Acquisition_1G.doppler_step=250 Acquisition_1G.dump=true; @@ -47,7 +49,6 @@ Acquisition_1G.dump_filename=/archive/glo_acquisition.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1G.implementation=GLONASS_L1_CA_DLL_PLL_Tracking Tracking_1G.item_type=gr_complex -Tracking_1G.if=0 Tracking_1G.early_late_space_chips=0.5 Tracking_1G.pll_bw_hz=25.0; Tracking_1G.dll_bw_hz=3.0; diff --git a/conf/gnss-sdr_GLONASS_L1_CA_ibyte_coh_trk.conf b/conf/gnss-sdr_GLONASS_L1_CA_ibyte_coh_trk.conf index 0bdbe7739..ca1197a6d 100644 --- a/conf/gnss-sdr_GLONASS_L1_CA_ibyte_coh_trk.conf +++ b/conf/gnss-sdr_GLONASS_L1_CA_ibyte_coh_trk.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## @@ -36,7 +39,6 @@ Acquisition_1G.implementation=GLONASS_L1_CA_PCPS_Acquisition Acquisition_1G.item_type=gr_complex Acquisition_1G.threshold=0.0 Acquisition_1G.pfa=0.0001 -Acquisition_1G.if=0 Acquisition_1G.doppler_max=10000 Acquisition_1G.doppler_step=250 Acquisition_1G.dump=false; @@ -47,7 +49,6 @@ Acquisition_1G.dump_filename=/archive/glo_acquisition.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1G.implementation=GLONASS_L1_CA_DLL_PLL_C_Aid_Tracking Tracking_1G.item_type=gr_complex -Tracking_1G.if=0 Tracking_1G.early_late_space_chips=0.5 Tracking_1G.pll_bw_hz=40.0; Tracking_1G.dll_bw_hz=3.0; diff --git a/conf/gnss-sdr_GLONASS_L2_CA_GPS_L1_CA_ibyte.conf b/conf/gnss-sdr_GLONASS_L2_CA_GPS_L1_CA_ibyte.conf index 04b8dd746..7e4e9e03f 100644 --- a/conf/gnss-sdr_GLONASS_L2_CA_GPS_L1_CA_ibyte.conf +++ b/conf/gnss-sdr_GLONASS_L2_CA_GPS_L1_CA_ibyte.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## @@ -79,7 +82,6 @@ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition Acquisition_1C.item_type=gr_complex Acquisition_1C.threshold=0.0 Acquisition_1C.pfa=0.00001 -Acquisition_1C.if=0 Acquisition_1C.doppler_max=10000 Acquisition_1C.doppler_step=250 Acquisition_1C.dump=false; @@ -90,7 +92,6 @@ Acquisition_2G.implementation=GLONASS_L2_CA_PCPS_Acquisition Acquisition_2G.item_type=gr_complex Acquisition_2G.threshold=0.0 Acquisition_2G.pfa=0.00001 -Acquisition_2G.if=0 Acquisition_2G.doppler_max=10000 Acquisition_2G.doppler_step=250 Acquisition_2G.dump=false; @@ -100,7 +101,6 @@ Acquisition_2G.dump_filename=/archive/glo_acquisition.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking Tracking_1C.item_type=gr_complex -Tracking_1C.if=0 Tracking_1C.early_late_space_chips=0.5 Tracking_1C.pll_bw_hz=20.0; Tracking_1C.dll_bw_hz=2.0; @@ -109,7 +109,6 @@ Tracking_1C.dump_filename=/archive/gps_tracking_ch_ Tracking_2G.implementation=GLONASS_L2_CA_DLL_PLL_Tracking Tracking_2G.item_type=gr_complex -Tracking_2G.if=0 Tracking_2G.early_late_space_chips=0.5 Tracking_2G.pll_bw_hz=25.0; Tracking_2G.dll_bw_hz=2.0; @@ -127,6 +126,7 @@ Observables.dump_filename=/archive/gnss_observables.dat ;######### PVT CONFIG ############ PVT.implementation=RTKLIB_PVT +PVT.positioning_mode=Single PVT.output_rate_ms=100 PVT.display_rate_ms=500 PVT.trop_model=Saastamoinen diff --git a/conf/gnss-sdr_GLONASS_L2_CA_GPS_L2C_ibyte.conf b/conf/gnss-sdr_GLONASS_L2_CA_GPS_L2C_ibyte.conf index 32faba32a..c3ab7cb9c 100644 --- a/conf/gnss-sdr_GLONASS_L2_CA_GPS_L2C_ibyte.conf +++ b/conf/gnss-sdr_GLONASS_L2_CA_GPS_L2C_ibyte.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## @@ -82,7 +85,6 @@ Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition Acquisition_2S.item_type=gr_complex Acquisition_2S.threshold=0.0 Acquisition_2S.pfa=0.00001 -Acquisition_2S.if=0 Acquisition_2S.doppler_max=10000 Acquisition_2S.doppler_step=60 Acquisition_2S.max_dwells=1 @@ -91,7 +93,6 @@ Acquisition_2G.implementation=GLONASS_L2_CA_PCPS_Acquisition Acquisition_2G.item_type=gr_complex Acquisition_2G.threshold=0.0 Acquisition_2G.pfa=0.00001 -Acquisition_2G.if=0 Acquisition_2G.doppler_max=10000 Acquisition_2G.doppler_step=250 Acquisition_2G.dump=false; @@ -100,7 +101,6 @@ Acquisition_2G.dump_filename=/archive/glo_acquisition.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_2S.implementation=GPS_L2_M_DLL_PLL_Tracking Tracking_2S.item_type=gr_complex -Tracking_2S.if=0 Tracking_2S.early_late_space_chips=0.5 Tracking_2S.pll_bw_hz=2.0; Tracking_2S.dll_bw_hz=0.250; @@ -110,7 +110,6 @@ Tracking_2S.dump_filename=/archive/gps_tracking_ch_ Tracking_2G.implementation=GLONASS_L2_CA_DLL_PLL_Tracking Tracking_2G.item_type=gr_complex -Tracking_2G.if=0 Tracking_2G.early_late_space_chips=0.5 Tracking_2G.pll_bw_hz=25.0; Tracking_2G.dll_bw_hz=3.0; @@ -128,6 +127,7 @@ Observables.dump_filename=/archive/gnss_observables.dat ;######### PVT CONFIG ############ PVT.implementation=RTKLIB_PVT +PVT.positioning_mode=Single PVT.output_rate_ms=100 PVT.display_rate_ms=500 PVT.trop_model=Saastamoinen diff --git a/conf/gnss-sdr_GLONASS_L2_CA_ibyte.conf b/conf/gnss-sdr_GLONASS_L2_CA_ibyte.conf index e8d1342a8..7cc44a0a4 100644 --- a/conf/gnss-sdr_GLONASS_L2_CA_ibyte.conf +++ b/conf/gnss-sdr_GLONASS_L2_CA_ibyte.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## @@ -30,7 +33,6 @@ Acquisition_2G.implementation=GLONASS_L2_CA_PCPS_Acquisition Acquisition_2G.item_type=gr_complex Acquisition_2G.threshold=0.0 Acquisition_2G.pfa=0.0001 -Acquisition_2G.if=0 Acquisition_2G.doppler_max=10000 Acquisition_2G.doppler_step=250 Acquisition_2G.dump=true; @@ -41,7 +43,6 @@ Acquisition_2G.dump_filename=/archive/glo_acquisition.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_2G.implementation=GLONASS_L2_CA_DLL_PLL_Tracking Tracking_2G.item_type=gr_complex -Tracking_2G.if=0 Tracking_2G.early_late_space_chips=0.5 Tracking_2G.pll_bw_hz=20.0; Tracking_2G.dll_bw_hz=2.0; diff --git a/conf/gnss-sdr_GLONASS_L2_CA_ibyte_coh_trk.conf b/conf/gnss-sdr_GLONASS_L2_CA_ibyte_coh_trk.conf index 0bdbe7739..ca1197a6d 100644 --- a/conf/gnss-sdr_GLONASS_L2_CA_ibyte_coh_trk.conf +++ b/conf/gnss-sdr_GLONASS_L2_CA_ibyte_coh_trk.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## @@ -36,7 +39,6 @@ Acquisition_1G.implementation=GLONASS_L1_CA_PCPS_Acquisition Acquisition_1G.item_type=gr_complex Acquisition_1G.threshold=0.0 Acquisition_1G.pfa=0.0001 -Acquisition_1G.if=0 Acquisition_1G.doppler_max=10000 Acquisition_1G.doppler_step=250 Acquisition_1G.dump=false; @@ -47,7 +49,6 @@ Acquisition_1G.dump_filename=/archive/glo_acquisition.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1G.implementation=GLONASS_L1_CA_DLL_PLL_C_Aid_Tracking Tracking_1G.item_type=gr_complex -Tracking_1G.if=0 Tracking_1G.early_late_space_chips=0.5 Tracking_1G.pll_bw_hz=40.0; Tracking_1G.dll_bw_hz=3.0; diff --git a/conf/gnss-sdr_GPS_L1_2ch_fmcomms2_realtime.conf b/conf/gnss-sdr_GPS_L1_2ch_fmcomms2_realtime.conf index 79a57f712..f53fe2ea6 100644 --- a/conf/gnss-sdr_GPS_L1_2ch_fmcomms2_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_2ch_fmcomms2_realtime.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; diff --git a/conf/gnss-sdr_GPS_L1_CA_ibyte.conf b/conf/gnss-sdr_GPS_L1_CA_ibyte.conf index 8bef7d1c0..959181078 100644 --- a/conf/gnss-sdr_GPS_L1_CA_ibyte.conf +++ b/conf/gnss-sdr_GPS_L1_CA_ibyte.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## diff --git a/conf/gnss-sdr_GPS_L1_FPGA.conf b/conf/gnss-sdr_GPS_L1_FPGA.conf index 5def11d31..c6bb2edfc 100644 --- a/conf/gnss-sdr_GPS_L1_FPGA.conf +++ b/conf/gnss-sdr_GPS_L1_FPGA.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -35,12 +38,11 @@ Channel.enable_FPGA=true ;######### ACQUISITION GLOBAL CONFIG ############ +Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fpga Acquisition_1C.dump=false Acquisition_1C.dump_filename=./acq_dump.dat Acquisition_1C.item_type=cshort -Acquisition_1C.if=0 -Acquisition_1C.sampled_ms=1 -Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fpga +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.select_queue_Fpga=0; Acquisition_1C.threshold=0.005 ;Acquisition_1C.pfa=0.01 @@ -50,7 +52,6 @@ Acquisition_1C.doppler_step=500 ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking_Fpga Tracking_1C.item_type=cshort -Tracking_1C.if=0 Tracking_1C.dump=false Tracking_1C.dump_filename=../data/epl_tracking_ch_ Tracking_1C.pll_bw_hz=45.0; @@ -60,7 +61,6 @@ Tracking_1C.order=3; ;######### TELEMETRY DECODER GPS CONFIG ############ TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false -TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ Observables.implementation=GPS_L1_CA_Observables diff --git a/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf b/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf index 082a1b3f4..bc99d4a28 100644 --- a/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -68,8 +71,7 @@ Channel.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 -Acquisition_1C.sampled_ms=1 +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.008 Acquisition_1C.doppler_max=10000 Acquisition_1C.doppler_step=500 @@ -79,7 +81,6 @@ Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking Tracking_1C.item_type=gr_complex -Tracking_1C.if=0 Tracking_1C.pll_bw_hz=45.0; Tracking_1C.dll_bw_hz=2.0; Tracking_1C.order=3; diff --git a/conf/gnss-sdr_GPS_L1_LimeSDR.conf b/conf/gnss-sdr_GPS_L1_LimeSDR.conf index 6ad918af0..ab1242bc7 100644 --- a/conf/gnss-sdr_GPS_L1_LimeSDR.conf +++ b/conf/gnss-sdr_GPS_L1_LimeSDR.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## diff --git a/conf/gnss-sdr_GPS_L1_SPIR.conf b/conf/gnss-sdr_GPS_L1_SPIR.conf index 4df77678f..6f3affed4 100644 --- a/conf/gnss-sdr_GPS_L1_SPIR.conf +++ b/conf/gnss-sdr_GPS_L1_SPIR.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -11,107 +13,43 @@ GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Spir_File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource.filename=/dtalogger/signals/spir/data/20Secs/20Secs_L1.dat ; <- 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=int -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=80000000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter.implementation=Pass_Through DataTypeAdapter.item_type=float ;######### INPUT_FILTER 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. - -;InputFilter.implementation=Fir_Filter InputFilter.implementation=Freq_Xlating_Fir_Filter -;InputFilter.implementation=Pass_Through - -;#dump: Dump the filtered data to a file. InputFilter.dump=false - -;#dump_filename: Log path and filename. InputFilter.dump_filename=../data/input_filter.dat - -;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. -;#These options are based on parameters of gnuradio's function: gr_remez. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter.input_item_type=float - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. InputFilter.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 - InputFilter.band1_begin=0.0 InputFilter.band1_end=0.45 InputFilter.band2_begin=0.55 InputFilter.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 - InputFilter.ampl1_begin=1.0 InputFilter.ampl1_end=1.0 InputFilter.ampl2_begin=0.0 InputFilter.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 InputFilter.band1_error=1.0 InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" InputFilter.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. InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - InputFilter.sampling_frequency=80000000 InputFilter.IF=10164 InputFilter.decimation_factor=20 @@ -119,105 +57,58 @@ InputFilter.decimation_factor=20 ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation -;Resampler.implementation=Direct_Resampler Resampler.implementation=Pass_Through -;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. Resampler.item_type=gr_complex -;#sample_freq_in: the sample frequency of the input signal Resampler.sample_freq_in=80000000 -;#sample_freq_out: the desired sample frequency of the output signal Resampler.sample_freq_out=4000000 -;#dump: Dump the resamplered data to a file. Resampler.dump=false -;#dump_filename: Log path and filename. Resampler.dump_filename=../data/resampler.dat ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=10 -;#count: Number of available Galileo satellite channels. Channels_1B.count=0 -;#in_acquisition: Number of channels simultaneously acquiring Channels.in_acquisition=1 -;#signal: -;# "1C" GPS L1 C/A -;# "1B" Galileo E1B Channel.signal=1C -;Galileo FM3 -> PRN 19 -;Galileo FM4 -> PRN 20 ;######### CHANNEL 0 CONFIG ############ - -;Channel0.signal=1B -;#satellite: Satellite PRN ID for this channel. Disable this option to random search ;Channel0.satellite=20 ;######### CHANNEL 1 CONFIG ############ -;Channel1.signal=1B ;Channel1.satellite=12 ;######### CHANNEL 2 CONFIG ############ -;Channel2.signal=1B -;#satellite: Satellite PRN ID for this channel. Disable this option to random search ;Channel2.satellite=11 ;######### CHANNEL 3 CONFIG ############ -;Channel3.signal=1B ;Channel3.satellite=19 ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fine_Doppler -;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 -;#threshold: Acquisition threshold +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.005 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.0001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_min=-10000 -;#doppler_step Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=500 -;#maximum dwells Acquisition_1C.max_dwells=5 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=20.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] -Tracking_1 -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false @@ -225,9 +116,7 @@ TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ ;#implementation: 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 @@ -237,20 +126,12 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 1 ms) [ms] PVT.output_rate_ms=500 -;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms. PVT.display_rate_ms=500 -;# RINEX, KML, and NMEA output configuration -;#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=true; -;#nmea_dump_devname: serial device descriptor for NMEA logging PVT.nmea_dump_devname=/dev/pts/4 -;#dump: Enable or disable the PVT internal binary data file logging [true] or [false] PVT.dump=false -;#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 diff --git a/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf b/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf index aaef910d3..89f84fd77 100644 --- a/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; Configuration file for using USRP X300 as a RF front-end for GPS L1 signals. ; Set SignalSource.device_address to the IP address of your device ; and run: @@ -26,154 +29,66 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -; # implementation: SignalSource.implementation=UHD_Signal_Source -; # When left empty, the device discovery routines will search all vailable transports on the system (ethernet, usb...) SignalSource.device_address=192.168.40.2 ; <- PUT THE IP ADDRESS OF YOUR USRP HERE -; # item_type: Type and resolution for each of the signal samples. -;SignalSource.item_type=gr_complex SignalSource.item_type=cshort -; # sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=4000000 -; # freq: RF front-end center frequency in [Hz] SignalSource.freq=1575420000 -; # gain: Front-end Gain in [dB] SignalSource.gain=40 -; # subdevice: UHD subdevice specification (for USRP1 use A:0 or B:0) SignalSource.subdevice=A:0 -; # samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -; # repeat: Repeat the processing file. SignalSource.repeat=false -; # dump: Dump the Signal source data to a file. SignalSource.dump=false SignalSource.dump_filename=../data/signal_source.dat -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner -;SignalConditioner.implementation=Pass_Through ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter.implementation=Pass_Through DataTypeAdapter.item_type=cshort -;DataTypeAdapter.item_type=cbyte ;######### INPUT_FILTER 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. - InputFilter.implementation=Fir_Filter -;InputFilter.implementation=Freq_Xlating_Fir_Filter -;InputFilter.implementation=Pass_Through - -;#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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter.input_item_type=cshort - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time InputFilter.number_of_taps=11 - -;#number_of _bands: Number of frequency bands in the filter. InputFilter.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 - InputFilter.band1_begin=0.0 InputFilter.band1_end=0.48 InputFilter.band2_begin=0.52 InputFilter.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 - InputFilter.ampl1_begin=1.0 InputFilter.ampl1_end=1.0 InputFilter.ampl2_begin=0.0 InputFilter.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 InputFilter.band1_error=1.0 InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" InputFilter.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. InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - InputFilter.sampling_frequency=4000000 InputFilter.IF=0 - -;#dump: Dump the filtered data to a file. InputFilter.dump=false - -;#dump_filename: Log path and filename. InputFilter.dump_filename=../data/input_filter.dat ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation -;Resampler.implementation=Direct_Resampler Resampler.implementation=Pass_Through -;#item_type: Type and resolution for each of the signal samples. Resampler.item_type=gr_complex -;#sample_freq_in: the sample frequency of the input signal Resampler.sample_freq_in=4000000 -;#sample_freq_out: the desired sample frequency of the output signal Resampler.sample_freq_out=4000000 -;#dump: Dump the resampled data to a file. Resampler.dump=false -;#dump_filename: Log path and filename. Resampler.dump_filename=../data/resampler.dat ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=8 -;#count: Number of available Galileo satellite channels. Channels_1B.count=0 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 -;#system: GPS, GLONASS, GALILEO, SBAS or COMPASS -;#if the option is disabled by default is assigned GPS -;Channel.system=GPS Channel.signal=1C -;#if the option is disabled by default is assigned "1C" GPS L1 C/A ;Channel0.signal=1C ;Channel1.signal=1C @@ -188,68 +103,28 @@ Channel.signal=1C ;Channel10.signal=1C ;Channel11.signal=1C -;######### SPECIFIC CHANNELS CONFIG ###### -;#The following options are specific to each channel and overwrite the generic options - -;######### CHANNEL 0 CONFIG ############ - -;Channel0.system=GPS -;Channel0.signal=1C - -;#satellite: Satellite PRN ID for this channel. Disable this option to random search -;Channel0.satellite=11 - -;######### CHANNEL 1 CONFIG ############ - -;Channel1.system=GPS -;Channel1.signal=1C -;Channel1.satellite=18 - - ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1C.coherent_integration_time_ms=1 -;#threshold: Acquisition threshold. It will be ignored if pfa is defined. Acquisition_1C.threshold=0.01 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.00001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=8000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=500 -;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take -maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] (should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) Acquisition_1C.bit_transition_flag=false -;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true Acquisition_1C.max_dwells=1 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=30.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=4.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] Tracking_1C.early_late_space_chips=0.5; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=./tracking_ch_ @@ -259,35 +134,23 @@ TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 -;#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=true 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 -;#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 diff --git a/conf/gnss-sdr_GPS_L1_USRP_realtime.conf b/conf/gnss-sdr_GPS_L1_USRP_realtime.conf index 72fa42adf..1cb41801f 100644 --- a/conf/gnss-sdr_GPS_L1_USRP_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_USRP_realtime.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; Configuration file for using USRP 1 as a RF front-end for GPS L1 signals. ; Run: ; gnss-sdr --config_file=/path/to/gnss-sdr_GPS_L1_USRP_realtime.conf @@ -25,145 +28,27 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=UHD_Signal_Source -;#When left empty, the device discovery routines will search all available transports on the system (ethernet, usb...) ;SignalSource.device_address=192.168.40.2 ; <- PUT THE IP ADDRESS OF YOUR USRP HERE -;#item_type: Type and resolution for each of the signal samples. SignalSource.item_type=gr_complex -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=2000000 -;#freq: RF front-end center frequency in [Hz] SignalSource.freq=1575420000 -;#gain: Front-end Gain in [dB] SignalSource.gain=60 -;#subdevice: UHD subdevice specification (for USRP1 use A:0 or B:0) SignalSource.subdevice=A:0 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#dump: Dump the Signal source data to a file. SignalSource.dump=false SignalSource.dump_filename=../data/signal_source.dat -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;SignalConditioner.implementation=Signal_Conditioner SignalConditioner.implementation=Pass_Through -;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. Please disable it in this version. -;#implementation: [Pass_Through] disables this block -DataTypeAdapter.implementation=Pass_Through - -;######### INPUT_FILTER 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. - -;InputFilter.implementation=Fir_Filter -;InputFilter.implementation=Freq_Xlating_Fir_Filter -InputFilter.implementation=Pass_Through - -;#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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. -InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. -InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. -InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time -InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. -InputFilter.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 - -InputFilter.band1_begin=0.0 -InputFilter.band1_end=0.45 -InputFilter.band2_begin=0.55 -InputFilter.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 - -InputFilter.ampl1_begin=1.0 -InputFilter.ampl1_end=1.0 -InputFilter.ampl2_begin=0.0 -InputFilter.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 -InputFilter.band1_error=1.0 -InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" -InputFilter.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. -InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - -InputFilter.sampling_frequency=2000000 -InputFilter.IF=0 - -;#dump: Dump the filtered data to a file. -InputFilter.dump=false - -;#dump_filename: Log path and filename. -InputFilter.dump_filename=../data/input_filter.dat - - -;######### RESAMPLER CONFIG ############ -;## Resamples the input data. -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation -;Resampler.implementation=Direct_Resampler -Resampler.implementation=Pass_Through -;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. -Resampler.item_type=gr_complex -;#sample_freq_in: the sample frequency of the input signal -Resampler.sample_freq_in=8000000 -;#sample_freq_out: the desired sample frequency of the output signal -Resampler.sample_freq_out=2000000 -;#dump: Dump the resamplered data to a file. -Resampler.dump=false -;#dump_filename: Log path and filename. -Resampler.dump_filename=../data/resampler.dat - ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=6 -;#count: Number of available Galileo satellite channels. Channels_1B.count=0 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 @@ -175,86 +60,42 @@ Channels.in_acquisition=1 ;# "5X" GALILEO E5a I+Q ;# "L5" GPS L5 -;#if the option is disabled by default is assigned "1C" GPS L1 C/A Channel.signal=1C -;######### SPECIFIC CHANNELS CONFIG ###### -;#The following options are specific to each channel and overwrite the generic options - -;######### CHANNEL 0 CONFIG ############ - -;Channel0.system=GPS -;Channel0.signal=1C - -;#satellite: Satellite PRN ID for this channel. Disable this option to random search -;Channel0.satellite=11 - -;######### CHANNEL 1 CONFIG ############ - -;Channel1.system=GPS -;Channel1.signal=1C -;Channel1.satellite=18 - ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1C.coherent_integration_time_ms=1 -;#threshold: Acquisition threshold. It will be ignored if pfa is defined. Acquisition_1C.threshold=0.01 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.0001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=500 -;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take -maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] (should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) Acquisition_1C.bit_transition_flag=false -;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true Acquisition_1C.max_dwells=1 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=30.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=4.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#early_late_space_chips: correlator early-late space [chips] Tracking_1C.early_late_space_chips=0.5; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=./tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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 @@ -264,21 +105,13 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 -;#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=true 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 -;#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 diff --git a/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf b/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf index 1cd08b216..1f74645fb 100644 --- a/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf +++ b/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -12,233 +14,87 @@ GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ SignalSource.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource.filename=/datalogger/signals/CTTC/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE SignalSource.item_type=ishort -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=4000000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: Use [Ishort_To_Complex] or [Pass_Through] DataTypeAdapter.implementation=Ishort_To_Complex -;#dump: Dump the filtered data to a file. DataTypeAdapter.dump=false -;#dump_filename: Log path and filename. DataTypeAdapter.dump_filename=../data/data_type_adapter.dat ;######### INPUT_FILTER 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. - -;InputFilter.implementation=Fir_Filter -;InputFilter.implementation=Freq_Xlating_Fir_Filter InputFilter.implementation=Pass_Through - -;#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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. -InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time -InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. -InputFilter.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 - -InputFilter.band1_begin=0.0 -;InputFilter.band1_end=0.8 -InputFilter.band1_end=0.85 -InputFilter.band2_begin=0.90 -InputFilter.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 - -InputFilter.ampl1_begin=1.0 -InputFilter.ampl1_end=1.0 -InputFilter.ampl2_begin=0.0 -InputFilter.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 -InputFilter.band1_error=1.0 -InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" -InputFilter.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. -InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - -InputFilter.sampling_frequency=4000000 -InputFilter.IF=0 - -;#dump: Dump the filtered data to a file. InputFilter.dump=false - -;#dump_filename: Log path and filename. InputFilter.dump_filename=../data/input_filter.dat ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation -;Resampler.implementation=Direct_Resampler Resampler.implementation=Pass_Through -;#item_type: Type and resolution for each of the signal samples. Resampler.item_type=gr_complex -;#sample_freq_in: the sample frequency of the input signal Resampler.sample_freq_in=4000000 -;#sample_freq_out: the desired sample frequency of the output signal Resampler.sample_freq_out=4000000 -;#dump: Dump the resamplered data to a file. Resampler.dump=false -;#dump_filename: Log path and filename. Resampler.dump_filename=../data/resampler.dat ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available satellite channels. Channels_1C.count=5 -;#in_acquisition: Number of channels simultaneously acquiring Channels.in_acquisition=1 -;######### CHANNEL 0 CONFIG ############ -Channel0.signal=1C -Channel0.satellite=1 -Channel0.repeat_satellite=false - -;######### CHANNEL 1 CONFIG ############ -Channel1.signal=1C -Channel1.satellite=11 -Channel1.repeat_satellite=false - -;######### CHANNEL 2 CONFIG ############ -Channel2.signal=1C -Channel2.satellite=17 -Channel2.repeat_satellite=false - -;######### CHANNEL 3 CONFIG ############ -Channel3.signal=1C -Channel3.satellite=20 -Channel3.repeat_satellite=false - -;######### CHANNEL 4 CONFIG ############ -Channel4.signal=1C -Channel4.satellite=32 -Channel4.repeat_satellite=false - ;######### ACQUISITION GLOBAL CONFIG ############_1C Acquisition_1C.implementation=GPS_L1_CA_PCPS_QuickSync_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1C.coherent-integration_time_ms=4 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=true -;#filename: Log path and filename ;Acquisition_1C.dump_filename=./acq_dump.dat ;######### ACQUISITION CHANNELS CONFIG ###### Acquisition_1C.implementation=GPS_L1_CA_PCPS_QuickSync_Acquisition -;#threshold: Acquisition threshold Acquisition_1C.threshold=0.4 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=250 -;#repeat_satellite: Use only jointly with the satellte PRN ID option. ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=50.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=4.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] Tracking_1C.early_late_space_chips=0.5 -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=./tracking_ch_ ;######### TELEMETRY DECODER CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A. TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 1 ms) [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; PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea PVT.flag_nmea_tty_port=true @@ -246,7 +102,5 @@ 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 -;#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 diff --git a/conf/gnss-sdr_GPS_L1_bladeRF.conf b/conf/gnss-sdr_GPS_L1_bladeRF.conf index 84fe13d8b..48017a8ec 100644 --- a/conf/gnss-sdr_GPS_L1_bladeRF.conf +++ b/conf/gnss-sdr_GPS_L1_bladeRF.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## @@ -17,8 +20,7 @@ SignalSource.if_gain=48 SignalSource.AGC_enabled=false SignalSource.samples=0 SignalSource.repeat=false -;# Next line enables the bladeRF -SignalSource.osmosdr_args=bladerf=0 +SignalSource.osmosdr_args=bladerf=0 ; This line enables the bladeRF SignalSource.enable_throttle_control=false SignalSource.dump=false SignalSource.dump_filename=./signal_source.dat @@ -63,11 +65,9 @@ Channel.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fine_Doppler Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 -Acquisition_1C.sampled_ms=1 +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.015 Acquisition_1C.doppler_max=10000 -Acquisition_1C.doppler_min=-10000 Acquisition_1C.doppler_step=500 Acquisition_1C.max_dwells=15 Acquisition_1C.dump=false @@ -76,7 +76,6 @@ Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking Tracking_1C.item_type=gr_complex -Tracking_1C.if=0 Tracking_1C.pll_bw_hz=40.0; Tracking_1C.dll_bw_hz=2.0; Tracking_1C.order=3; @@ -89,7 +88,6 @@ TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ -#Observables.implementation=GPS_L1_CA_Observables Observables.implementation=Hybrid_Observables Observables.dump=false Observables.dump_filename=./observables.dat diff --git a/conf/gnss-sdr_GPS_L1_fmcomms2_realtime.conf b/conf/gnss-sdr_GPS_L1_fmcomms2_realtime.conf index 67fe037f8..17880d8a2 100644 --- a/conf/gnss-sdr_GPS_L1_fmcomms2_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_fmcomms2_realtime.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -5,9 +8,6 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [Sps]. -;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/ GNSS-SDR.internal_fs_sps=2000000 @@ -73,10 +73,6 @@ InputFilter.sampling_frequency=2000000 InputFilter.IF=0; IF deviation due to front-end LO inaccuracies [Hz] ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. -;# DISABLED IN THE RTL-SDR REALTIME -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block Resampler.implementation=Pass_Through ;######### CHANNELS GLOBAL CONFIG ############ @@ -88,12 +84,10 @@ Channel.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fine_Doppler Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 -Acquisition_1C.sampled_ms=1 +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.015 ;Acquisition_1C.pfa=0.0001 Acquisition_1C.doppler_max=10000 -Acquisition_1C.doppler_min=-10000 Acquisition_1C.doppler_step=500 Acquisition_1C.max_dwells=15 Acquisition_1C.dump=false @@ -103,7 +97,6 @@ Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking Tracking_1C.item_type=gr_complex -Tracking_1C.if=0 Tracking_1C.dump=false Tracking_1C.dump_filename=./tracking_ch_ Tracking_1C.pll_bw_hz=40.0; @@ -115,7 +108,6 @@ Tracking_1C.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; ;######### OBSERVABLES CONFIG ############ diff --git a/conf/gnss-sdr_GPS_L1_gr_complex.conf b/conf/gnss-sdr_GPS_L1_gr_complex.conf index 99118a0c4..0cf4d146c 100644 --- a/conf/gnss-sdr_GPS_L1_gr_complex.conf +++ b/conf/gnss-sdr_GPS_L1_gr_complex.conf @@ -1,19 +1,23 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; 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_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. -GNSS-SDR.internal_fs_sps=2600000 +GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ SignalSource.implementation=File_Signal_Source -SignalSource.filename=/home/javier/gnss/gnss-simulator/build/signal_out.bin ; <- PUT YOUR FILE HERE -SignalSource.item_type=byte -SignalSource.sampling_frequency=2600000 +SignalSource.filename=/datalogger/signals/CTTC/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE +SignalSource.item_type=ishort +SignalSource.sampling_frequency=4000000 +SignalSource.freq=1575420000 SignalSource.samples=0 SignalSource.repeat=false SignalSource.enable_throttle_control=false @@ -22,12 +26,8 @@ SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ SignalConditioner.implementation=Signal_Conditioner -;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block -DataTypeAdapter.implementation=Ibyte_To_Complex +DataTypeAdapter.implementation=Ishort_To_Complex DataTypeAdapter.dump=false -;#dump_filename: Log path and filename. DataTypeAdapter.dump_filename=../data/DataTypeAdapter.dat InputFilter.implementation=Pass_Through @@ -47,9 +47,8 @@ Channel.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 -Acquisition_1C.sampled_ms=1 -Acquisition_1C.threshold=0.05 +Acquisition_1C.coherent_integration_time_ms=1 +Acquisition_1C.threshold=0.008 ;Acquisition_1C.pfa=0.01 Acquisition_1C.doppler_max=10000 Acquisition_1C.doppler_step=250 @@ -60,9 +59,10 @@ Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking Tracking_1C.item_type=gr_complex -Tracking_1C.if=0 -Tracking_1C.pll_bw_hz=25.0; -Tracking_1C.dll_bw_hz=1.0; +Tracking_1C.dump=true +Tracking_1C.dump_filename=epl_tracking_ch_ +Tracking_1C.pll_bw_hz=40.0; +Tracking_1C.dll_bw_hz=4.0; Tracking_1C.order=3; Tracking_1C.dump=false Tracking_1C.dump_filename=../data/epl_tracking_c diff --git a/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf b/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf index 0111fc5e9..7ecb75715 100644 --- a/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf +++ b/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -33,8 +36,7 @@ Channel.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 -Acquisition_1C.sampled_ms=1 +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.005 ;Acquisition_1C.pfa=0.01 Acquisition_1C.doppler_max=10000 @@ -46,7 +48,6 @@ Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking_GPU 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; diff --git a/conf/gnss-sdr_GPS_L1_ishort.conf b/conf/gnss-sdr_GPS_L1_ishort.conf index e3395c982..a9528d183 100644 --- a/conf/gnss-sdr_GPS_L1_ishort.conf +++ b/conf/gnss-sdr_GPS_L1_ishort.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -13,7 +16,7 @@ ControlThread.wait_for_flowgraph=false ;######### SIGNAL_SOURCE CONFIG ############ SignalSource.implementation=File_Signal_Source -SignalSource.filename=/archive/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ;/datalogger/signals/CTTC/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE +SignalSource.filename=/archive/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE SignalSource.item_type=ishort SignalSource.sampling_frequency=4000000 SignalSource.samples=0 @@ -26,18 +29,12 @@ SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ SignalConditioner.implementation=Signal_Conditioner -;DataTypeAdapter.implementation=Ishort_To_Complex DataTypeAdapter.implementation=Ishort_To_Cshort InputFilter.implementation=Pass_Through -;InputFilter.input_item_type=gr_complex -;InputFilter.output_item_type=gr_complex InputFilter.item_type=cshort -;Resampler.implementation=Pass_Through -;Resampler.item_type=gr_complex Resampler.implementation=Direct_Resampler Resampler.sample_freq_in=4000000 Resampler.sample_freq_out=2000000 -;Resampler.item_type=gr_complex Resampler.item_type=cshort ;######### CHANNELS GLOBAL CONFIG ############ @@ -49,39 +46,33 @@ Channel.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition Acquisition_1C.item_type=cshort -Acquisition_1C.if=0 -Acquisition_1C.sampled_ms=1 +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.008 ;Acquisition_1C.pfa=0.000001 Acquisition_1C.doppler_max=10000 Acquisition_1C.doppler_step=250 -Acquisition_1C.tong_init_val=2 -Acquisition_1C.tong_max_val=10 -Acquisition_1C.tong_max_dwells=20 Acquisition_1C.dump=false Acquisition_1C.dump_filename=./acq_dump.dat - +Acquisition_1C.blocking=false; ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking Tracking_1C.item_type=cshort -Tracking_1C.if=0 -Tracking_1C.dump=false -Tracking_1C.dump_filename=../data/epl_tracking_ch_ Tracking_1C.pll_bw_hz=40.0; Tracking_1C.dll_bw_hz=4.0; Tracking_1C.order=3; +Tracking_1C.dump=false; +Tracking_1C.dump_filename=./epl_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false -TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ Observables.implementation=Hybrid_Observables -Observables.dump=false +Observables.dump=true Observables.dump_filename=./observables.dat diff --git a/conf/gnss-sdr_GPS_L1_nsr.conf b/conf/gnss-sdr_GPS_L1_nsr.conf index ec085add3..5e2bee6ba 100644 --- a/conf/gnss-sdr_GPS_L1_nsr.conf +++ b/conf/gnss-sdr_GPS_L1_nsr.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; Sample configuration file for IFEN SX-NSR software receiver front-end ; http://www.ifen.com/products/sx-scientific-gnss-solutions/nsr-software-receiver.html ; This sample configuration is able to process directly .sream binary files @@ -80,18 +83,15 @@ Resampler.item_type=gr_complex ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=0 Channels_2S.count=8 Channels.in_acquisition=1 -#Channel.signal=1C ;######### GPS ACQUISITION CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 -Acquisition_1C.sampled_ms=1 +Acquisition_1C.scoherent_integration_time_ms=1 Acquisition_1C.threshold=0.0075 ;Acquisition_1C.pfa=0.01 Acquisition_1C.doppler_max=10000 @@ -101,7 +101,6 @@ Acquisition_1C.dump_filename=./acq_dump.dat Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition Acquisition_2S.item_type=gr_complex -Acquisition_2S.if=0 Acquisition_2S.coherent_integration_time_ms=20 Acquisition_2S.threshold=0.00045 Acquisition_2S.doppler_max=5000 @@ -115,7 +114,6 @@ Acquisition_2S.dump_filename=./acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking Tracking_1C.item_type=gr_complex -Tracking_1C.if=0 Tracking_1C.pll_bw_hz=45.0; Tracking_1C.dll_bw_hz=2.0; Tracking_1C.order=3; @@ -125,7 +123,6 @@ Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### 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.pll_bw_hz=1.5; Tracking_2S.dll_bw_hz=0.4; Tracking_2S.order=2; @@ -143,11 +140,8 @@ TelemetryDecoder_2S.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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 diff --git a/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf b/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf index db5e6d23a..dffa01314 100644 --- a/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf +++ b/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; Sample configuration file for IFEN SX-NSR software receiver front-end ; http://www.ifen.com/products/sx-scientific-gnss-solutions/nsr-software-receiver.html ; This sample configuration is able to process directly .sream binary files @@ -94,7 +97,6 @@ Resampler.item_type=gr_complex ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=8 Channels.in_acquisition=1 Channel.signal=1C diff --git a/conf/gnss-sdr_GPS_L1_plutosdr_realtime.conf b/conf/gnss-sdr_GPS_L1_plutosdr_realtime.conf index 83f808645..d3be2c6b6 100644 --- a/conf/gnss-sdr_GPS_L1_plutosdr_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_plutosdr_realtime.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; 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 8cd02bd32..4f68bdb08 100644 --- a/conf/gnss-sdr_GPS_L1_pulse_blanking_gr_complex.conf +++ b/conf/gnss-sdr_GPS_L1_pulse_blanking_gr_complex.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -25,51 +27,26 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource.filename=/home/javier/signals/signal_source_int.dat -;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. SignalSource.item_type=gr_complex -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=2000000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. Disable this option in this version SignalSource.repeat=false -;#dump: Dump the Signal source data to a file. Disable this option in this version SignalSource.dump=false SignalSource.dump_filename=dump.dat -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner ;######### INPUT_FILTER CONFIG ############ -;## Filter the input data. Can be combined with frequency translation for IF signals - -;#[Pass_Through] disables this block InputFilter.implementation=Pulse_Blanking_Filter - InputFilter.Pfa=0.001 -;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version. InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version. InputFilter.output_item_type=gr_complex - -;#dump: Dump the filtered data to a file. InputFilter.dump=false - -;#dump_filename: Log path and filename. InputFilter.dump_filename=../data/input_filter.dat ;######### CHANNELS GLOBAL CONFIG ############ @@ -81,12 +58,8 @@ Channel.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 -Acquisition_1C.sampled_ms=1 -;#use_CFAR_algorithm: If enabled, acquisition estimates the input signal power to implement CFAR detection algorithms -;#notice that this affects the Acquisition threshold range! +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.use_CFAR_algorithm=false; -;#threshold: Acquisition threshold Acquisition_1C.threshold=20 ;Acquisition_1C.pfa=0.01 Acquisition_1C.doppler_max=5000 @@ -97,27 +70,15 @@ Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;# Extended correlation after telemetry bit synchronization -;# Valid values are: [1,2,4,5,10,20] (integer divisors of the GPS L1 CA bit period (20 ms) ) -;# Longer integration period require more stable front-end LO Tracking_1C.extend_correlation_ms=10 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=35; Tracking_1C.pll_bw_narrow_hz=30; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=2.0; Tracking_1C.dll_bw_narrow_hz=1.5; -;#fll_bw_hz: FLL loop filter bandwidth [Hz] Tracking_1C.fll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=true -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ diff --git a/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf b/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf index 944a1ba36..01b30c02a 100644 --- a/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -29,119 +31,48 @@ GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ ;#implementation SignalSource.implementation=RtlTcp_Signal_Source -;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. -SignalSource.item_type=gr_complex -;#sampling_frequency: Original Signal sampling frequency in samples per second -;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/ SignalSource.sampling_frequency=1200000 -;#freq: RF front-end center frequency in [Hz] SignalSource.freq=1575420000 -;#gain: Front-end overall gain Gain in [dB] SignalSource.gain=40 -;#rf_gain: Front-end RF stage gain in [dB] SignalSource.rf_gain=40 -;#rf_gain: Front-end IF stage gain in [dB] SignalSource.if_gain=30 -;#AGC_enabled: Front-end AGC enabled or disabled SignalSource.AGC_enabled = false -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. Disable this option in this version SignalSource.repeat=false -;#dump: Dump the Signal source data to a file. Disable this option in this version SignalSource.dump=false SignalSource.dump_filename=../data/signal_source.dat -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false - -;#Address of the rtl_tcp server (IPv6 allowed) SignalSource.address=127.0.0.1 - -;#Port of the rtl_tcp server SignalSource.port=1234 - -;# Set to true if I/Q samples come swapped SignalSource.swap_iq=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter.implementation=Pass_Through ;######### INPUT_FILTER 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. - InputFilter.implementation=Freq_Xlating_Fir_Filter - -;#dump: Dump the filtered data to a file. InputFilter.dump=false - -;#dump_filename: Log path and filename. InputFilter.dump_filename=../data/input_filter.dat - -;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. -;#These options are based on parameters of gnuradio's function: gr_remez. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. InputFilter.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 - InputFilter.band1_begin=0.0 InputFilter.band1_end=0.45 InputFilter.band2_begin=0.55 InputFilter.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 - InputFilter.ampl1_begin=1.0 InputFilter.ampl1_end=1.0 InputFilter.ampl2_begin=0.0 InputFilter.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 InputFilter.band1_error=1.0 InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" InputFilter.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. InputFilter.grid_density=16 ;#The following options are used only in Freq_Xlating_Fir_Filter implementation. @@ -149,22 +80,15 @@ InputFilter.grid_density=16 ;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/ InputFilter.sampling_frequency=1200000 -;# IF deviation due to front-end LO inaccuracies [HZ] InputFilter.IF=80558 ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. -;# DISABLED IN THE RTL-SDR REALTIME -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block Resampler.implementation=Pass_Through ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=4 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 Channel.signal=1C @@ -172,52 +96,30 @@ Channel.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fine_Doppler -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] -;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 -;#threshold: Acquisition threshold +Acquisition_1C.coherent_integration_time_ms =1 Acquisition_1C.threshold=0.015 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.0001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_min=-10000 -;#doppler_step Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=500 -;#maximum dwells Acquisition_1C.max_dwells=15 Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=40.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] Tracking_1C.early_late_space_chips=0.5; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=./tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false @@ -225,9 +127,7 @@ TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ ;#implementation: 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 @@ -237,21 +137,13 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 -;#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=true -;#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 diff --git a/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf b/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf index b4e025f6f..18d783741 100644 --- a/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -88,10 +91,6 @@ InputFilter.sampling_frequency=1999898 InputFilter.IF=80558 ; IF deviation due to front-end LO inaccuracies [Hz] ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. -;# DISABLED IN THE RTL-SDR REALTIME -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block Resampler.implementation=Pass_Through ;######### CHANNELS GLOBAL CONFIG ############ @@ -103,8 +102,7 @@ Channel.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fine_Doppler Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 -Acquisition_1C.sampled_ms=1 +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.015 ;Acquisition_1C.pfa=0.0001 Acquisition_1C.doppler_max=10000 @@ -118,7 +116,6 @@ Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking Tracking_1C.item_type=gr_complex -Tracking_1C.if=0 Tracking_1C.dump=false Tracking_1C.dump_filename=./tracking_ch_ Tracking_1C.pll_bw_hz=40.0; @@ -139,7 +136,6 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -;#implementation: Position Velocity and Time (PVT) implementation: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX diff --git a/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf b/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf index f6e2ec730..1cf1ac378 100644 --- a/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf +++ b/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -84,8 +87,7 @@ Channel.signal=1C ;######### GPS ACQUISITION CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition_Fine_Doppler Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 -Acquisition_1C.sampled_ms=1 +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.007 ;Acquisition_1C.pfa=0.0001 Acquisition_1C.doppler_max=10000 @@ -99,7 +101,6 @@ Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking Tracking_1C.item_type=gr_complex -Tracking_1C.if=0_ Tracking_1C.pll_bw_hz=40.0; Tracking_1C.dll_bw_hz=1.5; Tracking_1C.order=3; diff --git a/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf b/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf index 97710c4f0..362e747a3 100644 --- a/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf +++ b/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf @@ -1,7 +1,11 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; Configuration file for using USRP1 as a RF front-end for GPS L2C signals ; Run: ; gnss-sdr --config_file=/path/to/gnss-sdr_GPS_L2C_USRP1_realtime.conf ; + [GNSS-SDR] ;######### GLOBAL OPTIONS ################## @@ -46,81 +50,29 @@ DataTypeAdapter.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. - InputFilter.implementation=Freq_Xlating_Fir_Filter - -InputFilter.dump_filename=../data/input_filter.dat - -;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. -;#These options are based on parameters of gnuradio's function: gr_remez. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - - -;#input_item_type: Type and resolution for input signal samples. InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. InputFilter.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 - InputFilter.band1_begin=0.0 InputFilter.band1_end=0.45 InputFilter.band2_begin=0.55 InputFilter.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 - InputFilter.ampl1_begin=1.0 InputFilter.ampl1_end=1.0 InputFilter.ampl2_begin=0.0 InputFilter.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 InputFilter.band1_error=1.0 InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" InputFilter.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. InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - InputFilter.sampling_frequency=20000000 - InputFilter.IF=-1600000 - -;# Decimation factor after the frequency tranaslating block InputFilter.decimation_factor=1 - -;#dump: Dump the filtered data to a file. InputFilter.dump=false - -;#dump_filename: Log path and filename. +InputFilter.dump_filename=../data/input_filter.dat ;######### RESAMPLER CONFIG ############ @@ -133,9 +85,7 @@ Resampler.sample_freq_out=2000000 ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_2S.count=1 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 Channel.signal=2S @@ -155,14 +105,11 @@ Channel7.signal=2S ;######### ACQUISITION GLOBAL CONFIG ############ -;# GPS L2C M Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition Acquisition_2S.item_type=gr_complex -Acquisition_2S.if=0 Acquisition_2S.threshold=0.0013 ;Acquisition_2S.pfa=0.001 Acquisition_2S.doppler_max=10000 -Acquisition_2S.doppler_min=-10000 Acquisition_2S.doppler_step=100 Acquisition_2S.max_dwells=1 Acquisition_2S.dump=false @@ -172,7 +119,6 @@ Acquisition_2S.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_2S.implementation=GPS_L2_M_DLL_PLL_Tracking Tracking_2S.item_type=gr_complex -Tracking_2S.if=0 Tracking_2S.pll_bw_hz=1.5; Tracking_2S.dll_bw_hz=0.3; Tracking_2S.order=3; diff --git a/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf b/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf index caaf4536c..1572b45cd 100644 --- a/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; Configuration file for using USRP X300 as a RF front-end for GPS L2C signals ; Set SignalSource.device_address to the IP address of your device ; and run: @@ -87,9 +90,7 @@ Resampler.sample_freq_out=4000000 ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_2S.count=1 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 Channel.signal=2S @@ -112,7 +113,6 @@ Channel7.signal=2S ;# GPS L2C M Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition Acquisition_2S.item_type=gr_complex -Acquisition_2S.if=0 Acquisition_2S.threshold=0.0015 ;Acquisition_2S.pfa=0.001 Acquisition_2S.doppler_max=5000 @@ -125,7 +125,6 @@ Acquisition_2S.dump_filename=./acq_dump.dat Tracking_2S.implementation=GPS_L2_M_DLL_PLL_Tracking Tracking_2S.item_type=gr_complex -Tracking_2S.if=0 Tracking_2S.pll_bw_hz=2.0; Tracking_2S.dll_bw_hz=0.25; Tracking_2S.order=2; diff --git a/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf b/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf index 54e092708..aad3dd417 100644 --- a/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf @@ -38,8 +38,7 @@ Channel.signal=1B ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition Acquisition_1B.item_type=gr_complex -Acquisition_1B.if=0 -Acquisition_1B.sampled_ms=4 +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=1 Acquisition_1B.pfa=0.000008 Acquisition_1B.doppler_max=6000 @@ -52,7 +51,6 @@ Acquisition_1B.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking Tracking_1B.item_type=gr_complex -Tracking_1B.if=0 Tracking_1B.pll_bw_hz=20.0; Tracking_1B.dll_bw_hz=2.0; Tracking_1B.order=3; diff --git a/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf b/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf index ab6802559..2653a1402 100644 --- a/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf +++ b/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -10,259 +13,86 @@ GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation: SignalSource.implementation=File_Signal_Source - -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource.filename=/datalogger/signals/CTTC/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE - -;#item_type: Type and resolution for each of the signal samples. -;#Use gr_complex for 32 bits float I/Q or ishort for I/Q interleaved short integer. -;#If ishort is selected you should have to instantiate the Ishort_To_Complex data_type_adapter. SignalSource.item_type=ishort - -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=4000000 - -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 - -;#repeat: Repeat the processing file. SignalSource.repeat=false - -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: Use [Ishort_To_Complex] or [Pass_Through] DataTypeAdapter.implementation=Ishort_To_Complex -;#dump: Dump the filtered data to a file. DataTypeAdapter.dump=false -;#dump_filename: Log path and filename. DataTypeAdapter.dump_filename=../data/data_type_adapter.dat ;######### INPUT_FILTER 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. - -;InputFilter.implementation=Fir_Filter -;InputFilter.implementation=Freq_Xlating_Fir_Filter InputFilter.implementation=Pass_Through -;#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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. -InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. -InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. -InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time -InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. -InputFilter.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 - -#used for gps -InputFilter.band1_begin=0.0 -;InputFilter.band1_end=0.8 -InputFilter.band1_end=0.85 -InputFilter.band2_begin=0.90 -InputFilter.band2_end=1.0 - -#used for galileo -InputFilter.band1_begin=0.0 -;InputFilter.band1_end=0.8 -InputFilter.band1_end=0.45 -InputFilter.band2_begin=0.55 -InputFilter.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 -InputFilter.ampl1_begin=1.0 -InputFilter.ampl1_end=1.0 -InputFilter.ampl2_begin=0.0 -InputFilter.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 -InputFilter.band1_error=1.0 -InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" -InputFilter.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. -InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz -InputFilter.sampling_frequency=4000000 -InputFilter.IF=0 - -;#dump: Dump the filtered data to a file. -InputFilter.dump=false - -;#dump_filename: Log path and filename. -InputFilter.dump_filename=../data/input_filter.dat - ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation -;Resampler.implementation=Direct_Resampler Resampler.implementation=Pass_Through - -;#dump: Dump the resamplered data to a file. Resampler.dump=false -;#dump_filename: Log path and filename. Resampler.dump_filename=../data/resampler.dat - -;#item_type: Type and resolution for each of the signal samples. Resampler.item_type=gr_complex -;#sample_freq_in: the sample frequency of the input signal -Resampler.sample_freq_in=4000000 - -;#sample_freq_out: the desired sample frequency of the output signal -Resampler.sample_freq_out=4000000 - ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available satellite channels. Channels_1B.count=4 -;#in_acquisition: Number of channels simultaneously acquiring Channels.in_acquisition=1 Channel.signal=1B ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1B.coherent_integration_time_ms=4 -;#threshold: Acquisition threshold Acquisition_1B.threshold=0.05 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=15000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms]; Acquisition_1B.coherent_integration_time_ms=8 Acquisition_1B.cboc=false -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ -;#implementation: Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=20.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] -Tracking_1B.dump=true -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. +Tracking_1B.dump=false Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;######### TELEMETRY DECODER CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A or [Galileo_E1B_Telemetry_Decoder] for Galileo E1B TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad - -;#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; - -;#dump: Enable or disable the PVT internal binary data file logging [true] or [false] PVT.dump=false - -;#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 - -;# 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, ".kml" and ".geojson" to GIS-friendly formats. PVT.dump_filename=./PVT - -;#nmea_dump_filename: NMEA log path and filename PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea; - -;#flag_nmea_tty_port: Enables or disables the NMEA log to a serial TTY port (Can be used with real hardware or virtual one) PVT.flag_nmea_tty_port=true; - -;#nmea_dump_devname: serial device descriptor for NMEA logging PVT.nmea_dump_devname=/dev/pts/4 - -;#flag_rtcm_server: Enables or disables a TCP/IP server transmitting RTCM 3.2 messages (accepts multiple clients, port 2101 by default) PVT.flag_rtcm_server=false; - -;#flag_rtcm_tty_port: Enables or disables the RTCM log to a serial TTY port (Can be used with real hardware or virtual one) PVT.flag_rtcm_tty_port=false; - -;#rtcm_dump_devname: serial device descriptor for RTCM logging PVT.rtcm_dump_devname=/dev/pts/1 diff --git a/conf/gnss-sdr_Galileo_E1_ishort.conf b/conf/gnss-sdr_Galileo_E1_ishort.conf index 2f051700a..22a64245d 100644 --- a/conf/gnss-sdr_Galileo_E1_ishort.conf +++ b/conf/gnss-sdr_Galileo_E1_ishort.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -11,190 +14,65 @@ GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ SignalSource.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource.filename=/datalogger/signals/CTTC/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE -;#item_type: Type and resolution for each of the signal samples. SignalSource.item_type=ishort -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=4000000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. -SignalSource.enable_throttle_control=false +SignalSource.enable_throttle_control=true ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter.implementation=Ishort_To_Complex ;######### INPUT_FILTER CONFIG ############ -;## Filter the input data. Can be combined with frequency translation for IF signals - -;#implementation: -;#[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. -;InputFilter.implementation=Fir_Filter -;InputFilter.implementation=Freq_Xlating_Fir_Filter InputFilter.implementation=Pass_Through - -;#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 GNU Radio's function: gr_remez. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter.output_item_type=gr_complex -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. -InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time -InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. -InputFilter.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 - -InputFilter.band1_begin=0.0 -InputFilter.band1_end=0.45 -InputFilter.band2_begin=0.55 -InputFilter.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 - -InputFilter.ampl1_begin=1.0 -InputFilter.ampl1_end=1.0 -InputFilter.ampl2_begin=0.0 -InputFilter.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 -InputFilter.band1_error=1.0 -InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" -InputFilter.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. -InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - -InputFilter.sampling_frequency=4000000 -InputFilter.IF=0 -;#dump: Dump the filtered data to a file. -InputFilter.dump=false -;#dump_filename: Log path and filename. -InputFilter.dump_filename=../data/input_filter.dat - - ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neighborhood interpolation -;Resampler.implementation=Direct_Resampler Resampler.implementation=Pass_Through -;#item_type: Type and resolution for each of the signal samples. Resampler.item_type=gr_complex -;#sample_freq_in: the sample frequency of the input signal Resampler.sample_freq_in=4000000 -;#sample_freq_out: the desired sample frequency of the output signal Resampler.sample_freq_out=4000000 -;#dump: Dump the resampled data to a file. Resampler.dump=false -;#dump_filename: Log path and filename. Resampler.dump_filename=../data/resampler.dat ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available Galileo satellite channels. Channels_1B.count=8 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 Channel.signal=1B ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 -;#threshold: Acquisition threshold +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=0 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] -Acquisition_1B.pfa=0.000002 -;#doppler_max: Maximum expected Doppler shift [Hz] +Acquisition_1B.pfa=0.00001 Acquisition_1B.doppler_max=15000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 -;#cboc: Only for [Galileo_E1_PCPS_Ambiguous_Acquisition]. This option allows you to choose between acquiring with CBOC signal [true] or sinboc(1,1) signal [false]. -;#Use only if GNSS-SDR.internal_fs_sps is greater than or equal to 6138000 Acquisition_1B.cboc=false -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat - - -;######### ACQUISITION CHANNELS CONFIG ###### - -;######### ACQUISITION CH 0 CONFIG ############ -;#repeat_satellite: Use only jointly with the satellite PRN ID option. The default value is false -;Acquisition_1B0.repeat_satellite = true -;Acquisition_1B1.repeat_satellite = true -;Acquisition_1B2.repeat_satellite = true -;Acquisition_1B3.repeat_satellite = true +Acquisition_1B.blocking=false ;######### TRACKING GLOBAL CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] -Tracking_1B.pll_bw_hz=15.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] -Tracking_1B.dll_bw_hz=2.0; -;#fll_bw_hz: FLL loop filter bandwidth [Hz] -Tracking_1B.fll_bw_hz=10.0; -;#order: PLL/DLL loop filter order [2] or [3] -Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo +Tracking_1B.dump=true +Tracking_1B.dump_filename=./veml_tracking_ch_ +Tracking_1B.pll_bw_hz=20.0; +Tracking_1B.dll_bw_hz=3.0; Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; Tracking_1B.track_pilot=true -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1B.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1B.dump_filename=../data/veml_tracking_ch_ @@ -205,39 +83,25 @@ TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 -;#nmea_dump_filename: NMEA log path and filename PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea; -;#flag_nmea_tty_port: Enables or disables the NMEA log to a serial TTY port (Can be used with real hardware or virtual one) PVT.flag_nmea_tty_port=true -;#nmea_dump_devname: serial device descriptor for NMEA logging PVT.nmea_dump_devname=/dev/pts/4 -;#flag_rtcm_server: Enables or disables a TCP/IP server transmitting RTCM 3.2 messages (accepts multiple clients, port 2101 by default) PVT.flag_rtcm_server=true; PVT.rtcm_tcp_port=2101 PVT.rtcm_MT1045_rate_ms=5000 PVT.rtcm_MSM_rate_ms=1000 -;#flag_rtcm_tty_port: Enables or disables the RTCM log to a serial TTY port (Can be used with real hardware or virtual one) PVT.flag_rtcm_tty_port=false; -;#rtcm_dump_devname: serial device descriptor for RTCM logging PVT.rtcm_dump_devname=/dev/pts/1 -;#dump: Enable or disable the PVT internal binary data file logging [true] or [false] PVT.dump=false -;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump, ".kml" and ".geojson" to GIS-friendly formats. PVT.dump_filename=./PVT \ No newline at end of file diff --git a/conf/gnss-sdr_Galileo_E1_nsr.conf b/conf/gnss-sdr_Galileo_E1_nsr.conf index f7ca01480..7350f5314 100644 --- a/conf/gnss-sdr_Galileo_E1_nsr.conf +++ b/conf/gnss-sdr_Galileo_E1_nsr.conf @@ -1,3 +1,6 @@ +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -21,15 +24,10 @@ SignalSource.samples=0 ; 0 means the entire file SignalSource.repeat=false SignalSource.dump=false SignalSource.dump_filename=../data/signal_source.dat - - -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. SignalConditioner.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER CONFIG ############ @@ -78,8 +76,7 @@ Channel.signal=1B ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition Acquisition_1B.item_type=gr_complex -Acquisition_1B.if=0 -Acquisition_1B.sampled_ms=4 +Acquisition_1B.coherent_integration_time_ms=4 Acquisition_1B.pfa=0.0000008 Acquisition_1B.doppler_max=15000 Acquisition_1B.doppler_step=125 @@ -91,7 +88,6 @@ Acquisition_1B.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking Tracking_1B.item_type=gr_complex -Tracking_1B.if=0 Tracking_1B.pll_bw_hz=20.0; Tracking_1B.dll_bw_hz=2.0; Tracking_1B.order=3; diff --git a/conf/gnss-sdr_Galileo_E5a.conf b/conf/gnss-sdr_Galileo_E5a.conf index 702942f55..5ab3096c3 100644 --- a/conf/gnss-sdr_Galileo_E5a.conf +++ b/conf/gnss-sdr_Galileo_E5a.conf @@ -1,4 +1,3 @@ -; Default configuration file ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -25,159 +24,33 @@ GNSS-SDR.internal_fs_sps=32000000 ;GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource.filename=/datalogger/signals/ifen/32MS_complex.dat ; <- PUT YOUR FILE HERE -;#item_type: Type and resolution for each of the signal samples. SignalSource.item_type=gr_complex -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=32000000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;SignalConditioner.implementation=Signal_Conditioner SignalConditioner.implementation=Pass_Through -;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block -DataTypeAdapter.implementation=Pass_Through - -;######### INPUT_FILTER CONFIG ############ -;## Filter the input data. Can be combined with frequency translation for IF signals - -;#implementation: -;#[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. - -;InputFilter.implementation=Fir_Filter -;InputFilter.implementation=Freq_Xlating_Fir_Filter -InputFilter.implementation=Pass_Through - -;#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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. -InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. -InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. -InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time -InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. -InputFilter.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 - -InputFilter.band1_begin=0.0 -InputFilter.band1_end=0.45 -InputFilter.band2_begin=0.55 -InputFilter.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 - -InputFilter.ampl1_begin=1.0 -InputFilter.ampl1_end=1.0 -InputFilter.ampl2_begin=0.0 -InputFilter.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 -InputFilter.band1_error=1.0 -InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" -InputFilter.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. -InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - -InputFilter.sampling_frequency=32000000 -InputFilter.IF=0 - -;#dump: Dump the filtered data to a file. -InputFilter.dump=false - -;#dump_filename: Log path and filename. -InputFilter.dump_filename=../data/input_filter.dat - - -;######### RESAMPLER CONFIG ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation -;Resampler.implementation=Direct_Resampler -Resampler.implementation=Pass_Through -;#item_type: Type and resolution for each of the signal samples. -Resampler.item_type=gr_complex -;#sample_freq_in: the sample frequency of the input signal -Resampler.sample_freq_in=8000000 -;#sample_freq_out: the desired sample frequency of the output signal -Resampler.sample_freq_out=4000000 -;#dump: Dump the resamplered data to a file. -Resampler.dump=false -;#dump_filename: Log path and filename. -Resampler.dump_filename=../data/resampler.dat - ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available satellite channels. Channels_5X.count=1 -;#in_acquisition: Number of channels simultaneously acquiring Channels.in_acquisition=1 -;#system: GPS, GLONASS, Galileo, SBAS or Compass -;#if the option is disabled by default is assigned GPS -Channel.signal=5X ;######### SPECIFIC CHANNELS CONFIG ###### ;#The following options are specific to each channel and overwrite the generic options ;######### CHANNEL 0 CONFIG ############ -;Channel0.signal=5X -;#satellite: Satellite PRN ID for this channel. Disable this option to random search ;Channel0.satellite=19 -;Channel0.repeat_satellite=true ;######### CHANNEL 1 CONFIG ############ - -;Channel1.system=Galileo -;Channel1.signal=5Q ;Channel1.satellite=12 ;######### CHANNEL 2 CONFIG ############ - -;Channel2.system=Galileo -;Channel2.signal=5Q ;Channel2.satellite=11 ;######### CHANNEL 3 CONFIG ############ @@ -188,97 +61,56 @@ Channel.signal=5X ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_5X.implementation=Galileo_E5a_Noncoherent_IQ_Acquisition_CAF -;#item_type: Type and resolution for each of the signal samples. Acquisition_5X.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_5X.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_5X.coherent_integration_time_ms=1 -;#threshold: Acquisition threshold. It will be ignored if pfa is defined. Acquisition_5X.threshold=0.001 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] Acquisition_5X.pfa=0.0003 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_5X.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_5X.doppler_step=250 -;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take -;maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] (should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) Acquisition_5X.bit_transition_flag=false -;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true Acquisition_5X.max_dwells=1 -;#CAF filter: **Only for E5a** Resolves doppler ambiguity averaging the specified BW in the winner code delay. If set to 0 CAF filter is desactivated. Recommended value 3000 Hz Acquisition_5X.CAF_window_hz=0 -;#Zero_padding: **Only for E5a** Avoids power loss and doppler ambiguity in bit transitions by correlating one code with twice the input data length, ensuring that at least one full code is present without transitions. -;#If set to 1 it is ON, if set to 0 it is OFF. Acquisition_5X.Zero_padding=0 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] -Acquisition_5X.dump=true -;#filename: Log path and filename +Acquisition_5X.dump=false Acquisition_5X.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_5X.implementation=Galileo_E5a_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_5X.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_5X.if=0 -;#dll_ti_ms: **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms] -;Tracking_5X.ti_ms=3; -Tracking_5X.ti_ms=1; -;#pll_bw_hz: PLL loop filter bandwidth during initialization [Hz] Tracking_5X.pll_bw_hz=20.0; -;#dll_bw_hz: DLL loop filter bandwidth during initialization [Hz] Tracking_5X.dll_bw_hz=20.0; Tracking_5X.pll_bw_narrow_hz=2.0; Tracking_5X.dll_bw_narrow_hz=5.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_5X.order=2; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] Tracking_5X.early_late_space_chips=0.5; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] -Tracking_5X.dump=true -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. +Tracking_5X.dump=false Tracking_5X.dump_filename=./tracking_ch_ ;######### TELEMETRY DECODER CONFIG ############ -;#implementation: TelemetryDecoder_5X.implementation=Galileo_E5a_Telemetry_Decoder TelemetryDecoder_5X.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#output_rate_ms: Period between two PVT outputs. Notice that the minimum period is equal to the tracking integration time [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 -;#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=true; -;#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 -;#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 diff --git a/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf b/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf index 661920ca0..e884778d2 100644 --- a/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf +++ b/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf @@ -1,4 +1,3 @@ -; Default configuration file ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -74,7 +73,7 @@ Resampler.dump_filename=../data/resampler.dat ;######### CHANNELS GLOBAL CONFIG ############ -Channels_5X.count=1 +Channels_5X.count=8 Channels.in_acquisition=1 Channel.signal=5X @@ -83,7 +82,7 @@ Channel.signal=5X ;######### CHANNEL 0 CONFIG ############ Channel0.signal=5X -Channel0.satellite=19 +;Channel0.satellite=19 ;Channel0.repeat_satellite=true ;######### CHANNEL 1 CONFIG ############ @@ -101,7 +100,6 @@ Channel3.signal=5X ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_5X.implementation=Galileo_E5a_Noncoherent_IQ_Acquisition_CAF Acquisition_5X.item_type=gr_complex -Acquisition_5X.if=0 Acquisition_5X.coherent_integration_time_ms=1 Acquisition_5X.threshold=0.002 Acquisition_5X.doppler_max=10000 @@ -117,10 +115,8 @@ Acquisition_5X.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_5X.implementation=Galileo_E5a_DLL_PLL_Tracking Tracking_5X.item_type=gr_complex -Tracking_5X.if=0 Tracking_5X.pll_bw_hz=20.0; Tracking_5X.dll_bw_hz=20.0; -Tracking_5X.ti_ms=1; **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms] Tracking_5X.pll_bw_narrow_hz=20.0; Tracking_5X.dll_bw_narrow_hz=20.0; Tracking_5X.order=2; diff --git a/conf/gnss-sdr_Hybrid_byte.conf b/conf/gnss-sdr_Hybrid_byte.conf index aa7caae99..bf50bcb30 100644 --- a/conf/gnss-sdr_Hybrid_byte.conf +++ b/conf/gnss-sdr_Hybrid_byte.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -12,129 +14,40 @@ GNSS-SDR.internal_fs_sps=20000000 ;######### SIGNAL_SOURCE CONFIG ############ SignalSource.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource.filename=/datalogger/signals/Fraunhofer/L125_III1b_210s_L1.bin ; <- PUT YOUR FILE HERE -;#item_type: Type and resolution for each of the signal samples.. SignalSource.item_type=byte -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=20000000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter.implementation=Ibyte_To_Complex ;######### INPUT_FILTER CONFIG ############ -;## Filter the input data. Can be combined with frequency translation for IF signals -;#[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. - -;InputFilter.implementation=Fir_Filter -;InputFilter.implementation=Freq_Xlating_Fir_Filter InputFilter.implementation=Pass_Through - -;#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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples.. InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. -InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time -InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. -InputFilter.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 - -InputFilter.band1_begin=0.0 -InputFilter.band1_end=0.45 -InputFilter.band2_begin=0.55 -InputFilter.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 - -InputFilter.ampl1_begin=1.0 -InputFilter.ampl1_end=1.0 -InputFilter.ampl2_begin=0.0 -InputFilter.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 -InputFilter.band1_error=1.0 -InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" -InputFilter.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. -InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - -InputFilter.sampling_frequency=20000000 -InputFilter.IF=0 -;#dump: Dump the filtered data to a file. InputFilter.dump=false -;#dump_filename: Log path and filename. InputFilter.dump_filename=../data/input_filter.dat ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation -;Resampler.implementation=Direct_Resampler Resampler.implementation=Pass_Through -;#item_type: Type and resolution for each of the signal samples. Resampler.item_type=gr_complex -;#sample_freq_in: the sample frequency of the input signal Resampler.sample_freq_in=20000000 -;#sample_freq_out: the desired sample frequency of the output signal Resampler.sample_freq_out=20000000 -;#dump: Dump the resamplered data to a file. Resampler.dump=false -;#dump_filename: Log path and filename. Resampler.dump_filename=../data/resampler.dat ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=8 -;#count: Number of available Galileo satellite channels. Channels_1B.count=8 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 ;#signal: @@ -158,123 +71,75 @@ Channel15.signal=1B ;######### GPS ACQUISITION CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 -;#threshold: Acquisition threshold +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.0060 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.01 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=500 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### GALILEO ACQUISITION CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 -;#threshold: Acquisition threshold +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=0 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] Acquisition_1B.pfa=0.0000008 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=15000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=45.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=4.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### TRACKING GALILEO CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=15.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1B.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### TELEMETRY DECODER GALILEO CONFIG ############ -;#implementation: Use [Galileo_E1B_Telemetry_Decoder] for Galileo E1B TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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; -;#dump: Enable or disable the PVT internal binary data file logging [true] or [false] PVT.dump=false PVT.flag_rtcm_server=false PVT.flag_rtcm_tty_port=false PVT.rtcm_dump_devname=/dev/pts/1 -;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump. PVT.dump_filename=./PVT diff --git a/conf/gnss-sdr_Hybrid_byte_sim.conf b/conf/gnss-sdr_Hybrid_byte_sim.conf index 7df406547..60cca8e00 100644 --- a/conf/gnss-sdr_Hybrid_byte_sim.conf +++ b/conf/gnss-sdr_Hybrid_byte_sim.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -7,139 +9,48 @@ ;######### GLOBAL OPTIONS ################## ;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. -;GNSS-SDR.internal_fs_sps=2048000 GNSS-SDR.internal_fs_sps=2600000 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed -;#SignalSource.filename=/home/javier/Descargas/rtlsdr_tcxo_l1/rtlsdr_tcxo_l1.bin ; <- PUT YOUR FILE HERE SignalSource.filename=/Users/carlesfernandez/git/cttc/build/signal_out.bin ; <- PUT YOUR FILE HERE -;#item_type: Type and resolution for each of the signal samples. SignalSource.item_type=byte -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=4000000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#dump: Dump the Signal source data to a file. SignalSource.dump=false SignalSource.dump_filename=../data/signal_source.dat -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks 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 ;######### INPUT_FILTER 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. - -;InputFilter.implementation=Fir_Filter -;InputFilter.implementation=Freq_Xlating_Fir_Filter InputFilter.implementation=Pass_Through - -;#dump: Dump the filtered data to a file. InputFilter.dump=false - -;#dump_filename: Log path and filename. InputFilter.dump_filename=../data/input_filter.dat - -;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. -;#These options are based on parameters of gnuradio's function: gr_remez. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter.output_item_type=gr_complex -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. -InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time -InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. -InputFilter.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 - -InputFilter.band1_begin=0.0 -InputFilter.band1_end=0.45 -InputFilter.band2_begin=0.55 -InputFilter.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 - -InputFilter.ampl1_begin=1.0 -InputFilter.ampl1_end=1.0 -InputFilter.ampl2_begin=0.0 -InputFilter.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 -InputFilter.band1_error=1.0 -InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" -InputFilter.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. -InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - -InputFilter.sampling_frequency=2600000 -InputFilter.IF=0 - - ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. Resampler.implementation=Pass_Through Resampler.item_type = gr_complex; ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=11 -;#count: Number of available Galileo satellite channels. Channels_1B.count=0 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 ;#signal: -;#if the option is disabled by default is assigned "1C" GPS L1 C/A Channel1.signal=1C Channel2.signal=1C Channel3.signal=1C @@ -159,109 +70,63 @@ Channel15.signal=1B ;######### GPS ACQUISITION CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 -;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] -;#use_CFAR_algorithm: If enabled, acquisition estimates the input signal power to implement CFAR detection algorithms -;#notice that this affects the Acquisition threshold range! +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.use_CFAR_algorithm=false; -;#threshold: Acquisition threshold Acquisition_1C.threshold=15 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.01 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=6000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=100 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### GALILEO ACQUISITION CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 -;#threshold: Acquisition threshold +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=0 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] Acquisition_1B.pfa=0.0000008 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=15000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=20.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=1.5; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; ;######### TRACKING GALILEO CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1B.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1B.dump_filename=../data/veml_tracking_ch_ -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=15.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ - ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### TELEMETRY DECODER GALILEO CONFIG ############ -;#implementation: Use [Galileo_E1B_Telemetry_Decoder] for Galileo E1B TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder ;######### OBSERVABLES CONFIG ############ 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 @@ -270,14 +135,10 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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; 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 -;#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 diff --git a/conf/gnss-sdr_Hybrid_gr_complex.conf b/conf/gnss-sdr_Hybrid_gr_complex.conf index 63f92330e..dbd9d8286 100644 --- a/conf/gnss-sdr_Hybrid_gr_complex.conf +++ b/conf/gnss-sdr_Hybrid_gr_complex.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -10,135 +12,24 @@ GNSS-SDR.internal_fs_sps=4092000 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource.filename=/datalogger/signals/sim/GPS_sim1.dat ; <- PUT YOUR FILE HERE -;#item_type: Type and resolution for each of the signal samples. SignalSource.item_type=gr_complex -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=4092000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Pass_Through -;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block -DataTypeAdapter.implementation=Pass_Through -DataTypeAdapter.item_type=gr_complex - -;######### INPUT_FILTER 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] -;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation -;# that shifts IF down to zero Hz. - -InputFilter.implementation=Pass_Through - -;#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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. -InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. -InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. -InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time -InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. -InputFilter.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 - -InputFilter.band1_begin=0.0 -InputFilter.band1_end=0.45 -InputFilter.band2_begin=0.55 -InputFilter.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 - -InputFilter.ampl1_begin=1.0 -InputFilter.ampl1_end=1.0 -InputFilter.ampl2_begin=0.0 -InputFilter.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 -InputFilter.band1_error=1.0 -InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" -InputFilter.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. -InputFilter.grid_density=16 - -;# Original sampling frequency stored in the signal file -InputFilter.sampling_frequency=4092000 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - -InputFilter.IF=5499998.47412109 - -;# Decimation factor after the frequency tranaslating block -InputFilter.decimation_factor=8 - -;#dump: Dump the filtered data to a file. -InputFilter.dump=false - -;#dump_filename: Log path and filename. -InputFilter.dump_filename=../data/input_filter.dat - - -;######### RESAMPLER CONFIG ############ -;## Resamples the input data. -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation -Resampler.implementation=Pass_Through - ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=1 -;#count: Number of available Galileo satellite channels. Channels_1B.count=0 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 -;#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 - ;#if the option is disabled by default is assigned "1C" GPS L1 C/A Channel0.signal=1C Channel1.signal=1B @@ -160,134 +51,80 @@ Channel15.signal=1B ;######### GPS ACQUISITION CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.use_CFAR_algorithm=false; -;#threshold: Acquisition threshold Acquisition_1C.threshold=30 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.01 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=5000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=100 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### GALILEO ACQUISITION CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 -;#threshold: Acquisition threshold +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=0 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] Acquisition_1B.pfa=0.0000002 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=15000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;# Extended correlation after telemetry bit synchronization -;# Valid values are: [1,2,4,5,10,20] (integer divisors of the GPS L1 CA bit period (20 ms) ) -;# Longer integration period require more stable front-end LO Tracking_1C.extend_correlation_ms=10 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=40; Tracking_1C.pll_bw_narrow_hz=25; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=2.0; Tracking_1C.dll_bw_narrow_hz=2.0; -;#fll_bw_hz: FLL loop filter bandwidth [Hz] -Tracking_1C.fll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=true -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### TRACKING GALILEO CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=15.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=2.0; -;#fll_bw_hz: FLL loop filter bandwidth [Hz] Tracking_1B.fll_bw_hz=10.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1B.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### TELEMETRY DECODER GALILEO CONFIG ############ -;#implementation: Use [Galileo_E1B_Telemetry_Decoder] for Galileo E1B TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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=10; -;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms. PVT.display_rate_ms=500; -;#dump: Enable or disable the PVT internal binary data file logging [true] or [false] PVT.dump=false PVT.flag_rtcm_server=false PVT.flag_rtcm_tty_port=false PVT.rtcm_dump_devname=/dev/pts/1 -;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump. PVT.dump_filename=./PVT diff --git a/conf/gnss-sdr_Hybrid_ishort.conf b/conf/gnss-sdr_Hybrid_ishort.conf index 6bfa9e8fa..6fc17c35c 100644 --- a/conf/gnss-sdr_Hybrid_ishort.conf +++ b/conf/gnss-sdr_Hybrid_ishort.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -28,133 +30,36 @@ GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ ;#implementation SignalSource.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource.filename=/datalogger/signals/CTTC/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE -;#item_type: Type and resolution for each of the signal samples. SignalSource.item_type=ishort -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=4000000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter.implementation=Ishort_To_Complex ;######### INPUT_FILTER 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. - -;InputFilter.implementation=Fir_Filter -;InputFilter.implementation=Freq_Xlating_Fir_Filter InputFilter.implementation=Pass_Through - -;#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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter.output_item_type=gr_complex -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. -InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time -InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. -InputFilter.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 - -InputFilter.band1_begin=0.0 -InputFilter.band1_end=0.45 -InputFilter.band2_begin=0.55 -InputFilter.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 - -InputFilter.ampl1_begin=1.0 -InputFilter.ampl1_end=1.0 -InputFilter.ampl2_begin=0.0 -InputFilter.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 -InputFilter.band1_error=1.0 -InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" -InputFilter.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. -InputFilter.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - -InputFilter.sampling_frequency=4000000 -InputFilter.IF=0 - -;#dump: Dump the filtered data to a file. -InputFilter.dump=false - -;#dump_filename: Log path and filename. -InputFilter.dump_filename=../data/input_filter.dat - ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation -;Resampler.implementation=Direct_Resampler Resampler.implementation=Pass_Through -;#item_type: Type and resolution for each of the signal samples. Resampler.item_type=gr_complex -;#sample_freq_in: the sample frequency of the input signalq -Resampler.sample_freq_in=4000000 -;#sample_freq_out: the desired sample frequency of the output signal -Resampler.sample_freq_out=4000000 -;#dump: Dump the resamplered data to a file. Resampler.dump=false -;#dump_filename: Log path and filename. Resampler.dump_filename=../data/resampler.dat ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=0 -;#count: Number of available Galileo satellite channels. Channels_1B.count=5 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 ;#signal: @@ -174,120 +79,73 @@ Channel7.signal=1B ;######### GPS ACQUISITION CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 -;#threshold: Acquisition threshold +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.0075 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.01 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=500 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### GALILEO ACQUISITION CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 -;#implementation: Acquisition algorithm selection for this channel: -;#threshold: Acquisition threshold +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=0 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] Acquisition_1B.pfa=0.0000008; 0.0000008 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=15000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 Acquisition_1B.cboc=false; -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=50.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=5.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### TRACKING GALILEO CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=20.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1B.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### TELEMETRY DECODER GALILEO CONFIG ############ -;#implementation: Use [Galileo_E1B_Telemetry_Decoder] for Galileo E1B TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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; PVT.flag_rtcm_server=true PVT.flag_rtcm_tty_port=false @@ -297,7 +155,5 @@ PVT.rtcm_MT1045_rate_ms=5000 ; Period (in ms) of Galileo ephemeris messages. 0 m PVT.rtcm_MT1045_rate_ms=5000 ; Period (in ms) of GPS ephemeris messages. 0 mutes this message PVT.rtcm_MT1097_rate_ms=1000 ; Period (in ms) of Galileo observables. 0 mutes this message PVT.rtcm_MT1077_rate_ms=1000 ; Period (in ms) of GPS observables. 0 mutes this message -;#dump: Enable or disable the PVT internal binary data file logging [true] or [false] PVT.dump=false -;#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 diff --git a/conf/gnss-sdr_Hybrid_nsr.conf b/conf/gnss-sdr_Hybrid_nsr.conf index 2427aa101..682482991 100644 --- a/conf/gnss-sdr_Hybrid_nsr.conf +++ b/conf/gnss-sdr_Hybrid_nsr.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -7,136 +9,60 @@ ;######### GLOBAL OPTIONS ################## ;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. -;GNSS-SDR.internal_fs_sps=6826700 GNSS-SDR.internal_fs_sps=2560000 -;GNSS-SDR.internal_fs_sps=4096000 -;GNSS-SDR.internal_fs_sps=5120000 + ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Nsr_File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed 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 -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=20480000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#dump: Dump the Signal source data to a file. SignalSource.dump=false SignalSource.dump_filename=../data/signal_source.dat -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter.implementation=Pass_Through DataTypeAdapter.item_type=float ;######### INPUT_FILTER 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] -;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation -;# that shifts IF down to zero Hz. - InputFilter.implementation=Freq_Xlating_Fir_Filter - -;#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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter.input_item_type=float - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. InputFilter.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 - InputFilter.band1_begin=0.0 InputFilter.band1_end=0.45 InputFilter.band2_begin=0.55 InputFilter.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 - InputFilter.ampl1_begin=1.0 InputFilter.ampl1_end=1.0 InputFilter.ampl2_begin=0.0 InputFilter.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 InputFilter.band1_error=1.0 InputFilter.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" InputFilter.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. InputFilter.grid_density=16 - -;# Original sampling frequency stored in the signal file InputFilter.sampling_frequency=20480000 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - InputFilter.IF=5499998.47412109 - -;# Decimation factor after the frequency tranaslating block InputFilter.decimation_factor=8 - -;#dump: Dump the filtered data to a file. InputFilter.dump=false - -;#dump_filename: Log path and filename. InputFilter.dump_filename=../data/input_filter.dat ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation Resampler.implementation=Pass_Through ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=8 -;#count: Number of available Galileo satellite channels. Channels_1B.count=0 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 ;#signal: @@ -168,103 +94,59 @@ Channel15.signal=1B ;######### GPS ACQUISITION CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 -;#threshold: Acquisition threshold +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.0075 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.01 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=5000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=250 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### GALILEO ACQUISITION CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 -;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] -;#threshold: Acquisition threshold +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=0 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] Acquisition_1B.pfa=0.0000002 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=15000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;# Extended correlation after telemetry bit synchronization -;# Valid values are: [1,2,4,5,10,20] (integer divisors of the GPS L1 CA bit period (20 ms) ) -;# Longer integration period require more stable front-end LO Tracking_1C.extend_correlation_ms=1 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=40; Tracking_1C.pll_bw_narrow_hz=20; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=2.0; Tracking_1C.dll_bw_narrow_hz=1.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=true -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### TRACKING GALILEO CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=15.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1B.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### TELEMETRY DECODER GALILEO CONFIG ############ -;#implementation: Use [Galileo_E1B_Telemetry_Decoder] for Galileo E1B TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false @@ -272,9 +154,7 @@ TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ ;#implementation: 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 @@ -283,14 +163,10 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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=10; -;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms. PVT.display_rate_ms=500; 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 -;#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 diff --git a/conf/gnss-sdr_galileo_E1_extended_correlator_byte.conf b/conf/gnss-sdr_galileo_E1_extended_correlator_byte.conf index e9e5eb0f8..18d9f5307 100644 --- a/conf/gnss-sdr_galileo_E1_extended_correlator_byte.conf +++ b/conf/gnss-sdr_galileo_E1_extended_correlator_byte.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -11,62 +13,34 @@ GNSS-SDR.internal_fs_sps=20000000 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource.filename=/media/javier/SISTEMA/signals/fraunhofer/L125_III1b_210s_L1.bin ; <- PUT YOUR FILE HERE -;#item_type: Type and resolution for each of the signal samples. SignalSource.item_type=byte -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=20000000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter.implementation=Ibyte_To_Complex ;######### INPUT_FILTER CONFIG ############ -;## Filter the input data. Can be combined with frequency translation for IF signals - InputFilter.implementation=Pass_Through - ;######### RESAMPLER CONFIG ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neighborhood interpolation -;Resampler.implementation=Direct_Resampler Resampler.implementation=Pass_Through ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=0 -;#count: Number of available Galileo satellite channels. -Channels_1B.count=1 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver +Channels_1B.count=8 + Channels.in_acquisition=1 -;#signal: -;#if the option is disabled by default is assigned "1C" GPS L1 C/A Channel1.signal=1B Channel2.signal=1B Channel3.signal=1B @@ -86,132 +60,83 @@ Channel15.signal=1B ;######### GPS ACQUISITION CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 +Acquisition_1C.scoherent_integration_time_ms=1 Acquisition_1C.use_CFAR_algorithm=false; -;#threshold: Acquisition threshold Acquisition_1C.threshold=18 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=5000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=500 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### GALILEO ACQUISITION CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 +Acquisition_1B.coherent_integration_time_ms=4 Acquisition_1B.acquire_pilot=true Acquisition_1B.use_CFAR_algorithm=false -;#threshold: Acquisition threshold Acquisition_1B.threshold=21 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=5000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 Acquisition_1B.bit_transition_flag=true -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=../data/acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=30.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### TRACKING GALILEO CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] Tracking_1B.if=0 Tracking_1B.track_pilot=true -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=4.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=0.5; -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_narrow_hz=2.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_narrow_hz=0.25; Tracking_1B.extend_correlation_symbols=4; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_narrow_chips=0.06; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_narrow_chips=0.25; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] -Tracking_1B.dump=true -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. +Tracking_1B.dump=false Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### TELEMETRY DECODER GALILEO CONFIG ############ -;#implementation: Use [Galileo_E1B_Telemetry_Decoder] for Galileo E1B TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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; 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 -;#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 diff --git a/conf/gnss-sdr_galileo_E1_extended_correlator_labsat.conf b/conf/gnss-sdr_galileo_E1_extended_correlator_labsat.conf index 8b2f05195..cfbd1f73c 100644 --- a/conf/gnss-sdr_galileo_E1_extended_correlator_labsat.conf +++ b/conf/gnss-sdr_galileo_E1_extended_correlator_labsat.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -6,11 +8,9 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. GNSS-SDR.internal_fs_sps=5456000 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Labsat_Signal_Source SignalSource.selected_channel=1 ;#filename: path to file with the captured GNSS signal samples to be processed @@ -18,121 +18,58 @@ SignalSource.selected_channel=1 ;# the adapter adds "_0000.LS3" to this base path and filename. Next file will be "_0001.LS3" and so on ;# in this example, the first file complete path will be ../signals/GPS_025_0000.LS3 SignalSource.filename=../signals/GPS_025 ; <- 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 -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource.sampling_frequency=16368000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource.samples=0 -;#repeat: Repeat the processing file. SignalSource.repeat=false -;#dump: Dump the Signal source data to a file. SignalSource.dump=false SignalSource.dump_filename=../data/signal_source.dat -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false ;######### SIGNAL_CONDITIONER CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter.implementation=Pass_Through DataTypeAdapter.item_type=gr_complex ;######### INPUT_FILTER CONFIG ############ -;## Filter the input data. Can be combined with frequency translation for IF signals - -;#implementation -;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation -;# that shifts IF down to zero Hz. InputFilter.implementation=Freq_Xlating_Fir_Filter - -;#dump: Dump the filtered data to a file. InputFilter.dump=false - -;#dump_filename: Log path and filename. InputFilter.dump_filename=../data/input_filter.dat -;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. -;#These options are based on parameters of gnuradio's function: gr_remez. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. InputFilter.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time InputFilter.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. InputFilter.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 - InputFilter.band1_begin=0.0 InputFilter.band1_end=0.45 InputFilter.band2_begin=0.55 InputFilter.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 - InputFilter.ampl1_begin=1.0 InputFilter.ampl1_end=1.0 InputFilter.ampl2_begin=0.0 InputFilter.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 InputFilter.band1_error=1.0 InputFilter.band2_error=1.0 -;#filter_type: one of "bandpass", "hilbert" or "differentiator" InputFilter.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. InputFilter.grid_density=16 - -;# Original sampling frequency stored in the signal file InputFilter.sampling_frequency=16368000 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz - InputFilter.IF=0 - -;# Decimation factor after the frequency tranaslating block InputFilter.decimation_factor=3 ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=0 -;#count: Number of available Galileo satellite channels. Channels_1B.count=6 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 -;#signal: -;#if the option is disabled by default is assigned "1C" GPS L1 C/A Channel0.signal=1B Channel1.signal=1B Channel2.signal=1B @@ -153,130 +90,80 @@ Channel15.signal=1B ;######### GPS ACQUISITION CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.use_CFAR_algorithm=false; -;#threshold: Acquisition threshold Acquisition_1C.threshold=22 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=5000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=250 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### GALILEO ACQUISITION CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 +Acquisition_1B.coherent_integration_time_ms=4 Acquisition_1B.acquire_pilot=true Acquisition_1B.use_CFAR_algorithm=false -;#threshold: Acquisition threshold Acquisition_1B.threshold=22 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=5000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 Acquisition_1B.bit_transition_flag=true -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=../data/acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=40.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] -Tracking_1C.dump=true -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. +Tracking_1C.dump=false Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### TRACKING GALILEO CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 Tracking_1B.track_pilot=true -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=7.5; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=0.5; -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_narrow_hz=2.5; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_narrow_hz=0.25; Tracking_1B.extend_correlation_symbols=4; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_narrow_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_narrow_chips=0.30; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] -Tracking_1B.dump=true -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. +Tracking_1B.dump=false Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### TELEMETRY DECODER GALILEO CONFIG ############ -;#implementation: Use [Galileo_E1B_Telemetry_Decoder] for Galileo E1B TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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; 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 -;#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 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 746dbdea9..2180d8ccb 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 @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -24,27 +26,20 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Flexiband_Signal_Source SignalSource.flag_read_file=true SignalSource.signal_file=/datalogger/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 -;# 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=1 ;#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 ;######### 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 ############ @@ -52,88 +47,34 @@ 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.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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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; -;#-205000 - -;# Decimation factor after the frequency tranaslating block InputFilter0.decimation_factor=8 ;######### RESAMPLER CONFIG 0 ############ -;## Resamples the input data. Resampler0.implementation=Pass_Through ;######### SIGNAL_CONDITIONER 1 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. SignalConditioner1.implementation=Pass_Through ;######### DATA_TYPE_ADAPTER 1 CONFIG ############ @@ -142,25 +83,15 @@ DataTypeAdapter1.item_type=gr_complex ;######### INPUT_FILTER 1 CONFIG ############ InputFilter1.implementation=Pass_Through - -;#dump: Dump the filtered data to a file. InputFilter1.dump=false - -;#dump_filename: Log path and filename. InputFilter1.dump_filename=../data/input_filter.dat - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter1.output_item_type=gr_complex ;######### 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 ############ @@ -169,28 +100,17 @@ 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. InputFilter2.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 ;# CHANNEL CONNECTION @@ -204,77 +124,46 @@ Channel6.RF_channel_ID=0 Channel7.RF_channel_ID=0 ;#signal: -;#if the option is disabled by default is assigned "1C" GPS L1 C/A Channel.signal=1C -;######### SPECIFIC CHANNELS CONFIG ###### -;#The following options are specific to each channel and overwrite the generic options - ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.use_CFAR_algorithm=false; -;#threshold: Acquisition threshold. It will be ignored if pfa is defined. Acquisition_1C.threshold=15 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.0001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=250 -;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take -;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] -;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) Acquisition_1C.bit_transition_flag=false -;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true Acquisition_1C.max_dwells=1 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 Tracking_1C.extend_correlation_ms=10 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=40.0; Tracking_1C.pll_bw_narrow_hz=35; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=2.0; Tracking_1C.dll_bw_narrow_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] Tracking_1C.early_late_space_chips=0.5; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=true -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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 @@ -283,22 +172,13 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 -;#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=true 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 -;#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 - 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 dc80ecfd0..e53db62e7 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 @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -25,31 +27,18 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Flexiband_Signal_Source - -;#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-1a.bit - -;#RF_channels: Number of RF channels present in the frontend device, must agree the FPGA firmware file SignalSource.RF_channels=1 - ;#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 ;######### 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 ############ @@ -57,87 +46,34 @@ 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.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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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=-205000 - -;# Decimation factor after the frequency tranaslating block InputFilter0.decimation_factor=8 ;######### RESAMPLER CONFIG 0 ############ -;## Resamples the input data. Resampler0.implementation=Pass_Through ;######### SIGNAL_CONDITIONER 1 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. SignalConditioner1.implementation=Pass_Through ;######### DATA_TYPE_ADAPTER 1 CONFIG ############ @@ -146,25 +82,15 @@ DataTypeAdapter1.item_type=gr_complex ;######### INPUT_FILTER 1 CONFIG ############ InputFilter1.implementation=Pass_Through - -;#dump: Dump the filtered data to a file. InputFilter1.dump=false - -;#dump_filename: Log path and filename. InputFilter1.dump_filename=../data/input_filter.dat - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter1.output_item_type=gr_complex ;######### 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 ############ @@ -173,37 +99,19 @@ 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. InputFilter2.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 -;#signal: -;# "1C" GPS L1 C/A -;# "1B" GALILEO E1 B (I/NAV OS/CS/SoL) -;# "1G" GLONASS L1 C/A -;# "2S" GPS L2 L2C (M) -;# "5X" GALILEO E5a I+Q -;# "L5" GPS L5 ;# CHANNEL CONNECTION Channel0.RF_channel_ID=0 @@ -227,69 +135,39 @@ Channel6.signal=1C Channel7.signal=1C -;######### SPECIFIC CHANNELS CONFIG ###### -;#The following options are specific to each channel and overwrite the generic options - - ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1C.coherent_integration_time_ms=1 -;#threshold: Acquisition threshold. It will be ignored if pfa is defined. Acquisition_1C.threshold=0.012 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.0001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=250 -;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take -;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] -;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) Acquisition_1C.bit_transition_flag=false -;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true Acquisition_1C.max_dwells=1 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=40.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=3.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] Tracking_1C.early_late_space_chips=0.5; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=./tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ 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 @@ -298,21 +176,13 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 -;#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=true 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 -;#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 \ No newline at end of file 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 9a184f66d..aa0e26be4 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 @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -25,13 +27,9 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Flexiband_Signal_Source -;#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=1 ;#frontend channels gain. Not usable yet! SignalSource.gain1=0 @@ -39,11 +37,9 @@ 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 ;######### 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 ############ @@ -51,87 +47,33 @@ 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.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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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=-205000 - -;# Decimation factor after the frequency tranaslating block InputFilter0.decimation_factor=8 ;######### RESAMPLER CONFIG 0 ############ -;## Resamples the input data. Resampler0.implementation=Pass_Through ;######### SIGNAL_CONDITIONER 1 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. SignalConditioner1.implementation=Pass_Through ;######### DATA_TYPE_ADAPTER 1 CONFIG ############ @@ -140,25 +82,15 @@ DataTypeAdapter1.item_type=gr_complex ;######### INPUT_FILTER 1 CONFIG ############ InputFilter1.implementation=Pass_Through - -;#dump: Dump the filtered data to a file. InputFilter1.dump=false - -;#dump_filename: Log path and filename. InputFilter1.dump_filename=../data/input_filter.dat - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter1.output_item_type=gr_complex ;######### 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 ############ @@ -167,36 +99,18 @@ 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. InputFilter2.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 -;#signal: -;# "1C" GPS L1 C/A -;# "1B" GALILEO E1 B (I/NAV OS/CS/SoL) -;# "1G" GLONASS L1 C/A -;# "2S" GPS L2 L2C (M) -;# "5X" GALILEO E5a I+Q -;# "L5" GPS L5 ;# CHANNEL CONNECTION Channel0.RF_channel_ID=0 @@ -222,63 +136,37 @@ Channel7.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1C.coherent_integration_time_ms=1 -;#threshold: Acquisition threshold. It will be ignored if pfa is defined. Acquisition_1C.threshold=0.012 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.0001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=250 -;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take -;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] -;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) Acquisition_1C.bit_transition_flag=false -;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true Acquisition_1C.max_dwells=1 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=40.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=3.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] Tracking_1C.early_late_space_chips=0.5; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=./tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ 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 @@ -287,21 +175,13 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 -;#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=true 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 -;#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 \ No newline at end of file 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 34c4e3142..7a7627cef 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 @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -25,25 +27,18 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Flexiband_Signal_Source -;#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_II-3b.bit -;#RF_channels: Number of RF channels present in the frontend device, must agree the FPGA firmware file SignalSource.RF_channels=1 ;#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 ;######### 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 ############ @@ -51,85 +46,34 @@ 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.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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter0.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. 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 InputFilter0.sampling_frequency=40000000 -;# IF deviation due to front-end LO inaccuracies [HZ] InputFilter0.IF=-205000 - -;# Decimation factor after the frequency tranaslating block InputFilter0.decimation_factor=16 ;######### RESAMPLER CONFIG 0 ############ -;## Resamples the input data. Resampler0.implementation=Pass_Through ;######### SIGNAL_CONDITIONER 1 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. SignalConditioner1.implementation=Pass_Through ;######### DATA_TYPE_ADAPTER 1 CONFIG ############ @@ -138,25 +82,15 @@ DataTypeAdapter1.item_type=gr_complex ;######### INPUT_FILTER 1 CONFIG ############ InputFilter1.implementation=Pass_Through - -;#dump: Dump the filtered data to a file. InputFilter1.dump=false - -;#dump_filename: Log path and filename. InputFilter1.dump_filename=../data/input_filter.dat - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter1.output_item_type=gr_complex ;######### 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 ############ @@ -165,28 +99,17 @@ 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. InputFilter2.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 ;#signal: @@ -208,7 +131,6 @@ Channel6.RF_channel_ID=0 Channel7.RF_channel_ID=0 ;#signal: -;#if the option is disabled by default is assigned "1C" GPS L1 C/A Channel0.signal=1C Channel1.signal=1C Channel2.signal=1C @@ -219,91 +141,54 @@ Channel6.signal=1C Channel7.signal=1C - ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1C.coherent_integration_time_ms=1 -;#threshold: Acquisition threshold. It will be ignored if pfa is defined. Acquisition_1C.threshold=0.012 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.0001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=250 -;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take -;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] -;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) Acquisition_1C.bit_transition_flag=false -;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true Acquisition_1C.max_dwells=1 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=40.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=3.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] Tracking_1C.early_late_space_chips=0.5; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=./tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 -;#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=true 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 -;#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 \ No newline at end of file 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 2bba3f755..3dd9d76cd 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 @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -25,25 +27,18 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Flexiband_Signal_Source -;#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_I-1b.bit -;#RF_channels: Number of RF channels present in the frontend device, must agree the FPGA firmware file SignalSource.RF_channels=1 ;#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 ;######### 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 ############ @@ -51,87 +46,34 @@ 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.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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter0.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. InputFilter0.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time InputFilter0.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. InputFilter0.number_of_bands=2 - -;#bands: frequency at the band edges [ b1 e1 b2 e2 b3 e3 ...]. -;#Frequency is in the range [0, 1], with 1 being the Nyquist frequency (Fs/2) -;#The number of band_begin and band_end elements must match the number of bands - InputFilter0.band1_begin=0.0 InputFilter0.band1_end=0.45 InputFilter0.band2_begin=0.55 InputFilter0.band2_end=1.0 - -;#ampl: desired amplitude at the band edges [ a(b1) a(e1) a(b2) a(e2) ...]. -;#The number of ampl_begin and ampl_end elements must match the number of bands - InputFilter0.ampl1_begin=1.0 InputFilter0.ampl1_end=1.0 InputFilter0.ampl2_begin=0.0 InputFilter0.ampl2_end=0.0 - -;#band_error: weighting applied to each band (usually 1). -;#The number of band_error elements must match the number of bands InputFilter0.band1_error=1.0 InputFilter0.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" InputFilter0.filter_type=bandpass - -;#grid_density: determines how accurately the filter will be constructed. -;The minimum value is 16; higher values are slower to compute the filter. InputFilter0.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter0.IF is the intermediate frequency (in Hz) shifted down to zero Hz -;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE -; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/ InputFilter0.sampling_frequency=40000000 -;# IF deviation due to front-end LO inaccuracies [HZ] InputFilter0.IF=-205000 - -;# Decimation factor after the frequency tranaslating block InputFilter0.decimation_factor=8 ;######### RESAMPLER CONFIG 0 ############ -;## Resamples the input data. Resampler0.implementation=Pass_Through ;######### SIGNAL_CONDITIONER 1 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. SignalConditioner1.implementation=Pass_Through ;######### DATA_TYPE_ADAPTER 1 CONFIG ############ @@ -140,25 +82,15 @@ DataTypeAdapter1.item_type=gr_complex ;######### INPUT_FILTER 1 CONFIG ############ InputFilter1.implementation=Pass_Through - -;#dump: Dump the filtered data to a file. InputFilter1.dump=false - -;#dump_filename: Log path and filename. InputFilter1.dump_filename=../data/input_filter.dat - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter1.output_item_type=gr_complex ;######### 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 ############ @@ -167,38 +99,19 @@ 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. InputFilter2.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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=4 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 -;#signal: -;# "1C" GPS L1 C/A -;# "1B" GALILEO E1 B (I/NAV OS/CS/SoL) -;# "1G" GLONASS L1 C/A -;# "2S" GPS L2 L2C (M) -;# "5X" GALILEO E5a I+Q -;# "L5" GPS L5 - ;# CHANNEL CONNECTION Channel0.RF_channel_ID=0 Channel1.RF_channel_ID=0 @@ -210,7 +123,6 @@ Channel3.RF_channel_ID=0 ;Channel7.RF_channel_ID=0 ;#signal: -;#if the option is disabled by default is assigned "1C" GPS L1 C/A Channel0.signal=1C Channel1.signal=1C Channel2.signal=1C @@ -219,63 +131,37 @@ Channel3.signal=1C ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1C.coherent_integration_time_ms=1 -;#threshold: Acquisition threshold. It will be ignored if pfa is defined. Acquisition_1C.threshold=0.011 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.0001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=250 -;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take -;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] -;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) Acquisition_1C.bit_transition_flag=false -;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true Acquisition_1C.max_dwells=1 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=40.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=3.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] Tracking_1C.early_late_space_chips=0.5; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=./tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ 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 @@ -284,20 +170,13 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 -;#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=true 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 PVT.dump_filename=./PVT diff --git a/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf index 48c73a036..1513e6c8b 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -25,21 +27,15 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Flexiband_Signal_Source -;#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 ;###################################################### @@ -47,7 +43,6 @@ SignalSource.usb_packet_buffer=128 ;###################################################### ;######### 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 ############ @@ -55,85 +50,31 @@ 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.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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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] -;# WARNING: Fraunhofer front-end hardwareconfigurations can difer. Signals available on http://www.iis.fraunhofer.de/de/ff/lok/leist/test/flexiband.html are centered on 0 Hz, ALL BANDS. InputFilter0.IF=-205000 -;#InputFilter0.IF=0 - -;# Decimation factor after the frequency tranaslating block InputFilter0.decimation_factor=8 ;######### RESAMPLER CONFIG 0 ############ -;## Resamples the input data. Resampler0.implementation=Pass_Through ;###################################################### @@ -141,7 +82,6 @@ Resampler0.implementation=Pass_Through ;###################################################### ;######### 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 ############ @@ -149,90 +89,35 @@ 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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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] -;# WARNING: Fraunhofer front-end hardwareconfigurations can difer. Signals available on http://www.iis.fraunhofer.de/de/ff/lok/leist/test/flexiband.html are centered on 0 Hz, ALL BANDS. InputFilter1.IF=100000 -;#InputFilter1.IF=0 - -;# Decimation factor after the frequency tranaslating block InputFilter1.decimation_factor=8 ;######### 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 ############ @@ -241,30 +126,17 @@ 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. InputFilter2.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 -;#count: Number of available Galileo satellite channels. -;Channels_Galileo.count=0 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 ;#signal: @@ -351,40 +223,23 @@ Channel15.RF_channel_ID=1 Channel15.signal=2S -;######### SPECIFIC CHANNELS CONFIG ###### -;#The following options are specific to each channel and overwrite the generic options ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1C.coherent_integration_time_ms=1 -;#threshold: Acquisition threshold. It will be ignored if pfa is defined. Acquisition_1C.threshold=0.008 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.0001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=5000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=250 -;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take -;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] -;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) Acquisition_1C.bit_transition_flag=false -;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true Acquisition_1C.max_dwells=1 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking Tracking_1C.item_type=gr_complex -Tracking_1C.if=0 Tracking_1C.pll_bw_hz=40.0; Tracking_1C.dll_bw_hz=3.0; Tracking_1C.order=3; @@ -396,7 +251,6 @@ Tracking_1C.dump_filename=./tracking_ch_ ;# GPS L2C M Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition Acquisition_2S.item_type=gr_complex -Acquisition_2S.if=0 Acquisition_2S.threshold=0.0005 ;Acquisition_2S.pfa=0.001 Acquisition_2S.doppler_max=5000 @@ -408,7 +262,6 @@ Acquisition_2S.dump_filename=./acq_dump.dat Tracking_2S.implementation=GPS_L2_M_DLL_PLL_Tracking Tracking_2S.item_type=gr_complex -Tracking_2S.if=0 Tracking_2S.pll_bw_hz=1.5; Tracking_2S.dll_bw_hz=0.3; Tracking_2S.order=3; @@ -418,22 +271,18 @@ Tracking_2S.dump_filename=./tracking_ch_ ;######### TELEMETRY DECODER GPS L1 CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### TELEMETRY DECODER GPS L2 CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L2 M TelemetryDecoder_2S.implementation=GPS_L2C_Telemetry_Decoder TelemetryDecoder_2S.dump=false ;######### OBSERVABLES CONFIG ############ 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 @@ -442,25 +291,14 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 -;#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 -;#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 diff --git a/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf index 44be57a15..349b2f2b3 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -25,30 +27,17 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Flexiband_Signal_Source - SignalSource.flag_read_file=true SignalSource.signal_file=/datalogger/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 - -;# 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 ;###################################################### @@ -56,7 +45,6 @@ SignalSource.usb_packet_buffer=128 ;###################################################### ;######### 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 ############ @@ -64,85 +52,31 @@ 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.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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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] -;# WARNING: Fraunhofer front-end hardwareconfigurations can difer. Signals available on http://www.iis.fraunhofer.de/de/ff/lok/leist/test/flexiband.html are centered on 0 Hz, ALL BANDS. -;#InputFilter0.IF=-205000 InputFilter0.IF=0 - -;# Decimation factor after the frequency tranaslating block InputFilter0.decimation_factor=8 ;######### RESAMPLER CONFIG 0 ############ -;## Resamples the input data. Resampler0.implementation=Pass_Through ;###################################################### @@ -150,7 +84,6 @@ Resampler0.implementation=Pass_Through ;###################################################### ;######### 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 ############ @@ -158,90 +91,35 @@ 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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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] -;# WARNING: Fraunhofer front-end hardware configurations can differ. Signals available at http://www.iis.fraunhofer.de/de/ff/lok/leist/test/flexiband.html are centered on 0 Hz, ALL BANDS. -;#InputFilter1.IF=100000 InputFilter1.IF=0 - -;# Decimation factor after the frequency translating block InputFilter1.decimation_factor=8 ;######### 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 ############ @@ -250,30 +128,19 @@ 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. InputFilter2.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 GLOBAL CONFIG ############. Channels_1C.count=2 Channels_1B.count=4 Channels_2S.count=4 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 ;#signal: @@ -304,33 +171,17 @@ Channel14.RF_channel_ID=1 Channel15.RF_channel_ID=1 -;######### SPECIFIC CHANNELS CONFIG ###### -;#The following options are specific to each channel and overwrite the generic options ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples.. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1C.coherent_integration_time_ms=1 -;#threshold: Acquisition threshold. It will be ignored if pfa is defined. Acquisition_1C.threshold=0.008 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.0001 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=5000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=250 -;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take -;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] -;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) Acquisition_1C.bit_transition_flag=false -;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true Acquisition_1C.max_dwells=1 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat @@ -371,70 +222,44 @@ Tracking_2S.dump_filename=../data/epl_tracking_ch_ ;# GALILEO E1B Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 -;#threshold: Acquisition threshold +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=0 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] Acquisition_1B.pfa=0.0000005 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=5000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=15.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1B.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1B.dump_filename=./veml_tracking_ch_ ;######### TELEMETRY DECODER GPS L1 CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### TELEMETRY DECODER GPS L2 CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L2 M TelemetryDecoder_2S.implementation=GPS_L2C_Telemetry_Decoder TelemetryDecoder_2S.dump=false ;######### TELEMETRY DECODER GALILEO E1B CONFIG ############ -;#implementation: Use [Galileo_E1B_Telemetry_Decoder] for Galileo E1B TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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 @@ -443,22 +268,14 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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=100 -;# KML, GeoJSON, NMEA and RTCM output configuration -;#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 -;#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 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 c5f32b456..c2216e648 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -27,235 +29,59 @@ GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ ;#implementation SignalSource.implementation=UHD_Signal_Source -;#When left empty, the device discovery routines will search all vailable transports on the system (ethernet, usb...) SignalSource.device_address=192.168.40.2 ; <- PUT THE IP ADDRESS OF YOUR USRP HERE -;#item_type: Type and resolution for each of the signal samples. SignalSource.item_type=gr_complex -;#RF_channels: Number of RF channels present in the frontend device (i.e. USRP with two frontends) SignalSource.RF_channels=2 -;#sampling_frequency: Original Signal sampling frequency in [Hz] SignalSource.sampling_frequency=4000000 -;#subdevice: UHD subdevice specification (for USRP dual frontend use A:0 or B:0 or A:0 B:0) SignalSource.subdevice=A:0 B:0 ;######### RF Channels specific settings ###### - ;## RF CHANNEL 0 ## -;#freq: RF front-end center frequency in [Hz] SignalSource.freq0=1575420000 - -;#gain: Front-end Gain in [dB] SignalSource.gain0=50 - -;#samples: Number of samples to be processed. Notice that 0 indicates no limit SignalSource.samples0=0 - ;## RF CHANNEL 1 ## -;#freq: RF front-end center frequency in [Hz] SignalSource.freq1=1575420000 - -;#gain: Front-end Gain in [dB] SignalSource.gain1=50 - -;#samples: Number of samples to be processed. Notice that 0 indicates no limit SignalSource.samples1=0 ;######### SIGNAL_CONDITIONER 0 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner0.implementation=Pass_Through ;######### DATA_TYPE_ADAPTER 0 CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block 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] -;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation -;# that shifts IF down to zero Hz. - InputFilter0.implementation=Pass_Through - -;#dump: Dump the filtered data to a file. InputFilter0.dump=false - -;#dump_filename: Log path and filename. InputFilter0.dump_filename=../data/input_filter.dat - -;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. -;#These options are based on parameters of gnuradio's function: gr_remez. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 - -;# Original sampling frequency stored in the signal file -InputFilter0.sampling_frequency=20480000 - -;#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 - -InputFilter0.IF=5499998.47412109 - -;# Decimation factor after the frequency tranaslating block -InputFilter0.decimation_factor=8 - ;######### RESAMPLER CONFIG 0 ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation Resampler0.implementation=Pass_Through -;######### SIGNAL_CONDITIONER 1 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks +;######### SIGNAL_CONDITIONER 1 CONFIG ############ SignalConditioner1.implementation=Pass_Through + ;######### INPUT_FILTER 1 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] -;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation -;# that shifts IF down to zero Hz. - InputFilter1.implementation=Pass_Through - -;#dump: Dump the filtered data to a file. InputFilter1.dump=false - -;#dump_filename: Log path and filename. InputFilter1.dump_filename=../data/input_filter.dat - -;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. -;#These options are based on parameters of gnuradio's function: gr_remez. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 - -;# Original sampling frequency stored in the signal file -InputFilter1.sampling_frequency=20480000 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter1.IF is the intermediate frequency (in Hz) shifted down to zero Hz - -InputFilter1.IF=5499998.47412109 - -;# Decimation factor after the frequency tranaslating block -InputFilter1.decimation_factor=8 - - ;######### RESAMPLER CONFIG 1 ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation Resampler1.implementation=Pass_Through ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=4 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 ;#signal: @@ -274,75 +100,45 @@ Channel3.RF_channel_ID=1 ;#signal: -;#if the option is disabled by default is assigned "1C" GPS L1 C/A Channel0.signal=1C Channel1.signal=1C Channel2.signal=1C Channel3.signal=1C -;######### SPECIFIC CHANNELS CONFIG ###### -;#The following options are specific to each channel and overwrite the generic options - ;######### ACQUISITION GLOBAL CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] Acquisition_1C.coherent_integration_time_ms=1 -;#threshold: Acquisition threshold. It will be ignored if pfa is defined. Acquisition_1C.threshold=0.01 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.01 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=8000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=500 -;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take -;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] -;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) Acquisition_1C.bit_transition_flag=false -;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true Acquisition_1C.max_dwells=1 Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### TRACKING GLOBAL CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=40.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=4.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] Tracking_1C.early_late_space_chips=0.5; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=./tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### OBSERVABLES CONFIG ############ 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 @@ -351,21 +147,13 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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 -;#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=true 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 -;#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 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 2f601ba41..9c899e6ca 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 @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -25,23 +27,17 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Flexiband_Signal_Source SignalSource.flag_read_file=true 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 -;# 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=1 ;#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 ;###################################################### @@ -49,7 +45,6 @@ SignalSource.usb_packet_buffer=128 ;###################################################### ;######### 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 ############ @@ -57,80 +52,31 @@ 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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 InputFilter0.sampling_frequency=20000000 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 ;###################################################### @@ -138,7 +84,6 @@ Resampler0.implementation=Pass_Through ;###################################################### ;######### 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 ############ @@ -146,81 +91,32 @@ 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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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. 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 @@ -229,7 +125,6 @@ Resampler1.implementation=Pass_Through ;###################################################### ;######### SIGNAL_CONDITIONER 2 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. SignalConditioner2.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER 2 CONFIG ############ @@ -237,84 +132,41 @@ DataTypeAdapter2.implementation=Pass_Through DataTypeAdapter2.item_type=gr_complex ;######### INPUT_FILTER 2 CONFIG ############ -;## Filter the input data. Can be combined with frequency translation for IF signals - InputFilter2.implementation=Freq_Xlating_Fir_Filter - -;#dump: Dump the filtered data to a file. InputFilter2.dump=false - -;#dump_filename: Log path and filename. InputFilter2.dump_filename=../data/input_filter_ch2.dat - -;#input_item_type: Type and resolution for input signal samples. InputFilter2.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples.. InputFilter2.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. InputFilter2.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time InputFilter2.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. InputFilter2.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 - InputFilter2.band1_begin=0.0 InputFilter2.band1_end=0.45 InputFilter2.band2_begin=0.55 InputFilter2.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 - InputFilter2.ampl1_begin=1.0 InputFilter2.ampl1_end=1.0 InputFilter2.ampl2_begin=0.0 InputFilter2.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 InputFilter2.band1_error=1.0 InputFilter2.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" InputFilter2.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. InputFilter2.grid_density=16 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. InputFilter2.sampling_frequency=40000000 -;# IF deviation due to front-end LO inaccuracies [HZ] InputFilter2.IF=0 - -;# Decimation factor after the frequency tranaslating block InputFilter2.decimation_factor=8 ;######### RESAMPLER CONFIG 1 ############ -;## Resamples the input data. Resampler2.implementation=Pass_Through ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=0 Channels_1B.count=10 Channels_2S.count=0 Channels_5X.count=0 -;#GPS.prns=7,8 - -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 ;#signal: @@ -369,13 +221,11 @@ Channel37.RF_channel_ID=2 Channel38.RF_channel_ID=2 Channel39.RF_channel_ID=2 -;######### ACQUISITION GENERIC CONFIG ###### -;#The following options are specific to each channel and overwrite the generic options +;######### ACQUISITION CONFIG ###### ;# GPS L1 CA Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.005 Acquisition_1C.doppler_max=5000 @@ -387,30 +237,19 @@ Acquisition_1C.dump_filename=./acq_dump.dat ;# Galileo E1 Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 -;#threshold: Acquisition threshold +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=0 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] Acquisition_1B.pfa=0.0000002 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=5000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat ;# GPS L2C M Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition Acquisition_2S.item_type=gr_complex -Acquisition_2S.if=0 Acquisition_2S.threshold=0.00074 ;Acquisition_2S.pfa=0.001 Acquisition_2S.doppler_max=5000 @@ -424,7 +263,6 @@ Acquisition_2S.dump_filename=./acq_dump.dat ;# GALILEO E5a Acquisition_5X.implementation=Galileo_E5a_Noncoherent_IQ_Acquisition_CAF Acquisition_5X.item_type=gr_complex -Acquisition_5X.if=0 Acquisition_5X.coherent_integration_time_ms=1 Acquisition_5X.threshold=0.009 Acquisition_5X.doppler_max=5000 @@ -441,7 +279,6 @@ Acquisition_5X.dump_filename=./acq_dump.dat ;######### 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.pll_bw_hz=40.0; Tracking_1C.dll_bw_hz=3.0; Tracking_1C.order=3; @@ -452,30 +289,19 @@ Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### GALILEO E1 TRK CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=15.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1B.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;######### 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.pll_bw_hz=2.0; Tracking_2S.dll_bw_hz=0.25; Tracking_2S.order=2; @@ -487,7 +313,6 @@ Tracking_2S.dump_filename=./tracking_ch_ ;######### GALILEO E5 TRK CONFIG ############ Tracking_5X.implementation=Galileo_E5a_DLL_PLL_Tracking Tracking_5X.item_type=gr_complex -Tracking_5X.if=0 Tracking_5X.pll_bw_hz_init=20.0; **Only for E5a** PLL loop filter bandwidth during initialization [Hz] Tracking_5X.dll_bw_hz_init=20.0; **Only for E5a** DLL loop filter bandwidth during initialization [Hz] Tracking_5X.ti_ms=1; **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms] @@ -515,9 +340,7 @@ TelemetryDecoder_5X.dump=false ;######### OBSERVABLES CONFIG ############ 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 @@ -526,21 +349,13 @@ PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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=100 -;# KML, GeoJSON, NMEA and RTCM output configuration -;#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 -;#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 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 index 669f734c3..ab8bbaed6 100644 --- 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 @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -25,23 +27,17 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation 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 ;###################################################### @@ -49,7 +45,6 @@ SignalSource.usb_packet_buffer=128 ;###################################################### ;######### 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 ############ @@ -57,83 +52,30 @@ 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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 ;###################################################### @@ -141,7 +83,6 @@ Resampler0.implementation=Pass_Through ;###################################################### ;######### 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 ############ @@ -149,88 +90,35 @@ 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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 ############ @@ -239,32 +127,21 @@ 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. InputFilter2.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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=10 Channels_2S.count=4 ;#GPS.prns=7,8 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 ;#signal: @@ -301,7 +178,6 @@ Channel19.RF_channel_ID=1 Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.005 Acquisition_1C.doppler_max=5000 @@ -315,7 +191,6 @@ Acquisition_1C.dump_filename=./acq_dump.dat ;# GPS L2C M Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition Acquisition_2S.item_type=gr_complex -Acquisition_2S.if=0 Acquisition_2S.threshold=0.00074 ;Acquisition_2S.pfa=0.001 Acquisition_2S.doppler_max=5000 @@ -330,7 +205,6 @@ Acquisition_2S.dump_filename=./acq_dump.dat ;######### 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.pll_bw_hz=40.0; Tracking_1C.dll_bw_hz=3.0; Tracking_1C.order=3; @@ -342,7 +216,6 @@ Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### 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.pll_bw_hz=2.0; Tracking_2S.dll_bw_hz=0.25; Tracking_2S.order=2; @@ -362,29 +235,22 @@ TelemetryDecoder_2S.dump=false ;######### OBSERVABLES CONFIG ############ Observables.implementation=Hybrid_Observables -;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=true -;#dump_filename: Log path and filename. Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ PVT.implementation=RTKLIB_PVT -;#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.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic +PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX +PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad 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=100 -;# KML, GeoJSON, NMEA and RTCM output configuration -;#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 -;#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 \ No newline at end of file diff --git a/conf/gnss-sdr_multichannel_all_in_one_Flexiband_bin_file_III_1b.conf b/conf/gnss-sdr_multichannel_all_in_one_Flexiband_bin_file_III_1b.conf index dece9c9e4..26fa98a81 100644 --- a/conf/gnss-sdr_multichannel_all_in_one_Flexiband_bin_file_III_1b.conf +++ b/conf/gnss-sdr_multichannel_all_in_one_Flexiband_bin_file_III_1b.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -25,23 +27,17 @@ GNSS-SDR.SUPL_LAC=0x59e2 GNSS-SDR.SUPL_CI=0x31b0 ;######### SIGNAL_SOURCE CONFIG ############ -;#implementation SignalSource.implementation=Flexiband_Signal_Source SignalSource.flag_read_file=true -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.signal_file=/media/javier/SISTEMA/signals/fraunhofer/L125_III1b_210s.usb ; <- PUT YOUR FILE HERE 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=3 ;#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 ;###################################################### @@ -49,7 +45,6 @@ SignalSource.usb_packet_buffer=128 ;###################################################### ;######### 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 ############ @@ -57,177 +52,69 @@ 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 impulse reaponse given a set of band edges, -;#the desired reaponse on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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=-205000 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. - +;######### INPUT_FILTER 1 CONFIG ############ 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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter1.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. 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 @@ -236,7 +123,6 @@ Resampler1.implementation=Pass_Through ;###################################################### ;######### SIGNAL_CONDITIONER 2 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. SignalConditioner2.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER 2 CONFIG ############ @@ -244,96 +130,43 @@ DataTypeAdapter2.implementation=Pass_Through DataTypeAdapter2.item_type=gr_complex ;######### INPUT_FILTER 2 CONFIG ############ -;## Filter the input data. Can be combined with frequency translation for IF signals - InputFilter2.implementation=Freq_Xlating_Fir_Filter - -;#dump: Dump the filtered data to a file. InputFilter2.dump=false - -;#dump_filename: Log path and filename. InputFilter2.dump_filename=../data/input_filter_ch2.dat - -;#input_item_type: Type and resolution for input signal samples. InputFilter2.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. InputFilter2.output_item_type=gr_complex - -;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version. InputFilter2.taps_item_type=float - -;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time InputFilter2.number_of_taps=5 - -;#number_of _bands: Number of frequency bands in the filter. InputFilter2.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 - InputFilter2.band1_begin=0.0 InputFilter2.band1_end=0.45 InputFilter2.band2_begin=0.55 InputFilter2.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 - InputFilter2.ampl1_begin=1.0 InputFilter2.ampl1_end=1.0 InputFilter2.ampl2_begin=0.0 InputFilter2.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 InputFilter2.band1_error=1.0 InputFilter2.band2_error=1.0 - -;#filter_type: one of "bandpass", "hilbert" or "differentiator" InputFilter2.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. InputFilter2.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/ -InputFilter2.sampling_frequency=40000000 -;# IF deviation due to front-end LO inaccuracies [HZ] InputFilter2.IF=0 - -;# Decimation factor after the frequency tranaslating block InputFilter2.decimation_factor=8 -;######### RESAMPLER CONFIG 1 ############ -;## Resamples the input data. +;######### RESAMPLER CONFIG 2 ############ Resampler2.implementation=Pass_Through ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=10 Channels_1B.count=10 Channels_2S.count=10 -Channels_5X.count=10 +Channels_5X.count=2 +Channels_L5.count=2 ;#GPS.prns=7,8 - -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver -Channels.in_acquisition=1 - -;#signal: -;# "1C" GPS L1 C/A -;# "1B" GALILEO E1 B (I/NAV OS/CS/SoL) -;# "1G" GLONASS L1 C/A -;# "2S" GPS L2 L2C (M) -;# "5X" GALILEO E5a I+Q -;# "L5" GPS L5 +;Channels.in_acquisition=2 ;# CHANNEL CONNECTION @@ -377,14 +210,16 @@ Channel36.RF_channel_ID=2 Channel37.RF_channel_ID=2 Channel38.RF_channel_ID=2 Channel39.RF_channel_ID=2 +Channel40.RF_channel_ID=2 +Channel41.RF_channel_ID=2 +Channel42.RF_channel_ID=2 + +;Channel20.satellite=7 -;######### ACQUISITION GENERIC CONFIG ###### -;#The following options are specific to each channel and overwrite the generic options ;# GPS L1 CA Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition Acquisition_1C.item_type=gr_complex -Acquisition_1C.if=0 Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.005 Acquisition_1C.doppler_max=5000 @@ -397,30 +232,18 @@ Acquisition_1C.dump_filename=./acq_dump.dat ;# Galileo E1 Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 -;#threshold: Acquisition threshold +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=0 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] Acquisition_1B.pfa=0.0000002 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=5000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] -Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat ;# GPS L2C M Acquisition_2S.implementation=GPS_L2_M_PCPS_Acquisition Acquisition_2S.item_type=gr_complex -Acquisition_2S.if=0 Acquisition_2S.threshold=0.00074 ;Acquisition_2S.pfa=0.001 Acquisition_2S.doppler_max=5000 @@ -434,7 +257,6 @@ Acquisition_2S.dump_filename=./acq_dump.dat ;# GALILEO E5a Acquisition_5X.implementation=Galileo_E5a_Noncoherent_IQ_Acquisition_CAF Acquisition_5X.item_type=gr_complex -Acquisition_5X.if=0 Acquisition_5X.coherent_integration_time_ms=1 Acquisition_5X.threshold=0.009 Acquisition_5X.doppler_max=5000 @@ -447,11 +269,23 @@ Acquisition_5X.dump=false Acquisition_5X.dump_filename=./acq_dump.dat +;# GPS L5 +Acquisition_L5.implementation=GPS_L5i_PCPS_Acquisition +Acquisition_L5.item_type=gr_complex +Acquisition_L5.threshold=0.00074 +;Acquisition_L5.pfa=0.001 +Acquisition_L5.doppler_max=5000 +Acquisition_L5.doppler_min=-5000 +Acquisition_L5.doppler_step=125 +Acquisition_L5.max_dwells=1 +Acquisition_L5.dump=false +Acquisition_L5.dump_filename=./acq_dump.dat + + + ;######### 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.pll_bw_hz=35.0; Tracking_1C.dll_bw_hz=2.0; Tracking_1C.order=3; @@ -461,30 +295,19 @@ Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### GALILEO E1 TRK CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=15.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1B.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;######### 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.pll_bw_hz=2.0; Tracking_2S.dll_bw_hz=0.25; Tracking_2S.order=2; @@ -492,21 +315,32 @@ Tracking_2S.early_late_space_chips=0.5; Tracking_2S.dump=false Tracking_2S.dump_filename=./tracking_ch_ - ;######### GALILEO E5 TRK CONFIG ############ Tracking_5X.implementation=Galileo_E5a_DLL_PLL_Tracking Tracking_5X.item_type=gr_complex -Tracking_5X.if=0 -Tracking_5X.pll_bw_hz_init=20.0; **Only for E5a** PLL loop filter bandwidth during initialization [Hz] -Tracking_5X.dll_bw_hz_init=20.0; **Only for E5a** DLL loop filter bandwidth during initialization [Hz] -Tracking_5X.ti_ms=1; **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms] -Tracking_5X.pll_bw_hz=20.0; -Tracking_5X.dll_bw_hz=20.0; +Tracking_5X.track_pilot=true +Tracking_5X.pll_bw_hz=15.0; +Tracking_5X.dll_bw_hz=2.0; +Tracking_5X.pll_bw_narrow_hz=5.0; +Tracking_5X.dll_bw_narrow_hz=1.0; Tracking_5X.order=2; Tracking_5X.early_late_space_chips=0.5; Tracking_5X.dump=false Tracking_5X.dump_filename=./tracking_ch_ +;######### GALILEO E5 TRK CONFIG ############ +Tracking_L5.implementation=GPS_L5_DLL_PLL_Tracking +Tracking_L5.item_type=gr_complex +Tracking_L5.track_pilot=true +Tracking_L5.pll_bw_hz=15.0; +Tracking_L5.dll_bw_hz=2.0; +Tracking_L5.pll_bw_narrow_hz=4.0; +Tracking_L5.dll_bw_narrow_hz=1.0; +Tracking_L5.order=2; +Tracking_L5.early_late_space_chips=0.5; +Tracking_L5.dump=false +Tracking_L5.dump_filename=./tracking_ch_ + ;######### TELEMETRY DECODER CONFIG ############ TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder @@ -521,37 +355,28 @@ TelemetryDecoder_2S.dump=false TelemetryDecoder_5X.implementation=Galileo_E5a_Telemetry_Decoder TelemetryDecoder_5X.dump=false +TelemetryDecoder_L5.implementation=GPS_L5_Telemetry_Decoder +TelemetryDecoder_L5.dump=false + ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT PVT.positioning_mode=PPP_Static ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad -;#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=10 -;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms. PVT.display_rate_ms=100 -;# KML, GeoJSON, NMEA and RTCM output configuration -;#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 -;#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 diff --git a/conf/gnss-sdr_multisource_Hybrid_ishort.conf b/conf/gnss-sdr_multisource_Hybrid_ishort.conf index 3aa7f840b..60f03431b 100644 --- a/conf/gnss-sdr_multisource_Hybrid_ishort.conf +++ b/conf/gnss-sdr_multisource_Hybrid_ishort.conf @@ -1,4 +1,6 @@ -; Default configuration file +; This is a GNSS-SDR configuration file +; The configuration API is described at http://gnss-sdr.org/docs/sp-blocks/ + ; You can define your own receiver and invoke it by doing ; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf ; @@ -11,260 +13,73 @@ GNSS-SDR.internal_fs_sps=4000000 Receiver.sources_count=2 -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false -;#repeat: Repeat the processing file. SignalSource.repeat=false ;######### SIGNAL_SOURCE 0 CONFIG ############ SignalSource0.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource0.filename=/datalogger/signals/CTTC/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE -;#item_type: Type and resolution for each of the signal samples. SignalSource0.item_type=ishort -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource0.sampling_frequency=4000000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource0.samples=0 ;######### SIGNAL_SOURCE 1 CONFIG ############ SignalSource1.implementation=File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource1.filename=/datalogger/signals/CTTC/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE -;#item_type: Type and resolution for each of the signal samples. SignalSource1.item_type=ishort -;#sampling_frequency: Original Signal sampling frequency in [Hz] SignalSource1.sampling_frequency=4000000 -;#freq: RF front-end center frequency in [Hz] SignalSource1.freq=1575420000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource1.samples=0 ;######### SIGNAL_CONDITIONER 0 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner0.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER 0 CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter0.implementation=Ishort_To_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=Pass_Through - -;#dump: Dump the filtered data to a file. InputFilter0.dump=false - -;#dump_filename: Log path and filename. InputFilter0.dump_filename=../data/input_filter.dat - -;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. -;#These options are based on parameters of GNU Radio's function: gr_remez. -;;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 - -InputFilter0.sampling_frequency=4000000 -InputFilter0.IF=0 ;######### RESAMPLER 1 CONFIG ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neighborhood interpolation - Resampler1.implementation=Pass_Through - -;#dump: Dump the resampled data to a file. Resampler1.dump=false -;#dump_filename: Log path and filename. Resampler1.dump_filename=../data/resampler.dat - -;#item_type: Type and resolution for each of the signal samples. Resampler1.item_type=gr_complex - -;#sample_freq_in: the sample frequency of the input signal Resampler1.sample_freq_in=4000000 - -;#sample_freq_out: the desired sample frequency of the output signal Resampler1.sample_freq_out=4000000 ;######### SIGNAL_CONDITIONER 1 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner1.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER 1 CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter1.implementation=Ishort_To_Complex ;######### INPUT_FILTER 1 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=Pass_Through - -;#dump: Dump the filtered data to a file. InputFilter1.dump=false -;#dump_filename: Log path and filename. -InputFilter1.dump_filename=../data/input_filter.dat - -;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation. -;#These options are based on parameters of GNU Radio's function: gr_remez. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. -InputFilter1.input_item_type=gr_complex - -;#outut_item_type: Type and resolution for output filtered signal samples. -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. -;#InputFilter1.IF is the intermediate frequency (in Hz) shifted down to zero Hz - -InputFilter1.sampling_frequency=4000000 -InputFilter1.IF=0 ;######### RESAMPLER 1 CONFIG ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neighborhood interpolation - Resampler1.implementation=Pass_Through - -;#dump: Dump the resampled data to a file. Resampler1.dump=false -;#dump_filename: Log path and filename. -Resampler1.dump_filename=../data/resampler.dat - -;#item_type: Type and resolution for each of the signal samples. +Resampler1.dump_filename=../data/resampler.dat. Resampler1.item_type=gr_complex - -;#sample_freq_in: the sample frequency of the input signal Resampler1.sample_freq_in=4000000 - -;#sample_freq_out: the desired sample frequency of the output signal Resampler1.sample_freq_out=4000000 ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=2 -;#count: Number of available Galileo satellite channels. Channels_1B.count=2 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 @@ -280,120 +95,73 @@ Channel.signal=1B ;######### GPS ACQUISITION CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 -;#threshold: Acquisition threshold +Acquisition_1C.coherent_integration_time_ms=1 Acquisition_1C.threshold=0.0075 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.01 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=500 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### GALILEO ACQUISITION CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 -;#threshold: Acquisition threshold +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=0 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] Acquisition_1B.pfa=0.0000008 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=15000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=45.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=4.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### TRACKING GALILEO CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=15.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1B.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### TELEMETRY DECODER GALILEO CONFIG ############ -;#implementation: Use [Galileo_E1B_Telemetry_Decoder] for Galileo E1B TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ -;#implementation: 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: PVT.implementation=RTKLIB_PVT -;#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.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic 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; PVT.flag_rtcm_server=false PVT.flag_rtcm_tty_port=false PVT.rtcm_dump_devname=/dev/pts/1 -;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump. PVT.dump_filename=./PVT -;#dump: Enable or disable the PVT internal binary data file logging [true] or [false] PVT.dump=false diff --git a/conf/gnss-sdr_multisource_Hybrid_nsr.conf b/conf/gnss-sdr_multisource_Hybrid_nsr.conf index 5a543018e..8c035713e 100644 --- a/conf/gnss-sdr_multisource_Hybrid_nsr.conf +++ b/conf/gnss-sdr_multisource_Hybrid_nsr.conf @@ -14,250 +14,102 @@ GNSS-SDR.internal_fs_sps=2560000 ;GNSS-SDR.internal_fs_sps=4096000 ;GNSS-SDR.internal_fs_sps=5120000 -;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. -; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false -;#repeat: Repeat the processing file. SignalSource.repeat=false ;######### SIGNAL_SOURCE 0 CONFIG ############ -;#implementation SignalSource0.implementation=Nsr_File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource0.filename=/datalogger/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. SignalSource0.item_type=byte -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource0.sampling_frequency=20480000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource0.samples=0 ;######### SIGNAL_SOURCE 1 CONFIG ############ -;#implementation: Use [File_Signal_Source] [Nsr_File_Signal_Source] or [UHD_Signal_Source] or [GN3S_Signal_Source] (experimental) SignalSource1.implementation=Nsr_File_Signal_Source -;#filename: path to file with the captured GNSS signal samples to be processed SignalSource1.filename=/datalogger/signals/ifen/E1L1_FE0_Band0.stream -;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. SignalSource1.item_type=byte -;#sampling_frequency: Original Signal sampling frequency in samples per second SignalSource1.sampling_frequency=20480000 -;#samples: Number of samples to be processed. Notice that 0 indicates the entire file. SignalSource1.samples=0 ;######### SIGNAL_CONDITIONER 0 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner0.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER 0 CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter0.implementation=Pass_Through DataTypeAdapter0.item_type=float ;######### 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] -;#[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.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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter0.input_item_type=float - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 - -;# Original sampling frequency stored in the signal file InputFilter0.sampling_frequency=20480000 - -;#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 - InputFilter0.IF=5499998.47412109 - -;# Decimation factor after the frequency tranaslating block InputFilter0.decimation_factor=8 ;######### RESAMPLER CONFIG 0 ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation Resampler0.implementation=Pass_Through ;######### SIGNAL_CONDITIONER 1 CONFIG ############ -;## It holds blocks to change data type, filter and resample input data. - -;#implementation: Use [Pass_Through] or [Signal_Conditioner] -;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks -;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks SignalConditioner1.implementation=Signal_Conditioner ;######### DATA_TYPE_ADAPTER 1 CONFIG ############ -;## Changes the type of input data. -;#implementation: [Pass_Through] disables this block DataTypeAdapter1.implementation=Pass_Through DataTypeAdapter1.item_type=float ;######### INPUT_FILTER 1 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] -;#[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.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. -;#This function calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, -;#the desired response on those bands, and the weight given to the error in those bands. - -;#input_item_type: Type and resolution for input signal samples. InputFilter1.input_item_type=float - -;#outut_item_type: Type and resolution for output filtered signal samples. 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 - -;# Original sampling frequency stored in the signal file InputFilter1.sampling_frequency=20480000 - -;#The following options are used only in Freq_Xlating_Fir_Filter implementation. -;#InputFilter1.IF is the intermediate frequency (in Hz) shifted down to zero Hz - InputFilter1.IF=5499998.47412109 - -;# Decimation factor after the frequency tranaslating block InputFilter1.decimation_factor=8 ;######### RESAMPLER CONFIG 1 ############ -;## Resamples the input data. - -;#implementation: Use [Pass_Through] or [Direct_Resampler] -;#[Pass_Through] disables this block -;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation Resampler1.implementation=Pass_Through ;######### CHANNELS GLOBAL CONFIG ############ -;#count: Number of available GPS satellite channels. Channels_1C.count=8 -;#count: Number of available Galileo satellite channels. Channels_1B.count=8 -;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 -;#signal: -;# "1C" GPS L1 C/A -;# "1B" GALILEO E1 B (I/NAV OS/CS/SoL) -;# "1G" GLONASS L1 C/A -;# "2S" GPS L2 L2C (M) -;# "5X" GALILEO E5a I+Q -;# "L5" GPS L5 - ;# SOURCE CONNECTION Channel0.RF_channel_ID=0 Channel1.RF_channel_ID=0 @@ -299,117 +151,77 @@ Channel15.signal=1B ;######### GPS ACQUISITION CONFIG ############ Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1C.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1C.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1C.sampled_ms=1 -;#threshold: Acquisition threshold +Acquisition_1C.scoherent_integration_time_ms=1 Acquisition_1C.threshold=0.0075 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] ;Acquisition_1C.pfa=0.01 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1C.doppler_max=10000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1C.doppler_step=500 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1C.dump=false -;#filename: Log path and filename Acquisition_1C.dump_filename=./acq_dump.dat ;######### GALILEO ACQUISITION CONFIG ############ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition -;#item_type: Type and resolution for each of the signal samples. Acquisition_1B.item_type=gr_complex -;#if: Signal intermediate frequency in [Hz] -Acquisition_1B.if=0 -;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_1B.sampled_ms=4 -;#threshold: Acquisition threshold +Acquisition_1B.coherent_integration_time_ms=4 ;Acquisition_1B.threshold=0 -;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] Acquisition_1B.pfa=0.0000002 -;#doppler_max: Maximum expected Doppler shift [Hz] Acquisition_1B.doppler_max=15000 -;#doppler_max: Doppler step in the grid search [Hz] Acquisition_1B.doppler_step=125 -;#dump: Enable or disable the acquisition internal data file logging [true] or [false] Acquisition_1B.dump=false -;#filename: Log path and filename Acquisition_1B.dump_filename=./acq_dump.dat ;######### TRACKING GPS CONFIG ############ Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1C.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1C.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1C.pll_bw_hz=45.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1C.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1C.order=3; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1C.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;######### TRACKING GALILEO CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking -;#item_type: Type and resolution for each of the signal samples. Tracking_1B.item_type=gr_complex -;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_1B.if=0 -;#pll_bw_hz: PLL loop filter bandwidth [Hz] Tracking_1B.pll_bw_hz=15.0; -;#dll_bw_hz: DLL loop filter bandwidth [Hz] Tracking_1B.dll_bw_hz=2.0; -;#order: PLL/DLL loop filter order [2] or [3] Tracking_1B.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo Tracking_1B.early_late_space_chips=0.15; -;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] Tracking_1B.very_early_late_space_chips=0.6; -;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] Tracking_1B.dump=false -;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;######### TELEMETRY DECODER GPS CONFIG ############ -;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false ;######### TELEMETRY DECODER GALILEO CONFIG ############ -;#implementation: Use [Galileo_E1B_Telemetry_Decoder] for Galileo E1B TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder ;######### OBSERVABLES CONFIG ############ 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=RTKLIB_PVT -;#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=10; -;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms. -PVT.display_rate_ms=500; +PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic +PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX +PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad +PVT.output_rate_ms=100 +PVT.display_rate_ms=500 +PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea; +PVT.flag_nmea_tty_port=true; +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_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 -;#dump: Enable or disable the PVT internal binary data file logging [true] or [false] PVT.dump=false +PVT.dump_filename=./PVT diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc index 91267e33d..18248ea05 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc @@ -261,6 +261,12 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump d_kml_dump = std::make_shared(); d_kml_dump->set_headers(kml_dump_filename); + //initialize gpx_printer + std::string gpx_dump_filename; + gpx_dump_filename = d_dump_filename; + d_gpx_dump = std::make_shared(); + d_gpx_dump->set_headers(gpx_dump_filename); + //initialize geojson_printer std::string geojson_dump_filename; geojson_dump_filename = d_dump_filename; @@ -678,6 +684,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item first_fix = false; } d_kml_dump->print_position(d_ls_pvt, false); + d_gpx_dump->print_position(d_ls_pvt, false); d_geojson_printer->print_position(d_ls_pvt, false); d_nmea_printer->Print_Nmea_Line(d_ls_pvt, false); diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h index f4e4323fd..70333a7eb 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h @@ -34,6 +34,7 @@ #include "nmea_printer.h" #include "kml_printer.h" +#include "gpx_printer.h" #include "geojson_printer.h" #include "rinex_printer.h" #include "rtcm_printer.h" @@ -120,6 +121,7 @@ private: std::shared_ptr rp; std::shared_ptr d_kml_dump; + std::shared_ptr d_gpx_dump; std::shared_ptr d_nmea_printer; std::shared_ptr d_geojson_printer; std::shared_ptr d_rtcm_printer; diff --git a/src/algorithms/PVT/libs/CMakeLists.txt b/src/algorithms/PVT/libs/CMakeLists.txt index 96aace272..ebf9d6041 100644 --- a/src/algorithms/PVT/libs/CMakeLists.txt +++ b/src/algorithms/PVT/libs/CMakeLists.txt @@ -23,6 +23,7 @@ set(PVT_LIB_SOURCES ls_pvt.cc hybrid_ls_pvt.cc kml_printer.cc + gpx_printer.cc rinex_printer.cc nmea_printer.cc rtcm_printer.cc diff --git a/src/algorithms/PVT/libs/gpx_printer.cc b/src/algorithms/PVT/libs/gpx_printer.cc new file mode 100644 index 000000000..65dda1636 --- /dev/null +++ b/src/algorithms/PVT/libs/gpx_printer.cc @@ -0,0 +1,187 @@ +/*! + * \file gpx_printer.cc + * \brief Interface of a class that prints PVT information to a gpx file + * \author Álvaro Cebrián Juan, 2018. acebrianjuan(at)gmail.com + * + * + * ------------------------------------------------------------------------- + * + * Copyright (C) 2010-2018 (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 "gpx_printer.h" +#include +#include +#include + +using google::LogMessage; + +bool Gpx_Printer::set_headers(std::string filename, bool time_tag_name) +{ + boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); + tm timeinfo = boost::posix_time::to_tm(pt); + + if (time_tag_name) + { + std::stringstream strm0; + const int year = timeinfo.tm_year - 100; + strm0 << year; + const int month = timeinfo.tm_mon + 1; + if (month < 10) + { + strm0 << "0"; + } + strm0 << month; + const int day = timeinfo.tm_mday; + if (day < 10) + { + strm0 << "0"; + } + strm0 << day << "_"; + const int hour = timeinfo.tm_hour; + if (hour < 10) + { + strm0 << "0"; + } + strm0 << hour; + const int min = timeinfo.tm_min; + if (min < 10) + { + strm0 << "0"; + } + strm0 << min; + const int sec = timeinfo.tm_sec; + if (sec < 10) + { + strm0 << "0"; + } + strm0 << sec; + + gpx_filename = filename + "_" + strm0.str() + ".gpx"; + } + else + { + gpx_filename = filename + ".gpx"; + } + gpx_file.open(gpx_filename.c_str()); + + if (gpx_file.is_open()) + { + DLOG(INFO) << "GPX printer writing on " << filename.c_str(); + // Set iostream numeric format and precision + gpx_file.setf(gpx_file.fixed, gpx_file.floatfield); + gpx_file << std::setprecision(14); + gpx_file << "" << std::endl + << "" << std::endl + << "" << std::endl + << indent << "Position fixes computed by GNSS-SDR v" << GNSS_SDR_VERSION << "" << std::endl + << indent << "GNSS-SDR position log generated at " << pt << " (local time)" << std::endl + << indent << "" << std::endl; + return true; + } + else + { + return false; + } +} + + +bool Gpx_Printer::print_position(const std::shared_ptr& position, bool print_average_values) +{ + double latitude; + double longitude; + double height; + + positions_printed = true; + std::shared_ptr position_ = position; + + double hdop = position_->get_hdop(); + double vdop = position_->get_vdop(); + double pdop = position_->get_pdop(); + std::string utc_time = to_iso_extended_string(position_->get_position_UTC_time()); + utc_time.resize(23); // time up to ms + utc_time.append("Z"); // UTC time zone + + if (print_average_values == false) + { + latitude = position_->get_latitude(); + longitude = position_->get_longitude(); + height = position_->get_height(); + } + else + { + latitude = position_->get_avg_latitude(); + longitude = position_->get_avg_longitude(); + height = position_->get_avg_height(); + } + + if (gpx_file.is_open()) + { + gpx_file << indent << indent << "" << height << "" + << "" + << "" << hdop << "" << vdop << "" << pdop << "" << std::endl; + return true; + } + else + { + return false; + } +} + + +bool Gpx_Printer::close_file() +{ + if (gpx_file.is_open()) + { + gpx_file << indent << "" << std::endl + << "" << std::endl + << ""; + gpx_file.close(); + return true; + } + else + { + return false; + } +} + + +Gpx_Printer::Gpx_Printer() +{ + positions_printed = false; + indent = " "; +} + + +Gpx_Printer::~Gpx_Printer() +{ + close_file(); + if (!positions_printed) + { + if (remove(gpx_filename.c_str()) != 0) LOG(INFO) << "Error deleting temporary GPX file"; + } +} diff --git a/src/algorithms/PVT/libs/gpx_printer.h b/src/algorithms/PVT/libs/gpx_printer.h new file mode 100644 index 000000000..347d95599 --- /dev/null +++ b/src/algorithms/PVT/libs/gpx_printer.h @@ -0,0 +1,64 @@ +/*! + * \file gpx_printer.h + * \brief Interface of a class that prints PVT information to a gpx file + * \author Álvaro Cebrián Juan, 2018. acebrianjuan(at)gmail.com + * + * + * ------------------------------------------------------------------------- + * + * Copyright (C) 2010-2018 (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_GPX_PRINTER_H_ +#define GNSS_SDR_GPX_PRINTER_H_ + +#include "pvt_solution.h" +#include "rtklib_solver.h" +#include +#include +#include + + +/*! + * \brief Prints PVT information to GPX format file + * + * See http://www.topografix.com/gpx.asp + */ +class Gpx_Printer +{ +private: + std::ofstream gpx_file; + bool positions_printed; + std::string gpx_filename; + std::string indent; + +public: + Gpx_Printer(); + ~Gpx_Printer(); + bool set_headers(std::string filename, bool time_tag_name = true); + bool print_position(const std::shared_ptr& position, bool print_average_values); + bool close_file(); +}; + +#endif diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc index 3197c1882..4644352e5 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc @@ -350,9 +350,6 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, do << " [deg], Height= " << this->get_height() << " [m]" << " RX time offset= " << this->get_time_offset_s() << " [s]"; - // ###### Compute DOPs ######## - hybrid_ls_pvt::compute_DOP(); - // ######## LOG FILE ######### if (d_flag_dump_enabled == true) { diff --git a/src/algorithms/PVT/libs/ls_pvt.cc b/src/algorithms/PVT/libs/ls_pvt.cc index 27be29287..af4f1e812 100644 --- a/src/algorithms/PVT/libs/ls_pvt.cc +++ b/src/algorithms/PVT/libs/ls_pvt.cc @@ -281,7 +281,7 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat& satpos, const arma::vec& obs, } //-- compute the Dilution Of Precision values - this->set_Q(arma::inv(arma::htrans(A) * A)); + //this->set_Q(arma::inv(arma::htrans(A) * A)); // check the consistency of the PVT solution if (((fabs(pos(3)) * 1000.0) / GPS_C_m_s) > GPS_STARTOFFSET_ms * 2) diff --git a/src/algorithms/PVT/libs/nmea_printer.cc b/src/algorithms/PVT/libs/nmea_printer.cc index 305a89a07..ebff7b4ac 100644 --- a/src/algorithms/PVT/libs/nmea_printer.cc +++ b/src/algorithms/PVT/libs/nmea_printer.cc @@ -125,7 +125,7 @@ void Nmea_Printer::close_serial() } -bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr& pvt_data, bool print_average_values) +bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr& pvt_data, bool print_average_values) { std::string GPRMC; std::string GPGGA; @@ -432,9 +432,9 @@ std::string Nmea_Printer::get_GPGSA() // GSA-GNSS DOP and Active Satellites bool valid_fix = d_PVT_data->is_valid_position(); int n_sats_used = d_PVT_data->get_num_valid_observations(); - double pdop = d_PVT_data->get_PDOP(); - double hdop = d_PVT_data->get_HDOP(); - double vdop = d_PVT_data->get_VDOP(); + double pdop = d_PVT_data->get_pdop(); + double hdop = d_PVT_data->get_hdop(); + double vdop = d_PVT_data->get_vdop(); std::stringstream sentence_str; std::string sentence_header; @@ -603,7 +603,7 @@ std::string Nmea_Printer::get_GPGGA() //boost::posix_time::ptime d_position_UTC_time=boost::posix_time::microsec_clock::universal_time(); bool valid_fix = d_PVT_data->is_valid_position(); int n_channels = d_PVT_data->get_num_valid_observations(); //d_nchannels - double hdop = d_PVT_data->get_HDOP(); + double hdop = d_PVT_data->get_hdop(); double MSL_altitude; if (d_PVT_data->is_averaging() == true) diff --git a/src/algorithms/PVT/libs/nmea_printer.h b/src/algorithms/PVT/libs/nmea_printer.h index c1b671d1a..857301d1c 100644 --- a/src/algorithms/PVT/libs/nmea_printer.h +++ b/src/algorithms/PVT/libs/nmea_printer.h @@ -36,7 +36,7 @@ #ifndef GNSS_SDR_NMEA_PRINTER_H_ #define GNSS_SDR_NMEA_PRINTER_H_ -#include "pvt_solution.h" +#include "rtklib_solver.h" #include #include @@ -58,7 +58,7 @@ public: /*! * \brief Print NMEA PVT and satellite info to the initialized device */ - bool Print_Nmea_Line(const std::shared_ptr& position, bool print_average_values); + bool Print_Nmea_Line(const std::shared_ptr& position, bool print_average_values); /*! * \brief Default destructor. @@ -70,7 +70,7 @@ private: std::ofstream nmea_file_descriptor; // Output file stream for NMEA log file std::string nmea_devname; int nmea_dev_descriptor; // NMEA serial device descriptor (i.e. COM port) - std::shared_ptr d_PVT_data; + std::shared_ptr d_PVT_data; int init_serial(std::string serial_device); //serial port control void close_serial(); std::string get_GPGGA(); // fix data diff --git a/src/algorithms/PVT/libs/pvt_solution.cc b/src/algorithms/PVT/libs/pvt_solution.cc index e38da70f7..dbfd76f1c 100644 --- a/src/algorithms/PVT/libs/pvt_solution.cc +++ b/src/algorithms/PVT/libs/pvt_solution.cc @@ -46,11 +46,6 @@ Pvt_Solution::Pvt_Solution() d_avg_latitude_d = 0.0; d_avg_longitude_d = 0.0; d_avg_height_m = 0.0; - d_GDOP = 0.0; - d_PDOP = 0.0; - d_HDOP = 0.0; - d_VDOP = 0.0; - d_TDOP = 0.0; d_flag_averaging = false; b_valid_position = false; d_averaging_depth = 0; @@ -445,50 +440,6 @@ int Pvt_Solution::topocent(double *Az, double *El, double *D, const arma::vec &x } -int Pvt_Solution::compute_DOP() -{ - // ###### Compute DOPs ######## - - // 1- Rotation matrix from ECEF coordinates to ENU coordinates - // ref: http://www.navipedia.net/index.php/Transformations_between_ECEF_and_ENU_coordinates - arma::mat F = arma::zeros(3, 3); - F(0, 0) = -sin(GPS_TWO_PI * (d_longitude_d / 360.0)); - F(0, 1) = -sin(GPS_TWO_PI * (d_latitude_d / 360.0)) * cos(GPS_TWO_PI * (d_longitude_d / 360.0)); - F(0, 2) = cos(GPS_TWO_PI * (d_latitude_d / 360.0)) * cos(GPS_TWO_PI * (d_longitude_d / 360.0)); - - F(1, 0) = cos((GPS_TWO_PI * d_longitude_d) / 360.0); - F(1, 1) = -sin((GPS_TWO_PI * d_latitude_d) / 360.0) * sin((GPS_TWO_PI * d_longitude_d) / 360.0); - F(1, 2) = cos((GPS_TWO_PI * d_latitude_d / 360.0)) * sin((GPS_TWO_PI * d_longitude_d) / 360.0); - - F(2, 0) = 0; - F(2, 1) = cos((GPS_TWO_PI * d_latitude_d) / 360.0); - F(2, 2) = sin((GPS_TWO_PI * d_latitude_d / 360.0)); - - // 2- Apply the rotation to the latest covariance matrix (available in ECEF from LS) - arma::mat Q_ECEF = d_Q.submat(0, 0, 2, 2); - arma::mat DOP_ENU = arma::zeros(3, 3); - - try - { - DOP_ENU = arma::htrans(F) * Q_ECEF * F; - d_GDOP = sqrt(arma::trace(DOP_ENU)); // Geometric DOP - d_PDOP = sqrt(DOP_ENU(0, 0) + DOP_ENU(1, 1) + DOP_ENU(2, 2)); // PDOP - d_HDOP = sqrt(DOP_ENU(0, 0) + DOP_ENU(1, 1)); // HDOP - d_VDOP = sqrt(DOP_ENU(2, 2)); // VDOP - d_TDOP = sqrt(d_Q(3, 3)); // TDOP - } - catch (const std::exception &ex) - { - d_GDOP = -1; // Geometric DOP - d_PDOP = -1; // PDOP - d_HDOP = -1; // HDOP - d_VDOP = -1; // VDOP - d_TDOP = -1; // TDOP - } - return 0; -} - - void Pvt_Solution::set_averaging_depth(int depth) { d_averaging_depth = depth; @@ -824,39 +775,3 @@ double Pvt_Solution::get_visible_satellites_CN0_dB(size_t index) const return d_visible_satellites_CN0_dB[index]; } } - - -void Pvt_Solution::set_Q(const arma::mat &Q) -{ - d_Q = Q; -} - - -double Pvt_Solution::get_GDOP() const -{ - return d_GDOP; -} - - -double Pvt_Solution::get_PDOP() const -{ - return d_PDOP; -} - - -double Pvt_Solution::get_HDOP() const -{ - return d_HDOP; -} - - -double Pvt_Solution::get_VDOP() const -{ - return d_VDOP; -} - - -double Pvt_Solution::get_TDOP() const -{ - return d_TDOP; -} diff --git a/src/algorithms/PVT/libs/pvt_solution.h b/src/algorithms/PVT/libs/pvt_solution.h index e036b1547..c01e494a9 100644 --- a/src/algorithms/PVT/libs/pvt_solution.h +++ b/src/algorithms/PVT/libs/pvt_solution.h @@ -70,13 +70,6 @@ private: boost::posix_time::ptime d_position_UTC_time; int d_valid_observations; - arma::mat d_Q; - double d_GDOP; - double d_PDOP; - double d_HDOP; - double d_VDOP; - double d_TDOP; - int d_visible_satellites_IDs[PVT_MAX_CHANNELS] = {}; // Array with the IDs of the valid satellites double d_visible_satellites_El[PVT_MAX_CHANNELS] = {}; // Array with the LOS Elevation of the valid satellites double d_visible_satellites_Az[PVT_MAX_CHANNELS] = {}; // Array with the LOS Azimuth of the valid satellites @@ -130,16 +123,6 @@ public: bool is_averaging() const; void set_averaging_flag(bool flag); - // DOP estimations - void set_Q(const arma::mat &Q); - int compute_DOP(); //!< Compute Dilution Of Precision parameters - - double get_GDOP() const; - double get_PDOP() const; - double get_HDOP() const; - double get_VDOP() const; - double get_TDOP() const; - arma::vec rotateSatellite(double traveltime, const arma::vec &X_sat); /*! diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index 4dcee81a0..8d74aea20 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -70,7 +70,7 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag count_valid_position = 0; this->set_averaging_flag(false); rtk_ = rtk; - + for (unsigned int i = 0; i > 4; i++) dop_[i] = 0.0; pvt_sol = {{0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, '0', '0', '0', 0, 0, 0}; // ############# ENABLE DATA FILE LOG ################# @@ -109,6 +109,30 @@ rtklib_solver::~rtklib_solver() } +double rtklib_solver::get_gdop() const +{ + return dop_[0]; +} + + +double rtklib_solver::get_pdop() const +{ + return dop_[1]; +} + + +double rtklib_solver::get_hdop() const +{ + return dop_[2]; +} + + +double rtklib_solver::get_vdop() const +{ + return dop_[3]; +} + + bool rtklib_solver::get_PVT(const std::map& gnss_observables_map, double Rx_time, bool flag_averaging) { std::map::const_iterator gnss_observables_iter; @@ -435,6 +459,26 @@ bool rtklib_solver::get_PVT(const std::map& gnss_observables_ { this->set_num_valid_observations(rtk_.sol.ns); //record the number of valid satellites used by the PVT solver pvt_sol = rtk_.sol; + // DOP computation + unsigned int used_sats = 0; + for (unsigned int i = 0; i < MAXSAT; i++) + { + if (int vsat = rtk_.ssat[i].vsat[0] == 1) used_sats++; + } + + double azel[used_sats * 2]; + unsigned int index_aux = 0; + for (unsigned int i = 0; i < MAXSAT; i++) + { + if (int vsat = rtk_.ssat[i].vsat[0] == 1) + { + azel[2 * index_aux] = rtk_.ssat[i].azel[0]; + azel[2 * index_aux + 1] = rtk_.ssat[i].azel[1]; + index_aux++; + } + } + if (index_aux > 0) dops(index_aux, azel, 0.0, dop_); + this->set_valid_position(true); arma::vec rx_position_and_time(4); rx_position_and_time(0) = pvt_sol.rr[0]; diff --git a/src/algorithms/PVT/libs/rtklib_solver.h b/src/algorithms/PVT/libs/rtklib_solver.h index 3af8d2a76..ac180f617 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.h +++ b/src/algorithms/PVT/libs/rtklib_solver.h @@ -79,12 +79,18 @@ private: sol_t pvt_sol; bool d_flag_dump_enabled; int d_nchannels; // Number of available channels for positioning + double dop_[4]; + public: rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, rtk_t& rtk); ~rtklib_solver(); bool get_PVT(const std::map& gnss_observables_map, double Rx_time, bool flag_averaging); - + double get_hdop() const; + double get_vdop() const; + double get_pdop() const; + double get_gdop() const; + std::map galileo_ephemeris_map; //!< Map storing new Galileo_Ephemeris std::map gps_ephemeris_map; //!< Map storing new GPS_Ephemeris std::map gps_cnav_ephemeris_map; //!< Map storing new GPS_CNAV_Ephemeris diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc index d9ef75ae3..4b7aae6d0 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc @@ -34,16 +34,15 @@ * ------------------------------------------------------------------------- */ +#include "gps_l1_ca_pcps_acquisition_fpga.h" #include "configuration_interface.h" #include "gnss_sdr_flags.h" -#include "gps_l1_ca_pcps_acquisition_fpga.h" -#include "gps_sdr_signal_processing.h" #include "GPS_L1_CA.h" +#include "gps_sdr_signal_processing.h" #include #include #include - #define NUM_PRNs 32 using google::LogMessage; @@ -123,8 +122,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( } } - //acq_parameters - + // acq_parameters acq_parameters.all_fft_codes = d_all_fft_codes_; // temporary buffers that we can delete @@ -132,7 +130,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( delete fft_if; delete[] fft_codes_padded; - acquisition_fpga_ = pcps_make_acquisition(acq_parameters); + acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters); DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")"; channel_ = 0; @@ -211,15 +209,20 @@ void GpsL1CaPcpsAcquisitionFpga::set_state(int state) acquisition_fpga_->set_state(state); } + void GpsL1CaPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block) { - // nothing to connect + if (top_block) + { // nothing to disconnect + } } void GpsL1CaPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block) { - // nothing to disconnect + if (top_block) + { // nothing to disconnect + } } diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.cc index 6a337925e..8a5d3ea99 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.cc @@ -38,22 +38,22 @@ * ------------------------------------------------------------------------- */ - +#include "pcps_acquisition_fpga.h" #include #include -#include "pcps_acquisition_fpga.h" + using google::LogMessage; -pcps_acquisition_fpga_sptr pcps_make_acquisition(pcpsconf_fpga_t conf_) +pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_) { return pcps_acquisition_fpga_sptr(new pcps_acquisition_fpga(conf_)); } pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) : gr::block("pcps_acquisition_fpga", - gr::io_signature::make(0, 0, 0), - gr::io_signature::make(0, 0, 0)) + gr::io_signature::make(0, 0, 0), + gr::io_signature::make(0, 0, 0)) { this->message_port_register_out(pmt::mp("events")); @@ -71,10 +71,8 @@ pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) : gr::block( d_channel = 0; d_gnss_synchro = 0; - acquisition_fpga = std::make_shared - (acq_parameters.device_name, d_fft_size, acq_parameters.doppler_max, acq_parameters.samples_per_ms, - acq_parameters.fs_in, acq_parameters.freq, acq_parameters.sampled_ms, acq_parameters.select_queue_Fpga, acq_parameters.all_fft_codes); - + acquisition_fpga = std::make_shared(acq_parameters.device_name, d_fft_size, acq_parameters.doppler_max, acq_parameters.samples_per_ms, + acq_parameters.fs_in, acq_parameters.freq, acq_parameters.sampled_ms, acq_parameters.select_queue_Fpga, acq_parameters.all_fft_codes); } @@ -196,9 +194,9 @@ void pcps_acquisition_fpga::set_active(bool active) int doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * doppler_index; acquisition_fpga->set_phase_step(doppler_index); - acquisition_fpga->run_acquisition(); // runs acquisition and waits until it is finished + acquisition_fpga->run_acquisition(); // runs acquisition and waits until it is finished acquisition_fpga->read_acquisition_results(&indext, &magt, - &initial_sample, &d_input_power); + &initial_sample, &d_input_power); d_sample_counter = initial_sample; if (d_mag < magt) @@ -213,7 +211,7 @@ void pcps_acquisition_fpga::set_active(bool active) d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); d_gnss_synchro->Acq_samplestamp_samples = d_sample_counter; - d_test_statistics = (d_mag / d_input_power); //* correction_factor; + d_test_statistics = (d_mag / d_input_power); //* correction_factor; } // In the case of the FPGA the option of dumping the results of the acquisition to a file is not available diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h index e758904e3..36ddcd70f 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h @@ -81,7 +81,7 @@ class pcps_acquisition_fpga; typedef boost::shared_ptr pcps_acquisition_fpga_sptr; pcps_acquisition_fpga_sptr -pcps_make_acquisition(pcpsconf_fpga_t conf_); +pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_); /*! * \brief This class implements a Parallel Code Phase Search Acquisition that uses the FPGA. @@ -94,7 +94,7 @@ class pcps_acquisition_fpga : public gr::block private: friend pcps_acquisition_fpga_sptr - pcps_make_acquisition(pcpsconf_fpga_t conf_); + pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_); pcps_acquisition_fpga(pcpsconf_fpga_t conf_); diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt index d135412e0..50a38b82e 100644 --- a/src/algorithms/signal_source/adapters/CMakeLists.txt +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -29,7 +29,7 @@ if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2) message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio") message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio") message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio") - message(FATAL_ERROR "gnuradio-iio required for building gnss-sdr with this option enabled") + message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled.") endif(NOT IIO_FOUND) set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES}) set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}) @@ -38,12 +38,12 @@ endif(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2) if(ENABLE_AD9361) find_package(libiio REQUIRED) if(NOT LIBIIO_FOUND) - message(STATUS "gnuradio-iio not found, its installation is required.") + message(STATUS "libiio not found, its installation is required.") message(STATUS "Please build and install the following projects:") message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio") message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio") message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio") - message(FATAL_ERROR "gnuradio-iio required for building gnss-sdr with this option enabled") + message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled.") endif(NOT LIBIIO_FOUND) set(OPT_LIBRARIES ${OPT_LIBRARIES} ${LIBIIO_LIBRARIES}) set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${LIBIIO_INCLUDE_DIRS}) diff --git a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc index cba4e5439..02be88152 100644 --- a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc +++ b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc @@ -35,10 +35,8 @@ #include "ad9361_manager.h" #include "GPS_L1_CA.h" #include "GPS_L2C.h" -#include -#include #include -#include +#include // for cout, endl #ifdef __APPLE__ #include @@ -47,10 +45,8 @@ #endif Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, unsigned int out_stream, - boost::shared_ptr queue) : - role_(role), in_stream_(in_stream), out_stream_(out_stream), - queue_(queue) + std::string role, unsigned int in_stream, unsigned int out_stream, + boost::shared_ptr queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue) { std::string default_item_type = "gr_complex"; std::string default_dump_file = "./data/signal_source.dat"; @@ -75,12 +71,12 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface* configura dump_ = configuration->property(role + ".dump", false); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file); - enable_dds_lo_=configuration->property(role + ".enable_dds_lo", false); - freq_rf_tx_hz_=configuration->property(role + ".freq_rf_tx_hz", GPS_L1_FREQ_HZ-GPS_L2_FREQ_HZ-1000); - freq_dds_tx_hz_=configuration->property(role + ".freq_dds_tx_hz", 1000); - scale_dds_dbfs_=configuration->property(role + ".scale_dds_dbfs", -3.0); - phase_dds_deg_=configuration->property(role + ".phase_dds_deg", 0.0); - tx_attenuation_db_=configuration->property(role + ".tx_attenuation_db", 0.0); + enable_dds_lo_ = configuration->property(role + ".enable_dds_lo", false); + freq_rf_tx_hz_ = configuration->property(role + ".freq_rf_tx_hz", GPS_L1_FREQ_HZ - GPS_L2_FREQ_HZ - 1000); + freq_dds_tx_hz_ = configuration->property(role + ".freq_dds_tx_hz", 1000); + scale_dds_dbfs_ = configuration->property(role + ".scale_dds_dbfs", -3.0); + phase_dds_deg_ = configuration->property(role + ".phase_dds_deg", 0.0); + tx_attenuation_db_ = configuration->property(role + ".tx_attenuation_db", 0.0); item_size_ = sizeof(gr_complex); @@ -89,30 +85,30 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface* configura std::cout << "sample rate: " << sample_rate_ << " Hz" << std::endl; config_ad9361_rx_local(bandwidth_, - sample_rate_, - freq_, - rf_port_select_, - gain_mode_rx1_, - gain_mode_rx2_, - rf_gain_rx1_, - rf_gain_rx2_); + sample_rate_, + freq_, + rf_port_select_, + gain_mode_rx1_, + gain_mode_rx2_, + rf_gain_rx1_, + rf_gain_rx2_); //LOCAL OSCILLATOR DDS GENERATOR FOR DUAL FREQUENCY OPERATION - if (enable_dds_lo_==true) - { - config_ad9361_lo_local(bandwidth_, - sample_rate_, - freq_rf_tx_hz_, - tx_attenuation_db_, - freq_dds_tx_hz_, - scale_dds_dbfs_); - } + if (enable_dds_lo_ == true) + { + config_ad9361_lo_local(bandwidth_, + sample_rate_, + freq_rf_tx_hz_, + tx_attenuation_db_, + freq_dds_tx_hz_, + scale_dds_dbfs_); + } // turn switch to A/D position std::string default_device_name = "/dev/uio13"; std::string device_name = configuration->property(role + ".devicename", default_device_name); int switch_position = configuration->property(role + ".switch_position", 0); - switch_fpga = std::make_shared (device_name); + switch_fpga = std::make_shared(device_name); switch_fpga->set_switch_position(switch_position); } @@ -125,11 +121,11 @@ Ad9361FpgaSignalSource::~Ad9361FpgaSignalSource() //if (rx0_q) { iio_channel_disable(rx0_q); } if (enable_dds_lo_) - { - ad9361_disable_lo_local(); - } + { + ad9361_disable_lo_local(); + } - // std::cout<<"* AD9361 Destroying context\n"; + // std::cout<<"* AD9361 Destroying context\n"; //if (ctx) { iio_context_destroy(ctx); } } diff --git a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h index 6110a63c3..2a98e3017 100644 --- a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h +++ b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h @@ -34,21 +34,20 @@ #include "gnss_block_interface.h" #include "fpga_switch.h" - #include #include #include class ConfigurationInterface; -class Ad9361FpgaSignalSource: public GNSSBlockInterface +class Ad9361FpgaSignalSource : public GNSSBlockInterface { public: Ad9361FpgaSignalSource(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, - unsigned int out_stream, boost::shared_ptr queue); + std::string role, unsigned int in_stream, + unsigned int out_stream, boost::shared_ptr queue); - virtual ~Ad9361FpgaSignalSource(); + ~Ad9361FpgaSignalSource(); inline std::string role() override { @@ -77,11 +76,11 @@ private: std::string role_; // Front-end settings - std::string uri_;//device direction - unsigned long freq_; //frequency of local oscilator + std::string uri_; // device direction + unsigned long freq_; // frequency of local oscillator unsigned long sample_rate_; unsigned long bandwidth_; - unsigned long buffer_size_; //reception buffer + unsigned long buffer_size_; // reception buffer bool rx1_en_; bool rx2_en_; bool quadrature_; @@ -95,7 +94,7 @@ private: std::string filter_file_; bool filter_auto_; - //DDS configuration for LO generation for external mixer + // DDS configuration for LO generation for external mixer bool enable_dds_lo_; unsigned long freq_rf_tx_hz_; unsigned long freq_dds_tx_hz_; diff --git a/src/algorithms/signal_source/gnuradio_blocks/rtl_tcp_signal_source_c.cc b/src/algorithms/signal_source/gnuradio_blocks/rtl_tcp_signal_source_c.cc index 4ec4420ce..cad8c570f 100644 --- a/src/algorithms/signal_source/gnuradio_blocks/rtl_tcp_signal_source_c.cc +++ b/src/algorithms/signal_source/gnuradio_blocks/rtl_tcp_signal_source_c.cc @@ -154,7 +154,10 @@ rtl_tcp_signal_source_c::rtl_tcp_signal_source_c(const std::string &address, rtl_tcp_signal_source_c::~rtl_tcp_signal_source_c() { + boost::mutex::scoped_lock lock(mutex_); io_service_.stop(); + not_empty_.notify_one(); + not_full_.notify_one(); } diff --git a/src/algorithms/signal_source/libs/CMakeLists.txt b/src/algorithms/signal_source/libs/CMakeLists.txt index 9cb569618..073cc343f 100644 --- a/src/algorithms/signal_source/libs/CMakeLists.txt +++ b/src/algorithms/signal_source/libs/CMakeLists.txt @@ -52,10 +52,10 @@ if(ENABLE_FMCOMMS2 OR ENABLE_AD9361) endif(LIBIIO_FOUND) endif(ENABLE_FMCOMMS2 OR ENABLE_AD9361) -if(ENABLE_FPGA) +if(ENABLE_FPGA OR ENABLE_AD9361) set(OPT_SIGNAL_SOURCE_LIB_SOURCES ${OPT_SIGNAL_SOURCE_LIB_SOURCES} fpga_switch.cc) set(OPT_SIGNAL_SOURCE_LIB_HEADERS ${OPT_SIGNAL_SOURCE_LIB_HEADERS} fpga_switch.h) -endif(ENABLE_FPGA) +endif(ENABLE_FPGA OR ENABLE_AD9361) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} 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 647647698..41bf44833 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 @@ -81,7 +81,6 @@ void galileo_e5a_telemetry_decoder_cc::decode_word(double *page_symbols, int fra { double page_symbols_deint[frame_length]; // 1. De-interleave - deinterleaver(GALILEO_FNAV_INTERLEAVER_ROWS, GALILEO_FNAV_INTERLEAVER_COLS, page_symbols, page_symbols_deint); // 2. Viterbi decoder @@ -116,7 +115,6 @@ void galileo_e5a_telemetry_decoder_cc::decode_word(double *page_symbols, int fra if (d_nav.flag_CRC_test == true) { LOG(INFO) << "Galileo E5a CRC correct in channel " << d_channel << " from satellite " << d_satellite; - //std::cout << "Galileo E5a CRC correct on channel " << d_channel << " from satellite " << d_satellite << std::endl; } else { @@ -191,19 +189,19 @@ galileo_e5a_telemetry_decoder_cc::galileo_e5a_telemetry_decoder_cc( delta_t = 0.0; d_symbol_counter = 0; d_prompt_acum = 0.0; - flag_bit_start = false; + flag_bit_start = true; new_symbol = false; required_symbols = GALILEO_FNAV_SYMBOLS_PER_PAGE + GALILEO_FNAV_PREAMBLE_LENGTH_BITS; // vars for Viterbi decoder - int max_states = 1 << mm; /* 2^mm */ - g_encoder[0] = 121; // Polynomial G1 - g_encoder[1] = 91; // Polynomial G2 + int max_states = 1 << mm; // 2^mm + g_encoder[0] = 121; // Polynomial G1 + g_encoder[1] = 91; // Polynomial G2 out0 = static_cast(volk_gnsssdr_malloc(max_states * sizeof(int), volk_gnsssdr_get_alignment())); out1 = static_cast(volk_gnsssdr_malloc(max_states * sizeof(int), volk_gnsssdr_get_alignment())); state0 = static_cast(volk_gnsssdr_malloc(max_states * sizeof(int), volk_gnsssdr_get_alignment())); state1 = static_cast(volk_gnsssdr_malloc(max_states * sizeof(int), volk_gnsssdr_get_alignment())); - /* create appropriate transition matrices */ + // create appropriate transition matrices nsc_transit(out0, state0, 0, g_encoder, KK, nn); nsc_transit(out1, state1, 1, g_encoder, KK, nn); } @@ -241,7 +239,7 @@ void galileo_e5a_telemetry_decoder_cc::set_channel(int channel) { d_channel = channel; LOG(INFO) << "Navigation channel set to " << channel; - // ############# ENABLE DATA FILE LOG ################# + // Enable data file logging if (d_dump == true) { if (d_dump_file.is_open() == false) @@ -272,7 +270,7 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute Gnss_Synchro *out = reinterpret_cast(output_items[0]); // Get the output buffer pointer const Gnss_Synchro *in = reinterpret_cast(input_items[0]); // Get the input buffer pointer - //1. Copy the current tracking output + // 1. Copy the current tracking output Gnss_Synchro current_sample = in[0]; d_symbol_counter++; if (flag_bit_start) @@ -281,7 +279,7 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute if (d_symbol_counter == GALILEO_FNAV_CODES_PER_SYMBOL) { current_sample.Prompt_I = d_prompt_acum / static_cast(GALILEO_FNAV_CODES_PER_SYMBOL); - d_symbol_history.push_back(current_sample); //add new symbol to the symbol queue + d_symbol_history.push_back(current_sample); // add new symbol to the symbol queue d_prompt_acum = 0.0; d_symbol_counter = 0; new_symbol = true; @@ -323,14 +321,14 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute } } } - d_sample_counter++; //count for the processed samples + d_sample_counter++; // count for the processed samples consume_each(1); d_flag_preamble = false; if ((d_symbol_history.size() > required_symbols) && new_symbol) { - //******* preamble correlation ******** + // ****************** Preamble orrelation ****************** corr_value = 0; for (int i = 0; i < GALILEO_FNAV_PREAMBLE_LENGTH_BITS; i++) { @@ -344,13 +342,12 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute } } } - - //******* frame sync ****************** - if ((d_stat == 0) && new_symbol) //no preamble information + // ****************** Frame sync ****************** + if ((d_stat == 0) && new_symbol) // no preamble information { if (abs(corr_value) >= GALILEO_FNAV_PREAMBLE_LENGTH_BITS) { - d_preamble_index = d_sample_counter; //record the preamble sample stamp + d_preamble_index = d_sample_counter; // record the preamble sample stamp LOG(INFO) << "Preamble detection for Galileo E5a satellite " << d_satellite; d_stat = 1; // enter into frame pre-detection status } @@ -359,13 +356,13 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute { if (abs(corr_value) >= GALILEO_FNAV_PREAMBLE_LENGTH_BITS) { - //check preamble separation + // check preamble separation preamble_diff = d_sample_counter - d_preamble_index; if (preamble_diff == GALILEO_FNAV_CODES_PER_PAGE) { - //try to decode frame + // try to decode frame LOG(INFO) << "Starting page decoder for Galileo E5a satellite " << d_satellite; - d_preamble_index = d_sample_counter; //record the preamble sample stamp + d_preamble_index = d_sample_counter; // record the preamble sample stamp d_stat = 2; } else if (preamble_diff > GALILEO_FNAV_CODES_PER_PAGE) @@ -397,13 +394,13 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute page_symbols[i] = corr_sign * d_symbol_history.at(i + GALILEO_FNAV_PREAMBLE_LENGTH_BITS).Prompt_I; // because last symbol of the preamble is just received now! } - //call the decoder + // call the decoder decode_word(page_symbols, frame_length); if (d_nav.flag_CRC_test == true) { d_CRC_error_counter = 0; - d_flag_preamble = true; //valid preamble indicator (initialized to false every work()) - d_preamble_index = d_sample_counter; //record the preamble sample stamp (t_P) + d_flag_preamble = true; // valid preamble indicator (initialized to false every work()) + d_preamble_index = d_sample_counter; // record the preamble sample stamp (t_P) if (!d_flag_frame_sync) { d_flag_frame_sync = true; @@ -414,7 +411,7 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute else { d_CRC_error_counter++; - d_preamble_index = d_sample_counter; //record the preamble sample stamp + d_preamble_index = d_sample_counter; // record the preamble sample stamp if (d_CRC_error_counter > GALILEO_E5A_CRC_ERROR_LIMIT) { LOG(INFO) << "Lost of frame sync SAT " << this->d_satellite; @@ -428,10 +425,10 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute new_symbol = false; // UPDATE GNSS SYNCHRO DATA - //Add the telemetry decoder information + // Add the telemetry decoder information if (d_flag_preamble and d_nav.flag_TOW_set) - //update TOW at the preamble instant - //We expect a preamble each 10 seconds (FNAV page period) + // update TOW at the preamble instant + // We expect a preamble each 10 seconds (FNAV page period) { if (d_nav.flag_TOW_1 == true) { @@ -458,7 +455,7 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute d_TOW_at_current_symbol += GALILEO_E5a_CODE_PERIOD; } } - else //if there is not a new preamble, we define the TOW of the current symbol + else // if there is not a new preamble, we define the TOW of the current symbol { d_TOW_at_current_symbol += GALILEO_E5a_CODE_PERIOD; } @@ -499,7 +496,7 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute { d_symbol_history.pop_front(); } - //3. Make the output + // 3. Make the output if (current_sample.Flag_valid_word) { out[0] = current_sample; diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc index 77f667407..111de94c5 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc @@ -1,8 +1,9 @@ /*! * \file gps_l1_ca_dll_pll_tracking.cc * \brief Implementation of an adapter of a DLL+PLL tracking loop block - * for GPS L1 C/A to a TrackingInterface - * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com + * for GPS L1 C/A to a TrackingInterface that uses the FPGA + * \author Marc Majoral, 2018, mmajoral(at)cttc.es + * Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com * Javier Arribas, 2011. jarribas(at)cttc.es * * Code DLL + carrier PLL according to the algorithms described in: @@ -35,65 +36,109 @@ * ------------------------------------------------------------------------- */ - #include "gps_l1_ca_dll_pll_tracking_fpga.h" #include "configuration_interface.h" +#include "display.h" +#include "gnss_sdr_flags.h" #include "GPS_L1_CA.h" +#include "gps_sdr_signal_processing.h" #include +#define NUM_PRNs 32 + using google::LogMessage; GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga( ConfigurationInterface* configuration, std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { + dllpllconf_fpga_t trk_param_fpga; DLOG(INFO) << "role " << role; + //################# CONFIGURATION PARAMETERS ######################## - int fs_in; - int vector_length; - int f_if; - bool dump; - std::string dump_filename; - std::string item_type; - //std::string default_item_type = "gr_complex"; - std::string default_item_type = "cshort"; - float pll_bw_hz; - float dll_bw_hz; - float early_late_space_chips; - item_type = configuration->property(role + ".item_type", default_item_type); int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); - std::string device_name; - unsigned int device_base; - std::string default_device_name = "/dev/uio"; - device_name = configuration->property(role + ".devicename", default_device_name); - device_base = configuration->property(role + ".device_base", 1); - fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); - f_if = configuration->property(role + ".if", 0); - dump = configuration->property(role + ".dump", false); - pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); - dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); - early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); + int fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); + trk_param_fpga.fs_in = fs_in; + bool dump = configuration->property(role + ".dump", false); + trk_param_fpga.dump = dump; + float pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); + if (FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz); + trk_param_fpga.pll_bw_hz = pll_bw_hz; + float pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0); + trk_param_fpga.pll_bw_narrow_hz = pll_bw_narrow_hz; + float dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0); + trk_param_fpga.dll_bw_narrow_hz = dll_bw_narrow_hz; + float dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); + if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast(FLAGS_dll_bw_hz); + trk_param_fpga.dll_bw_hz = dll_bw_hz; + float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); + trk_param_fpga.early_late_space_chips = early_late_space_chips; + float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5); + trk_param_fpga.early_late_space_narrow_chips = early_late_space_narrow_chips; std::string default_dump_filename = "./track_ch"; - dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); //unused! - vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); - if (item_type.compare("cshort") == 0) + std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); + trk_param_fpga.dump_filename = dump_filename; + int vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); + trk_param_fpga.vector_length = vector_length; + int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1); + if (symbols_extended_correlator < 1) { - item_size_ = sizeof(lv_16sc_t); - tracking_fpga_sc = gps_l1_ca_dll_pll_make_tracking_fpga_sc( - f_if, fs_in, vector_length, dump, dump_filename, pll_bw_hz, - dll_bw_hz, early_late_space_chips, device_name, - device_base); - DLOG(INFO) << "tracking(" << tracking_fpga_sc->unique_id() - << ")"; + symbols_extended_correlator = 1; + std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl; } - else + else if (symbols_extended_correlator > 20) { - item_size_ = sizeof(lv_16sc_t); - // LOG(WARNING) << item_type_ << " unknown tracking item type"; - LOG(WARNING) << item_type - << " the tracking item type for the FPGA tracking test has to be cshort"; + symbols_extended_correlator = 20; + std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl; } + trk_param_fpga.extend_correlation_symbols = symbols_extended_correlator; + bool track_pilot = configuration->property(role + ".track_pilot", false); + if (track_pilot) + { + std::cout << TEXT_RED << "WARNING: GPS L1 C/A does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl; + } + if ((symbols_extended_correlator > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)) + { + std::cout << TEXT_RED << "WARNING: GPS L1 C/A. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl; + } + trk_param_fpga.very_early_late_space_chips = 0.0; + trk_param_fpga.very_early_late_space_narrow_chips = 0.0; + trk_param_fpga.track_pilot = false; + trk_param_fpga.system = 'G'; + char sig_[3] = "1C"; + std::memcpy(trk_param_fpga.signal, sig_, 3); + int cn0_samples = configuration->property(role + ".cn0_samples", 20); + if (FLAGS_cn0_samples != 20) cn0_samples = FLAGS_cn0_samples; + trk_param_fpga.cn0_samples = cn0_samples; + int cn0_min = configuration->property(role + ".cn0_min", 25); + if (FLAGS_cn0_min != 25) cn0_min = FLAGS_cn0_min; + trk_param_fpga.cn0_min = cn0_min; + int max_lock_fail = configuration->property(role + ".max_lock_fail", 50); + if (FLAGS_max_lock_fail != 50) max_lock_fail = FLAGS_max_lock_fail; + trk_param_fpga.max_lock_fail = max_lock_fail; + double carrier_lock_th = configuration->property(role + ".carrier_lock_th", 0.85); + if (FLAGS_carrier_lock_th != 0.85) carrier_lock_th = FLAGS_carrier_lock_th; + trk_param_fpga.carrier_lock_th = carrier_lock_th; + + // FPGA configuration parameters + std::string default_device_name = "/dev/uio"; + std::string device_name = configuration->property(role + ".devicename", default_device_name); + trk_param_fpga.device_name = device_name; + unsigned int device_base = configuration->property(role + ".device_base", 1); + trk_param_fpga.device_base = device_base; + + //################# PRE-COMPUTE ALL THE CODES ################# + d_ca_codes = static_cast(volk_gnsssdr_malloc(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS * NUM_PRNs) * sizeof(int), volk_gnsssdr_get_alignment())); + for (unsigned int PRN = 1; PRN <= NUM_PRNs; PRN++) + { + gps_l1_ca_code_gen_int(&d_ca_codes[(int(GPS_L1_CA_CODE_LENGTH_CHIPS)) * (PRN - 1)], PRN, 0); + } + trk_param_fpga.ca_codes = d_ca_codes; + trk_param_fpga.code_length = GPS_L1_CA_CODE_LENGTH_CHIPS; + + //################# MAKE TRACKING GNURadio object ################### + tracking_fpga_sc = dll_pll_veml_make_tracking_fpga(trk_param_fpga); channel_ = 0; DLOG(INFO) << "tracking(" << tracking_fpga_sc->unique_id() << ")"; } @@ -101,6 +146,7 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga( GpsL1CaDllPllTrackingFpga::~GpsL1CaDllPllTrackingFpga() { + delete[] d_ca_codes; } @@ -131,7 +177,7 @@ void GpsL1CaDllPllTrackingFpga::connect(gr::top_block_sptr top_block) if (top_block) { /* top_block is not null */ }; - //nothing to connect, now the tracking uses gr_sync_decimator + //nothing to connect } @@ -140,7 +186,7 @@ void GpsL1CaDllPllTrackingFpga::disconnect(gr::top_block_sptr top_block) if (top_block) { /* top_block is not null */ }; - //nothing to disconnect, now the tracking uses gr_sync_decimator + //nothing to disconnect } @@ -154,9 +200,3 @@ gr::basic_block_sptr GpsL1CaDllPllTrackingFpga::get_right_block() { return tracking_fpga_sc; } - - -void GpsL1CaDllPllTrackingFpga::reset(void) -{ - // tracking_fpga_sc->reset(); -} diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.h b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.h index 0abb88220..4c5a171d2 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.h +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.h @@ -1,8 +1,9 @@ /*! * \file gps_l1_ca_dll_pll_tracking.h * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for GPS L1 C/A to a TrackingInterface - * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com + * for GPS L1 C/A to a TrackingInterface that uses the FPGA + * \author Marc Majoral, 2018. mmajoral(at)cttc.es + * Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com * Javier Arribas, 2011. jarribas(at)cttc.es * * Code DLL + carrier PLL according to the algorithms described in: @@ -38,9 +39,8 @@ #ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_FPGA_H_ #define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_FPGA_H_ - #include "tracking_interface.h" -#include "gps_l1_ca_dll_pll_tracking_fpga_sc.h" +#include "dll_pll_veml_tracking_fpga.h" #include class ConfigurationInterface; @@ -92,16 +92,14 @@ public: void start_tracking() override; - void reset(void); - private: - //gps_l1_ca_dll_pll_tracking_cc_sptr tracking_; - gps_l1_ca_dll_pll_tracking_fpga_sc_sptr tracking_fpga_sc; + dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc; size_t item_size_; unsigned int channel_; std::string role_; unsigned int in_streams_; unsigned int out_streams_; + int* d_ca_codes; }; #endif // GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_FPGA_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt index 4cb869a79..2010ef817 100644 --- a/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt @@ -23,7 +23,7 @@ if(ENABLE_CUDA) endif(ENABLE_CUDA) if(ENABLE_FPGA) - set(OPT_TRACKING_BLOCKS ${OPT_TRACKING_BLOCKS} gps_l1_ca_dll_pll_tracking_fpga_sc.cc) + set(OPT_TRACKING_BLOCKS ${OPT_TRACKING_BLOCKS} dll_pll_veml_tracking_fpga.cc) endif(ENABLE_FPGA) set(TRACKING_GR_BLOCKS_SOURCES diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc index 515e21ada..372aec4ff 100755 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc @@ -144,21 +144,20 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(dllpllconf_t conf_) : gr::block("dl d_correlation_length_ms = 1; d_code_samples_per_chip = 1; d_code_length_chips = static_cast(GPS_L5i_CODE_LENGTH_CHIPS); - // GPS L5 does not have pilot secondary code d_secondary = true; - interchange_iq = false; if (trk_parameters.track_pilot) { d_secondary_code_length = static_cast(GPS_L5q_NH_CODE_LENGTH); d_secondary_code_string = const_cast(&GPS_L5q_NH_CODE_STR); signal_pretty_name = signal_pretty_name + "Q"; - //interchange_iq = true; + interchange_iq = true; } else { d_secondary_code_length = static_cast(GPS_L5i_NH_CODE_LENGTH); d_secondary_code_string = const_cast(&GPS_L5i_NH_CODE_STR); signal_pretty_name = signal_pretty_name + "I"; + interchange_iq = false; } } else @@ -212,18 +211,18 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(dllpllconf_t conf_) : gr::block("dl d_code_samples_per_chip = 1; d_code_length_chips = static_cast(Galileo_E5a_CODE_LENGTH_CHIPS); d_secondary = true; - interchange_iq = false; if (trk_parameters.track_pilot) { d_secondary_code_length = static_cast(Galileo_E5a_Q_SECONDARY_CODE_LENGTH); signal_pretty_name = signal_pretty_name + "Q"; - // interchange_iq = true; + interchange_iq = true; } else { d_secondary_code_length = static_cast(Galileo_E5a_I_SECONDARY_CODE_LENGTH); d_secondary_code_string = const_cast(&Galileo_E5a_I_SECONDARY_CODE); signal_pretty_name = signal_pretty_name + "I"; + interchange_iq = false; } } else diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc new file mode 100644 index 000000000..fe856cded --- /dev/null +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc @@ -0,0 +1,1474 @@ +/*! + * \file dll_pll_veml_tracking.cc + * \brief Implementation of a code DLL + carrier PLL tracking block using an FPGA + * \author Marc Majoral, 2018. marc.majoral(at)cttc.es + * Antonio Ramos, 2018 antonio.ramosdet(at)gmail.com + * + * Code DLL + carrier PLL according to the algorithms described in: + * [1] K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, + * A Software-Defined GPS and Galileo Receiver. A Single-Frequency + * Approach, Birkhauser, 2007 + * + * ------------------------------------------------------------------------- + * + * Copyright (C) 2010-2018 (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 "dll_pll_veml_tracking_fpga.h" +#include "tracking_discriminators.h" +#include "lock_detectors.h" +#include "control_message_factory.h" +#include "MATH_CONSTANTS.h" +#include "Galileo_E1.h" +#include "Galileo_E5a.h" +#include "GPS_L1_CA.h" +#include "GPS_L2C.h" +#include "gps_l2c_signal.h" +#include "GPS_L5.h" +#include "gps_l5_signal.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using google::LogMessage; + +dll_pll_veml_tracking_fpga_sptr dll_pll_veml_make_tracking_fpga(dllpllconf_fpga_t conf_) +{ + return dll_pll_veml_tracking_fpga_sptr(new dll_pll_veml_tracking_fpga(conf_)); +} + + +dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(dllpllconf_fpga_t conf_) : gr::block("dll_pll_veml_tracking_fpga", gr::io_signature::make(0, 0, sizeof(lv_16sc_t)), + gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) +{ + trk_parameters = conf_; + // Telemetry bit synchronization message port input + this->message_port_register_out(pmt::mp("events")); + this->set_relative_rate(1.0 / static_cast(trk_parameters.vector_length)); + + // initialize internal vars + d_veml = false; + d_cloop = true; + d_synchonizing = false; + d_code_chip_rate = 0.0; + d_secondary_code_length = 0; + d_secondary_code_string = nullptr; + signal_type = std::string(trk_parameters.signal); + + std::map map_signal_pretty_name; + map_signal_pretty_name["1C"] = "L1 C/A"; + map_signal_pretty_name["1B"] = "E1"; + map_signal_pretty_name["1G"] = "L1 C/A"; + map_signal_pretty_name["2S"] = "L2C"; + map_signal_pretty_name["2G"] = "L2 C/A"; + map_signal_pretty_name["5X"] = "E5a"; + map_signal_pretty_name["L5"] = "L5"; + + signal_pretty_name = map_signal_pretty_name[signal_type]; + + if (trk_parameters.system == 'G') + { + systemName = "GPS"; + if (signal_type.compare("1C") == 0) + { + d_signal_carrier_freq = GPS_L1_FREQ_HZ; + d_code_period = GPS_L1_CA_CODE_PERIOD; + d_code_chip_rate = GPS_L1_CA_CODE_RATE_HZ; + d_symbols_per_bit = GPS_CA_TELEMETRY_SYMBOLS_PER_BIT; + d_correlation_length_ms = 1; + d_code_samples_per_chip = 1; + d_code_length_chips = static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS); + // GPS L1 C/A does not have pilot component nor secondary code + d_secondary = false; + trk_parameters.track_pilot = false; + interchange_iq = false; + } + else if (signal_type.compare("2S") == 0) + { + d_signal_carrier_freq = GPS_L2_FREQ_HZ; + d_code_period = GPS_L2_M_PERIOD; + d_code_chip_rate = GPS_L2_M_CODE_RATE_HZ; + d_code_length_chips = static_cast(GPS_L2_M_CODE_LENGTH_CHIPS); + d_symbols_per_bit = GPS_L2_SAMPLES_PER_SYMBOL; + d_correlation_length_ms = 20; + d_code_samples_per_chip = 1; + // GPS L2 does not have pilot component nor secondary code + d_secondary = false; + trk_parameters.track_pilot = false; + interchange_iq = false; + } + else if (signal_type.compare("L5") == 0) + { + d_signal_carrier_freq = GPS_L5_FREQ_HZ; + d_code_period = GPS_L5i_PERIOD; + d_code_chip_rate = GPS_L5i_CODE_RATE_HZ; + d_symbols_per_bit = GPS_L5_SAMPLES_PER_SYMBOL; + d_correlation_length_ms = 1; + d_code_samples_per_chip = 1; + d_code_length_chips = static_cast(GPS_L5i_CODE_LENGTH_CHIPS); + d_secondary = true; + if (trk_parameters.track_pilot) + { + d_secondary_code_length = static_cast(GPS_L5q_NH_CODE_LENGTH); + d_secondary_code_string = const_cast(&GPS_L5q_NH_CODE_STR); + signal_pretty_name = signal_pretty_name + "Q"; + interchange_iq = true; + } + else + { + d_secondary_code_length = static_cast(GPS_L5i_NH_CODE_LENGTH); + d_secondary_code_string = const_cast(&GPS_L5i_NH_CODE_STR); + signal_pretty_name = signal_pretty_name + "I"; + interchange_iq = false; + } + } + else + { + LOG(WARNING) << "Invalid Signal argument when instantiating tracking blocks"; + std::cerr << "Invalid Signal argument when instantiating tracking blocks" << std::endl; + d_correlation_length_ms = 1; + d_secondary = false; + interchange_iq = false; + d_signal_carrier_freq = 0.0; + d_code_period = 0.0; + d_code_length_chips = 0; + d_code_samples_per_chip = 0; + d_symbols_per_bit = 0; + } + } + else if (trk_parameters.system == 'E') + { + systemName = "Galileo"; + if (signal_type.compare("1B") == 0) + { + d_signal_carrier_freq = Galileo_E1_FREQ_HZ; + d_code_period = Galileo_E1_CODE_PERIOD; + d_code_chip_rate = Galileo_E1_CODE_CHIP_RATE_HZ; + d_code_length_chips = static_cast(Galileo_E1_B_CODE_LENGTH_CHIPS); + d_symbols_per_bit = 1; + d_correlation_length_ms = 4; + d_code_samples_per_chip = 2; // CBOC disabled: 2 samples per chip. CBOC enabled: 12 samples per chip + d_veml = true; + if (trk_parameters.track_pilot) + { + d_secondary = true; + d_secondary_code_length = static_cast(Galileo_E1_C_SECONDARY_CODE_LENGTH); + d_secondary_code_string = const_cast(&Galileo_E1_C_SECONDARY_CODE); + signal_pretty_name = signal_pretty_name + "C"; + } + else + { + d_secondary = false; + signal_pretty_name = signal_pretty_name + "B"; + } + interchange_iq = false; // Note that E1-B and E1-C are in anti-phase, NOT IN QUADRATURE. See Galileo ICD. + } + else if (signal_type.compare("5X") == 0) + { + d_signal_carrier_freq = Galileo_E5a_FREQ_HZ; + d_code_period = GALILEO_E5a_CODE_PERIOD; + d_code_chip_rate = Galileo_E5a_CODE_CHIP_RATE_HZ; + d_symbols_per_bit = 20; + d_correlation_length_ms = 1; + d_code_samples_per_chip = 1; + d_code_length_chips = static_cast(Galileo_E5a_CODE_LENGTH_CHIPS); + d_secondary = true; + if (trk_parameters.track_pilot) + { + d_secondary_code_length = static_cast(Galileo_E5a_Q_SECONDARY_CODE_LENGTH); + signal_pretty_name = signal_pretty_name + "Q"; + interchange_iq = true; + } + else + { + d_secondary_code_length = static_cast(Galileo_E5a_I_SECONDARY_CODE_LENGTH); + d_secondary_code_string = const_cast(&Galileo_E5a_I_SECONDARY_CODE); + signal_pretty_name = signal_pretty_name + "I"; + interchange_iq = false; + } + } + else + { + LOG(WARNING) << "Invalid Signal argument when instantiating tracking blocks"; + std::cout << "Invalid Signal argument when instantiating tracking blocks" << std::endl; + d_correlation_length_ms = 1; + d_secondary = false; + interchange_iq = false; + d_signal_carrier_freq = 0.0; + d_code_period = 0.0; + d_code_length_chips = 0; + d_code_samples_per_chip = 0; + d_symbols_per_bit = 0; + } + } + else + { + LOG(WARNING) << "Invalid System argument when instantiating tracking blocks"; + std::cerr << "Invalid System argument when instantiating tracking blocks" << std::endl; + d_correlation_length_ms = 1; + d_secondary = false; + interchange_iq = false; + d_signal_carrier_freq = 0.0; + d_code_period = 0.0; + d_code_length_chips = 0; + d_code_samples_per_chip = 0; + d_symbols_per_bit = 0; + } + T_chip_seconds = 0.0; + T_prn_seconds = 0.0; + T_prn_samples = 0.0; + K_blk_samples = 0.0; + + // Initialize tracking ========================================== + d_code_loop_filter = Tracking_2nd_DLL_filter(static_cast(d_code_period)); + d_carrier_loop_filter = Tracking_2nd_PLL_filter(static_cast(d_code_period)); + d_carrier_loop_filter.set_PLL_BW(trk_parameters.pll_bw_hz); + d_code_loop_filter.set_DLL_BW(trk_parameters.dll_bw_hz); + + if (d_veml) + { + // Very-Early, Early, Prompt, Late, Very-Late + d_n_correlator_taps = 5; + } + else + { + // Early, Prompt, Late + d_n_correlator_taps = 3; + } + + d_correlator_outs = static_cast(volk_gnsssdr_malloc(d_n_correlator_taps * sizeof(gr_complex), volk_gnsssdr_get_alignment())); + d_local_code_shift_chips = static_cast(volk_gnsssdr_malloc(d_n_correlator_taps * sizeof(float), volk_gnsssdr_get_alignment())); + std::fill_n(d_correlator_outs, d_n_correlator_taps, gr_complex(0.0, 0.0)); + + // map memory pointers of correlator outputs + if (d_veml) + { + d_Very_Early = &d_correlator_outs[0]; + d_Early = &d_correlator_outs[1]; + d_Prompt = &d_correlator_outs[2]; + d_Late = &d_correlator_outs[3]; + d_Very_Late = &d_correlator_outs[4]; + d_local_code_shift_chips[0] = -trk_parameters.very_early_late_space_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[1] = -trk_parameters.early_late_space_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[2] = 0.0; + d_local_code_shift_chips[3] = trk_parameters.early_late_space_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[4] = trk_parameters.very_early_late_space_chips * static_cast(d_code_samples_per_chip); + d_prompt_data_shift = &d_local_code_shift_chips[2]; + } + else + { + d_Very_Early = nullptr; + d_Early = &d_correlator_outs[0]; + d_Prompt = &d_correlator_outs[1]; + d_Late = &d_correlator_outs[2]; + d_Very_Late = nullptr; + d_local_code_shift_chips[0] = -trk_parameters.early_late_space_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[1] = 0.0; + d_local_code_shift_chips[2] = trk_parameters.early_late_space_chips * static_cast(d_code_samples_per_chip); + d_prompt_data_shift = &d_local_code_shift_chips[1]; + } + + if (trk_parameters.extend_correlation_symbols > 1) + { + d_enable_extended_integration = true; + } + else + { + d_enable_extended_integration = false; + trk_parameters.extend_correlation_symbols = 1; + } + + // Enable Data component prompt correlator (slave to Pilot prompt) if tracking uses Pilot signal + if (trk_parameters.track_pilot) + { + // Extra correlator for the data component + d_Prompt_Data = static_cast(volk_gnsssdr_malloc(sizeof(gr_complex), volk_gnsssdr_get_alignment())); + d_Prompt_Data[0] = gr_complex(0.0, 0.0); + } + else + { + d_Prompt_Data = nullptr; + } + + //--- Initializations ---// + // Initial code frequency basis of NCO + d_code_freq_chips = d_code_chip_rate; + // Residual code phase (in chips) + d_rem_code_phase_samples = 0.0; + // Residual carrier phase + d_rem_carr_phase_rad = 0.0; + + // sample synchronization + d_sample_counter = 0; + d_acq_sample_stamp = 0; + + d_current_prn_length_samples = static_cast(trk_parameters.vector_length); + d_next_prn_length_samples = d_current_prn_length_samples; + d_correlation_length_samples = static_cast(trk_parameters.vector_length); // this one is only for initialisation and does not change its value (MM) + + // CN0 estimation and lock detector buffers + d_cn0_estimation_counter = 0; + d_Prompt_buffer = new gr_complex[trk_parameters.cn0_samples]; + d_carrier_lock_test = 1.0; + d_CN0_SNV_dB_Hz = 0.0; + d_carrier_lock_fail_counter = 0; + d_carrier_lock_threshold = trk_parameters.carrier_lock_th; + + clear_tracking_vars(); + + d_acquisition_gnss_synchro = nullptr; + d_channel = 0; + d_acq_code_phase_samples = 0.0; + d_acq_carrier_doppler_hz = 0.0; + d_carrier_doppler_hz = 0.0; + d_acc_carrier_phase_rad = 0.0; + + d_extend_correlation_symbols_count = 0; + d_code_phase_step_chips = 0.0; + d_carrier_phase_step_rad = 0.0; + d_rem_code_phase_chips = 0.0; + d_K_blk_samples = 0.0; + d_code_phase_samples = 0.0; + d_last_prompt = gr_complex(0.0, 0.0); + d_state = 0; // initial state: standby + + // create multicorrelator class + std::string device_name = trk_parameters.device_name; + unsigned int device_base = trk_parameters.device_base; + int *ca_codes = trk_parameters.ca_codes; + unsigned int code_length = trk_parameters.code_length; + multicorrelator_fpga = std::make_shared(d_n_correlator_taps, device_name, device_base, ca_codes, code_length); + multicorrelator_fpga->set_output_vectors(d_correlator_outs); + + d_pull_in = 0; +} + +void dll_pll_veml_tracking_fpga::start_tracking() +{ + /* + * correct the code phase according to the delay between acq and trk + */ + d_acq_code_phase_samples = d_acquisition_gnss_synchro->Acq_delay_samples; + d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz; + d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples; + + double acq_trk_diff_seconds = 0; // when using the FPGA we don't use the global sample counter + // Doppler effect Fd = (C / (C + Vr)) * F + double radial_velocity = (d_signal_carrier_freq + d_acq_carrier_doppler_hz) / d_signal_carrier_freq; + // new chip and prn sequence periods based on acq Doppler + d_code_freq_chips = radial_velocity * d_code_chip_rate; + d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in; + double T_chip_mod_seconds = 1.0 / d_code_freq_chips; + double T_prn_mod_seconds = T_chip_mod_seconds * static_cast(d_code_length_chips); + double T_prn_mod_samples = T_prn_mod_seconds * trk_parameters.fs_in; + + d_current_prn_length_samples = std::round(T_prn_mod_samples); + d_next_prn_length_samples = d_current_prn_length_samples; + double T_prn_true_seconds = static_cast(d_code_length_chips) / d_code_chip_rate; + double T_prn_true_samples = T_prn_true_seconds * trk_parameters.fs_in; + double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds; + double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds; + double corrected_acq_phase_samples = std::fmod(d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * trk_parameters.fs_in, T_prn_true_samples); + if (corrected_acq_phase_samples < 0.0) + { + corrected_acq_phase_samples += T_prn_mod_samples; + } + double delay_correction_samples = d_acq_code_phase_samples - corrected_acq_phase_samples; + + d_acq_code_phase_samples = corrected_acq_phase_samples; + + d_carrier_doppler_hz = d_acq_carrier_doppler_hz; + d_carrier_phase_step_rad = PI_2 * d_carrier_doppler_hz / trk_parameters.fs_in; + + // DLL/PLL filter initialization + d_carrier_loop_filter.initialize(); // initialize the carrier filter + d_code_loop_filter.initialize(); // initialize the code filter + + if (systemName.compare("GPS") == 0 and signal_type.compare("1C") == 0) + { + // nothing to compute : the local codes are pre-computed in the adapter class + } + else if (systemName.compare("GPS") == 0 and signal_type.compare("2S") == 0) + { + // nothing to compute : the local codes are pre-computed in the adapter class + } + else if (systemName.compare("GPS") == 0 and signal_type.compare("L5") == 0) + { + if (trk_parameters.track_pilot) + { + d_Prompt_Data[0] = gr_complex(0.0, 0.0); + } + else + { + // nothing to compute : the local codes are pre-computed in the adapter class + } + } + else if (systemName.compare("Galileo") == 0 and signal_type.compare("1B") == 0) + { + if (trk_parameters.track_pilot) + { + char pilot_signal[3] = "1C"; + d_Prompt_Data[0] = gr_complex(0.0, 0.0); + } + else + { + // nothing to compute : the local codes are pre-computed in the adapter class + } + } + else if (systemName.compare("Galileo") == 0 and signal_type.compare("5X") == 0) + { + if (trk_parameters.track_pilot) + { + d_secondary_code_string = const_cast(&Galileo_E5a_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN - 1]); + for (unsigned int i = 0; i < d_code_length_chips; i++) + { + // nothing to compute : the local codes are pre-computed in the adapter class + } + d_Prompt_Data[0] = gr_complex(0.0, 0.0); + } + else + { + for (unsigned int i = 0; i < d_code_length_chips; i++) + { + // nothing to compute : the local codes are pre-computed in the adapter class + } + } + } + + std::fill_n(d_correlator_outs, d_n_correlator_taps, gr_complex(0.0, 0.0)); + + d_carrier_lock_fail_counter = 0; + d_rem_code_phase_samples = 0.0; + d_rem_carr_phase_rad = 0.0; + d_rem_code_phase_chips = 0.0; + d_acc_carrier_phase_rad = 0.0; + d_cn0_estimation_counter = 0; + d_carrier_lock_test = 1.0; + d_CN0_SNV_dB_Hz = 0.0; + + if (d_veml) + { + d_local_code_shift_chips[0] = -trk_parameters.very_early_late_space_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[1] = -trk_parameters.early_late_space_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[3] = trk_parameters.early_late_space_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[4] = trk_parameters.very_early_late_space_chips * static_cast(d_code_samples_per_chip); + } + else + { + d_local_code_shift_chips[0] = -trk_parameters.early_late_space_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[2] = trk_parameters.early_late_space_chips * static_cast(d_code_samples_per_chip); + } + + d_code_phase_samples = d_acq_code_phase_samples; + d_code_loop_filter.set_DLL_BW(trk_parameters.dll_bw_hz); + d_carrier_loop_filter.set_PLL_BW(trk_parameters.pll_bw_hz); + d_carrier_loop_filter.set_pdi(static_cast(d_code_period)); + d_code_loop_filter.set_pdi(static_cast(d_code_period)); + + // DEBUG OUTPUT + std::cout << "Tracking of " << systemName << " " << signal_pretty_name << " signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl; + LOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel; + + d_synchonizing = false; + d_cloop = true; + d_Prompt_buffer_deque.clear(); + d_last_prompt = gr_complex(0.0, 0.0); + LOG(INFO) << "PULL-IN Doppler [Hz] = " << d_carrier_doppler_hz + << ". Code Phase correction [samples] = " << delay_correction_samples + << ". PULL-IN Code Phase [samples] = " << d_acq_code_phase_samples; + multicorrelator_fpga->set_local_code_and_taps(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS), d_local_code_shift_chips, d_acquisition_gnss_synchro->PRN); + d_pull_in = 1; + // enable tracking pull-in and d_state at the end to avoid general work from starting pull-in before the start tracking function is finished + d_state = 1; +} + +dll_pll_veml_tracking_fpga::~dll_pll_veml_tracking_fpga() +{ + if (d_dump_file.is_open()) + { + try + { + d_dump_file.close(); + } + catch (const std::exception &ex) + { + LOG(WARNING) << "Exception in destructor " << ex.what(); + } + } + if (trk_parameters.dump) + { + if (d_channel == 0) + { + std::cout << "Writing .mat files ..."; + } + save_matfile(); + if (d_channel == 0) + { + std::cout << " done." << std::endl; + } + } + try + { + volk_gnsssdr_free(d_local_code_shift_chips); + volk_gnsssdr_free(d_correlator_outs); + if (trk_parameters.track_pilot) + { + volk_gnsssdr_free(d_Prompt_Data); + } + delete[] d_Prompt_buffer; + multicorrelator_fpga->free(); + } + catch (const std::exception &ex) + { + LOG(WARNING) << "Exception in destructor " << ex.what(); + } +} + + +bool dll_pll_veml_tracking_fpga::acquire_secondary() +{ + // ******* preamble correlation ******** + int corr_value = 0; + for (unsigned int i = 0; i < d_secondary_code_length; i++) + { + if (d_Prompt_buffer_deque.at(i).real() < 0.0) // symbols clipping + { + if (d_secondary_code_string->at(i) == '0') + { + corr_value++; + } + else + { + corr_value--; + } + } + else + { + if (d_secondary_code_string->at(i) == '0') + { + corr_value--; + } + else + { + corr_value++; + } + } + } + + if (abs(corr_value) == d_secondary_code_length) + { + return true; + } + else + { + return false; + } +} + + +bool dll_pll_veml_tracking_fpga::cn0_and_tracking_lock_status(double coh_integration_time_s) +{ + // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### + if (d_cn0_estimation_counter < trk_parameters.cn0_samples) + { + // fill buffer with prompt correlator output values + d_Prompt_buffer[d_cn0_estimation_counter] = d_P_accu; + d_cn0_estimation_counter++; + return true; + } + else + { + d_cn0_estimation_counter = 0; + // Code lock indicator + d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, trk_parameters.cn0_samples, coh_integration_time_s); + // Carrier lock indicator + d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, trk_parameters.cn0_samples); + // Loss of lock detection + if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < trk_parameters.cn0_min) + { + d_carrier_lock_fail_counter++; + } + else + { + if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; + } + if (d_carrier_lock_fail_counter > trk_parameters.max_lock_fail) + { + std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; + LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; + this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock + d_carrier_lock_fail_counter = 0; + multicorrelator_fpga->unlock_channel(); + return false; + } + else + { + return true; + } + } +} + + +void dll_pll_veml_tracking_fpga::run_dll_pll() +{ + // ################## PLL ########################################################## + // PLL discriminator + if (d_cloop) + { + // Costas loop discriminator, insensitive to 180 deg phase transitions + d_carr_error_hz = pll_cloop_two_quadrant_atan(d_P_accu) / PI_2; + } + else + { + // Secondary code acquired. No symbols transition should be present in the signal + d_carr_error_hz = pll_four_quadrant_atan(d_P_accu) / PI_2; + } + + // Carrier discriminator filter + d_carr_error_filt_hz = d_carrier_loop_filter.get_carrier_nco(d_carr_error_hz); + // New carrier Doppler frequency estimation + d_carrier_doppler_hz = d_acq_carrier_doppler_hz + d_carr_error_filt_hz; + // New code Doppler frequency estimation + d_code_freq_chips = (1.0 + (d_carrier_doppler_hz / d_signal_carrier_freq)) * d_code_chip_rate; + + // ################## DLL ########################################################## + // DLL discriminator + if (d_veml) + { + d_code_error_chips = dll_nc_vemlp_normalized(d_VE_accu, d_E_accu, d_L_accu, d_VL_accu); // [chips/Ti] + } + else + { + d_code_error_chips = dll_nc_e_minus_l_normalized(d_E_accu, d_L_accu); // [chips/Ti] + } + // Code discriminator filter + d_code_error_filt_chips = d_code_loop_filter.get_code_nco(d_code_error_chips); // [chips/second] +} + + +void dll_pll_veml_tracking_fpga::clear_tracking_vars() +{ + std::fill_n(d_correlator_outs, d_n_correlator_taps, gr_complex(0.0, 0.0)); + if (trk_parameters.track_pilot) *d_Prompt_Data = gr_complex(0.0, 0.0); + d_carr_error_hz = 0.0; + d_carr_error_filt_hz = 0.0; + d_code_error_chips = 0.0; + d_code_error_filt_chips = 0.0; + d_current_symbol = 0; + d_Prompt_buffer_deque.clear(); + d_last_prompt = gr_complex(0.0, 0.0); +} + + +void dll_pll_veml_tracking_fpga::update_tracking_vars() +{ + T_chip_seconds = 1.0 / d_code_freq_chips; + T_prn_seconds = T_chip_seconds * static_cast(d_code_length_chips); + double code_error_filt_secs = T_prn_seconds * d_code_error_filt_chips * T_chip_seconds; //[seconds] + + // ################## CARRIER AND CODE NCO BUFFER ALIGNMENT ####################### + // keep alignment parameters for the next input buffer + // Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation + T_prn_samples = T_prn_seconds * trk_parameters.fs_in; + K_blk_samples = T_prn_samples + d_rem_code_phase_samples + code_error_filt_secs * trk_parameters.fs_in; + d_next_prn_length_samples = round(K_blk_samples); + //################### PLL COMMANDS ################################################# + // carrier phase step (NCO phase increment per sample) [rads/sample] + d_carrier_phase_step_rad = PI_2 * d_carrier_doppler_hz / trk_parameters.fs_in; + // remnant carrier phase to prevent overflow in the code NCO + d_rem_carr_phase_rad += d_carrier_phase_step_rad * static_cast(d_current_prn_length_samples); + d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, PI_2); + // carrier phase accumulator + d_acc_carrier_phase_rad -= d_carrier_phase_step_rad * static_cast(d_current_prn_length_samples); + + //################### DLL COMMANDS ################################################# + // code phase step (Code resampler phase increment per sample) [chips/sample] + d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in; + // remnant code phase [chips] + d_rem_code_phase_samples = K_blk_samples - static_cast(d_current_prn_length_samples); // rounding error < 1 sample + d_rem_code_phase_chips = d_code_freq_chips * d_rem_code_phase_samples / trk_parameters.fs_in; +} + + +void dll_pll_veml_tracking_fpga::save_correlation_results() +{ + if (d_secondary) + { + if (d_secondary_code_string->at(d_current_symbol) == '0') + { + if (d_veml) + { + d_VE_accu += *d_Very_Early; + d_VL_accu += *d_Very_Late; + } + d_E_accu += *d_Early; + d_P_accu += *d_Prompt; + d_L_accu += *d_Late; + } + else + { + if (d_veml) + { + d_VE_accu -= *d_Very_Early; + d_VL_accu -= *d_Very_Late; + } + d_E_accu -= *d_Early; + d_P_accu -= *d_Prompt; + d_L_accu -= *d_Late; + } + d_current_symbol++; + // secondary code roll-up + d_current_symbol %= d_secondary_code_length; + } + else + { + if (d_veml) + { + d_VE_accu += *d_Very_Early; + d_VL_accu += *d_Very_Late; + } + d_E_accu += *d_Early; + d_P_accu += *d_Prompt; + d_L_accu += *d_Late; + d_current_symbol++; + d_current_symbol %= d_symbols_per_bit; + } + // If tracking pilot, disable Costas loop + if (trk_parameters.track_pilot) + d_cloop = false; + else + d_cloop = true; +} + + +void dll_pll_veml_tracking_fpga::log_data(bool integrating) +{ + if (trk_parameters.dump) + { + // Dump results to file + float prompt_I; + float prompt_Q; + float tmp_VE, tmp_E, tmp_P, tmp_L, tmp_VL; + float tmp_float; + double tmp_double; + if (trk_parameters.track_pilot) + { + if (interchange_iq) + { + prompt_I = d_Prompt_Data->imag(); + prompt_Q = d_Prompt_Data->real(); + } + else + { + prompt_I = d_Prompt_Data->real(); + prompt_Q = d_Prompt_Data->imag(); + } + } + else + { + if (interchange_iq) + { + prompt_I = d_Prompt->imag(); + prompt_Q = d_Prompt->real(); + } + else + { + prompt_I = d_Prompt->real(); + prompt_Q = d_Prompt->imag(); + } + } + if (d_veml) + { + tmp_VE = std::abs(d_VE_accu); + tmp_VL = std::abs(d_VL_accu); + } + else + { + tmp_VE = 0.0; + tmp_VL = 0.0; + } + tmp_E = std::abs(d_E_accu); + tmp_P = std::abs(d_P_accu); + tmp_L = std::abs(d_L_accu); + if (integrating) + { + //TODO: Improve this solution! + // It compensates the amplitude difference while integrating + if (d_extend_correlation_symbols_count > 0) + { + float scale_factor = static_cast(trk_parameters.extend_correlation_symbols) / static_cast(d_extend_correlation_symbols_count); + tmp_VE *= scale_factor; + tmp_E *= scale_factor; + tmp_P *= scale_factor; + tmp_L *= scale_factor; + tmp_VL *= scale_factor; + } + } + + try + { + // Dump correlators output + d_dump_file.write(reinterpret_cast(&tmp_VE), sizeof(float)); + d_dump_file.write(reinterpret_cast(&tmp_E), sizeof(float)); + d_dump_file.write(reinterpret_cast(&tmp_P), sizeof(float)); + d_dump_file.write(reinterpret_cast(&tmp_L), sizeof(float)); + d_dump_file.write(reinterpret_cast(&tmp_VL), sizeof(float)); + // PROMPT I and Q (to analyze navigation symbols) + d_dump_file.write(reinterpret_cast(&prompt_I), sizeof(float)); + d_dump_file.write(reinterpret_cast(&prompt_Q), sizeof(float)); + // PRN start sample stamp + d_dump_file.write(reinterpret_cast(&d_sample_counter), sizeof(unsigned long int)); + // accumulated carrier phase + tmp_float = d_acc_carrier_phase_rad; + d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); + // carrier and code frequency + tmp_float = d_carrier_doppler_hz; + d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); + tmp_float = d_code_freq_chips; + d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); + // PLL commands + tmp_float = d_carr_error_hz; + d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); + tmp_float = d_carr_error_filt_hz; + d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); + // DLL commands + tmp_float = d_code_error_chips; + d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); + tmp_float = d_code_error_filt_chips; + d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); + // CN0 and carrier lock test + tmp_float = d_CN0_SNV_dB_Hz; + d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); + tmp_float = d_carrier_lock_test; + d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); + // AUX vars (for debug purposes) + tmp_float = d_rem_code_phase_samples; + d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); + tmp_double = static_cast(d_sample_counter + d_current_prn_length_samples); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); + // PRN + unsigned int prn_ = d_acquisition_gnss_synchro->PRN; + d_dump_file.write(reinterpret_cast(&prn_), sizeof(unsigned int)); + } + catch (const std::ifstream::failure &e) + { + LOG(WARNING) << "Exception writing trk dump file " << e.what(); + } + } +} + + +int dll_pll_veml_tracking_fpga::save_matfile() +{ + // READ DUMP FILE + std::ifstream::pos_type size; + int number_of_double_vars = 1; + int number_of_float_vars = 17; + int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars + + sizeof(float) * number_of_float_vars + sizeof(unsigned int); + std::ifstream dump_file; + dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); + try + { + dump_file.open(trk_parameters.dump_filename.c_str(), std::ios::binary | std::ios::ate); + } + catch (const std::ifstream::failure &e) + { + std::cerr << "Problem opening dump file:" << e.what() << std::endl; + return 1; + } + // count number of epochs and rewind + long int num_epoch = 0; + if (dump_file.is_open()) + { + size = dump_file.tellg(); + num_epoch = static_cast(size) / static_cast(epoch_size_bytes); + dump_file.seekg(0, std::ios::beg); + } + else + { + return 1; + } + float *abs_VE = new float[num_epoch]; + float *abs_E = new float[num_epoch]; + float *abs_P = new float[num_epoch]; + float *abs_L = new float[num_epoch]; + float *abs_VL = new float[num_epoch]; + float *Prompt_I = new float[num_epoch]; + float *Prompt_Q = new float[num_epoch]; + unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch]; + float *acc_carrier_phase_rad = new float[num_epoch]; + float *carrier_doppler_hz = new float[num_epoch]; + float *code_freq_chips = new float[num_epoch]; + float *carr_error_hz = new float[num_epoch]; + float *carr_error_filt_hz = new float[num_epoch]; + float *code_error_chips = new float[num_epoch]; + float *code_error_filt_chips = new float[num_epoch]; + float *CN0_SNV_dB_Hz = new float[num_epoch]; + float *carrier_lock_test = new float[num_epoch]; + float *aux1 = new float[num_epoch]; + double *aux2 = new double[num_epoch]; + unsigned int *PRN = new unsigned int[num_epoch]; + + try + { + if (dump_file.is_open()) + { + for (long int i = 0; i < num_epoch; i++) + { + dump_file.read(reinterpret_cast(&abs_VE[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&abs_E[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&abs_P[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&abs_L[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&abs_VL[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&Prompt_I[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&Prompt_Q[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&PRN_start_sample_count[i]), sizeof(unsigned long int)); + dump_file.read(reinterpret_cast(&acc_carrier_phase_rad[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&carrier_doppler_hz[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&code_freq_chips[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&carr_error_hz[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&carr_error_filt_hz[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&code_error_chips[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&code_error_filt_chips[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&CN0_SNV_dB_Hz[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&carrier_lock_test[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&aux1[i]), sizeof(float)); + dump_file.read(reinterpret_cast(&aux2[i]), sizeof(double)); + dump_file.read(reinterpret_cast(&PRN[i]), sizeof(unsigned int)); + } + } + dump_file.close(); + } + catch (const std::ifstream::failure &e) + { + std::cerr << "Problem reading dump file:" << e.what() << std::endl; + delete[] abs_VE; + delete[] abs_E; + delete[] abs_P; + delete[] abs_L; + delete[] abs_VL; + delete[] Prompt_I; + delete[] Prompt_Q; + delete[] PRN_start_sample_count; + delete[] acc_carrier_phase_rad; + delete[] carrier_doppler_hz; + delete[] code_freq_chips; + delete[] carr_error_hz; + delete[] carr_error_filt_hz; + delete[] code_error_chips; + delete[] code_error_filt_chips; + delete[] CN0_SNV_dB_Hz; + delete[] carrier_lock_test; + delete[] aux1; + delete[] aux2; + delete[] PRN; + return 1; + } + + // WRITE MAT FILE + mat_t *matfp; + matvar_t *matvar; + std::string filename = trk_parameters.dump_filename; + filename.erase(filename.length() - 4, 4); + filename.append(".mat"); + matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73); + if (reinterpret_cast(matfp) != NULL) + { + size_t dims[2] = {1, static_cast(num_epoch)}; + matvar = Mat_VarCreate("abs_VE", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_VE, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("abs_P", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_P, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("abs_L", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_L, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("abs_VL", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_VL, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("Prompt_I", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, Prompt_I, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("Prompt_Q", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, Prompt_Q, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("PRN_start_sample_count", MAT_C_UINT64, MAT_T_UINT64, 2, dims, PRN_start_sample_count, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("acc_carrier_phase_rad", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, acc_carrier_phase_rad, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("carrier_doppler_hz", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, carrier_doppler_hz, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("code_freq_chips", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, code_freq_chips, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("carr_error_hz", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, carr_error_hz, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("carr_error_filt_hz", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, carr_error_filt_hz, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("code_error_chips", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, code_error_chips, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("code_error_filt_chips", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, code_error_filt_chips, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("CN0_SNV_dB_Hz", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, CN0_SNV_dB_Hz, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("carrier_lock_test", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, carrier_lock_test, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("aux1", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, aux1, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("aux2", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, aux2, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("PRN", MAT_C_UINT32, MAT_T_UINT32, 2, dims, PRN, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + } + Mat_Close(matfp); + delete[] abs_VE; + delete[] abs_E; + delete[] abs_P; + delete[] abs_L; + delete[] abs_VL; + delete[] Prompt_I; + delete[] Prompt_Q; + delete[] PRN_start_sample_count; + delete[] acc_carrier_phase_rad; + delete[] carrier_doppler_hz; + delete[] code_freq_chips; + delete[] carr_error_hz; + delete[] carr_error_filt_hz; + delete[] code_error_chips; + delete[] code_error_filt_chips; + delete[] CN0_SNV_dB_Hz; + delete[] carrier_lock_test; + delete[] aux1; + delete[] aux2; + delete[] PRN; + return 0; +} + +void dll_pll_veml_tracking_fpga::set_channel(unsigned int channel) +{ + d_channel = channel; + multicorrelator_fpga->set_channel(d_channel); + LOG(INFO) << "Tracking Channel set to " << d_channel; + // ############# ENABLE DATA FILE LOG ################# + if (trk_parameters.dump) + { + if (!d_dump_file.is_open()) + { + try + { + trk_parameters.dump_filename.append(boost::lexical_cast(d_channel)); + trk_parameters.dump_filename.append(".dat"); + d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); + d_dump_file.open(trk_parameters.dump_filename.c_str(), std::ios::out | std::ios::binary); + LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << trk_parameters.dump_filename.c_str(); + } + catch (const std::ifstream::failure &e) + { + LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what(); + } + } + } +} + + +void dll_pll_veml_tracking_fpga::set_gnss_synchro(Gnss_Synchro *p_gnss_synchro) +{ + d_acquisition_gnss_synchro = p_gnss_synchro; +} + + +void dll_pll_veml_tracking_fpga::reset(void) +{ + multicorrelator_fpga->unlock_channel(); +} + + +int dll_pll_veml_tracking_fpga::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) +{ + // Block input data and block output stream pointers + Gnss_Synchro **out = reinterpret_cast(&output_items[0]); + + // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder + Gnss_Synchro current_synchro_data = Gnss_Synchro(); + + d_current_prn_length_samples = d_next_prn_length_samples; + current_synchro_data = *d_acquisition_gnss_synchro; + + switch (d_state) + { + case 0: // Standby - Consume samples at full throttle, do nothing + { + for (int n = 0; n < d_n_correlator_taps; n++) + { + d_correlator_outs[n] = gr_complex(0, 0); + } + + current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples; + current_synchro_data.System = {'G'}; + current_synchro_data.correlation_length_ms = 1; + break; + } + case 1: // Standby - Consume samples at full throttle, do nothing + { + d_pull_in = 0; + multicorrelator_fpga->lock_channel(); + unsigned counter_value = multicorrelator_fpga->read_sample_counter(); + unsigned num_frames = ceil((counter_value - current_synchro_data.Acq_samplestamp_samples - current_synchro_data.Acq_delay_samples) / d_correlation_length_samples); + unsigned absolute_samples_offset = current_synchro_data.Acq_delay_samples + current_synchro_data.Acq_samplestamp_samples + num_frames * d_correlation_length_samples; + multicorrelator_fpga->set_initial_sample(absolute_samples_offset); + d_sample_counter = absolute_samples_offset; + current_synchro_data.Tracking_sample_counter = absolute_samples_offset; + d_sample_counter_next = d_sample_counter; + d_state = 2; + return 0; + break; + } + + case 2: + { + d_sample_counter = d_sample_counter_next; + d_sample_counter_next = d_sample_counter + d_current_prn_length_samples; + + // ################# CARRIER WIPEOFF AND CORRELATORS ############################## + // perform carrier wipe-off and compute Early, Prompt and Late correlation + multicorrelator_fpga->Carrier_wipeoff_multicorrelator_resampler( + d_rem_carr_phase_rad, d_carrier_phase_step_rad, + d_rem_code_phase_chips, d_code_phase_step_chips, + d_current_prn_length_samples); + + // Save single correlation step variables + if (d_veml) + { + d_VE_accu = *d_Very_Early; + d_VL_accu = *d_Very_Late; + } + d_E_accu = *d_Early; + d_P_accu = *d_Prompt; + d_L_accu = *d_Late; + + if (!cn0_and_tracking_lock_status(d_code_period)) + { + clear_tracking_vars(); + d_state = 0; // loss-of-lock detected + } + else + { + bool next_state = false; + // Perform DLL/PLL tracking loop computations. Costas Loop enabled + run_dll_pll(); + update_tracking_vars(); + + // enable write dump file this cycle (valid DLL/PLL cycle) + log_data(false); + if (d_secondary) + { + // ####### SECONDARY CODE LOCK ##### + d_Prompt_buffer_deque.push_back(*d_Prompt); + if (d_Prompt_buffer_deque.size() == d_secondary_code_length) + { + next_state = acquire_secondary(); + if (next_state) + { + std::cout << systemName << " " << signal_pretty_name << " secondary code locked in channel " << d_channel + << " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl; + } + + d_Prompt_buffer_deque.pop_front(); + } + } + else if (d_symbols_per_bit > 1) //Signal does not have secondary code. Search a bit transition by sign change + { + if (d_synchonizing) + { + if (d_Prompt->real() * d_last_prompt.real() > 0.0) + { + d_current_symbol++; + } + else if (d_current_symbol > d_symbols_per_bit) + { + d_synchonizing = false; + d_current_symbol = 1; + } + else + { + d_current_symbol = 1; + d_last_prompt = *d_Prompt; + } + } + else if (d_last_prompt.real() != 0.0) + { + d_current_symbol++; + if (d_current_symbol == d_symbols_per_bit) next_state = true; + } + else + { + d_last_prompt = *d_Prompt; + d_synchonizing = true; + d_current_symbol = 1; + } + } + else + { + next_state = true; + } + + if (next_state) + { // reset extended correlator + d_VE_accu = gr_complex(0.0, 0.0); + d_E_accu = gr_complex(0.0, 0.0); + d_P_accu = gr_complex(0.0, 0.0); + d_L_accu = gr_complex(0.0, 0.0); + d_VL_accu = gr_complex(0.0, 0.0); + d_last_prompt = gr_complex(0.0, 0.0); + d_Prompt_buffer_deque.clear(); + d_current_symbol = 0; + d_synchonizing = false; + + if (d_enable_extended_integration) + { + // UPDATE INTEGRATION TIME + d_extend_correlation_symbols_count = 0; + float new_correlation_time = static_cast(trk_parameters.extend_correlation_symbols) * static_cast(d_code_period); + d_carrier_loop_filter.set_pdi(new_correlation_time); + d_code_loop_filter.set_pdi(new_correlation_time); + d_state = 3; // next state is the extended correlator integrator + LOG(INFO) << "Enabled " << trk_parameters.extend_correlation_symbols * static_cast(d_code_period * 1000.0) << " ms extended correlator in channel " + << d_channel + << " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN); + std::cout << "Enabled " << trk_parameters.extend_correlation_symbols * static_cast(d_code_period * 1000.0) << " ms extended correlator in channel " + << d_channel + << " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl; + // Set narrow taps delay values [chips] + d_code_loop_filter.set_DLL_BW(trk_parameters.dll_bw_narrow_hz); + d_carrier_loop_filter.set_PLL_BW(trk_parameters.pll_bw_narrow_hz); + if (d_veml) + { + d_local_code_shift_chips[0] = -trk_parameters.very_early_late_space_narrow_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[1] = -trk_parameters.early_late_space_narrow_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[3] = trk_parameters.early_late_space_narrow_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[4] = trk_parameters.very_early_late_space_narrow_chips * static_cast(d_code_samples_per_chip); + } + else + { + d_local_code_shift_chips[0] = -trk_parameters.early_late_space_narrow_chips * static_cast(d_code_samples_per_chip); + d_local_code_shift_chips[2] = trk_parameters.early_late_space_narrow_chips * static_cast(d_code_samples_per_chip); + } + } + else + { + d_state = 4; + } + } + } + + break; + } + + case 3: + { + d_sample_counter = d_sample_counter_next; + d_sample_counter_next = d_sample_counter + d_current_prn_length_samples; + + // Fill the acquisition data + current_synchro_data = *d_acquisition_gnss_synchro; + // perform a correlation step + multicorrelator_fpga->Carrier_wipeoff_multicorrelator_resampler( + d_rem_carr_phase_rad, d_carrier_phase_step_rad, + d_rem_code_phase_chips, d_code_phase_step_chips, + d_current_prn_length_samples); + update_tracking_vars(); + save_correlation_results(); + + // ########### Output the tracking results to Telemetry block ########## + if (interchange_iq) + { + if (trk_parameters.track_pilot) + { + // Note that data and pilot components are in quadrature. I and Q are interchanged + current_synchro_data.Prompt_I = static_cast((*d_Prompt_Data).imag()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt_Data).real()); + } + else + { + current_synchro_data.Prompt_I = static_cast((*d_Prompt).imag()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt).real()); + } + } + else + { + if (trk_parameters.track_pilot) + { + // Note that data and pilot components are in quadrature. I and Q are interchanged + current_synchro_data.Prompt_I = static_cast((*d_Prompt_Data).real()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt_Data).imag()); + } + else + { + current_synchro_data.Prompt_I = static_cast((*d_Prompt).real()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt).imag()); + } + } + current_synchro_data.Code_phase_samples = d_rem_code_phase_samples; + current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; + current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; + current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; + current_synchro_data.Flag_valid_symbol_output = true; + current_synchro_data.correlation_length_ms = d_correlation_length_ms; + d_extend_correlation_symbols_count++; + if (d_extend_correlation_symbols_count == (trk_parameters.extend_correlation_symbols - 1)) + { + d_extend_correlation_symbols_count = 0; + d_state = 4; + } + log_data(true); + break; + } + + case 4: // narrow tracking + { + d_sample_counter = d_sample_counter_next; + d_sample_counter_next = d_sample_counter + d_current_prn_length_samples; + + // perform a correlation step + //do_correlation_step(in); + multicorrelator_fpga->Carrier_wipeoff_multicorrelator_resampler( + d_rem_carr_phase_rad, d_carrier_phase_step_rad, + d_rem_code_phase_chips, d_code_phase_step_chips, + d_current_prn_length_samples); + + save_correlation_results(); + + // check lock status + if (!cn0_and_tracking_lock_status(d_code_period * static_cast(trk_parameters.extend_correlation_symbols))) + { + clear_tracking_vars(); + d_state = 0; // loss-of-lock detected + } + else + { + run_dll_pll(); + update_tracking_vars(); + + // ########### Output the tracking results to Telemetry block ########## + if (interchange_iq) + { + if (trk_parameters.track_pilot) + { + // Note that data and pilot components are in quadrature. I and Q are interchanged + current_synchro_data.Prompt_I = static_cast((*d_Prompt_Data).imag()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt_Data).real()); + } + else + { + current_synchro_data.Prompt_I = static_cast((*d_Prompt).imag()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt).real()); + } + } + else + { + if (trk_parameters.track_pilot) + { + // Note that data and pilot components are in quadrature. I and Q are interchanged + current_synchro_data.Prompt_I = static_cast((*d_Prompt_Data).real()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt_Data).imag()); + } + else + { + current_synchro_data.Prompt_I = static_cast((*d_Prompt).real()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt).imag()); + } + } + + current_synchro_data.Code_phase_samples = d_rem_code_phase_samples; + current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; + current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; + current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; + current_synchro_data.Flag_valid_symbol_output = true; + current_synchro_data.correlation_length_ms = d_correlation_length_ms; + // enable write dump file this cycle (valid DLL/PLL cycle) + log_data(false); + // reset extended correlator + d_VE_accu = gr_complex(0.0, 0.0); + d_E_accu = gr_complex(0.0, 0.0); + d_P_accu = gr_complex(0.0, 0.0); + d_L_accu = gr_complex(0.0, 0.0); + d_VL_accu = gr_complex(0.0, 0.0); + if (d_enable_extended_integration) + { + d_state = 3; // new coherent integration (correlation time extension) cycle + } + } + } + } + if (current_synchro_data.Flag_valid_symbol_output) + { + current_synchro_data.fs = static_cast(trk_parameters.fs_in); + current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples; + *out[0] = current_synchro_data; + return 1; + } + return 0; +} diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h new file mode 100644 index 000000000..0d8b93f1e --- /dev/null +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h @@ -0,0 +1,226 @@ +/*! + * \file gps_l1_ca_dll_pll_tracking_fpga.h + * \brief Interface of a code DLL + carrier PLL tracking block + * \author Marc Majoral, 2018. marc.majoral(at)cttc.es + * Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com + * Javier Arribas, 2011. jarribas(at)cttc.es + * Cillian O'Driscoll, 2017. cillian.odriscoll(at)gmail.com + * + * Code DLL + carrier PLL according to the algorithms described in: + * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, + * A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach, + * Birkhauser, 2007 + * + * ------------------------------------------------------------------------- + * + * 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_DLL_PLL_VEML_TRACKING_FPGA_H +#define GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H + +#include "fpga_multicorrelator.h" +#include "gnss_synchro.h" +#include "tracking_2nd_DLL_filter.h" +#include "tracking_2nd_PLL_filter.h" +#include +#include +#include +#include + + +typedef struct +{ + /* DLL/PLL tracking configuration */ + double fs_in; + unsigned int vector_length; + bool dump; + std::string dump_filename; + float pll_bw_hz; + float dll_bw_hz; + float pll_bw_narrow_hz; + float dll_bw_narrow_hz; + float early_late_space_chips; + float very_early_late_space_chips; + float early_late_space_narrow_chips; + float very_early_late_space_narrow_chips; + int extend_correlation_symbols; + int cn0_samples; + int cn0_min; + int max_lock_fail; + double carrier_lock_th; + bool track_pilot; + char system; + char signal[3]; + std::string device_name; + unsigned int device_base; + unsigned int code_length; + int *ca_codes; +} dllpllconf_fpga_t; + +class dll_pll_veml_tracking_fpga; + +typedef boost::shared_ptr + dll_pll_veml_tracking_fpga_sptr; + +dll_pll_veml_tracking_fpga_sptr dll_pll_veml_make_tracking_fpga(dllpllconf_fpga_t conf_); + + +/*! + * \brief This class implements a DLL + PLL tracking loop block + */ +class dll_pll_veml_tracking_fpga : public gr::block +{ +public: + ~dll_pll_veml_tracking_fpga(); + + void set_channel(unsigned int channel); + void set_gnss_synchro(Gnss_Synchro *p_gnss_synchro); + void start_tracking(); + + int general_work(int noutput_items, gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); + + void reset(void); + +private: + friend dll_pll_veml_tracking_fpga_sptr dll_pll_veml_make_tracking_fpga(dllpllconf_fpga_t conf_); + + dll_pll_veml_tracking_fpga(dllpllconf_fpga_t conf_); + + bool cn0_and_tracking_lock_status(double coh_integration_time_s); + bool acquire_secondary(); + void run_dll_pll(); + void update_tracking_vars(); + void clear_tracking_vars(); + void save_correlation_results(); + void log_data(bool integrating); + int save_matfile(); + + // tracking configuration vars + dllpllconf_fpga_t trk_parameters; + bool d_veml; + bool d_cloop; + unsigned int d_channel; + Gnss_Synchro *d_acquisition_gnss_synchro; + + //Signal parameters + bool d_secondary; + bool interchange_iq; + double d_signal_carrier_freq; + double d_code_period; + double d_code_chip_rate; + unsigned int d_secondary_code_length; + unsigned int d_code_length_chips; + unsigned int d_code_samples_per_chip; // All signals have 1 sample per chip code except Gal. E1 which has 2 (CBOC disabled) or 12 (CBOC enabled) + int d_symbols_per_bit; + std::string systemName; + std::string signal_type; + std::string *d_secondary_code_string; + std::string signal_pretty_name; + + //tracking state machine + int d_state; + bool d_synchonizing; + //Integration period in samples + int d_correlation_length_ms; + int d_n_correlator_taps; + float *d_local_code_shift_chips; + float *d_prompt_data_shift; + std::shared_ptr multicorrelator_fpga; + + gr_complex *d_correlator_outs; + gr_complex *d_Very_Early; + gr_complex *d_Early; + gr_complex *d_Prompt; + gr_complex *d_Late; + gr_complex *d_Very_Late; + + bool d_enable_extended_integration; + int d_extend_correlation_symbols_count; + int d_current_symbol; + + gr_complex d_VE_accu; + gr_complex d_E_accu; + gr_complex d_P_accu; + gr_complex d_L_accu; + gr_complex d_VL_accu; + gr_complex d_last_prompt; + + gr_complex *d_Prompt_Data; + + double d_code_phase_step_chips; + double d_carrier_phase_step_rad; + // remaining code phase and carrier phase between tracking loops + double d_rem_code_phase_samples; + double d_rem_carr_phase_rad; + + // PLL and DLL filter library + Tracking_2nd_DLL_filter d_code_loop_filter; + Tracking_2nd_PLL_filter d_carrier_loop_filter; + + // acquisition + double d_acq_code_phase_samples; + double d_acq_carrier_doppler_hz; + + // tracking vars + double d_carr_error_hz; + double d_carr_error_filt_hz; + double d_code_error_chips; + double d_code_error_filt_chips; + double d_K_blk_samples; + double d_code_freq_chips; + double d_carrier_doppler_hz; + double d_acc_carrier_phase_rad; + double d_rem_code_phase_chips; + double d_code_phase_samples; + double T_chip_seconds; + double T_prn_seconds; + double T_prn_samples; + double K_blk_samples; + // PRN period in samples + int d_current_prn_length_samples; + // processing samples counters + unsigned long int d_sample_counter; + unsigned long int d_acq_sample_stamp; + + // CN0 estimation and lock detector + int d_cn0_estimation_counter; + int d_carrier_lock_fail_counter; + double d_carrier_lock_test; + double d_CN0_SNV_dB_Hz; + double d_carrier_lock_threshold; + std::deque d_Prompt_buffer_deque; + gr_complex *d_Prompt_buffer; + + // file dump + std::ofstream d_dump_file; + + // extra + int d_correlation_length_samples; + int d_next_prn_length_samples; + unsigned long int d_sample_counter_next; + unsigned int d_pull_in = 0; +}; + +#endif //GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc deleted file mode 100644 index 5f9a6ec23..000000000 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc +++ /dev/null @@ -1,951 +0,0 @@ -/*! - * \file gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.cc - * \brief Implementation of a code DLL + carrier PLL tracking block - * \author Marc Majoral, 2017. mmajoral(at)cttc.cat - * Javier Arribas, 2015. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors) - * - * GNSS-SDR is a software defined Global Navigation - * Satellite Systems receiver - * - * This file is part of GNSS-SDR. - * - * GNSS-SDR is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GNSS-SDR is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNSS-SDR. If not, see . - * - * ------------------------------------------------------------------------- - */ - -#include "gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc.h" -#include "gnss_synchro.h" -#include "gps_sdr_signal_processing.h" -#include "tracking_discriminators.h" -#include "lock_detectors.h" -#include "GPS_L1_CA.h" -#include "gnss_sdr_flags.h" -#include "control_message_factory.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -using google::LogMessage; - -gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc_sptr gps_l1_ca_dll_pll_c_aid_make_tracking_fpga_sc( - long if_freq, long fs_in, unsigned int vector_length, bool dump, - std::string dump_filename, float pll_bw_hz, float dll_bw_hz, - float pll_bw_narrow_hz, float dll_bw_narrow_hz, - int extend_correlation_ms, float early_late_space_chips, - std::string device_name, unsigned int device_base) -{ - return gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc_sptr( - new gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc(if_freq, fs_in, - vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, - pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, - early_late_space_chips, device_name, device_base)); -} - - -void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::msg_handler_preamble_index( - pmt::pmt_t msg) -{ - DLOG(INFO) << "Extended correlation enabled for Tracking CH " - << d_channel << ": Satellite " - << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); - if (d_enable_extended_integration == false) //avoid re-setting preamble indicator - { - d_preamble_timestamp_s = pmt::to_double(msg); - d_enable_extended_integration = true; - d_preamble_synchronized = false; - } -} - - -gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc( - long if_freq, long fs_in, unsigned int vector_length, bool dump, - std::string dump_filename, float pll_bw_hz, float dll_bw_hz, - float pll_bw_narrow_hz, float dll_bw_narrow_hz, - int extend_correlation_ms, float early_late_space_chips, - std::string device_name, unsigned int device_base) : gr::block("gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc", - gr::io_signature::make(0, 0, sizeof(lv_16sc_t)), - gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) - -{ - // Telemetry bit synchronization message port input - this->message_port_register_in(pmt::mp("preamble_timestamp_s")); - this->set_msg_handler(pmt::mp("preamble_timestamp_s"), - boost::bind( - &gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::msg_handler_preamble_index, - this, _1)); - this->message_port_register_out(pmt::mp("events")); - // initialize internal vars - d_dump = dump; - d_if_freq = if_freq; - d_fs_in = fs_in; - d_vector_length = vector_length; - d_dump_filename = dump_filename; - d_correlation_length_samples = static_cast(d_vector_length); - - // Initialize tracking ========================================== - d_pll_bw_hz = pll_bw_hz; - d_dll_bw_hz = dll_bw_hz; - d_pll_bw_narrow_hz = pll_bw_narrow_hz; - d_dll_bw_narrow_hz = dll_bw_narrow_hz; - d_code_loop_filter.set_DLL_BW(d_dll_bw_hz); - d_carrier_loop_filter.set_params(10.0, d_pll_bw_hz, 2); - d_extend_correlation_ms = extend_correlation_ms; - - // --- DLL variables -------------------------------------------------------- - d_early_late_spc_chips = early_late_space_chips; // Define early-late offset (in chips) - - // Initialization of local code replica - // Get space for a vector with the C/A code replica sampled 1x/chip - d_ca_code = static_cast(volk_gnsssdr_malloc(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_gnsssdr_get_alignment())); - d_ca_code_16sc = static_cast(volk_gnsssdr_malloc(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(lv_16sc_t), volk_gnsssdr_get_alignment())); - - // correlator outputs (scalar) - d_n_correlator_taps = 3; // Early, Prompt, and Late - - d_correlator_outs_16sc = static_cast(volk_gnsssdr_malloc(d_n_correlator_taps * sizeof(lv_16sc_t), - volk_gnsssdr_get_alignment())); - - for (int n = 0; n < d_n_correlator_taps; n++) - { - d_correlator_outs_16sc[n] = lv_cmake(0, 0); - } - - d_local_code_shift_chips = static_cast(volk_gnsssdr_malloc(d_n_correlator_taps * sizeof(float), volk_gnsssdr_get_alignment())); - - // Set TAPs delay values [chips] - d_local_code_shift_chips[0] = -d_early_late_spc_chips; - d_local_code_shift_chips[1] = 0.0; - d_local_code_shift_chips[2] = d_early_late_spc_chips; - - // create multicorrelator class - multicorrelator_fpga_8sc = std::make_shared(d_n_correlator_taps, device_name, device_base); - - //--- Perform initializations ------------------------------ - // define initial code frequency basis of NCO - d_code_freq_chips = GPS_L1_CA_CODE_RATE_HZ; - // define residual code phase (in chips) - d_rem_code_phase_samples = 0.0; - // define residual carrier phase - d_rem_carrier_phase_rad = 0.0; - - // sample synchronization - d_sample_counter = 0; //(from trk to tlm) - d_acq_sample_stamp = 0; - d_enable_tracking = false; - d_pull_in = false; - - // CN0 estimation and lock detector buffers - d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; - d_carrier_lock_test = 1; - d_CN0_SNV_dB_Hz = 0; - d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = FLAGS_carrier_lock_th; - - systemName["G"] = std::string("GPS"); - systemName["S"] = std::string("SBAS"); - - set_relative_rate(1.0 / static_cast(d_vector_length)); - - d_acquisition_gnss_synchro = 0; - d_channel = 0; - d_acq_code_phase_samples = 0.0; - d_acq_carrier_doppler_hz = 0.0; - d_carrier_doppler_hz = 0.0; - d_acc_carrier_phase_cycles = 0.0; - d_code_phase_samples = 0.0; - d_enable_extended_integration = false; - d_preamble_synchronized = false; - d_rem_code_phase_integer_samples = 0; - d_code_error_chips_Ti = 0.0; - d_pll_to_dll_assist_secs_Ti = 0.0; - d_rem_code_phase_chips = 0.0; - d_code_phase_step_chips = 0.0; - d_carrier_phase_step_rad = 0.0; - d_code_error_filt_chips_s = 0.0; - d_code_error_filt_chips_Ti = 0.0; - d_preamble_timestamp_s = 0.0; - d_carr_phase_error_secs_Ti = 0.0; - //set_min_output_buffer((long int)300); -} - - -void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::start_tracking() -{ - /* - * correct the code phase according to the delay between acq and trk - */ - d_acq_code_phase_samples = d_acquisition_gnss_synchro->Acq_delay_samples; - d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz; - d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples; - - long int acq_trk_diff_samples; - double acq_trk_diff_seconds; - acq_trk_diff_samples = static_cast(d_sample_counter) - static_cast(d_acq_sample_stamp); - DLOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples; - acq_trk_diff_seconds = static_cast(acq_trk_diff_samples) / static_cast(d_fs_in); - // Doppler effect - // Fd=(C/(C+Vr))*F - double radial_velocity = (GPS_L1_FREQ_HZ + d_acq_carrier_doppler_hz) / GPS_L1_FREQ_HZ; - // new chip and prn sequence periods based on acq Doppler - double T_chip_mod_seconds; - double T_prn_mod_seconds; - double T_prn_mod_samples; - d_code_freq_chips = radial_velocity * GPS_L1_CA_CODE_RATE_HZ; - d_code_phase_step_chips = static_cast(d_code_freq_chips) / static_cast(d_fs_in); - T_chip_mod_seconds = 1.0 / d_code_freq_chips; - T_prn_mod_seconds = T_chip_mod_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS; - T_prn_mod_samples = T_prn_mod_seconds * static_cast(d_fs_in); - - d_correlation_length_samples = round(T_prn_mod_samples); - - double T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_HZ; - double T_prn_true_samples = T_prn_true_seconds * static_cast(d_fs_in); - double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds; - double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds; - double corrected_acq_phase_samples, delay_correction_samples; - corrected_acq_phase_samples = fmod((d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * static_cast(d_fs_in)), T_prn_true_samples); - if (corrected_acq_phase_samples < 0) - { - corrected_acq_phase_samples = T_prn_mod_samples + corrected_acq_phase_samples; - } - delay_correction_samples = d_acq_code_phase_samples - corrected_acq_phase_samples; - - d_acq_code_phase_samples = corrected_acq_phase_samples; - - d_carrier_doppler_hz = d_acq_carrier_doppler_hz; - - d_carrier_phase_step_rad = GPS_TWO_PI * d_carrier_doppler_hz / static_cast(d_fs_in); - - // DLL/PLL filter initialization - d_carrier_loop_filter.initialize(d_acq_carrier_doppler_hz); // The carrier loop filter implements the Doppler accumulator - d_code_loop_filter.initialize(); // initialize the code filter - - // generate local reference ALWAYS starting at chip 1 (1 sample per chip) - gps_l1_ca_code_gen_complex(d_ca_code, d_acquisition_gnss_synchro->PRN, 0); - volk_gnsssdr_32fc_convert_16ic(d_ca_code_16sc, d_ca_code, static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS)); - - multicorrelator_fpga_8sc->set_local_code_and_taps(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS), d_ca_code_16sc, d_local_code_shift_chips); - for (int n = 0; n < d_n_correlator_taps; n++) - { - d_correlator_outs_16sc[n] = lv_16sc_t(0, 0); - } - - d_carrier_lock_fail_counter = 0; - d_rem_code_phase_samples = 0.0; - d_rem_carrier_phase_rad = 0.0; - d_rem_code_phase_chips = 0.0; - d_acc_carrier_phase_cycles = 0.0; - d_pll_to_dll_assist_secs_Ti = 0.0; - d_code_phase_samples = d_acq_code_phase_samples; - - std::string sys_ = &d_acquisition_gnss_synchro->System; - sys = sys_.substr(0, 1); - - // DEBUG OUTPUT - std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl; - LOG(INFO) << "Tracking of GPS L1 C/A signal for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel; - - // enable tracking - d_pull_in = true; - d_enable_tracking = true; - d_enable_extended_integration = false; - d_preamble_synchronized = false; - - // lock the channel - multicorrelator_fpga_8sc->lock_channel(); - - LOG(INFO) << "PULL-IN Doppler [Hz]=" << d_carrier_doppler_hz - << " Code Phase correction [samples]=" << delay_correction_samples - << " PULL-IN Code Phase [samples]=" << d_acq_code_phase_samples; -} - - -gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::~gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc() -{ - if (d_dump_file.is_open()) - { - try - { - d_dump_file.close(); - } - catch (const std::exception &ex) - { - LOG(WARNING) << "Exception in destructor " << ex.what(); - } - } - - if (d_dump) - { - if (d_channel == 0) - { - std::cout << "Writing .mat files ..."; - } - gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::save_matfile(); - if (d_channel == 0) - { - std::cout << " done." << std::endl; - } - } - - try - { - volk_gnsssdr_free(d_local_code_shift_chips); - volk_gnsssdr_free(d_ca_code); - volk_gnsssdr_free(d_ca_code_16sc); - volk_gnsssdr_free(d_correlator_outs_16sc); - delete[] d_Prompt_buffer; - multicorrelator_fpga_8sc->free(); - } - catch (const std::exception &ex) - { - LOG(WARNING) << "Exception in destructor " << ex.what(); - } -} - - -void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::set_channel(unsigned int channel) -{ - d_channel = channel; - multicorrelator_fpga_8sc->set_channel(d_channel); - LOG(INFO) << "Tracking Channel set to " << d_channel; - // ############# ENABLE DATA FILE LOG ################# - if (d_dump == true) - { - if (d_dump_file.is_open() == false) - { - try - { - d_dump_filename.append(boost::lexical_cast(d_channel)); - d_dump_filename.append(".dat"); - d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); - d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); - LOG(INFO) << "Tracking dump enabled on channel " - << d_channel << " Log file: " - << d_dump_filename.c_str(); - } - catch (const std::ifstream::failure *e) - { - LOG(WARNING) << "channel " << d_channel - << " Exception opening trk dump file " - << e->what(); - } - } - } -} - - -int gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::save_matfile() -{ - // READ DUMP FILE - std::ifstream::pos_type size; - int number_of_double_vars = 11; - int number_of_float_vars = 5; - int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars + - sizeof(float) * number_of_float_vars + sizeof(unsigned int); - std::ifstream dump_file; - dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); - try - { - dump_file.open(d_dump_filename.c_str(), std::ios::binary | std::ios::ate); - } - catch (const std::ifstream::failure &e) - { - std::cerr << "Problem opening dump file:" << e.what() << std::endl; - return 1; - } - // count number of epochs and rewind - long int num_epoch = 0; - if (dump_file.is_open()) - { - size = dump_file.tellg(); - num_epoch = static_cast(size) / static_cast(epoch_size_bytes); - dump_file.seekg(0, std::ios::beg); - } - else - { - return 1; - } - float *abs_E = new float[num_epoch]; - float *abs_P = new float[num_epoch]; - float *abs_L = new float[num_epoch]; - float *Prompt_I = new float[num_epoch]; - float *Prompt_Q = new float[num_epoch]; - unsigned long int *PRN_start_sample_count = new unsigned long int[num_epoch]; - double *acc_carrier_phase_rad = new double[num_epoch]; - double *carrier_doppler_hz = new double[num_epoch]; - double *code_freq_chips = new double[num_epoch]; - double *carr_error_hz = new double[num_epoch]; - double *carr_error_filt_hz = new double[num_epoch]; - double *code_error_chips = new double[num_epoch]; - double *code_error_filt_chips = new double[num_epoch]; - double *CN0_SNV_dB_Hz = new double[num_epoch]; - double *carrier_lock_test = new double[num_epoch]; - double *aux1 = new double[num_epoch]; - double *aux2 = new double[num_epoch]; - unsigned int *PRN = new unsigned int[num_epoch]; - - try - { - if (dump_file.is_open()) - { - for (long int i = 0; i < num_epoch; i++) - { - dump_file.read(reinterpret_cast(&abs_E[i]), sizeof(float)); - dump_file.read(reinterpret_cast(&abs_P[i]), sizeof(float)); - dump_file.read(reinterpret_cast(&abs_L[i]), sizeof(float)); - dump_file.read(reinterpret_cast(&Prompt_I[i]), sizeof(float)); - dump_file.read(reinterpret_cast(&Prompt_Q[i]), sizeof(float)); - dump_file.read(reinterpret_cast(&PRN_start_sample_count[i]), sizeof(unsigned long int)); - dump_file.read(reinterpret_cast(&acc_carrier_phase_rad[i]), sizeof(double)); - dump_file.read(reinterpret_cast(&carrier_doppler_hz[i]), sizeof(double)); - dump_file.read(reinterpret_cast(&code_freq_chips[i]), sizeof(double)); - dump_file.read(reinterpret_cast(&carr_error_hz[i]), sizeof(double)); - dump_file.read(reinterpret_cast(&carr_error_filt_hz[i]), sizeof(double)); - dump_file.read(reinterpret_cast(&code_error_chips[i]), sizeof(double)); - dump_file.read(reinterpret_cast(&code_error_filt_chips[i]), sizeof(double)); - dump_file.read(reinterpret_cast(&CN0_SNV_dB_Hz[i]), sizeof(double)); - dump_file.read(reinterpret_cast(&carrier_lock_test[i]), sizeof(double)); - dump_file.read(reinterpret_cast(&aux1[i]), sizeof(double)); - dump_file.read(reinterpret_cast(&aux2[i]), sizeof(double)); - dump_file.read(reinterpret_cast(&PRN[i]), sizeof(unsigned int)); - } - } - dump_file.close(); - } - catch (const std::ifstream::failure &e) - { - std::cerr << "Problem reading dump file:" << e.what() << std::endl; - delete[] abs_E; - delete[] abs_P; - delete[] abs_L; - delete[] Prompt_I; - delete[] Prompt_Q; - delete[] PRN_start_sample_count; - delete[] acc_carrier_phase_rad; - delete[] carrier_doppler_hz; - delete[] code_freq_chips; - delete[] carr_error_hz; - delete[] carr_error_filt_hz; - delete[] code_error_chips; - delete[] code_error_filt_chips; - delete[] CN0_SNV_dB_Hz; - delete[] carrier_lock_test; - delete[] aux1; - delete[] aux2; - delete[] PRN; - return 1; - } - - // WRITE MAT FILE - mat_t *matfp; - matvar_t *matvar; - std::string filename = d_dump_filename; - filename.erase(filename.length() - 4, 4); - filename.append(".mat"); - matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73); - if (reinterpret_cast(matfp) != NULL) - { - size_t dims[2] = {1, static_cast(num_epoch)}; - matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("abs_P", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_P, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("abs_L", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_L, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("Prompt_I", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, Prompt_I, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("Prompt_Q", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, Prompt_Q, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("PRN_start_sample_count", MAT_C_UINT64, MAT_T_UINT64, 2, dims, PRN_start_sample_count, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("acc_carrier_phase_rad", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, acc_carrier_phase_rad, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("carrier_doppler_hz", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, carrier_doppler_hz, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("code_freq_chips", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, code_freq_chips, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("carr_error_hz", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, carr_error_hz, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("carr_error_filt_hz", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, carr_error_filt_hz, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("code_error_chips", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, code_error_chips, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("code_error_filt_chips", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, code_error_filt_chips, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("CN0_SNV_dB_Hz", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, CN0_SNV_dB_Hz, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("carrier_lock_test", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, carrier_lock_test, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("aux1", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, aux1, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("aux2", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, aux2, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - - matvar = Mat_VarCreate("PRN", MAT_C_UINT32, MAT_T_UINT32, 2, dims, PRN, 0); - Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE - Mat_VarFree(matvar); - } - Mat_Close(matfp); - delete[] abs_E; - delete[] abs_P; - delete[] abs_L; - delete[] Prompt_I; - delete[] Prompt_Q; - delete[] PRN_start_sample_count; - delete[] acc_carrier_phase_rad; - delete[] carrier_doppler_hz; - delete[] code_freq_chips; - delete[] carr_error_hz; - delete[] carr_error_filt_hz; - delete[] code_error_chips; - delete[] code_error_filt_chips; - delete[] CN0_SNV_dB_Hz; - delete[] carrier_lock_test; - delete[] aux1; - delete[] aux2; - delete[] PRN; - return 0; -} - - -void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::set_gnss_synchro( - Gnss_Synchro *p_gnss_synchro) -{ - d_acquisition_gnss_synchro = p_gnss_synchro; -} - - -void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::reset(void) -{ - multicorrelator_fpga_8sc->unlock_channel(); -} - - -int gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::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) -{ - // samples offset - int samples_offset; - - // Block input data and block output stream pointers - Gnss_Synchro **out = reinterpret_cast(&output_items[0]); - - Gnss_Synchro current_synchro_data = Gnss_Synchro(); - - // process vars - double code_error_filt_secs_Ti = 0.0; - double CURRENT_INTEGRATION_TIME_S = 0.0; - double CORRECTED_INTEGRATION_TIME_S = 0.0; - - if (d_enable_tracking == true) - { - // Fill the acquisition data - current_synchro_data = *d_acquisition_gnss_synchro; - // Receiver signal alignment - if (d_pull_in == true) - { - double acq_trk_shif_correction_samples; - int acq_to_trk_delay_samples; - acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp; - acq_trk_shif_correction_samples = d_correlation_length_samples - fmod(static_cast(acq_to_trk_delay_samples), static_cast(d_correlation_length_samples)); - samples_offset = round(d_acq_code_phase_samples + acq_trk_shif_correction_samples); - current_synchro_data.Tracking_sample_counter = d_sample_counter + samples_offset; - d_sample_counter += samples_offset; // count for the processed samples - d_pull_in = false; - d_acc_carrier_phase_cycles -= d_carrier_phase_step_rad * samples_offset / GPS_TWO_PI; - current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_cycles * GPS_TWO_PI; - current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; - current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; - //consume_each(samples_offset); // shift input to perform alignment with local replica - multicorrelator_fpga_8sc->set_initial_sample(samples_offset); - - return 1; - } - - // ################# CARRIER WIPEOFF AND CORRELATORS ############################## - // perform carrier wipe-off and compute Early, Prompt and Late correlation - multicorrelator_fpga_8sc->set_output_vectors(d_correlator_outs_16sc); - - multicorrelator_fpga_8sc->Carrier_wipeoff_multicorrelator_resampler( - d_rem_carrier_phase_rad, d_carrier_phase_step_rad, - d_rem_code_phase_chips, d_code_phase_step_chips, - d_correlation_length_samples); - - // ####### coherent integration extension - // keep the last symbols - d_E_history.push_back(d_correlator_outs_16sc[0]); // save early output - d_P_history.push_back(d_correlator_outs_16sc[1]); // save prompt output - d_L_history.push_back(d_correlator_outs_16sc[2]); // save late output - - if (static_cast(d_P_history.size()) > d_extend_correlation_ms) - { - d_E_history.pop_front(); - d_P_history.pop_front(); - d_L_history.pop_front(); - } - - bool enable_dll_pll; - if (d_enable_extended_integration == true) - { - long int symbol_diff = round(1000.0 * ((static_cast(d_sample_counter) + d_rem_code_phase_samples) / static_cast(d_fs_in) - d_preamble_timestamp_s)); - if (symbol_diff > 0 and symbol_diff % d_extend_correlation_ms == 0) - { - // compute coherent integration and enable tracking loop - // perform coherent integration using correlator output history - // std::cout<<"##### RESET COHERENT INTEGRATION ####"<PRN) - << " pll_bw = " << d_pll_bw_hz - << " [Hz], pll_narrow_bw = " - << d_pll_bw_narrow_hz << " [Hz]" - << std::endl - << " dll_bw = " - << d_dll_bw_hz - << " [Hz], dll_narrow_bw = " - << d_dll_bw_narrow_hz << " [Hz]" - << std::endl; - } - // UPDATE INTEGRATION TIME - CURRENT_INTEGRATION_TIME_S = static_cast(d_extend_correlation_ms) * GPS_L1_CA_CODE_PERIOD; - enable_dll_pll = true; - } - else - { - if (d_preamble_synchronized == true) - { - // continue extended coherent correlation - // Compute the next buffer length based on the period of the PRN sequence and the code phase error estimation - double T_chip_seconds = 1.0 / d_code_freq_chips; - double T_prn_seconds = T_chip_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS; - double T_prn_samples = T_prn_seconds * static_cast(d_fs_in); - int K_prn_samples = round(T_prn_samples); - double K_T_prn_error_samples = K_prn_samples - T_prn_samples; - - d_rem_code_phase_samples = d_rem_code_phase_samples - K_T_prn_error_samples; - d_rem_code_phase_integer_samples = round(d_rem_code_phase_samples); // round to a discrete number of samples - d_correlation_length_samples = K_prn_samples + d_rem_code_phase_integer_samples; - d_rem_code_phase_samples = d_rem_code_phase_samples - d_rem_code_phase_integer_samples; - // code phase step (Code resampler phase increment per sample) [chips/sample] - d_code_phase_step_chips = d_code_freq_chips / static_cast(d_fs_in); - // remnant code phase [chips] - d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast(d_fs_in)); - d_rem_carrier_phase_rad = fmod(d_rem_carrier_phase_rad + d_carrier_phase_step_rad * static_cast(d_correlation_length_samples), GPS_TWO_PI); - - // UPDATE ACCUMULATED CARRIER PHASE - CORRECTED_INTEGRATION_TIME_S = (static_cast(d_correlation_length_samples) / static_cast(d_fs_in)); - d_acc_carrier_phase_cycles -= d_carrier_phase_step_rad * d_correlation_length_samples / GPS_TWO_PI; - - // disable tracking loop and inform telemetry decoder - enable_dll_pll = false; - } - else - { - // perform basic (1ms) correlation - // UPDATE INTEGRATION TIME - CURRENT_INTEGRATION_TIME_S = static_cast(d_correlation_length_samples) / static_cast(d_fs_in); - enable_dll_pll = true; - } - } - } - else - { - // UPDATE INTEGRATION TIME - CURRENT_INTEGRATION_TIME_S = static_cast(d_correlation_length_samples) / static_cast(d_fs_in); - enable_dll_pll = true; - } - - if (enable_dll_pll == true) - { - // ################## PLL ########################################################## - // Update PLL discriminator [rads/Ti -> Secs/Ti] - d_carr_phase_error_secs_Ti = pll_cloop_two_quadrant_atan(std::complex(d_correlator_outs_16sc[1].real(), d_correlator_outs_16sc[1].imag())) / GPS_TWO_PI; //prompt output - - // Carrier discriminator filter - // NOTICE: The carrier loop filter includes the Carrier Doppler accumulator, as described in Kaplan - // Input [s/Ti] -> output [Hz] - d_carrier_doppler_hz = d_carrier_loop_filter.get_carrier_error(0.0, d_carr_phase_error_secs_Ti, CURRENT_INTEGRATION_TIME_S); - // PLL to DLL assistance [Secs/Ti] - d_pll_to_dll_assist_secs_Ti = (d_carrier_doppler_hz * CURRENT_INTEGRATION_TIME_S) / GPS_L1_FREQ_HZ; - // code Doppler frequency update - d_code_freq_chips = GPS_L1_CA_CODE_RATE_HZ + ((d_carrier_doppler_hz * GPS_L1_CA_CODE_RATE_HZ) / GPS_L1_FREQ_HZ); - - // ################## DLL ########################################################## - // DLL discriminator - d_code_error_chips_Ti = dll_nc_e_minus_l_normalized( - std::complex( - d_correlator_outs_16sc[0].real(), - d_correlator_outs_16sc[0].imag()), - std::complex( - d_correlator_outs_16sc[2].real(), - d_correlator_outs_16sc[2].imag())); // [chips/Ti] //early and late - // Code discriminator filter - d_code_error_filt_chips_s = d_code_loop_filter.get_code_nco(d_code_error_chips_Ti); // input [chips/Ti] -> output [chips/second] - d_code_error_filt_chips_Ti = d_code_error_filt_chips_s * CURRENT_INTEGRATION_TIME_S; - code_error_filt_secs_Ti = d_code_error_filt_chips_Ti / d_code_freq_chips; // [s/Ti] - - // ################## CARRIER AND CODE NCO BUFFER ALIGNMENT ####################### - // keep alignment parameters for the next input buffer - // Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation - double T_chip_seconds = 1.0 / d_code_freq_chips; - double T_prn_seconds = T_chip_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS; - double T_prn_samples = T_prn_seconds * static_cast(d_fs_in); - double K_prn_samples = round(T_prn_samples); - double K_T_prn_error_samples = K_prn_samples - T_prn_samples; - - d_rem_code_phase_samples = d_rem_code_phase_samples - K_T_prn_error_samples + code_error_filt_secs_Ti * static_cast(d_fs_in); //(code_error_filt_secs_Ti + d_pll_to_dll_assist_secs_Ti) * static_cast(d_fs_in); - d_rem_code_phase_integer_samples = round(d_rem_code_phase_samples); // round to a discrete number of samples - d_correlation_length_samples = K_prn_samples + d_rem_code_phase_integer_samples; - d_rem_code_phase_samples = d_rem_code_phase_samples - d_rem_code_phase_integer_samples; - - //################### PLL COMMANDS ################################################# - //carrier phase step (NCO phase increment per sample) [rads/sample] - d_carrier_phase_step_rad = GPS_TWO_PI * d_carrier_doppler_hz / static_cast(d_fs_in); - d_acc_carrier_phase_cycles -= d_carrier_phase_step_rad * d_correlation_length_samples / GPS_TWO_PI; - // UPDATE ACCUMULATED CARRIER PHASE - CORRECTED_INTEGRATION_TIME_S = (static_cast(d_correlation_length_samples) / static_cast(d_fs_in)); - //remnant carrier phase [rad] - d_rem_carrier_phase_rad = fmod(d_rem_carrier_phase_rad + GPS_TWO_PI * d_carrier_doppler_hz * CORRECTED_INTEGRATION_TIME_S, GPS_TWO_PI); - - //################### DLL COMMANDS ################################################# - //code phase step (Code resampler phase increment per sample) [chips/sample] - d_code_phase_step_chips = d_code_freq_chips / static_cast(d_fs_in); - //remnant code phase [chips] - d_rem_code_phase_chips = d_rem_code_phase_samples * (d_code_freq_chips / static_cast(d_fs_in)); - - // ####### CN0 ESTIMATION AND LOCK DETECTORS ####################################### - if (d_cn0_estimation_counter < FLAGS_cn0_samples) - { - // fill buffer with prompt correlator output values - d_Prompt_buffer[d_cn0_estimation_counter] = lv_cmake(static_cast(d_correlator_outs_16sc[1].real()), - static_cast(d_correlator_outs_16sc[1].imag())); // prompt - d_cn0_estimation_counter++; - } - else - { - d_cn0_estimation_counter = 0; - // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, GPS_L1_CA_CODE_PERIOD); - // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); - // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) - { - d_carrier_lock_fail_counter++; - } - else - { - if (d_carrier_lock_fail_counter > 0) - { - d_carrier_lock_fail_counter--; - } - } - if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) - { - std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; - LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; - this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); //3 -> loss of lock - d_carrier_lock_fail_counter = 0; - d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine - multicorrelator_fpga_8sc->unlock_channel(); - } - } - // ########### Output the tracking data to navigation and PVT ########## - current_synchro_data.Prompt_I = static_cast((d_correlator_outs_16sc[1]).real()); - current_synchro_data.Prompt_Q = static_cast((d_correlator_outs_16sc[1]).imag()); - current_synchro_data.Tracking_sample_counter = d_sample_counter + d_correlation_length_samples; - current_synchro_data.Code_phase_samples = d_rem_code_phase_samples; - current_synchro_data.Carrier_phase_rads = GPS_TWO_PI * d_acc_carrier_phase_cycles; - current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; - current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; - current_synchro_data.Flag_valid_symbol_output = true; - if (d_preamble_synchronized == true) - { - current_synchro_data.correlation_length_ms = d_extend_correlation_ms; - } - else - { - current_synchro_data.correlation_length_ms = 1; - } - } - else - { - current_synchro_data.Prompt_I = static_cast((d_correlator_outs_16sc[1]).real()); - current_synchro_data.Prompt_Q = static_cast((d_correlator_outs_16sc[1]).imag()); - current_synchro_data.Tracking_sample_counter = d_sample_counter + d_correlation_length_samples; - current_synchro_data.Code_phase_samples = d_rem_code_phase_samples; - current_synchro_data.Carrier_phase_rads = GPS_TWO_PI * d_acc_carrier_phase_cycles; - current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; // todo: project the carrier doppler - current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; - } - } - else - { - for (int n = 0; n < d_n_correlator_taps; n++) - { - d_correlator_outs_16sc[n] = lv_cmake(0, 0); - } - - current_synchro_data.System = {'G'}; - current_synchro_data.Tracking_sample_counter = d_sample_counter + d_correlation_length_samples; - } - - current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; - - if (d_dump) - { - // MULTIPLEXED FILE RECORDING - Record results to file - float prompt_I; - float prompt_Q; - float tmp_E, tmp_P, tmp_L; - float tmp_VE = 0.0; - float tmp_VL = 0.0; - float tmp_float; - prompt_I = d_correlator_outs_16sc[1].real(); - prompt_Q = d_correlator_outs_16sc[1].imag(); - tmp_E = std::abs(gr_complex(d_correlator_outs_16sc[0].real(), d_correlator_outs_16sc[0].imag())); - tmp_P = std::abs(gr_complex(d_correlator_outs_16sc[1].real(), d_correlator_outs_16sc[1].imag())); - tmp_L = std::abs(gr_complex(d_correlator_outs_16sc[2].real(), d_correlator_outs_16sc[2].imag())); - try - { - // Dump correlators output - d_dump_file.write(reinterpret_cast(&tmp_VE), sizeof(float)); - d_dump_file.write(reinterpret_cast(&tmp_E), sizeof(float)); - d_dump_file.write(reinterpret_cast(&tmp_P), sizeof(float)); - d_dump_file.write(reinterpret_cast(&tmp_L), sizeof(float)); - d_dump_file.write(reinterpret_cast(&tmp_VL), sizeof(float)); - // PROMPT I and Q (to analyze navigation symbols) - d_dump_file.write(reinterpret_cast(&prompt_I), sizeof(float)); - d_dump_file.write(reinterpret_cast(&prompt_Q), sizeof(float)); - // PRN start sample stamp - d_dump_file.write(reinterpret_cast(&d_sample_counter), sizeof(unsigned long int)); - // accumulated carrier phase - tmp_float = d_acc_carrier_phase_cycles * GPS_TWO_PI; - d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); - // carrier and code frequency - tmp_float = d_carrier_doppler_hz; - d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); - tmp_float = d_code_freq_chips; - d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); - // PLL commands - tmp_float = 1.0 / (d_carr_phase_error_secs_Ti * CURRENT_INTEGRATION_TIME_S); - d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); - tmp_float = 1.0 / (d_code_error_filt_chips_Ti * CURRENT_INTEGRATION_TIME_S); - d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); - // DLL commands - tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S; - d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); - tmp_float = d_code_error_filt_chips_Ti; - d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); - // CN0 and carrier lock test - tmp_float = d_CN0_SNV_dB_Hz; - d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); - tmp_float = d_carrier_lock_test; - d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); - // AUX vars (for debug purposes) - tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S; - d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); - double tmp_double = static_cast(d_sample_counter + d_correlation_length_samples); - d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); - // PRN - unsigned int prn_ = d_acquisition_gnss_synchro->PRN; - d_dump_file.write(reinterpret_cast(&prn_), sizeof(unsigned int)); - } - catch (const std::ifstream::failure *e) - { - LOG(WARNING) << "Exception writing trk dump file " << e->what(); - } - } - - //consume_each(d_correlation_length_samples); // this is necessary in gr::block derivates - d_sample_counter += d_correlation_length_samples; //count for the processed samples - - if (d_enable_tracking) - { - return 1; - } - else - { - return 0; - } -} diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_fpga_sc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_fpga_sc.cc deleted file mode 100644 index 30a99b5d5..000000000 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_fpga_sc.cc +++ /dev/null @@ -1,540 +0,0 @@ -/*! - * \file gps_l1_ca_dll_pll_tracking_cc.cc - * \brief Implementation of a code DLL + carrier PLL tracking block - * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com - * Javier Arribas, 2011. jarribas(at)cttc.es - * - * Code DLL + carrier PLL according to the algorithms described in: - * [1] K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ------------------------------------------------------------------------- - * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) - * - * GNSS-SDR is a software defined Global Navigation - * Satellite Systems receiver - * - * This file is part of GNSS-SDR. - * - * GNSS-SDR is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GNSS-SDR is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNSS-SDR. If not, see . - * - * ------------------------------------------------------------------------- - */ - -#include "gps_l1_ca_dll_pll_tracking_fpga_sc.h" -#include "control_message_factory.h" -#include "gnss_sdr_flags.h" -#include "GPS_L1_CA.h" -#include "gps_sdr_signal_processing.h" -#include "lock_detectors.h" -#include "tracking_discriminators.h" -#include -#include -#include -#include -#include -#include -#include - - -using google::LogMessage; - -gps_l1_ca_dll_pll_tracking_fpga_sc_sptr -gps_l1_ca_dll_pll_make_tracking_fpga_sc( - long if_freq, - long fs_in, - unsigned int vector_length, - bool dump, - std::string dump_filename, - float pll_bw_hz, - float dll_bw_hz, - float early_late_space_chips, - std::string device_name, - unsigned int device_base) -{ - return gps_l1_ca_dll_pll_tracking_fpga_sc_sptr(new Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc(if_freq, - fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, early_late_space_chips, device_name, device_base)); -} - - -Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc::Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc( - long if_freq, - long fs_in, - unsigned int vector_length, - bool dump, - std::string dump_filename, - float pll_bw_hz, - float dll_bw_hz, - float early_late_space_chips, - std::string device_name, - unsigned int device_base) : gr::block("Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc", gr::io_signature::make(0, 0, sizeof(lv_16sc_t)), - gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) -{ - // Telemetry bit synchronization message port input - this->message_port_register_out(pmt::mp("events")); - - // initialize internal vars - d_dump = dump; - d_if_freq = if_freq; - d_fs_in = fs_in; - d_vector_length = vector_length; - d_dump_filename = dump_filename; - d_current_prn_length_samples = static_cast(d_vector_length); - d_correlation_length_samples = static_cast(d_vector_length); - - // Initialize tracking ========================================== - d_code_loop_filter.set_DLL_BW(dll_bw_hz); - d_carrier_loop_filter.set_PLL_BW(pll_bw_hz); - - //--- DLL variables -------------------------------------------------------- - d_early_late_spc_chips = early_late_space_chips; // Define early-late offset (in chips) - - // Initialization of local code replica - // Get space for a vector with the C/A code replica sampled 1x/chip - //d_ca_code = static_cast(volk_gnsssdr_malloc(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(float), volk_gnsssdr_get_alignment())); - //d_ca_code_16sc = static_cast(volk_gnsssdr_malloc(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(lv_16sc_t), volk_gnsssdr_get_alignment())); - //d_ca_code_16sc = static_cast(volk_gnsssdr_malloc(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(int), volk_gnsssdr_get_alignment())); - - // correlator outputs (scalar) - d_n_correlator_taps = 3; // Early, Prompt, and Late - d_correlator_outs = static_cast(volk_gnsssdr_malloc(d_n_correlator_taps * sizeof(gr_complex), volk_gnsssdr_get_alignment())); - for (int n = 0; n < d_n_correlator_taps; n++) - { - d_correlator_outs[n] = gr_complex(0, 0); - } - d_local_code_shift_chips = static_cast(volk_gnsssdr_malloc(d_n_correlator_taps * sizeof(float), volk_gnsssdr_get_alignment())); - - // Set TAPs delay values [chips] - d_local_code_shift_chips[0] = -d_early_late_spc_chips; - d_local_code_shift_chips[1] = 0.0; - d_local_code_shift_chips[2] = d_early_late_spc_chips; - - // create multicorrelator class - multicorrelator_fpga_8sc = std::make_shared(d_n_correlator_taps, device_name, device_base); - - //--- Perform initializations ------------------------------ - // define initial code frequency basis of NCO - d_code_freq_chips = GPS_L1_CA_CODE_RATE_HZ; - // define residual code phase (in chips) - d_rem_code_phase_samples = 0.0; - // define residual carrier phase - d_rem_carr_phase_rad = 0.0; - - // sample synchronization - d_sample_counter = 0; - d_acq_sample_stamp = 0; - - d_enable_tracking = false; - d_pull_in = false; - - // CN0 estimation and lock detector buffers - d_cn0_estimation_counter = 0; - d_Prompt_buffer = new gr_complex[FLAGS_cn0_samples]; - d_carrier_lock_test = 1; - d_CN0_SNV_dB_Hz = 0; - d_carrier_lock_fail_counter = 0; - d_carrier_lock_threshold = FLAGS_carrier_lock_th; - - systemName["G"] = std::string("GPS"); - systemName["S"] = std::string("SBAS"); - - d_acquisition_gnss_synchro = 0; - d_channel = 0; - d_acq_code_phase_samples = 0.0; - d_acq_carrier_doppler_hz = 0.0; - d_carrier_doppler_hz = 0.0; - d_acc_carrier_phase_rad = 0.0; - d_code_phase_samples = 0.0; - d_rem_code_phase_chips = 0.0; - d_code_phase_step_chips = 0.0; - d_carrier_phase_step_rad = 0.0; - - set_relative_rate(1.0 / static_cast(d_vector_length)); - - multicorrelator_fpga_8sc->set_output_vectors(d_correlator_outs); -} - - -void Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc::start_tracking() -{ - /* - * correct the code phase according to the delay between acq and trk - */ - //printf("TRK : start tracking for satellite %d\n", d_acquisition_gnss_synchro->PRN); - d_acq_code_phase_samples = d_acquisition_gnss_synchro->Acq_delay_samples; - d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz; - d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples; - long int acq_trk_diff_samples; - double acq_trk_diff_seconds; - acq_trk_diff_samples = static_cast(d_sample_counter) - static_cast(d_acq_sample_stamp); //-d_vector_length; - DLOG(INFO) << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples; - acq_trk_diff_seconds = static_cast(acq_trk_diff_samples) / static_cast(d_fs_in); - // Doppler effect - // Fd=(C/(C+Vr))*F - double radial_velocity = (GPS_L1_FREQ_HZ + d_acq_carrier_doppler_hz) / GPS_L1_FREQ_HZ; - // new chip and prn sequence periods based on acq Doppler - double T_chip_mod_seconds; - double T_prn_mod_seconds; - double T_prn_mod_samples; - d_code_freq_chips = radial_velocity * GPS_L1_CA_CODE_RATE_HZ; - d_code_phase_step_chips = static_cast(d_code_freq_chips) / static_cast(d_fs_in); - T_chip_mod_seconds = 1 / d_code_freq_chips; - T_prn_mod_seconds = T_chip_mod_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS; - T_prn_mod_samples = T_prn_mod_seconds * static_cast(d_fs_in); - d_current_prn_length_samples = round(T_prn_mod_samples); - double T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_HZ; - double T_prn_true_samples = T_prn_true_seconds * static_cast(d_fs_in); - double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds; - double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds; - double corrected_acq_phase_samples, delay_correction_samples; - corrected_acq_phase_samples = fmod((d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * static_cast(d_fs_in)), T_prn_true_samples); - if (corrected_acq_phase_samples < 0) - { - corrected_acq_phase_samples = T_prn_mod_samples + corrected_acq_phase_samples; - } - delay_correction_samples = d_acq_code_phase_samples - corrected_acq_phase_samples; - d_acq_code_phase_samples = corrected_acq_phase_samples; - d_carrier_doppler_hz = d_acq_carrier_doppler_hz; - d_carrier_phase_step_rad = GPS_TWO_PI * d_carrier_doppler_hz / static_cast(d_fs_in); - // DLL/PLL filter initialization - d_carrier_loop_filter.initialize(); // initialize the carrier filter - d_code_loop_filter.initialize(); // initialize the code filter - // generate local reference ALWAYS starting at chip 1 (1 sample per chip) - //gps_l1_ca_code_gen_float(d_ca_code, d_acquisition_gnss_synchro->PRN, 0); - //gps_l1_ca_code_gen_int(d_ca_code_16sc, d_acquisition_gnss_synchro->PRN, 0); - /* for (int n = 0; n < static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS); n++) - { - d_ca_code_16sc[n] = d_ca_code[n]; - } */ - //multicorrelator_fpga_8sc->set_local_code_and_taps(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS), d_ca_code_16sc, d_local_code_shift_chips, d_acquisition_gnss_synchro->PRN); - multicorrelator_fpga_8sc->set_local_code_and_taps(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS), d_local_code_shift_chips, d_acquisition_gnss_synchro->PRN); - for (int n = 0; n < d_n_correlator_taps; n++) - { - d_correlator_outs[n] = gr_complex(0, 0); - } - d_carrier_lock_fail_counter = 0; - d_rem_code_phase_samples = 0; - d_rem_carr_phase_rad = 0.0; - d_rem_code_phase_chips = 0.0; - d_acc_carrier_phase_rad = 0.0; - d_code_phase_samples = d_acq_code_phase_samples; - std::string sys_ = &d_acquisition_gnss_synchro->System; - sys = sys_.substr(0, 1); - std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl; - LOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel; - // enable tracking - d_pull_in = true; - d_enable_tracking = true; //do it in the end to avoid starting running tracking before finishing this function - LOG(INFO) << "PULL-IN Doppler [Hz]=" << d_carrier_doppler_hz - << " Code Phase correction [samples]=" << delay_correction_samples - << " PULL-IN Code Phase [samples]=" << d_acq_code_phase_samples; -} - - -Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc::~Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc() -{ - if (d_dump_file.is_open()) - { - try - { - d_dump_file.close(); - } - catch (const std::exception &ex) - { - LOG(WARNING) << "Exception in destructor " << ex.what(); - } - } - try - { - volk_gnsssdr_free(d_local_code_shift_chips); - volk_gnsssdr_free(d_correlator_outs); - delete[] d_Prompt_buffer; - multicorrelator_fpga_8sc->free(); - } - catch (const std::exception &ex) - { - LOG(WARNING) << "Exception in destructor " << ex.what(); - } -} - - -int Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc::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) -{ - unsigned absolute_samples_offset; - // process vars - double carr_error_hz = 0.0; - double carr_error_filt_hz = 0.0; - double code_error_chips = 0.0; - double code_error_filt_chips = 0.0; - - int next_prn_length_samples = d_current_prn_length_samples; - - // Block input data and block output stream pointers - Gnss_Synchro **out = reinterpret_cast(&output_items[0]); - - // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder - Gnss_Synchro current_synchro_data = Gnss_Synchro(); - - if (d_enable_tracking == true) - { - // Fill the acquisition data - current_synchro_data = *d_acquisition_gnss_synchro; - // Receiver signal alignment - if (d_pull_in == true) - { - d_pull_in = false; - multicorrelator_fpga_8sc->lock_channel(); - unsigned counter_value = multicorrelator_fpga_8sc->read_sample_counter(); - unsigned num_frames = ceil((counter_value - current_synchro_data.Acq_samplestamp_samples - current_synchro_data.Acq_delay_samples) / d_correlation_length_samples); - absolute_samples_offset = current_synchro_data.Acq_delay_samples + current_synchro_data.Acq_samplestamp_samples + num_frames * d_correlation_length_samples; - multicorrelator_fpga_8sc->set_initial_sample(absolute_samples_offset); - d_sample_counter = absolute_samples_offset; - current_synchro_data.Tracking_sample_counter = absolute_samples_offset; - } - else - { - // continue as from the previous point - d_sample_counter = d_sample_counter_next; - } - d_sample_counter_next = d_sample_counter + d_current_prn_length_samples; - - // ################# CARRIER WIPEOFF AND CORRELATORS ############################## - // perform carrier wipe-off and compute Early, Prompt and Late correlation - multicorrelator_fpga_8sc->Carrier_wipeoff_multicorrelator_resampler( - d_rem_carr_phase_rad, d_carrier_phase_step_rad, - d_rem_code_phase_chips, d_code_phase_step_chips, - d_current_prn_length_samples); - - // ################## PLL ########################################################## - // PLL discriminator - // Update PLL discriminator [rads/Ti -> Secs/Ti] - carr_error_hz = pll_cloop_two_quadrant_atan(d_correlator_outs[1]) / GPS_TWO_PI; // prompt output - // Carrier discriminator filter - carr_error_filt_hz = d_carrier_loop_filter.get_carrier_nco(carr_error_hz); - // New carrier Doppler frequency estimation - d_carrier_doppler_hz = d_acq_carrier_doppler_hz + carr_error_filt_hz; - // New code Doppler frequency estimation - d_code_freq_chips = GPS_L1_CA_CODE_RATE_HZ + ((d_carrier_doppler_hz * GPS_L1_CA_CODE_RATE_HZ) / GPS_L1_FREQ_HZ); - - // ################## DLL ########################################################## - // DLL discriminator - code_error_chips = dll_nc_e_minus_l_normalized(d_correlator_outs[0], d_correlator_outs[2]); // [chips/Ti] //early and late - // Code discriminator filter - code_error_filt_chips = d_code_loop_filter.get_code_nco(code_error_chips); // [chips/second] - double T_chip_seconds = 1.0 / static_cast(d_code_freq_chips); - double T_prn_seconds = T_chip_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS; - double code_error_filt_secs = (T_prn_seconds * code_error_filt_chips * T_chip_seconds); //[seconds] - - // ################## CARRIER AND CODE NCO BUFFER ALIGNEMENT ####################### - // keep alignment parameters for the next input buffer - // Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation - double T_prn_samples = T_prn_seconds * static_cast(d_fs_in); - double K_blk_samples = T_prn_samples + d_rem_code_phase_samples + code_error_filt_secs * static_cast(d_fs_in); - next_prn_length_samples = round(K_blk_samples); - - //################### PLL COMMANDS ################################################# - // carrier phase step (NCO phase increment per sample) [rads/sample] - d_carrier_phase_step_rad = GPS_TWO_PI * d_carrier_doppler_hz / static_cast(d_fs_in); - // remnant carrier phase to prevent overflow in the code NCO - d_rem_carr_phase_rad = d_rem_carr_phase_rad + d_carrier_phase_step_rad * d_current_prn_length_samples; - d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GPS_TWO_PI); - // carrier phase accumulator - d_acc_carrier_phase_rad -= d_carrier_phase_step_rad * d_current_prn_length_samples; - - //################### DLL COMMANDS ################################################# - // code phase step (Code resampler phase increment per sample) [chips/sample] - d_code_phase_step_chips = d_code_freq_chips / static_cast(d_fs_in); - // remnant code phase [chips] - d_rem_code_phase_samples = K_blk_samples - next_prn_length_samples; // rounding error < 1 sample - d_rem_code_phase_chips = d_code_freq_chips * (d_rem_code_phase_samples / static_cast(d_fs_in)); - - // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### - if (d_cn0_estimation_counter < FLAGS_cn0_samples) - { - // fill buffer with prompt correlator output values - d_Prompt_buffer[d_cn0_estimation_counter] = d_correlator_outs[1]; //prompt - d_cn0_estimation_counter++; - } - else - { - d_cn0_estimation_counter = 0; - // Code lock indicator - d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, GPS_L1_CA_CODE_PERIOD); - // Carrier lock indicator - d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); - // Loss of lock detection - if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min) - { - d_carrier_lock_fail_counter++; - } - else - { - if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; - } - if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail) - { - std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; - LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; - this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock - d_carrier_lock_fail_counter = 0; - d_enable_tracking = false; // TODO: check if disabling tracking is consistent with the channel state machine - multicorrelator_fpga_8sc->unlock_channel(); - } - } - - // ########### Output the tracking data to navigation and PVT ########## - current_synchro_data.Prompt_I = static_cast((d_correlator_outs[1]).real()); - current_synchro_data.Prompt_Q = static_cast((d_correlator_outs[1]).imag()); - current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples; - current_synchro_data.Code_phase_samples = d_rem_code_phase_samples; - current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; - current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; - current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; - current_synchro_data.Flag_valid_symbol_output = true; - current_synchro_data.correlation_length_ms = 1; - } - else - { - for (int n = 0; n < d_n_correlator_taps; n++) - { - d_correlator_outs[n] = gr_complex(0, 0); - } - - current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples; - current_synchro_data.System = {'G'}; - current_synchro_data.correlation_length_ms = 1; - } - - //assign the GNURadio block output data - current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; - if (d_enable_tracking == true) // in the FPGA case dump data only when tracking is enabled, otherwise the dumped data is useless - { - if (d_dump) - { - // MULTIPLEXED FILE RECORDING - Record results to file - float prompt_I; - float prompt_Q; - float tmp_E, tmp_P, tmp_L; - double tmp_double; - unsigned long int tmp_long; - prompt_I = d_correlator_outs[1].real(); - prompt_Q = d_correlator_outs[1].imag(); - tmp_E = std::abs(d_correlator_outs[0]); - tmp_P = std::abs(d_correlator_outs[1]); - tmp_L = std::abs(d_correlator_outs[2]); - try - { - // EPR - d_dump_file.write(reinterpret_cast(&tmp_E), sizeof(float)); - d_dump_file.write(reinterpret_cast(&tmp_P), sizeof(float)); - d_dump_file.write(reinterpret_cast(&tmp_L), sizeof(float)); - // PROMPT I and Q (to analyze navigation symbols) - d_dump_file.write(reinterpret_cast(&prompt_I), sizeof(float)); - d_dump_file.write(reinterpret_cast(&prompt_Q), sizeof(float)); - // PRN start sample stamp - tmp_long = d_sample_counter + d_current_prn_length_samples; - d_dump_file.write(reinterpret_cast(&tmp_long), sizeof(unsigned long int)); - // accumulated carrier phase - d_dump_file.write(reinterpret_cast(&d_acc_carrier_phase_rad), sizeof(double)); - - // carrier and code frequency - d_dump_file.write(reinterpret_cast(&d_carrier_doppler_hz), sizeof(double)); - d_dump_file.write(reinterpret_cast(&d_code_freq_chips), sizeof(double)); - - // PLL commands - d_dump_file.write(reinterpret_cast(&carr_error_hz), sizeof(double)); - d_dump_file.write(reinterpret_cast(&carr_error_filt_hz), sizeof(double)); - - // DLL commands - d_dump_file.write(reinterpret_cast(&code_error_chips), sizeof(double)); - d_dump_file.write(reinterpret_cast(&code_error_filt_chips), sizeof(double)); - - // CN0 and carrier lock test - d_dump_file.write(reinterpret_cast(&d_CN0_SNV_dB_Hz), sizeof(double)); - d_dump_file.write(reinterpret_cast(&d_carrier_lock_test), sizeof(double)); - - // AUX vars (for debug purposes) - tmp_double = d_rem_code_phase_samples; - d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); - tmp_double = static_cast(d_sample_counter); - d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); - - // PRN - unsigned int prn_ = d_acquisition_gnss_synchro->PRN; - d_dump_file.write(reinterpret_cast(&prn_), sizeof(unsigned int)); - } - catch (const std::ifstream::failure &e) - { - LOG(WARNING) << "Exception writing trk dump file " << e.what(); - } - } - } - - - d_current_prn_length_samples = next_prn_length_samples; - d_sample_counter += d_current_prn_length_samples; // count for the processed samples - - if (d_enable_tracking == true) - { - return 1; - } - else - { - return 0; - } -} - - -void Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc::set_channel(unsigned int channel) -{ - d_channel = channel; - multicorrelator_fpga_8sc->set_channel(d_channel); - LOG(INFO) << "Tracking Channel set to " << d_channel; - - // ############# ENABLE DATA FILE LOG ################# - if (d_dump == true) - { - if (d_dump_file.is_open() == false) - { - try - { - d_dump_filename.append(boost::lexical_cast(d_channel)); - d_dump_filename.append(".dat"); - d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); - d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); - LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str(); - } - catch (const std::ifstream::failure &e) - { - LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what(); - } - } - } -} - - -void Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc::set_gnss_synchro(Gnss_Synchro *p_gnss_synchro) -{ - d_acquisition_gnss_synchro = p_gnss_synchro; -} - - -void Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc::reset(void) -{ - multicorrelator_fpga_8sc->unlock_channel(); -} diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_fpga_sc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_fpga_sc.h deleted file mode 100644 index 295c3f177..000000000 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_fpga_sc.h +++ /dev/null @@ -1,188 +0,0 @@ -/*! - * \file gps_l1_ca_dll_pll_tracking_cc.h - * \brief Interface of a code DLL + carrier PLL tracking block - * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com - * Javier Arribas, 2011. jarribas(at)cttc.es - * Cillian O'Driscoll, 2017. cillian.odriscoll(at)gmail.com - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach, - * Birkhauser, 2007 - * - * ------------------------------------------------------------------------- - * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) - * - * GNSS-SDR is a software defined Global Navigation - * Satellite Systems receiver - * - * This file is part of GNSS-SDR. - * - * GNSS-SDR is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GNSS-SDR is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNSS-SDR. If not, see . - * - * ------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_FPGA_SC_H -#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_FPGA_SC_H - - -#include "gps_sdr_signal_processing.h" -#include "gnss_synchro.h" -#include "tracking_2nd_DLL_filter.h" -#include "tracking_2nd_PLL_filter.h" -#include "fpga_multicorrelator_8sc.h" -#include -#include -#include -#include -#include -#include -#include - - -class Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc; - -typedef boost::shared_ptr - gps_l1_ca_dll_pll_tracking_fpga_sc_sptr; - -gps_l1_ca_dll_pll_tracking_fpga_sc_sptr -gps_l1_ca_dll_pll_make_tracking_fpga_sc(long if_freq, - long fs_in, unsigned int vector_length, - bool dump, - std::string dump_filename, - float pll_bw_hz, - float dll_bw_hz, - float early_late_space_chips, - std::string device_name, - unsigned int device_base); - - -/*! - * \brief This class implements a DLL + PLL tracking loop block - */ -class Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc : public gr::block -{ -public: - ~Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc(); - - void set_channel(unsigned int channel); - void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); - void start_tracking(); - - int general_work(int noutput_items, gr_vector_int& ninput_items, - gr_vector_const_void_star& input_items, gr_vector_void_star& output_items); - - void reset(void); - -private: - friend gps_l1_ca_dll_pll_tracking_fpga_sc_sptr - gps_l1_ca_dll_pll_make_tracking_fpga_sc(long if_freq, - long fs_in, unsigned int vector_length, - bool dump, - std::string dump_filename, - float pll_bw_hz, - float dll_bw_hz, - float early_late_space_chips, - std::string device_name, - unsigned int device_base); - - Gps_L1_Ca_Dll_Pll_Tracking_fpga_sc(long if_freq, - long fs_in, unsigned int vector_length, - bool dump, - std::string dump_filename, - float pll_bw_hz, - float dll_bw_hz, - float early_late_space_chips, - std::string device_name, - unsigned int device_base); - - // tracking configuration vars - unsigned int d_vector_length; - bool d_dump; - - Gnss_Synchro* d_acquisition_gnss_synchro; - unsigned int d_channel; - - long d_if_freq; - long d_fs_in; - - double d_early_late_spc_chips; - - // remaining code phase and carrier phase between tracking loops - double d_rem_code_phase_samples; - double d_rem_code_phase_chips; - double d_rem_carr_phase_rad; - - // PLL and DLL filter library - Tracking_2nd_DLL_filter d_code_loop_filter; - Tracking_2nd_PLL_filter d_carrier_loop_filter; - - // acquisition - double d_acq_code_phase_samples; - double d_acq_carrier_doppler_hz; - // correlator - int d_n_correlator_taps; - //float* d_ca_code; - //int* d_ca_code_16sc; - - float* d_local_code_shift_chips; - gr_complex* d_correlator_outs; - std::shared_ptr multicorrelator_fpga_8sc; - - // tracking vars - double d_code_freq_chips; - double d_code_phase_step_chips; - double d_carrier_doppler_hz; - double d_carrier_phase_step_rad; - double d_acc_carrier_phase_rad; - double d_code_phase_samples; - - //PRN period in samples - int d_current_prn_length_samples; - - //processing samples counters - unsigned long int d_sample_counter; - unsigned long int d_acq_sample_stamp; - - // CN0 estimation and lock detector - int d_cn0_estimation_counter; - gr_complex* d_Prompt_buffer; - double d_carrier_lock_test; - double d_CN0_SNV_dB_Hz; - double d_carrier_lock_threshold; - int d_carrier_lock_fail_counter; - - // control vars - bool d_enable_tracking; - bool d_pull_in; - - // file dump - std::string d_dump_filename; - std::ofstream d_dump_file; - - std::map systemName; - std::string sys; - - // extra - int d_correlation_length_samples; - unsigned long int d_sample_counter_next; - double d_rem_carrier_phase_rad; - - double d_K_blk_samples_previous; - int d_offset_sample_previous; -}; - -#endif //GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_FPGA_SC_H diff --git a/src/algorithms/tracking/libs/CMakeLists.txt b/src/algorithms/tracking/libs/CMakeLists.txt index 88c4eb2a5..4e2a93efd 100644 --- a/src/algorithms/tracking/libs/CMakeLists.txt +++ b/src/algorithms/tracking/libs/CMakeLists.txt @@ -46,7 +46,7 @@ set(TRACKING_LIB_SOURCES ) if(ENABLE_FPGA) - SET(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} fpga_multicorrelator_8sc.cc) + SET(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} fpga_multicorrelator.cc) endif(ENABLE_FPGA) include_directories( diff --git a/src/algorithms/tracking/libs/fpga_multicorrelator_8sc.cc b/src/algorithms/tracking/libs/fpga_multicorrelator.cc similarity index 71% rename from src/algorithms/tracking/libs/fpga_multicorrelator_8sc.cc rename to src/algorithms/tracking/libs/fpga_multicorrelator.cc index 737e414d9..281bf2bc2 100644 --- a/src/algorithms/tracking/libs/fpga_multicorrelator_8sc.cc +++ b/src/algorithms/tracking/libs/fpga_multicorrelator.cc @@ -34,8 +34,10 @@ * ------------------------------------------------------------------------- */ -#include "fpga_multicorrelator_8sc.h" +#include "fpga_multicorrelator.h" + #include + // FPGA stuff #include @@ -65,7 +67,7 @@ // constants #include "GPS_L1_CA.h" -#include "gps_sdr_signal_processing.h" +//#include "gps_sdr_signal_processing.h" #define NUM_PRNs 32 #define PAGE_SIZE 0x10000 @@ -73,7 +75,7 @@ #define CODE_RESAMPLER_NUM_BITS_PRECISION 20 #define CODE_PHASE_STEP_CHIPS_NUM_NBITS CODE_RESAMPLER_NUM_BITS_PRECISION #define pwrtwo(x) (1 << (x)) -#define MAX_CODE_RESAMPLER_COUNTER pwrtwo(CODE_PHASE_STEP_CHIPS_NUM_NBITS) // 2^CODE_PHASE_STEP_CHIPS_NUM_NBITS +#define MAX_CODE_RESAMPLER_COUNTER pwrtwo(CODE_PHASE_STEP_CHIPS_NUM_NBITS) // 2^CODE_PHASE_STEP_CHIPS_NUM_NBITS #define PHASE_CARR_NBITS 32 #define PHASE_CARR_NBITS_INT 1 #define PHASE_CARR_NBITS_FRAC PHASE_CARR_NBITS - PHASE_CARR_NBITS_INT @@ -84,7 +86,7 @@ int fpga_multicorrelator_8sc::read_sample_counter() { - return d_map_base[7]; + return d_map_base[7]; } void fpga_multicorrelator_8sc::set_initial_sample(int samples_offset) @@ -92,16 +94,17 @@ void fpga_multicorrelator_8sc::set_initial_sample(int samples_offset) d_initial_sample_counter = samples_offset; d_map_base[13] = d_initial_sample_counter; } - + void fpga_multicorrelator_8sc::set_local_code_and_taps(int code_length_chips, - float *shifts_chips, int PRN) + float *shifts_chips, int PRN) { + d_shifts_chips = shifts_chips; d_code_length_chips = code_length_chips; fpga_multicorrelator_8sc::fpga_configure_tracking_gps_local_code(PRN); } -void fpga_multicorrelator_8sc::set_output_vectors(gr_complex *corr_out) +void fpga_multicorrelator_8sc::set_output_vectors(gr_complex* corr_out) { d_corr_out = corr_out; } @@ -113,18 +116,21 @@ void fpga_multicorrelator_8sc::update_local_code(float rem_code_phase_chips) fpga_multicorrelator_8sc::fpga_configure_code_parameters_in_fpga(); } + void fpga_multicorrelator_8sc::Carrier_wipeoff_multicorrelator_resampler( - float rem_carrier_phase_in_rad, float phase_step_rad, - float rem_code_phase_chips, float code_phase_step_chips, - int signal_length_samples) + float rem_carrier_phase_in_rad, float phase_step_rad, + float rem_code_phase_chips, float code_phase_step_chips, + int signal_length_samples) { + + update_local_code(rem_code_phase_chips); d_rem_carrier_phase_in_rad = rem_carrier_phase_in_rad; d_code_phase_step_chips = code_phase_step_chips; d_phase_step_rad = phase_step_rad; d_correlator_length_samples = signal_length_samples; - fpga_multicorrelator_8sc::fpga_compute_signal_parameters_in_fpga(); - fpga_multicorrelator_8sc::fpga_configure_signal_parameters_in_fpga(); + fpga_multicorrelator_8sc::fpga_compute_signal_parameters_in_fpga(); + fpga_multicorrelator_8sc::fpga_configure_signal_parameters_in_fpga(); fpga_multicorrelator_8sc::fpga_launch_multicorrelator_fpga(); int irq_count; ssize_t nb; @@ -137,9 +143,8 @@ void fpga_multicorrelator_8sc::Carrier_wipeoff_multicorrelator_resampler( fpga_multicorrelator_8sc::read_tracking_gps_results(); } - fpga_multicorrelator_8sc::fpga_multicorrelator_8sc(int n_correlators, - std::string device_name, unsigned int device_base) + std::string device_name, unsigned int device_base, int *ca_codes, unsigned int code_length) { d_n_correlators = n_correlators; d_device_name = device_name; @@ -148,10 +153,10 @@ fpga_multicorrelator_8sc::fpga_multicorrelator_8sc(int n_correlators, d_map_base = nullptr; // instantiate variable length vectors - d_initial_index = static_cast(volk_gnsssdr_malloc( - n_correlators * sizeof(unsigned), volk_gnsssdr_get_alignment())); - d_initial_interp_counter = static_cast(volk_gnsssdr_malloc( - n_correlators * sizeof(unsigned), volk_gnsssdr_get_alignment())); + d_initial_index = static_cast(volk_gnsssdr_malloc( + n_correlators * sizeof(unsigned), volk_gnsssdr_get_alignment())); + d_initial_interp_counter = static_cast(volk_gnsssdr_malloc( + n_correlators * sizeof(unsigned), volk_gnsssdr_get_alignment())); //d_local_code_in = nullptr; d_shifts_chips = nullptr; @@ -165,21 +170,24 @@ fpga_multicorrelator_8sc::fpga_multicorrelator_8sc(int n_correlators, d_phase_step_rad_int = 0; d_initial_sample_counter = 0; d_channel = 0; - d_correlator_length_samples = 0; - + d_correlator_length_samples = 0, + d_code_length = code_length; + // pre-compute all the codes - d_ca_codes = static_cast(volk_gnsssdr_malloc(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS * NUM_PRNs) * sizeof(int), volk_gnsssdr_get_alignment())); - for (unsigned int PRN = 1; PRN <= NUM_PRNs; PRN++) - { - gps_l1_ca_code_gen_int(&d_ca_codes[(int(GPS_L1_CA_CODE_LENGTH_CHIPS)) * (PRN - 1)], PRN, 0); - } +// d_ca_codes = static_cast(volk_gnsssdr_malloc(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS*NUM_PRNs) * sizeof(int), volk_gnsssdr_get_alignment())); +// for (unsigned int PRN = 1; PRN <= NUM_PRNs; PRN++) +// { +// gps_l1_ca_code_gen_int(&d_ca_codes[(int(GPS_L1_CA_CODE_LENGTH_CHIPS)) * (PRN - 1)], PRN, 0); +// } + d_ca_codes = ca_codes; DLOG(INFO) << "TRACKING FPGA CLASS CREATED"; + } fpga_multicorrelator_8sc::~fpga_multicorrelator_8sc() { - delete[] d_ca_codes; + delete[] d_ca_codes; close_device(); } @@ -187,7 +195,7 @@ fpga_multicorrelator_8sc::~fpga_multicorrelator_8sc() bool fpga_multicorrelator_8sc::free() { // unlock the channel - fpga_multicorrelator_8sc::unlock_channel(); + fpga_multicorrelator_8sc::unlock_channel(); // free the FPGA dynamically created variables if (d_initial_index != nullptr) @@ -208,7 +216,7 @@ bool fpga_multicorrelator_8sc::free() void fpga_multicorrelator_8sc::set_channel(unsigned int channel) { - char device_io_name[MAX_LENGTH_DEVICEIO_NAME]; // driver io name + char device_io_name[MAX_LENGTH_DEVICEIO_NAME]; // driver io name d_channel = channel; // open the device corresponding to the assigned channel @@ -223,12 +231,12 @@ void fpga_multicorrelator_8sc::set_channel(unsigned int channel) LOG(WARNING) << "Cannot open deviceio" << device_io_name; } d_map_base = reinterpret_cast(mmap(NULL, PAGE_SIZE, - PROT_READ | PROT_WRITE, MAP_SHARED, d_device_descriptor, 0)); + PROT_READ | PROT_WRITE, MAP_SHARED, d_device_descriptor, 0)); - if (d_map_base == reinterpret_cast(-1)) + if (d_map_base == reinterpret_cast(-1)) { LOG(WARNING) << "Cannot map the FPGA tracking module " - << d_channel << "into user memory"; + << d_channel << "into user memory"; } // sanity check : check test register @@ -247,7 +255,7 @@ void fpga_multicorrelator_8sc::set_channel(unsigned int channel) unsigned fpga_multicorrelator_8sc::fpga_acquisition_test_register( - unsigned writeval) + unsigned writeval) { unsigned readval; // write value to test register @@ -272,7 +280,7 @@ void fpga_multicorrelator_8sc::fpga_configure_tracking_gps_local_code(int PRN) for (k = 0; k < d_code_length_chips; k++) { //if (d_local_code_in[k] == 1) - if (d_ca_codes[((int(GPS_L1_CA_CODE_LENGTH_CHIPS)) * (PRN - 1)) + k] == 1) + if (d_ca_codes[((int(d_code_length)) * (PRN - 1)) + k] == 1) { code_chip = 1; } @@ -281,9 +289,11 @@ void fpga_multicorrelator_8sc::fpga_configure_tracking_gps_local_code(int PRN) code_chip = 0; } // copy the local code to the FPGA memory one by one - d_map_base[11] = LOCAL_CODE_FPGA_ENABLE_WRITE_MEMORY | code_chip | select_fpga_correlator; + d_map_base[11] = LOCAL_CODE_FPGA_ENABLE_WRITE_MEMORY + | code_chip | select_fpga_correlator; } - select_fpga_correlator = select_fpga_correlator + LOCAL_CODE_FPGA_CORRELATOR_SELECT_COUNT; + select_fpga_correlator = select_fpga_correlator + + LOCAL_CODE_FPGA_CORRELATOR_SELECT_COUNT; } } @@ -296,20 +306,20 @@ void fpga_multicorrelator_8sc::fpga_compute_code_shift_parameters(void) for (i = 0; i < d_n_correlators; i++) { temp_calculation = floor( - d_shifts_chips[i] - d_rem_code_phase_chips); - + d_shifts_chips[i] - d_rem_code_phase_chips); + if (temp_calculation < 0) { - temp_calculation = temp_calculation + d_code_length_chips; // % operator does not work as in Matlab with negative numbers + temp_calculation = temp_calculation + d_code_length_chips; // % operator does not work as in Matlab with negative numbers } - d_initial_index[i] = static_cast((static_cast(temp_calculation)) % d_code_length_chips); + d_initial_index[i] = static_cast( (static_cast(temp_calculation)) % d_code_length_chips); temp_calculation = fmod(d_shifts_chips[i] - d_rem_code_phase_chips, - 1.0); + 1.0); if (temp_calculation < 0) { - temp_calculation = temp_calculation + 1.0; // fmod operator does not work as in Matlab with negative numbers + temp_calculation = temp_calculation + 1.0; // fmod operator does not work as in Matlab with negative numbers } - d_initial_interp_counter[i] = static_cast(floor(MAX_CODE_RESAMPLER_COUNTER * temp_calculation)); + d_initial_interp_counter[i] = static_cast( floor( MAX_CODE_RESAMPLER_COUNTER * temp_calculation)); } } @@ -322,7 +332,7 @@ void fpga_multicorrelator_8sc::fpga_configure_code_parameters_in_fpga(void) d_map_base[1 + i] = d_initial_index[i]; d_map_base[1 + d_n_correlators + i] = d_initial_interp_counter[i]; } - d_map_base[8] = d_code_length_chips - 1; // number of samples - 1 + d_map_base[8] = d_code_length_chips - 1; // number of samples - 1 } @@ -330,27 +340,30 @@ void fpga_multicorrelator_8sc::fpga_compute_signal_parameters_in_fpga(void) { float d_rem_carrier_phase_in_rad_temp; - d_code_phase_step_chips_num = static_cast(roundf(MAX_CODE_RESAMPLER_COUNTER * d_code_phase_step_chips)); + d_code_phase_step_chips_num = static_cast( roundf(MAX_CODE_RESAMPLER_COUNTER * d_code_phase_step_chips)); if (d_rem_carrier_phase_in_rad > M_PI) { - d_rem_carrier_phase_in_rad_temp = -2 * M_PI + d_rem_carrier_phase_in_rad; + d_rem_carrier_phase_in_rad_temp = -2 * M_PI + + d_rem_carrier_phase_in_rad; } else if (d_rem_carrier_phase_in_rad < -M_PI) { - d_rem_carrier_phase_in_rad_temp = 2 * M_PI + d_rem_carrier_phase_in_rad; + d_rem_carrier_phase_in_rad_temp = 2 * M_PI + + d_rem_carrier_phase_in_rad; } else { d_rem_carrier_phase_in_rad_temp = d_rem_carrier_phase_in_rad; } - d_rem_carr_phase_rad_int = static_cast(roundf( - (fabs(d_rem_carrier_phase_in_rad_temp) / M_PI) * pow(2, PHASE_CARR_NBITS_FRAC))); + d_rem_carr_phase_rad_int = static_cast( roundf( + (fabs(d_rem_carrier_phase_in_rad_temp) / M_PI) + * pow(2, PHASE_CARR_NBITS_FRAC))); if (d_rem_carrier_phase_in_rad_temp < 0) { d_rem_carr_phase_rad_int = -d_rem_carr_phase_rad_int; } - d_phase_step_rad_int = static_cast(roundf( - (fabs(d_phase_step_rad) / M_PI) * pow(2, PHASE_CARR_NBITS_FRAC))); // the FPGA accepts a range for the phase step between -pi and +pi + d_phase_step_rad_int = static_cast( roundf( + (fabs(d_phase_step_rad) / M_PI) * pow(2, PHASE_CARR_NBITS_FRAC))); // the FPGA accepts a range for the phase step between -pi and +pi if (d_phase_step_rad < 0) { @@ -372,10 +385,10 @@ void fpga_multicorrelator_8sc::fpga_launch_multicorrelator_fpga(void) { // enable interrupts int reenable = 1; - write(d_device_descriptor, reinterpret_cast(&reenable), sizeof(int)); + write(d_device_descriptor, reinterpret_cast(&reenable), sizeof(int)); - // writing 1 to reg 14 launches the tracking - d_map_base[14] = 1; + // writing 1 to reg 14 launches the tracking + d_map_base[14] = 1; } @@ -388,17 +401,17 @@ void fpga_multicorrelator_8sc::read_tracking_gps_results(void) for (k = 0; k < d_n_correlators; k++) { readval_real = d_map_base[1 + k]; - if (readval_real >= 1048576) // 0x100000 (21 bits two's complement) + if (readval_real >= 1048576) // 0x100000 (21 bits two's complement) { readval_real = -2097152 + readval_real; } readval_imag = d_map_base[1 + d_n_correlators + k]; - if (readval_imag >= 1048576) // 0x100000 (21 bits two's complement) + if (readval_imag >= 1048576) // 0x100000 (21 bits two's complement) { readval_imag = -2097152 + readval_imag; } - d_corr_out[k] = gr_complex(readval_real, readval_imag); + d_corr_out[k] = gr_complex(readval_real,readval_imag); } } @@ -406,42 +419,40 @@ void fpga_multicorrelator_8sc::read_tracking_gps_results(void) void fpga_multicorrelator_8sc::unlock_channel(void) { // unlock the channel to let the next samples go through - d_map_base[12] = 1; // unlock the channel + d_map_base[12] = 1; // unlock the channel } - void fpga_multicorrelator_8sc::close_device() { - unsigned *aux = const_cast(d_map_base); - if (munmap(static_cast(aux), PAGE_SIZE) == -1) + unsigned * aux = const_cast(d_map_base); + if (munmap(static_cast(aux), PAGE_SIZE) == -1) { printf("Failed to unmap memory uio\n"); } - /* else +/* else { printf("memory uio unmapped\n"); } */ close(d_device_descriptor); } - + void fpga_multicorrelator_8sc::lock_channel(void) { // lock the channel for processing - d_map_base[12] = 0; // lock the channel + d_map_base[12] = 0; // lock the channel } - void fpga_multicorrelator_8sc::read_sample_counters(int *sample_counter, int *secondary_sample_counter, int *counter_corr_0_in, int *counter_corr_0_out) { - *sample_counter = d_map_base[11]; - *secondary_sample_counter = d_map_base[8]; - *counter_corr_0_in = d_map_base[10]; - *counter_corr_0_out = d_map_base[9]; + *sample_counter = d_map_base[11]; + *secondary_sample_counter = d_map_base[8]; + *counter_corr_0_in = d_map_base[10]; + *counter_corr_0_out = d_map_base[9]; + } - void fpga_multicorrelator_8sc::reset_multicorrelator(void) { - d_map_base[14] = 2; // writing a 2 to d_map_base[14] resets the multicorrelator + d_map_base[14] = 2; // writing a 2 to d_map_base[14] resets the multicorrelator } diff --git a/src/algorithms/tracking/libs/fpga_multicorrelator_8sc.h b/src/algorithms/tracking/libs/fpga_multicorrelator.h similarity index 78% rename from src/algorithms/tracking/libs/fpga_multicorrelator_8sc.h rename to src/algorithms/tracking/libs/fpga_multicorrelator.h index 1eceb1936..5012651d4 100644 --- a/src/algorithms/tracking/libs/fpga_multicorrelator_8sc.h +++ b/src/algorithms/tracking/libs/fpga_multicorrelator.h @@ -49,46 +49,46 @@ class fpga_multicorrelator_8sc { public: fpga_multicorrelator_8sc(int n_correlators, std::string device_name, - unsigned int device_base); + unsigned int device_base, int *ca_codes, unsigned int code_length); ~fpga_multicorrelator_8sc(); - //bool set_output_vectors(gr_complex* corr_out); - void set_output_vectors(gr_complex *corr_out); - // bool set_local_code_and_taps( - // int code_length_chips, const int* local_code_in, - // float *shifts_chips, int PRN); + //bool set_output_vectors(gr_complex* corr_out); + void set_output_vectors(gr_complex* corr_out); +// bool set_local_code_and_taps( +// int code_length_chips, const int* local_code_in, +// float *shifts_chips, int PRN); //bool set_local_code_and_taps( void set_local_code_and_taps( - int code_length_chips, - float *shifts_chips, int PRN); + int code_length_chips, + float *shifts_chips, int PRN); //bool set_output_vectors(lv_16sc_t* corr_out); void update_local_code(float rem_code_phase_chips); //bool Carrier_wipeoff_multicorrelator_resampler( void Carrier_wipeoff_multicorrelator_resampler( - float rem_carrier_phase_in_rad, float phase_step_rad, - float rem_code_phase_chips, float code_phase_step_chips, - int signal_length_samples); - bool free(); + float rem_carrier_phase_in_rad, float phase_step_rad, + float rem_code_phase_chips, float code_phase_step_chips, + int signal_length_samples);bool free(); void set_channel(unsigned int channel); void set_initial_sample(int samples_offset); int read_sample_counter(); void lock_channel(void); void unlock_channel(void); - void read_sample_counters(int *sample_counter, int *secondary_sample_counter, int *counter_corr_0_in, int *counter_corr_0_out); // debug - + void read_sample_counters(int *sample_counter, int *secondary_sample_counter, int *counter_corr_0_in, int *counter_corr_0_out); // debug + + private: //const int *d_local_code_in; - gr_complex *d_corr_out; + gr_complex * d_corr_out; float *d_shifts_chips; int d_code_length_chips; int d_n_correlators; // data related to the hardware module and the driver - int d_device_descriptor; // driver descriptor - volatile unsigned *d_map_base; // driver memory map + int d_device_descriptor; // driver descriptor + volatile unsigned *d_map_base; // driver memory map // configuration data received from the interface - unsigned int d_channel; // channel number - unsigned d_ncorrelators; // number of correlators + unsigned int d_channel; // channel number + unsigned d_ncorrelators; // number of correlators unsigned d_correlator_length_samples; float d_rem_code_phase_chips; float d_code_phase_step_chips; @@ -107,7 +107,10 @@ private: std::string d_device_name; unsigned int d_device_base; - int *d_ca_codes; + + int* d_ca_codes; + + unsigned int d_code_length; // nominal number of chips // private functions unsigned fpga_acquisition_test_register(unsigned writeval); @@ -118,8 +121,11 @@ private: void fpga_configure_signal_parameters_in_fpga(void); void fpga_launch_multicorrelator_fpga(void); void read_tracking_gps_results(void); - void reset_multicorrelator(void); - void close_device(void); + void reset_multicorrelator(void); + void close_device(void); + + // debug + //unsigned int first_time = 1; }; #endif /* GNSS_SDR_FPGA_MULTICORRELATOR_H_ */ diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index 9121d7fa7..aba3c0272 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -110,7 +110,15 @@ ControlThread::~ControlThread() void ControlThread::run() { // Connect the flowgraph - flowgraph_->connect(); + try + { + flowgraph_->connect(); + } + catch (const std::exception e) + { + LOG(ERROR) << e.what(); + return; + } if (flowgraph_->connected()) { LOG(INFO) << "Flowgraph connected"; @@ -141,9 +149,9 @@ void ControlThread::run() bool enable_FPGA = configuration_->property("Channel.enable_FPGA", false); if (enable_FPGA == true) - { - flowgraph_->start_acquisition_helper(); - } + { + flowgraph_->start_acquisition_helper(); + } // Main loop to read and process the control messages while (flowgraph_->running() && !stop_) @@ -271,6 +279,7 @@ bool ControlThread::read_assistance_from_XML() return ret; } + void ControlThread::assist_GNSS() { //######### GNSS Assistance ################################# diff --git a/src/core/receiver/gnss_block_factory.cc b/src/core/receiver/gnss_block_factory.cc index 7aa1bab99..c76886c84 100644 --- a/src/core/receiver/gnss_block_factory.cc +++ b/src/core/receiver/gnss_block_factory.cc @@ -149,7 +149,6 @@ #include "gps_l1_ca_dll_pll_tracking_gpu.h" #endif -#include #include #include #include @@ -170,9 +169,16 @@ std::unique_ptr GNSSBlockFactory::GetSignalSource( { std::string default_implementation = "File_Signal_Source"; std::string role = "SignalSource"; //backwards compatibility for old conf files - if (ID != -1) + try { - role = "SignalSource" + boost::lexical_cast(ID); + if (ID != -1) + { + role = "SignalSource" + std::to_string(ID); + } + } + catch (const std::exception &e) + { + LOG(WARNING) << e.what(); } std::string implementation = configuration->property(role + ".implementation", default_implementation); LOG(INFO) << "Getting SignalSource with implementation " << implementation; @@ -189,15 +195,20 @@ std::unique_ptr GNSSBlockFactory::GetSignalConditioner( std::string role_datatypeadapter = "DataTypeAdapter"; std::string role_inputfilter = "InputFilter"; std::string role_resampler = "Resampler"; - - if (ID != -1) + try { - role_conditioner = "SignalConditioner" + boost::lexical_cast(ID); - role_datatypeadapter = "DataTypeAdapter" + boost::lexical_cast(ID); - role_inputfilter = "InputFilter" + boost::lexical_cast(ID); - role_resampler = "Resampler" + boost::lexical_cast(ID); + if (ID != -1) + { + role_conditioner = "SignalConditioner" + std::to_string(ID); + role_datatypeadapter = "DataTypeAdapter" + std::to_string(ID); + role_inputfilter = "InputFilter" + std::to_string(ID); + role_resampler = "Resampler" + std::to_string(ID); + } + } + catch (const std::exception &e) + { + LOG(WARNING) << e.what(); } - std::string signal_conditioner = configuration->property(role_conditioner + ".implementation", default_implementation); std::string data_type_adapter; @@ -294,31 +305,31 @@ std::unique_ptr GNSSBlockFactory::GetChannel_1C( LOG(INFO) << "Instantiating Channel " << channel << " with Acquisition Implementation: " << acq << ", Tracking Implementation: " << trk << ", Telemetry Decoder implementation: " << tlm; - std::string aux = configuration->property("Acquisition_1C" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + std::string aux = configuration->property("Acquisition_1C" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix1; if (aux.compare("W") != 0) { - appendix1 = boost::lexical_cast(channel); + appendix1 = std::to_string(channel); } else { appendix1 = ""; } - aux = configuration->property("Tracking_1C" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("Tracking_1C" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix2; if (aux.compare("W") != 0) { - appendix2 = boost::lexical_cast(channel); + appendix2 = std::to_string(channel); } else { appendix2 = ""; } - aux = configuration->property("TelemetryDecoder_1C" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("TelemetryDecoder_1C" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix3; if (aux.compare("W") != 0) { - appendix3 = boost::lexical_cast(channel); + appendix3 = std::to_string(channel); } else { @@ -359,31 +370,31 @@ std::unique_ptr GNSSBlockFactory::GetChannel_2S( { LOG(INFO) << "Instantiating Channel " << channel << " with Acquisition Implementation: " << acq << ", Tracking Implementation: " << trk << ", Telemetry Decoder implementation: " << tlm; - std::string aux = configuration->property("Acquisition_2S" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + std::string aux = configuration->property("Acquisition_2S" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix1; if (aux.compare("W") != 0) { - appendix1 = boost::lexical_cast(channel); + appendix1 = std::to_string(channel); } else { appendix1 = ""; } - aux = configuration->property("Tracking_2S" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("Tracking_2S" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix2; if (aux.compare("W") != 0) { - appendix2 = boost::lexical_cast(channel); + appendix2 = std::to_string(channel); } else { appendix2 = ""; } - aux = configuration->property("TelemetryDecoder_2S" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("TelemetryDecoder_2S" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix3; if (aux.compare("W") != 0) { - appendix3 = boost::lexical_cast(channel); + appendix3 = std::to_string(channel); } else { @@ -427,31 +438,31 @@ std::unique_ptr GNSSBlockFactory::GetChannel_1B( std::string id = stream.str(); LOG(INFO) << "Instantiating Channel " << id << " with Acquisition Implementation: " << acq << ", Tracking Implementation: " << trk << ", Telemetry Decoder implementation: " << tlm; - std::string aux = configuration->property("Acquisition_1B" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + std::string aux = configuration->property("Acquisition_1B" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix1; if (aux.compare("W") != 0) { - appendix1 = boost::lexical_cast(channel); + appendix1 = std::to_string(channel); } else { appendix1 = ""; } - aux = configuration->property("Tracking_1B" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("Tracking_1B" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix2; if (aux.compare("W") != 0) { - appendix2 = boost::lexical_cast(channel); + appendix2 = std::to_string(channel); } else { appendix2 = ""; } - aux = configuration->property("TelemetryDecoder_1B" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("TelemetryDecoder_1B" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix3; if (aux.compare("W") != 0) { - appendix3 = boost::lexical_cast(channel); + appendix3 = std::to_string(channel); } else { @@ -495,31 +506,31 @@ std::unique_ptr GNSSBlockFactory::GetChannel_5X( std::string id = stream.str(); LOG(INFO) << "Instantiating Channel " << id << " with Acquisition Implementation: " << acq << ", Tracking Implementation: " << trk << ", Telemetry Decoder implementation: " << tlm; - std::string aux = configuration->property("Acquisition_5X" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + std::string aux = configuration->property("Acquisition_5X" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix1; if (aux.compare("W") != 0) { - appendix1 = boost::lexical_cast(channel); + appendix1 = std::to_string(channel); } else { appendix1 = ""; } - aux = configuration->property("Tracking_5X" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("Tracking_5X" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix2; if (aux.compare("W") != 0) { - appendix2 = boost::lexical_cast(channel); + appendix2 = std::to_string(channel); } else { appendix2 = ""; } - aux = configuration->property("TelemetryDecoder_5X" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("TelemetryDecoder_5X" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix3; if (aux.compare("W") != 0) { - appendix3 = boost::lexical_cast(channel); + appendix3 = std::to_string(channel); } else { @@ -564,31 +575,31 @@ std::unique_ptr GNSSBlockFactory::GetChannel_1G( LOG(INFO) << "Instantiating Channel " << channel << " with Acquisition Implementation: " << acq << ", Tracking Implementation: " << trk << ", Telemetry Decoder Implementation: " << tlm; - std::string aux = configuration->property("Acquisition_1G" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + std::string aux = configuration->property("Acquisition_1G" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix1; if (aux.compare("W") != 0) { - appendix1 = boost::lexical_cast(channel); + appendix1 = std::to_string(channel); } else { appendix1 = ""; } - aux = configuration->property("Tracking_1G" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("Tracking_1G" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix2; if (aux.compare("W") != 0) { - appendix2 = boost::lexical_cast(channel); + appendix2 = std::to_string(channel); } else { appendix2 = ""; } - aux = configuration->property("TelemetryDecoder_1G" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("TelemetryDecoder_1G" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix3; if (aux.compare("W") != 0) { - appendix3 = boost::lexical_cast(channel); + appendix3 = std::to_string(channel); } else { @@ -633,31 +644,31 @@ std::unique_ptr GNSSBlockFactory::GetChannel_2G( LOG(INFO) << "Instantiating Channel " << channel << " with Acquisition Implementation: " << acq << ", Tracking Implementation: " << trk << ", Telemetry Decoder Implementation: " << tlm; - std::string aux = configuration->property("Acquisition_2G" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + std::string aux = configuration->property("Acquisition_2G" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix1; if (aux.compare("W") != 0) { - appendix1 = boost::lexical_cast(channel); + appendix1 = std::to_string(channel); } else { appendix1 = ""; } - aux = configuration->property("Tracking_2G" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("Tracking_2G" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix2; if (aux.compare("W") != 0) { - appendix2 = boost::lexical_cast(channel); + appendix2 = std::to_string(channel); } else { appendix2 = ""; } - aux = configuration->property("TelemetryDecoder_2G" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("TelemetryDecoder_2G" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix3; if (aux.compare("W") != 0) { - appendix3 = boost::lexical_cast(channel); + appendix3 = std::to_string(channel); } else { @@ -701,31 +712,31 @@ std::unique_ptr GNSSBlockFactory::GetChannel_L5( std::string id = stream.str(); LOG(INFO) << "Instantiating Channel " << id << " with Acquisition Implementation: " << acq << ", Tracking Implementation: " << trk << ", Telemetry Decoder implementation: " << tlm; - std::string aux = configuration->property("Acquisition_L5" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + std::string aux = configuration->property("Acquisition_L5" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix1; if (aux.compare("W") != 0) { - appendix1 = boost::lexical_cast(channel); + appendix1 = std::to_string(channel); } else { appendix1 = ""; } - aux = configuration->property("Tracking_L5" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("Tracking_L5" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix2; if (aux.compare("W") != 0) { - appendix2 = boost::lexical_cast(channel); + appendix2 = std::to_string(channel); } else { appendix2 = ""; } - aux = configuration->property("TelemetryDecoder_L5" + boost::lexical_cast(channel) + ".implementation", std::string("W")); + aux = configuration->property("TelemetryDecoder_L5" + std::to_string(channel) + ".implementation", std::string("W")); std::string appendix3; if (aux.compare("W") != 0) { - appendix3 = boost::lexical_cast(channel); + appendix3 = std::to_string(channel); } else { @@ -769,227 +780,233 @@ std::unique_ptr>> GNSSBlockFacto unsigned int channel_absolute_id = 0; unsigned int Channels_1C_count = configuration->property("Channels_1C.count", 0); - unsigned int Channels_2S_count = configuration->property("Channels_2S.count", 0); unsigned int Channels_1B_count = configuration->property("Channels_1B.count", 0); - unsigned int Channels_5X_count = configuration->property("Channels_5X.count", 0); unsigned int Channels_1G_count = configuration->property("Channels_1G.count", 0); unsigned int Channels_2G_count = configuration->property("Channels_2G.count", 0); + unsigned int Channels_2S_count = configuration->property("Channels_2S.count", 0); + unsigned int Channels_5X_count = configuration->property("Channels_5X.count", 0); unsigned int Channels_L5_count = configuration->property("Channels_L5.count", 0); unsigned int total_channels = Channels_1C_count + - Channels_2S_count + Channels_1B_count + - Channels_5X_count + Channels_1G_count + + Channels_2S_count + Channels_2G_count + + Channels_5X_count + Channels_L5_count; std::unique_ptr>> channels(new std::vector>(total_channels)); - - //**************** GPS L1 C/A CHANNELS ********************** - LOG(INFO) << "Getting " << Channels_1C_count << " GPS L1 C/A channels"; - acquisition_implementation = configuration->property("Acquisition_1C.implementation", default_implementation); - tracking_implementation = configuration->property("Tracking_1C.implementation", default_implementation); - telemetry_decoder_implementation = configuration->property("TelemetryDecoder_1C.implementation", default_implementation); - - for (unsigned int i = 0; i < Channels_1C_count; i++) + try { - //(i.e. Acquisition_1C0.implementation=xxxx) - std::string acquisition_implementation_specific = configuration->property( - "Acquisition_1C" + boost::lexical_cast(channel_absolute_id) + ".implementation", - acquisition_implementation); - //(i.e. Tracking_1C0.implementation=xxxx) - std::string tracking_implementation_specific = configuration->property( - "Tracking_1C" + boost::lexical_cast(channel_absolute_id) + ".implementation", - tracking_implementation); - std::string telemetry_decoder_implementation_specific = configuration->property( - "TelemetryDecoder_1C" + boost::lexical_cast(channel_absolute_id) + ".implementation", - telemetry_decoder_implementation); + //**************** GPS L1 C/A CHANNELS ********************** + LOG(INFO) << "Getting " << Channels_1C_count << " GPS L1 C/A channels"; + acquisition_implementation = configuration->property("Acquisition_1C.implementation", default_implementation); + tracking_implementation = configuration->property("Tracking_1C.implementation", default_implementation); + telemetry_decoder_implementation = configuration->property("TelemetryDecoder_1C.implementation", default_implementation); - // Push back the channel to the vector of channels - channels->at(channel_absolute_id) = std::move(GetChannel_1C(configuration, - acquisition_implementation_specific, - tracking_implementation_specific, - telemetry_decoder_implementation_specific, - channel_absolute_id, - queue)); - channel_absolute_id++; + for (unsigned int i = 0; i < Channels_1C_count; i++) + { + //(i.e. Acquisition_1C0.implementation=xxxx) + std::string acquisition_implementation_specific = configuration->property( + "Acquisition_1C" + std::to_string(channel_absolute_id) + ".implementation", + acquisition_implementation); + //(i.e. Tracking_1C0.implementation=xxxx) + std::string tracking_implementation_specific = configuration->property( + "Tracking_1C" + std::to_string(channel_absolute_id) + ".implementation", + tracking_implementation); + std::string telemetry_decoder_implementation_specific = configuration->property( + "TelemetryDecoder_1C" + std::to_string(channel_absolute_id) + ".implementation", + telemetry_decoder_implementation); + + // Push back the channel to the vector of channels + channels->at(channel_absolute_id) = std::move(GetChannel_1C(configuration, + acquisition_implementation_specific, + tracking_implementation_specific, + telemetry_decoder_implementation_specific, + channel_absolute_id, + queue)); + channel_absolute_id++; + } + + //**************** GPS L2C (M) CHANNELS ********************** + LOG(INFO) << "Getting " << Channels_2S_count << " GPS L2C (M) channels"; + tracking_implementation = configuration->property("Tracking_2S.implementation", default_implementation); + telemetry_decoder_implementation = configuration->property("TelemetryDecoder_2S.implementation", default_implementation); + acquisition_implementation = configuration->property("Acquisition_2S.implementation", default_implementation); + for (unsigned int i = 0; i < Channels_2S_count; i++) + { + //(i.e. Acquisition_1C0.implementation=xxxx) + std::string acquisition_implementation_specific = configuration->property( + "Acquisition_2S" + std::to_string(channel_absolute_id) + ".implementation", + acquisition_implementation); + //(i.e. Tracking_1C0.implementation=xxxx) + std::string tracking_implementation_specific = configuration->property( + "Tracking_2S" + std::to_string(channel_absolute_id) + ".implementation", + tracking_implementation); + std::string telemetry_decoder_implementation_specific = configuration->property( + "TelemetryDecoder_2S" + std::to_string(channel_absolute_id) + ".implementation", + telemetry_decoder_implementation); + + // Push back the channel to the vector of channels + channels->at(channel_absolute_id) = std::move(GetChannel_2S(configuration, + acquisition_implementation_specific, + tracking_implementation_specific, + telemetry_decoder_implementation_specific, + channel_absolute_id, + queue)); + channel_absolute_id++; + } + + //**************** GPS L5 CHANNELS ********************** + LOG(INFO) << "Getting " << Channels_L5_count << " GPS L5 channels"; + tracking_implementation = configuration->property("Tracking_L5.implementation", default_implementation); + telemetry_decoder_implementation = configuration->property("TelemetryDecoder_L5.implementation", default_implementation); + acquisition_implementation = configuration->property("Acquisition_L5.implementation", default_implementation); + for (unsigned int i = 0; i < Channels_L5_count; i++) + { + //(i.e. Acquisition_1C0.implementation=xxxx) + std::string acquisition_implementation_specific = configuration->property( + "Acquisition_L5" + std::to_string(channel_absolute_id) + ".implementation", + acquisition_implementation); + //(i.e. Tracking_1C0.implementation=xxxx) + std::string tracking_implementation_specific = configuration->property( + "Tracking_L5" + std::to_string(channel_absolute_id) + ".implementation", + tracking_implementation); + std::string telemetry_decoder_implementation_specific = configuration->property( + "TelemetryDecoder_L5" + std::to_string(channel_absolute_id) + ".implementation", + telemetry_decoder_implementation); + + // Push back the channel to the vector of channels + channels->at(channel_absolute_id) = std::move(GetChannel_L5(configuration, + acquisition_implementation_specific, + tracking_implementation_specific, + telemetry_decoder_implementation_specific, + channel_absolute_id, + queue)); + channel_absolute_id++; + } + + //**************** GALILEO E1 B (I/NAV OS) CHANNELS ********************** + LOG(INFO) << "Getting " << Channels_1B_count << " GALILEO E1 B (I/NAV OS) channels"; + tracking_implementation = configuration->property("Tracking_1B.implementation", default_implementation); + telemetry_decoder_implementation = configuration->property("TelemetryDecoder_1B.implementation", default_implementation); + acquisition_implementation = configuration->property("Acquisition_1B.implementation", default_implementation); + for (unsigned int i = 0; i < Channels_1B_count; i++) + { + //(i.e. Acquisition_1C0.implementation=xxxx) + std::string acquisition_implementation_specific = configuration->property( + "Acquisition_1B" + std::to_string(channel_absolute_id) + ".implementation", + acquisition_implementation); + //(i.e. Tracking_1C0.implementation=xxxx) + std::string tracking_implementation_specific = configuration->property( + "Tracking_1B" + std::to_string(channel_absolute_id) + ".implementation", + tracking_implementation); + std::string telemetry_decoder_implementation_specific = configuration->property( + "TelemetryDecoder_1B" + std::to_string(channel_absolute_id) + ".implementation", + telemetry_decoder_implementation); + + // Push back the channel to the vector of channels + channels->at(channel_absolute_id) = std::move(GetChannel_1B(configuration, + acquisition_implementation_specific, + tracking_implementation_specific, + telemetry_decoder_implementation_specific, + channel_absolute_id, + queue)); + channel_absolute_id++; + } + + //**************** GALILEO E5a I (F/NAV OS) CHANNELS ********************** + LOG(INFO) << "Getting " << Channels_5X_count << " GALILEO E5a I (F/NAV OS) channels"; + tracking_implementation = configuration->property("Tracking_5X.implementation", default_implementation); + telemetry_decoder_implementation = configuration->property("TelemetryDecoder_5X.implementation", default_implementation); + acquisition_implementation = configuration->property("Acquisition_5X.implementation", default_implementation); + for (unsigned int i = 0; i < Channels_5X_count; i++) + { + //(i.e. Acquisition_1C0.implementation=xxxx) + std::string acquisition_implementation_specific = configuration->property( + "Acquisition_5X" + std::to_string(channel_absolute_id) + ".implementation", + acquisition_implementation); + //(i.e. Tracking_1C0.implementation=xxxx) + std::string tracking_implementation_specific = configuration->property( + "Tracking_5X" + std::to_string(channel_absolute_id) + ".implementation", + tracking_implementation); + std::string telemetry_decoder_implementation_specific = configuration->property( + "TelemetryDecoder_5X" + std::to_string(channel_absolute_id) + ".implementation", + telemetry_decoder_implementation); + + // Push back the channel to the vector of channels + channels->at(channel_absolute_id) = std::move(GetChannel_5X(configuration, + acquisition_implementation_specific, + tracking_implementation_specific, + telemetry_decoder_implementation_specific, + channel_absolute_id, + queue)); + channel_absolute_id++; + } + + //**************** GLONASS L1 C/A CHANNELS ********************** + LOG(INFO) << "Getting " << Channels_1G_count << " GLONASS L1 C/A channels"; + acquisition_implementation = configuration->property("Acquisition_1G.implementation", default_implementation); + tracking_implementation = configuration->property("Tracking_1G.implementation", default_implementation); + telemetry_decoder_implementation = configuration->property("TelemetryDecoder_1G.implementation", default_implementation); + + for (unsigned int i = 0; i < Channels_1G_count; i++) + { + //(i.e. Acquisition_1G0.implementation=xxxx) + std::string acquisition_implementation_specific = configuration->property( + "Acquisition_1G" + std::to_string(channel_absolute_id) + ".implementation", + acquisition_implementation); + //(i.e. Tracking_1G0.implementation=xxxx) + std::string tracking_implementation_specific = configuration->property( + "Tracking_1G" + std::to_string(channel_absolute_id) + ".implementation", + tracking_implementation); + std::string telemetry_decoder_implementation_specific = configuration->property( + "TelemetryDecoder_1G" + std::to_string(channel_absolute_id) + ".implementation", + telemetry_decoder_implementation); + + // Push back the channel to the vector of channels + channels->at(channel_absolute_id) = std::move(GetChannel_1G(configuration, + acquisition_implementation_specific, + tracking_implementation_specific, + telemetry_decoder_implementation_specific, + channel_absolute_id, + queue)); + channel_absolute_id++; + } + + //**************** GLONASS L2 C/A CHANNELS ********************** + LOG(INFO) << "Getting " << Channels_2G_count << " GLONASS L2 C/A channels"; + acquisition_implementation = configuration->property("Acquisition_2G.implementation", default_implementation); + tracking_implementation = configuration->property("Tracking_2G.implementation", default_implementation); + telemetry_decoder_implementation = configuration->property("TelemetryDecoder_2G.implementation", default_implementation); + + for (unsigned int i = 0; i < Channels_2G_count; i++) + { + //(i.e. Acquisition_2G0.implementation=xxxx) + std::string acquisition_implementation_specific = configuration->property( + "Acquisition_2G" + std::to_string(channel_absolute_id) + ".implementation", + acquisition_implementation); + //(i.e. Tracking_2G0.implementation=xxxx) + std::string tracking_implementation_specific = configuration->property( + "Tracking_2G" + std::to_string(channel_absolute_id) + ".implementation", + tracking_implementation); + std::string telemetry_decoder_implementation_specific = configuration->property( + "TelemetryDecoder_2G" + std::to_string(channel_absolute_id) + ".implementation", + telemetry_decoder_implementation); + + // Push back the channel to the vector of channels + channels->at(channel_absolute_id) = std::move(GetChannel_2G(configuration, + acquisition_implementation_specific, + tracking_implementation_specific, + telemetry_decoder_implementation_specific, + channel_absolute_id, + queue)); + channel_absolute_id++; + } } - - //**************** GPS L2C (M) CHANNELS ********************** - LOG(INFO) << "Getting " << Channels_2S_count << " GPS L2C (M) channels"; - tracking_implementation = configuration->property("Tracking_2S.implementation", default_implementation); - telemetry_decoder_implementation = configuration->property("TelemetryDecoder_2S.implementation", default_implementation); - acquisition_implementation = configuration->property("Acquisition_2S.implementation", default_implementation); - for (unsigned int i = 0; i < Channels_2S_count; i++) + catch (const std::exception &e) { - //(i.e. Acquisition_1C0.implementation=xxxx) - std::string acquisition_implementation_specific = configuration->property( - "Acquisition_2S" + boost::lexical_cast(channel_absolute_id) + ".implementation", - acquisition_implementation); - //(i.e. Tracking_1C0.implementation=xxxx) - std::string tracking_implementation_specific = configuration->property( - "Tracking_2S" + boost::lexical_cast(channel_absolute_id) + ".implementation", - tracking_implementation); - std::string telemetry_decoder_implementation_specific = configuration->property( - "TelemetryDecoder_2S" + boost::lexical_cast(channel_absolute_id) + ".implementation", - telemetry_decoder_implementation); - - // Push back the channel to the vector of channels - channels->at(channel_absolute_id) = std::move(GetChannel_2S(configuration, - acquisition_implementation_specific, - tracking_implementation_specific, - telemetry_decoder_implementation_specific, - channel_absolute_id, - queue)); - channel_absolute_id++; - } - - //**************** GPS L5 CHANNELS ********************** - LOG(INFO) << "Getting " << Channels_L5_count << " GPS L5 channels"; - tracking_implementation = configuration->property("Tracking_L5.implementation", default_implementation); - telemetry_decoder_implementation = configuration->property("TelemetryDecoder_L5.implementation", default_implementation); - acquisition_implementation = configuration->property("Acquisition_L5.implementation", default_implementation); - for (unsigned int i = 0; i < Channels_L5_count; i++) - { - //(i.e. Acquisition_1C0.implementation=xxxx) - std::string acquisition_implementation_specific = configuration->property( - "Acquisition_L5" + boost::lexical_cast(channel_absolute_id) + ".implementation", - acquisition_implementation); - //(i.e. Tracking_1C0.implementation=xxxx) - std::string tracking_implementation_specific = configuration->property( - "Tracking_L5" + boost::lexical_cast(channel_absolute_id) + ".implementation", - tracking_implementation); - std::string telemetry_decoder_implementation_specific = configuration->property( - "TelemetryDecoder_L5" + boost::lexical_cast(channel_absolute_id) + ".implementation", - telemetry_decoder_implementation); - - // Push back the channel to the vector of channels - channels->at(channel_absolute_id) = std::move(GetChannel_L5(configuration, - acquisition_implementation_specific, - tracking_implementation_specific, - telemetry_decoder_implementation_specific, - channel_absolute_id, - queue)); - channel_absolute_id++; - } - - //**************** GALILEO E1 B (I/NAV OS) CHANNELS ********************** - LOG(INFO) << "Getting " << Channels_1B_count << " GALILEO E1 B (I/NAV OS) channels"; - tracking_implementation = configuration->property("Tracking_1B.implementation", default_implementation); - telemetry_decoder_implementation = configuration->property("TelemetryDecoder_1B.implementation", default_implementation); - acquisition_implementation = configuration->property("Acquisition_1B.implementation", default_implementation); - for (unsigned int i = 0; i < Channels_1B_count; i++) - { - //(i.e. Acquisition_1C0.implementation=xxxx) - std::string acquisition_implementation_specific = configuration->property( - "Acquisition_1B" + boost::lexical_cast(channel_absolute_id) + ".implementation", - acquisition_implementation); - //(i.e. Tracking_1C0.implementation=xxxx) - std::string tracking_implementation_specific = configuration->property( - "Tracking_1B" + boost::lexical_cast(channel_absolute_id) + ".implementation", - tracking_implementation); - std::string telemetry_decoder_implementation_specific = configuration->property( - "TelemetryDecoder_1B" + boost::lexical_cast(channel_absolute_id) + ".implementation", - telemetry_decoder_implementation); - - // Push back the channel to the vector of channels - channels->at(channel_absolute_id) = std::move(GetChannel_1B(configuration, - acquisition_implementation_specific, - tracking_implementation_specific, - telemetry_decoder_implementation_specific, - channel_absolute_id, - queue)); - channel_absolute_id++; - } - - //**************** GALILEO E5a I (F/NAV OS) CHANNELS ********************** - LOG(INFO) << "Getting " << Channels_5X_count << " GALILEO E5a I (F/NAV OS) channels"; - tracking_implementation = configuration->property("Tracking_5X.implementation", default_implementation); - telemetry_decoder_implementation = configuration->property("TelemetryDecoder_5X.implementation", default_implementation); - acquisition_implementation = configuration->property("Acquisition_5X.implementation", default_implementation); - for (unsigned int i = 0; i < Channels_5X_count; i++) - { - //(i.e. Acquisition_1C0.implementation=xxxx) - std::string acquisition_implementation_specific = configuration->property( - "Acquisition_5X" + boost::lexical_cast(channel_absolute_id) + ".implementation", - acquisition_implementation); - //(i.e. Tracking_1C0.implementation=xxxx) - std::string tracking_implementation_specific = configuration->property( - "Tracking_5X" + boost::lexical_cast(channel_absolute_id) + ".implementation", - tracking_implementation); - std::string telemetry_decoder_implementation_specific = configuration->property( - "TelemetryDecoder_5X" + boost::lexical_cast(channel_absolute_id) + ".implementation", - telemetry_decoder_implementation); - - // Push back the channel to the vector of channels - channels->at(channel_absolute_id) = std::move(GetChannel_5X(configuration, - acquisition_implementation_specific, - tracking_implementation_specific, - telemetry_decoder_implementation_specific, - channel_absolute_id, - queue)); - channel_absolute_id++; - } - - //**************** GLONASS L1 C/A CHANNELS ********************** - LOG(INFO) << "Getting " << Channels_1G_count << " GLONASS L1 C/A channels"; - acquisition_implementation = configuration->property("Acquisition_1G.implementation", default_implementation); - tracking_implementation = configuration->property("Tracking_1G.implementation", default_implementation); - telemetry_decoder_implementation = configuration->property("TelemetryDecoder_1G.implementation", default_implementation); - - for (unsigned int i = 0; i < Channels_1G_count; i++) - { - //(i.e. Acquisition_1G0.implementation=xxxx) - std::string acquisition_implementation_specific = configuration->property( - "Acquisition_1G" + boost::lexical_cast(channel_absolute_id) + ".implementation", - acquisition_implementation); - //(i.e. Tracking_1G0.implementation=xxxx) - std::string tracking_implementation_specific = configuration->property( - "Tracking_1G" + boost::lexical_cast(channel_absolute_id) + ".implementation", - tracking_implementation); - std::string telemetry_decoder_implementation_specific = configuration->property( - "TelemetryDecoder_1G" + boost::lexical_cast(channel_absolute_id) + ".implementation", - telemetry_decoder_implementation); - - // Push back the channel to the vector of channels - channels->at(channel_absolute_id) = std::move(GetChannel_1G(configuration, - acquisition_implementation_specific, - tracking_implementation_specific, - telemetry_decoder_implementation_specific, - channel_absolute_id, - queue)); - channel_absolute_id++; - } - - //**************** GLONASS L2 C/A CHANNELS ********************** - LOG(INFO) << "Getting " << Channels_2G_count << " GLONASS L2 C/A channels"; - acquisition_implementation = configuration->property("Acquisition_2G.implementation", default_implementation); - tracking_implementation = configuration->property("Tracking_2G.implementation", default_implementation); - telemetry_decoder_implementation = configuration->property("TelemetryDecoder_2G.implementation", default_implementation); - - for (unsigned int i = 0; i < Channels_2G_count; i++) - { - //(i.e. Acquisition_2G0.implementation=xxxx) - std::string acquisition_implementation_specific = configuration->property( - "Acquisition_2G" + boost::lexical_cast(channel_absolute_id) + ".implementation", - acquisition_implementation); - //(i.e. Tracking_2G0.implementation=xxxx) - std::string tracking_implementation_specific = configuration->property( - "Tracking_2G" + boost::lexical_cast(channel_absolute_id) + ".implementation", - tracking_implementation); - std::string telemetry_decoder_implementation_specific = configuration->property( - "TelemetryDecoder_2G" + boost::lexical_cast(channel_absolute_id) + ".implementation", - telemetry_decoder_implementation); - - // Push back the channel to the vector of channels - channels->at(channel_absolute_id) = std::move(GetChannel_2G(configuration, - acquisition_implementation_specific, - tracking_implementation_specific, - telemetry_decoder_implementation_specific, - channel_absolute_id, - queue)); - channel_absolute_id++; + LOG(WARNING) << e.what(); } return channels; diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 7085f9394..28fd703c9 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -310,7 +310,6 @@ void GNSSFlowgraph::connect() return; } } - #else // connect the signal source to sample counter // connect the sample counter to Observables @@ -336,12 +335,19 @@ void GNSSFlowgraph::connect() } #endif // Signal conditioner (selected_signal_source) >> channels (i) (dependent of their associated SignalSource_ID) - int selected_signal_conditioner_ID; + int selected_signal_conditioner_ID = 0; for (unsigned int i = 0; i < channels_count_; i++) { if (FPGA_enabled == false) { - selected_signal_conditioner_ID = configuration_->property("Channel" + boost::lexical_cast(i) + ".RF_channel_ID", 0); + try + { + selected_signal_conditioner_ID = configuration_->property("Channel" + std::to_string(i) + ".RF_channel_ID", 0); + } + catch (const std::exception& e) + { + LOG(WARNING) << e.what(); + } try { top_block_->connect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0, @@ -376,7 +382,15 @@ void GNSSFlowgraph::connect() std::vector vector_of_channels; for (unsigned int i = 0; i < channels_count_; i++) { - unsigned int sat = configuration_->property("Channel" + boost::lexical_cast(i) + ".satellite", 0); + unsigned int sat = 0; + try + { + sat = configuration_->property("Channel" + std::to_string(i) + ".satellite", 0); + } + catch (const std::exception& e) + { + LOG(WARNING) << e.what(); + } if (sat == 0) { vector_of_channels.push_back(i); @@ -392,7 +406,15 @@ void GNSSFlowgraph::connect() for (unsigned int& i : vector_of_channels) { std::string gnss_signal = channels_.at(i)->get_signal().get_signal_str(); // use channel's implicit signal - unsigned int sat = configuration_->property("Channel" + boost::lexical_cast(i) + ".satellite", 0); + unsigned int sat = 0; + try + { + sat = configuration_->property("Channel" + std::to_string(i) + ".satellite", 0); + } + catch (const std::exception& e) + { + LOG(WARNING) << e.what(); + } if (sat == 0) { channels_.at(i)->set_signal(search_next_signal(gnss_signal, true)); @@ -459,7 +481,7 @@ void GNSSFlowgraph::disconnect() LOG(INFO) << "flowgraph was not connected"; return; } - + connected_ = false; // Signal Source (i) > Signal conditioner (i) > int RF_Channels = 0; int signal_conditioner_ID = 0; @@ -511,24 +533,76 @@ void GNSSFlowgraph::disconnect() catch (const std::exception& e) { LOG(INFO) << "Can't disconnect signal source " << i << " to signal conditioner " << i << ": " << e.what(); + top_block_->disconnect_all(); + return; } } +#if ENABLE_FPGA + bool FPGA_enabled = configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false); + if (FPGA_enabled == false) + { + // disconnect the signal source to sample counter + // disconnect the sample counter to Observables + try + { + top_block_->disconnect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter, 0); + top_block_->disconnect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_); // extra port for the sample counter pulse + } + catch (const std::exception& e) + { + LOG(WARNING) << "Can't disconnect sample counter"; + LOG(ERROR) << e.what(); + top_block_->disconnect_all(); + return; + } + } + else + { + try + { + top_block_->disconnect(null_source_, 0, throttle_, 0); + top_block_->disconnect(throttle_, 0, time_counter_, 0); + top_block_->disconnect(time_counter_, 0, observables_->get_left_block(), channels_count_); + } + catch (const std::exception& e) + { + LOG(WARNING) << "Can't connect sample counter"; + LOG(ERROR) << e.what(); + top_block_->disconnect_all(); + return; + } + } +#else + // disconnect the signal source to sample counter + // disconnect the sample counter to Observables try { top_block_->disconnect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter, 0); - top_block_->disconnect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_); //extra port for the sample counter pulse + top_block_->disconnect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_); // extra port for the sample counter pulse } catch (const std::exception& e) { - LOG(INFO) << "Can't disconnect sample counter: " << e.what(); + LOG(WARNING) << "Can't connect sample counter"; + LOG(ERROR) << e.what(); + top_block_->disconnect_all(); + return; } - +#endif // Signal conditioner (selected_signal_source) >> channels (i) (dependent of their associated SignalSource_ID) int selected_signal_conditioner_ID; for (unsigned int i = 0; i < channels_count_; i++) { - selected_signal_conditioner_ID = configuration_->property("Channel" + boost::lexical_cast(i) + ".RF_channel_ID", 0); + try + { + selected_signal_conditioner_ID = configuration_->property("Channel" + std::to_string(i) + ".RF_channel_ID", 0); + } + catch (const std::exception& e) + { + LOG(WARNING) << e.what(); + top_block_->disconnect_all(); + return; + } try { top_block_->disconnect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0, @@ -537,6 +611,8 @@ void GNSSFlowgraph::disconnect() catch (const std::exception& e) { LOG(INFO) << "Can't disconnect signal conditioner " << selected_signal_conditioner_ID << " to channel " << i << ": " << e.what(); + top_block_->disconnect_all(); + return; } // Signal Source > Signal conditioner >> Channels >> Observables @@ -548,6 +624,8 @@ void GNSSFlowgraph::disconnect() catch (const std::exception& e) { LOG(INFO) << "Can't disconnect channel " << i << " to observables: " << e.what(); + top_block_->disconnect_all(); + return; } } @@ -562,6 +640,8 @@ void GNSSFlowgraph::disconnect() catch (const std::exception& e) { LOG(INFO) << "Can't disconnect observables to PVT: " << e.what(); + top_block_->disconnect_all(); + return; } for (int i = 0; i < sources_count_; i++) @@ -573,6 +653,8 @@ void GNSSFlowgraph::disconnect() catch (const std::exception& e) { LOG(INFO) << "Can't disconnect signal source block " << i << " internally: " << e.what(); + top_block_->disconnect_all(); + return; } } @@ -586,6 +668,8 @@ void GNSSFlowgraph::disconnect() catch (const std::exception& e) { LOG(INFO) << "Can't disconnect signal conditioner block " << i << " internally: " << e.what(); + top_block_->disconnect_all(); + return; } } @@ -598,6 +682,8 @@ void GNSSFlowgraph::disconnect() catch (const std::exception& e) { LOG(INFO) << "Can't disconnect channel " << i << " internally: " << e.what(); + top_block_->disconnect_all(); + return; } } @@ -608,6 +694,8 @@ void GNSSFlowgraph::disconnect() catch (const std::exception& e) { LOG(INFO) << "Can't disconnect observables block internally: " << e.what(); + top_block_->disconnect_all(); + return; } // Signal Source > Signal conditioner >> Channels >> Observables > PVT @@ -618,11 +706,11 @@ void GNSSFlowgraph::disconnect() catch (const std::exception& e) { LOG(INFO) << "Can't disconnect PVT block internally: " << e.what(); + top_block_->disconnect_all(); + return; } DLOG(INFO) << "blocks disconnected internally"; - - connected_ = false; LOG(INFO) << "Flowgraph disconnected"; } @@ -658,7 +746,15 @@ bool GNSSFlowgraph::send_telemetry_msg(pmt::pmt_t msg) void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) { DLOG(INFO) << "Received " << what << " from " << who << ". Number of applied actions = " << applied_actions_; - unsigned int sat = configuration_->property("Channel" + boost::lexical_cast(who) + ".satellite", 0); + unsigned int sat = 0; + try + { + sat = configuration_->property("Channel" + std::to_string(who) + ".satellite", 0); + } + catch (const std::exception& e) + { + LOG(WARNING) << e.what(); + } switch (what) { case 0: @@ -679,7 +775,15 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) acq_channels_count_--; for (unsigned int i = 0; i < channels_count_; i++) { - unsigned int sat_ = configuration_->property("Channel" + boost::lexical_cast(i) + ".satellite", 0); + unsigned int sat_ = 0; + try + { + sat_ = configuration_->property("Channel" + std::to_string(i) + ".satellite", 0); + } + catch (const std::exception& e) + { + LOG(WARNING) << e.what(); + } if (!available_GNSS_signals_.empty() && (acq_channels_count_ < max_acq_channels_) && (channels_state_[i] == 0)) { channels_state_[i] = 1; @@ -828,7 +932,7 @@ void GNSSFlowgraph::init() std::cout << "Please update your configuration file." << std::endl; } - std::shared_ptr > > channels = block_factory_->GetChannels(configuration_, queue_); + std::shared_ptr>> channels = block_factory_->GetChannels(configuration_, queue_); channels_count_ = channels->size(); for (unsigned int i = 0; i < channels_count_; i++) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index c43b47a07..ff2d91ee8 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -308,6 +308,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl ${CMAKE_SOURCE_DIR}/src/algorithms/libs + ${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib ${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/adapters ${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/gnuradio_blocks ${CMAKE_SOURCE_DIR}/src/algorithms/resampler/adapters diff --git a/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc b/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc index 0e260dd75..f259947e5 100644 --- a/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc @@ -38,8 +38,10 @@ TEST(NmeaPrinterTest, PrintLine) { std::string filename("nmea_test.nmea"); - - std::shared_ptr pvt_solution = std::make_shared(); + rtk_t rtk; + prcopt_t rtklib_configuration_options; + rtkinit(&rtk, &rtklib_configuration_options); + std::shared_ptr pvt_solution = std::make_shared(12, "filename", false, rtk); boost::posix_time::ptime pt(boost::gregorian::date(1994, boost::date_time::Nov, 19), boost::posix_time::hours(22) + boost::posix_time::minutes(54) + boost::posix_time::seconds(46)); // example from http://aprs.gids.nl/nmea/#rmc @@ -77,8 +79,10 @@ TEST(NmeaPrinterTest, PrintLine) TEST(NmeaPrinterTest, PrintLineLessthan10min) { std::string filename("nmea_test.nmea"); - - std::shared_ptr pvt_solution = std::make_shared(); + rtk_t rtk; + prcopt_t rtklib_configuration_options; + rtkinit(&rtk, &rtklib_configuration_options); + std::shared_ptr pvt_solution = std::make_shared(12, "filename", false, rtk); boost::posix_time::ptime pt(boost::gregorian::date(1994, boost::date_time::Nov, 19), boost::posix_time::hours(22) + boost::posix_time::minutes(54) + boost::posix_time::seconds(46)); // example from http://aprs.gids.nl/nmea/#rmc diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc index 797f2c3d9..896c2a6c0 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc @@ -36,8 +36,8 @@ #include #include #include -#include // to test the FPGA we have to create a simultaneous task to send the samples using the DMA and stop the test -#include // FPGA read input file +#include // to test the FPGA we have to create a simultaneous task to send the samples using the DMA and stop the test +#include // FPGA read input file #include #include #include @@ -61,17 +61,17 @@ #include "signal_generator_flags.h" #include "interleaved_byte_to_complex_short.h" -#define DMA_TRACK_TRANSFER_SIZE 2046 // DMA transfer size for tracking -#define MIN_SAMPLES_REMAINING 20000 // number of remaining samples in the DMA that causes the CPU to stop the flowgraph (it has to be a bit alrger than 2x max packet size) -#define FIVE_SECONDS 5000000 // five seconds in microseconds +#define DMA_TRACK_TRANSFER_SIZE 2046 // DMA transfer size for tracking +#define MIN_SAMPLES_REMAINING 20000 // number of remaining samples in the DMA that causes the CPU to stop the flowgraph (it has to be a bit alrger than 2x max packet size) +#define FIVE_SECONDS 5000000 // five seconds in microseconds void send_tracking_gps_input_samples(FILE *rx_signal_file, - int num_remaining_samples, gr::top_block_sptr top_block) + int num_remaining_samples, gr::top_block_sptr top_block) { - int num_samples_transferred = 0; // number of samples that have been transferred to the DMA so far - static int flowgraph_stopped = 0; // flag to indicate if the flowgraph is stopped already - char *buffer_DMA; // temporary buffer to store the samples to be sent to the DMA - int dma_descr; // DMA descriptor + int num_samples_transferred = 0; // number of samples that have been transferred to the DMA so far + static int flowgraph_stopped = 0; // flag to indicate if the flowgraph is stopped already + char *buffer_DMA; // temporary buffer to store the samples to be sent to the DMA + int dma_descr; // DMA descriptor dma_descr = open("/dev/loop_tx", O_WRONLY); if (dma_descr < 0) { @@ -79,7 +79,7 @@ void send_tracking_gps_input_samples(FILE *rx_signal_file, exit(1); } - buffer_DMA = (char *)malloc(DMA_TRACK_TRANSFER_SIZE); + buffer_DMA = (char *) malloc(DMA_TRACK_TRANSFER_SIZE); if (!buffer_DMA) { fprintf(stderr, "Memory error!"); @@ -98,7 +98,8 @@ void send_tracking_gps_input_samples(FILE *rx_signal_file, } if (num_remaining_samples > DMA_TRACK_TRANSFER_SIZE) { - fread(buffer_DMA, DMA_TRACK_TRANSFER_SIZE, 1, rx_signal_file); + + fread(buffer_DMA, DMA_TRACK_TRANSFER_SIZE, 1,rx_signal_file); assert(DMA_TRACK_TRANSFER_SIZE == write(dma_descr, &buffer_DMA[0], DMA_TRACK_TRANSFER_SIZE)); num_remaining_samples = num_remaining_samples - DMA_TRACK_TRANSFER_SIZE; @@ -120,11 +121,11 @@ void send_tracking_gps_input_samples(FILE *rx_signal_file, // thread that sends the samples to the FPGA -void thread(gr::top_block_sptr top_block, const char *file_name) +void thread(gr::top_block_sptr top_block, const char * file_name) { // file descriptor - FILE *rx_signal_file; // file descriptor - int file_length; // length of the file containing the received samples + FILE *rx_signal_file; // file descriptor + int file_length; // length of the file containing the received samples rx_signal_file = fopen(file_name, "rb"); if (!rx_signal_file) @@ -136,7 +137,7 @@ void thread(gr::top_block_sptr top_block, const char *file_name) file_length = ftell(rx_signal_file); fseek(rx_signal_file, 0, SEEK_SET); - usleep(FIVE_SECONDS); // wait for some time to give time to the other thread to program the device + usleep(FIVE_SECONDS); // wait for some time to give time to the other thread to program the device //send_tracking_gps_input_samples(dma_descr, rx_signal_file, file_length); send_tracking_gps_input_samples(rx_signal_file, file_length, top_block); @@ -162,14 +163,14 @@ private: public: int rx_message; - ~GpsL1CADllPllTrackingTestFpga_msg_rx(); //!< Default destructor + ~GpsL1CADllPllTrackingTestFpga_msg_rx(); //!< Default destructor }; GpsL1CADllPllTrackingTestFpga_msg_rx_sptr GpsL1CADllPllTrackingTestFpga_msg_rx_make() { return GpsL1CADllPllTrackingTestFpga_msg_rx_sptr( - new GpsL1CADllPllTrackingTestFpga_msg_rx()); + new GpsL1CADllPllTrackingTestFpga_msg_rx()); } @@ -180,7 +181,7 @@ void GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events(pmt::pmt_t msg) long int message = pmt::to_long(msg); rx_message = message; } - catch (boost::bad_any_cast &e) + catch (boost::bad_any_cast& e) { LOG(WARNING) << "msg_handler_telemetry Bad any cast!"; rx_message = 0; @@ -188,22 +189,22 @@ void GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events(pmt::pmt_t msg) } -GpsL1CADllPllTrackingTestFpga_msg_rx::GpsL1CADllPllTrackingTestFpga_msg_rx() : gr::block("GpsL1CADllPllTrackingTestFpga_msg_rx", - gr::io_signature::make(0, 0, 0), - gr::io_signature::make(0, 0, 0)) +GpsL1CADllPllTrackingTestFpga_msg_rx::GpsL1CADllPllTrackingTestFpga_msg_rx() : + gr::block("GpsL1CADllPllTrackingTestFpga_msg_rx", + gr::io_signature::make(0, 0, 0), + gr::io_signature::make(0, 0, 0)) { this->message_port_register_in(pmt::mp("events")); this->set_msg_handler(pmt::mp("events"), - boost::bind( - &GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events, - this, _1)); + boost::bind( + &GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events, + this, _1)); rx_message = 0; } GpsL1CADllPllTrackingTestFpga_msg_rx::~GpsL1CADllPllTrackingTestFpga_msg_rx() -{ -} +{} // ########################################################### @@ -225,12 +226,12 @@ public: int configure_generator(); int generate_signal(); - void check_results_doppler(arma::vec &true_time_s, arma::vec &true_value, - arma::vec &meas_time_s, arma::vec &meas_value); - void check_results_acc_carrier_phase(arma::vec &true_time_s, - arma::vec &true_value, arma::vec &meas_time_s, arma::vec &meas_value); - void check_results_codephase(arma::vec &true_time_s, arma::vec &true_value, - arma::vec &meas_time_s, arma::vec &meas_value); + void check_results_doppler(arma::vec & true_time_s, arma::vec & true_value, + arma::vec & meas_time_s, arma::vec & meas_value); + void check_results_acc_carrier_phase(arma::vec & true_time_s, + arma::vec & true_value, arma::vec & meas_time_s, arma::vec & meas_value); + void check_results_codephase(arma::vec & true_time_s, arma::vec & true_value, + arma::vec & meas_time_s, arma::vec & meas_value); GpsL1CADllPllTrackingTestFpga() { @@ -262,15 +263,16 @@ int GpsL1CADllPllTrackingTestFpga::configure_generator() p1 = std::string("-rinex_nav_file=") + FLAGS_rinex_nav_file; if (FLAGS_dynamic_position.empty()) { - p2 = std::string("-static_position=") + FLAGS_static_position + std::string(",") + std::to_string(FLAGS_duration * 10); + p2 = std::string("-static_position=") + FLAGS_static_position + + std::string(",") + std::to_string(FLAGS_duration * 10); } else { p2 = std::string("-obs_pos_file=") + std::string(FLAGS_dynamic_position); } - p3 = std::string("-rinex_obs_file=") + FLAGS_filename_rinex_obs; // RINEX 2.10 observation file output - p4 = std::string("-sig_out_file=") + FLAGS_filename_raw_data; // Baseband signal output file. Will be stored in int8_t IQ multiplexed samples - p5 = std::string("-sampling_freq=") + std::to_string(baseband_sampling_freq); //Baseband sampling frequency [MSps] + p3 = std::string("-rinex_obs_file=") + FLAGS_filename_rinex_obs; // RINEX 2.10 observation file output + p4 = std::string("-sig_out_file=") + FLAGS_filename_raw_data; // Baseband signal output file. Will be stored in int8_t IQ multiplexed samples + p5 = std::string("-sampling_freq=") + std::to_string(baseband_sampling_freq); //Baseband sampling frequency [MSps] return 0; } @@ -279,8 +281,8 @@ int GpsL1CADllPllTrackingTestFpga::generate_signal() { int child_status; - char *const parmList[] = {&generator_binary[0], &generator_binary[0], &p1[0], &p2[0], &p3[0], - &p4[0], &p5[0], NULL}; + char * const parmList[] = { &generator_binary[0], &generator_binary[0], &p1[0], &p2[0], &p3[0], + &p4[0], &p5[0], NULL }; int pid; if ((pid = fork()) == -1) @@ -308,12 +310,12 @@ void GpsL1CADllPllTrackingTestFpga::configure_receiver() gnss_synchro.PRN = FLAGS_test_satellite_PRN; config->set_property("GNSS-SDR.internal_fs_sps", - std::to_string(baseband_sampling_freq)); + std::to_string(baseband_sampling_freq)); // Set Tracking //config->set_property("Tracking_1C.implementation", // "GPS_L1_CA_DLL_PLL_C_Aid_Tracking_Fpga"); config->set_property("Tracking_1C.implementation", - "GPS_L1_CA_DLL_PLL_Tracking_Fpga"); + "GPS_L1_CA_DLL_PLL_Tracking_Fpga"); config->set_property("Tracking_1C.item_type", "cshort"); config->set_property("Tracking_1C.if", "0"); config->set_property("Tracking_1C.dump", "true"); @@ -326,8 +328,8 @@ void GpsL1CADllPllTrackingTestFpga::configure_receiver() } -void GpsL1CADllPllTrackingTestFpga::check_results_doppler(arma::vec &true_time_s, - arma::vec &true_value, arma::vec &meas_time_s, arma::vec &meas_value) +void GpsL1CADllPllTrackingTestFpga::check_results_doppler(arma::vec & true_time_s, + arma::vec & true_value, arma::vec & meas_time_s, arma::vec & meas_value) { //1. True value interpolation to match the measurement times arma::vec true_value_interp; @@ -360,13 +362,13 @@ void GpsL1CADllPllTrackingTestFpga::check_results_doppler(arma::vec &true_time_s << ", mean=" << error_mean << ", stdev=" << sqrt(error_var) << " (max,min)=" << max_error << "," << min_error << " [Hz]" << std::endl; - std::cout.precision(ss); + std::cout.precision (ss); } void GpsL1CADllPllTrackingTestFpga::check_results_acc_carrier_phase( - arma::vec &true_time_s, arma::vec &true_value, arma::vec &meas_time_s, - arma::vec &meas_value) + arma::vec & true_time_s, arma::vec & true_value, arma::vec & meas_time_s, + arma::vec & meas_value) { //1. True value interpolation to match the measurement times arma::vec true_value_interp; @@ -399,13 +401,13 @@ void GpsL1CADllPllTrackingTestFpga::check_results_acc_carrier_phase( << ", mean=" << error_mean << ", stdev=" << sqrt(error_var) << " (max,min)=" << max_error << "," << min_error << " [Hz]" << std::endl; - std::cout.precision(ss); + std::cout.precision (ss); } void GpsL1CADllPllTrackingTestFpga::check_results_codephase( - arma::vec &true_time_s, arma::vec &true_value, arma::vec &meas_time_s, - arma::vec &meas_value) + arma::vec & true_time_s, arma::vec & true_value, arma::vec & meas_time_s, + arma::vec & meas_value) { //1. True value interpolation to match the measurement times arma::vec true_value_interp; @@ -437,7 +439,7 @@ void GpsL1CADllPllTrackingTestFpga::check_results_codephase( << ", mean=" << error_mean << ", stdev=" << sqrt(error_var) << " (max,min)=" << max_error << "," << min_error << " [Chips]" << std::endl; - std::cout.precision(ss); + std::cout.precision (ss); } @@ -461,29 +463,27 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga) true_obs_file.append(std::to_string(test_satellite_PRN)); true_obs_file.append(".dat"); ASSERT_NO_THROW( - { - if (true_obs_data.open_obs_file(true_obs_file) == false) { - throw std::exception(); - }; - }) - << "Failure opening true observables file"; + if (true_obs_data.open_obs_file(true_obs_file) == false) + { + throw std::exception(); + }; + }) << "Failure opening true observables file"; top_block = gr::make_top_block("Tracking test"); //std::shared_ptr tracking = std::make_shared (config.get(), "Tracking_1C", 1, 1); - std::shared_ptr tracking = std::make_shared(config.get(), "Tracking_1C", 1, 1); + std::shared_ptr tracking = std::make_shared (config.get(), "Tracking_1C", 1, 1); boost::shared_ptr msg_rx = GpsL1CADllPllTrackingTestFpga_msg_rx_make(); // load acquisition data based on the first epoch of the true observations ASSERT_NO_THROW( - { - if (true_obs_data.read_binary_obs() == false) { - throw std::exception(); - }; - }) - << "Failure reading true observables file"; + if (true_obs_data.read_binary_obs() == false) + { + throw std::exception(); + }; + }) << "Failure reading true observables file"; //restart the epoch counter true_obs_data.restart(); @@ -492,54 +492,52 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga) << " Initial code delay [Chips]=" << true_obs_data.prn_delay_chips << std::endl; - gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD; + gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS + - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) + * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD; gnss_synchro.Acq_doppler_hz = true_obs_data.doppler_l1_hz; gnss_synchro.Acq_samplestamp_samples = 0; ASSERT_NO_THROW( - { - tracking->set_channel(gnss_synchro.Channel_ID); - }) - << "Failure setting channel."; + { + tracking->set_channel(gnss_synchro.Channel_ID); + }) << "Failure setting channel."; ASSERT_NO_THROW( - { - tracking->set_gnss_synchro(&gnss_synchro); - }) - << "Failure setting gnss_synchro."; + { + tracking->set_gnss_synchro(&gnss_synchro); + }) << "Failure setting gnss_synchro."; ASSERT_NO_THROW( - { - tracking->connect(top_block); - }) - << "Failure connecting tracking to the top_block."; + { + tracking->connect(top_block); + }) << "Failure connecting tracking to the top_block."; ASSERT_NO_THROW( - { - gr::blocks::null_sink::sptr sink = gr::blocks::null_sink::make(sizeof(Gnss_Synchro)); - top_block->connect(tracking->get_right_block(), 0, sink, 0); - top_block->msg_connect(tracking->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events")); - }) - << "Failure connecting the blocks of tracking test."; + { + gr::blocks::null_sink::sptr sink = gr::blocks::null_sink::make(sizeof(Gnss_Synchro)); + top_block->connect(tracking->get_right_block(), 0, sink, 0); + top_block->msg_connect(tracking->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events")); + }) << "Failure connecting the blocks of tracking test."; tracking->start_tracking(); // assemble again the file name in a null terminated string (not available by default in the main program flow) std::string file = "./" + filename_raw_data; - const char *file_name = file.c_str(); + const char * file_name = file.c_str(); // start thread that sends the DMA samples to the FPGA - boost::thread t{thread, top_block, file_name}; + boost::thread t + { thread, top_block, file_name }; EXPECT_NO_THROW( - { - start = std::chrono::system_clock::now(); - top_block->run(); // Start threads and wait - tracking->reset(); // unlock the channel - end = std::chrono::system_clock::now(); - elapsed_seconds = end - start; - }) - << "Failure running the top_block."; + { + start = std::chrono::system_clock::now(); + top_block->run(); // Start threads and wait + //tracking->reset();// unlock the channel + end = std::chrono::system_clock::now(); + elapsed_seconds = end - start; + }) << "Failure running the top_block."; // wait until child thread terminates t.join(); @@ -569,13 +567,12 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga) //load the measured values tracking_dump_reader trk_dump; ASSERT_NO_THROW( - { - if (trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")) == false) { - throw std::exception(); - }; - }) - << "Failure opening tracking dump file"; + if (trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")) == false) + { + throw std::exception(); + }; + }) << "Failure opening tracking dump file"; nepoch = trk_dump.num_epochs(); std::cout << "Measured observation epochs=" << nepoch << std::endl; @@ -588,11 +585,14 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga) epoch_counter = 0; while (trk_dump.read_binary_obs()) { - trk_timestamp_s(epoch_counter) = static_cast(trk_dump.PRN_start_sample_count) / static_cast(baseband_sampling_freq); + trk_timestamp_s(epoch_counter) = static_cast(trk_dump.PRN_start_sample_count) + / static_cast(baseband_sampling_freq); trk_acc_carrier_phase_cycles(epoch_counter) = trk_dump.acc_carrier_phase_rad / GPS_TWO_PI; trk_Doppler_Hz(epoch_counter) = trk_dump.carrier_doppler_hz; - double delay_chips = GPS_L1_CA_CODE_LENGTH_CHIPS - GPS_L1_CA_CODE_LENGTH_CHIPS * (fmod((static_cast(trk_dump.PRN_start_sample_count) + trk_dump.aux1) / static_cast(baseband_sampling_freq), 1.0e-3) / 1.0e-3); + double delay_chips = GPS_L1_CA_CODE_LENGTH_CHIPS - GPS_L1_CA_CODE_LENGTH_CHIPS + * (fmod( (static_cast(trk_dump.PRN_start_sample_count) + trk_dump.aux1) + / static_cast(baseband_sampling_freq), 1.0e-3) / 1.0e-3); trk_prn_delay_chips(epoch_counter) = delay_chips; epoch_counter++; @@ -600,7 +600,7 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga) //Align initial measurements and cut the tracking pull-in transitory double pull_in_offset_s = 1.0; - arma::uvec initial_meas_point = arma::find(trk_timestamp_s >= (true_timestamp_s(0) + pull_in_offset_s), 1, "first"); + arma::uvec initial_meas_point = arma::find( trk_timestamp_s >= (true_timestamp_s(0) + pull_in_offset_s), 1, "first"); trk_timestamp_s = trk_timestamp_s.subvec(initial_meas_point(0), trk_timestamp_s.size() - 1); trk_acc_carrier_phase_cycles = trk_acc_carrier_phase_cycles.subvec(initial_meas_point(0), trk_acc_carrier_phase_cycles.size() - 1); @@ -610,8 +610,8 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga) check_results_doppler(true_timestamp_s, true_Doppler_Hz, trk_timestamp_s, trk_Doppler_Hz); check_results_codephase(true_timestamp_s, true_prn_delay_chips, trk_timestamp_s, trk_prn_delay_chips); check_results_acc_carrier_phase(true_timestamp_s, - true_acc_carrier_phase_cycles, trk_timestamp_s, - trk_acc_carrier_phase_cycles); + true_acc_carrier_phase_cycles, trk_timestamp_s, + trk_acc_carrier_phase_cycles); std::cout << "Signal tracking completed in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl; }