mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 20:50:33 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
537d9414ca
274
conf/gnss-sdr_BDS_B1I_GPS_L1_CA_byte.conf
Normal file
274
conf/gnss-sdr_BDS_B1I_GPS_L1_CA_byte.conf
Normal file
@ -0,0 +1,274 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://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=25000000
|
||||
Receiver.sources_count=2
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
;# Signal Source config for GPS, Galileo signals
|
||||
SignalSource0.implementation=File_Signal_Source
|
||||
SignalSource0.filename=/home/dmiralles/Documents/GNSS-Metadata-Standard/install/GPSL1-GalileoE1.dat
|
||||
SignalSource0.item_type=byte
|
||||
SignalSource0.sampling_frequency=25000000
|
||||
SignalSource0.samples=0
|
||||
SignalSource0.repeat=false
|
||||
SignalSource0.dump=false
|
||||
SignalSource0.enable_throttle_control=false
|
||||
|
||||
;# Signal Source config for BDS signals
|
||||
SignalSource1.implementation=File_Signal_Source
|
||||
SignalSource1.filename=/home/dmiralles/Documents/GNSS-Metadata-Standard/install/BdsB1IStr01.dat
|
||||
SignalSource1.item_type=byte
|
||||
SignalSource1.sampling_frequency=25000000
|
||||
SignalSource1.samples=0
|
||||
SignalSource1.repeat=false
|
||||
SignalSource1.dump=false
|
||||
SignalSource1.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
;# Signal Conditioner config for GPS, Galileo signals
|
||||
SignalConditioner0.implementation=Signal_Conditioner
|
||||
DataTypeAdapter0.implementation=Byte_To_Short
|
||||
InputFilter0.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter0.input_item_type=short
|
||||
InputFilter0.output_item_type=gr_complex
|
||||
InputFilter0.taps_item_type=float
|
||||
InputFilter0.number_of_taps=5
|
||||
InputFilter0.number_of_bands=2
|
||||
InputFilter0.band1_begin=0.0
|
||||
InputFilter0.band1_end=0.70
|
||||
InputFilter0.band2_begin=0.80
|
||||
InputFilter0.band2_end=1.0
|
||||
InputFilter0.ampl1_begin=1.0
|
||||
InputFilter0.ampl1_end=1.0
|
||||
InputFilter0.ampl2_begin=0.0
|
||||
InputFilter0.ampl2_end=0.0
|
||||
InputFilter0.band1_error=1.0
|
||||
InputFilter0.band2_error=1.0
|
||||
InputFilter0.filter_type=bandpass
|
||||
InputFilter0.grid_density=16
|
||||
InputFilter0.sampling_frequency=25000000
|
||||
InputFilter0.IF=6250000
|
||||
Resampler0.implementation=Pass_Through
|
||||
Resampler0.sample_freq_in=25000000
|
||||
Resampler0.sample_freq_out=25000000
|
||||
Resampler0.item_type=gr_complex
|
||||
|
||||
;# Signal Conditioner config for BDS signals
|
||||
SignalConditioner1.implementation=Signal_Conditioner
|
||||
DataTypeAdapter1.implementation=Byte_To_Short
|
||||
InputFilter1.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter1.input_item_type=short
|
||||
InputFilter1.output_item_type=gr_complex
|
||||
InputFilter1.taps_item_type=float
|
||||
InputFilter1.number_of_taps=5
|
||||
InputFilter1.number_of_bands=2
|
||||
InputFilter1.band1_begin=0.0
|
||||
InputFilter1.band1_end=0.70
|
||||
InputFilter1.band2_begin=0.80
|
||||
InputFilter1.band2_end=1.0
|
||||
InputFilter1.ampl1_begin=1.0
|
||||
InputFilter1.ampl1_end=1.0
|
||||
InputFilter1.ampl2_begin=0.0
|
||||
InputFilter1.ampl2_end=0.0
|
||||
InputFilter1.band1_error=1.0
|
||||
InputFilter1.band2_error=1.0
|
||||
InputFilter1.filter_type=bandpass
|
||||
InputFilter1.grid_density=16
|
||||
InputFilter1.sampling_frequency=25000000
|
||||
InputFilter1.IF=6250000
|
||||
Resampler1.implementation=Pass_Through
|
||||
Resampler1.sample_freq_in=25000000
|
||||
Resampler1.sample_freq_out=25000000
|
||||
Resampler1.item_type=gr_complex
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_1C.count=7
|
||||
Channels_1B.count=7
|
||||
Channels_B1.count=10
|
||||
Channels.in_acquisition=10
|
||||
|
||||
;# Preparing collection for GPS satellites
|
||||
Channel0.RF_channel_ID=0
|
||||
Channel1.RF_channel_ID=0
|
||||
Channel2.RF_channel_ID=0
|
||||
Channel3.RF_channel_ID=0
|
||||
Channel4.RF_channel_ID=0
|
||||
Channel5.RF_channel_ID=0
|
||||
Channel6.RF_channel_ID=0
|
||||
Channel0.signal=1C
|
||||
Channel0.satellite = 2
|
||||
Channel1.signal=1C
|
||||
Channel1.satellite = 5
|
||||
Channel2.signal=1C
|
||||
Channel2.satellite = 6
|
||||
Channel3.signal=1C
|
||||
Channel3.satellite = 7
|
||||
Channel4.signal=1C
|
||||
Channel4.satellite = 13
|
||||
Channel5.signal=1C
|
||||
Channel5.satellite = 19
|
||||
Channel6.signal=1C
|
||||
Channel6.satellite = 29
|
||||
|
||||
;# Preparing collection for Galileo satellites
|
||||
Channel7.RF_channel_ID=0
|
||||
Channel8.RF_channel_ID=0
|
||||
Channel9.RF_channel_ID=0
|
||||
Channel10.RF_channel_ID=0
|
||||
Channel11.RF_channel_ID=0
|
||||
Channel12.RF_channel_ID=0
|
||||
Channel13.RF_channel_ID=0
|
||||
Channel7.signal=1B
|
||||
Channel7.satellite = 2
|
||||
Channel8.signal=1B
|
||||
Channel8.satellite = 5
|
||||
Channel9.signal=1B
|
||||
Channel9.satellite = 6
|
||||
Channel10.signal=1B
|
||||
Channel10.satellite = 7
|
||||
Channel11.signal=1B
|
||||
Channel11.satellite = 13
|
||||
Channel12.signal=1B
|
||||
Channel12.satellite = 19
|
||||
Channel13.signal=1B
|
||||
Channel13.satellite = 29
|
||||
|
||||
;# Preparing collection for BDS satellites
|
||||
Channel14.RF_channel_ID=1
|
||||
Channel15.RF_channel_ID=1
|
||||
Channel16.RF_channel_ID=1
|
||||
Channel17.RF_channel_ID=1
|
||||
Channel18.RF_channel_ID=1
|
||||
Channel19.RF_channel_ID=1
|
||||
Channel20.RF_channel_ID=1
|
||||
Channel21.RF_channel_ID=1
|
||||
Channel22.RF_channel_ID=1
|
||||
Channel23.RF_channel_ID=1
|
||||
|
||||
Channel14.signal=B1
|
||||
Channel14.satellite = 6
|
||||
Channel15.signal=B1
|
||||
Channel15.satellite = 8
|
||||
Channel16.signal=B1
|
||||
Channel16.satellite = 9
|
||||
Channel17.signal=B1
|
||||
Channel17.satellite = 13
|
||||
Channel18.signal=B1
|
||||
Channel18.satellite = 17
|
||||
Channel19.signal=B1
|
||||
Channel19.satellite = 1
|
||||
Channel20.signal=B1
|
||||
Channel20.satellite = 2
|
||||
Channel21.signal=B1
|
||||
Channel21.satellite = 3
|
||||
Channel22.signal=B1
|
||||
Channel22.satellite = 4
|
||||
Channel23.signal=B1
|
||||
Channel23.satellite = 5
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
;# Acquisition config for BDS signals
|
||||
Acquisition_B1.implementation=BEIDOU_B1I_PCPS_Acquisition
|
||||
Acquisition_B1.item_type=gr_complex
|
||||
Acquisition_B1.coherent_integration_time_ms=1
|
||||
Acquisition_B1.threshold=0.0038
|
||||
Acquisition_B1.doppler_max=15000
|
||||
Acquisition_B1.doppler_step=100
|
||||
Acquisition_B1.dump=true
|
||||
Acquisition_B1.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_acq
|
||||
Acquisition_B1.blocking=false;
|
||||
Acquisition_B1.use_CFAR_algorithm=true;
|
||||
Acquisition_B1.bit_transition_flag = false;
|
||||
|
||||
;# Acquisition config for GPS signals
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.coherent_integration_time_ms=1
|
||||
Acquisition_1C.threshold=0.0038
|
||||
Acquisition_1C.doppler_max=15000
|
||||
Acquisition_1C.doppler_step=100
|
||||
Acquisition_1C.dump=true
|
||||
Acquisition_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_acq
|
||||
Acquisition_1C.blocking=false;
|
||||
Acquisition_1C.use_CFAR_algorithm=true;
|
||||
Acquisition_1C.bit_transition_flag = false;
|
||||
|
||||
;# Acquisition config for Galileo signals
|
||||
Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition
|
||||
Acquisition_1B.item_type=gr_complex
|
||||
Acquisition_1B.coherent_integration_time_ms=4
|
||||
Acquisition_1B.threshold=0.0038
|
||||
Acquisition_1B.doppler_max=15000
|
||||
Acquisition_1B.doppler_step=100
|
||||
Acquisition_1B.dump=true
|
||||
Acquisition_1B.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gal_e1b_acq
|
||||
Acquisition_1B.blocking=false;
|
||||
Acquisition_1B.use_CFAR_algorithm=true;
|
||||
Acquisition_1B.bit_transition_flag = false;
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B1.implementation=BEIDOU_B1I_DLL_PLL_Tracking
|
||||
Tracking_B1.item_type=gr_complex
|
||||
Tracking_B1.pll_bw_hz=25.0;
|
||||
Tracking_B1.dll_bw_hz=2.50;
|
||||
Tracking_B1.dump=true;
|
||||
Tracking_B1.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_trk_ch_
|
||||
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.pll_bw_hz=25.0;
|
||||
Tracking_1C.dll_bw_hz=2.50;
|
||||
Tracking_1C.dump=true;
|
||||
Tracking_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_trk_ch_
|
||||
|
||||
Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking
|
||||
Tracking_1B.item_type=gr_complex
|
||||
Tracking_1B.pll_bw_hz=25.0;
|
||||
Tracking_1B.dll_bw_hz=2.50;
|
||||
Tracking_1B.dump=true;
|
||||
Tracking_1B.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gal_e1b_trk_ch_
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B1.implementation=BEIDOU_B1I_Telemetry_Decoder
|
||||
TelemetryDecoder_B1.dump=false
|
||||
|
||||
TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_1C.dump=false
|
||||
|
||||
TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder
|
||||
TelemetryDecoder_1B.dump=false
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=true
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
|
||||
PVT.iono_model=OFF ; 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.dump=true
|
||||
PVT.dump_filename = /home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/pvt_l1
|
||||
PVT.kml_output_enabled = false;
|
||||
PVT.xml_output_enabled = false;
|
||||
PVT.gpx_output_enabled = false;
|
||||
PVT.rinex_output_enabled = false;
|
||||
PVT.rtcm_output_enabled = false;
|
||||
PVT.nmea_output_enabled = false;
|
||||
PVT.geojson_output_enabled = false;
|
265
conf/gnss-sdr_BDS_B1I_GPS_L1_CA_ibyte.conf
Normal file
265
conf/gnss-sdr_BDS_B1I_GPS_L1_CA_ibyte.conf
Normal file
@ -0,0 +1,265 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://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=10000000
|
||||
Receiver.sources_count=2
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
;# Signal Source config for GPS, Galileo signals
|
||||
SignalSource0.implementation=File_Signal_Source
|
||||
SignalSource0.filename=/archive/BDS3_datasets/long/20180713_211400_3.dat
|
||||
SignalSource0.item_type=ibyte
|
||||
SignalSource0.sampling_frequency=10000000
|
||||
SignalSource0.samples=0
|
||||
SignalSource0.repeat=false
|
||||
SignalSource0.dump=false
|
||||
SignalSource0.enable_throttle_control=false
|
||||
|
||||
;# Signal Source config for BDS signals
|
||||
SignalSource1.implementation=File_Signal_Source
|
||||
SignalSource1.filename=/archive/BDS3_datasets/long/20180713_211400_1.dat
|
||||
SignalSource1.item_type=ibyte
|
||||
SignalSource1.sampling_frequency=10000000
|
||||
SignalSource1.samples=0
|
||||
SignalSource1.repeat=false
|
||||
SignalSource1.dump=false
|
||||
SignalSource1.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
;# Signal Conditioner config for GPS, Galileo signals
|
||||
SignalConditioner0.implementation=Signal_Conditioner
|
||||
DataTypeAdapter0.implementation=Ibyte_To_Complex
|
||||
InputFilter0.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter0.input_item_type=gr_complex
|
||||
InputFilter0.output_item_type=gr_complex
|
||||
InputFilter0.taps_item_type=float
|
||||
InputFilter0.number_of_taps=5
|
||||
InputFilter0.number_of_bands=2
|
||||
InputFilter0.band1_begin=0.0
|
||||
InputFilter0.band1_end=0.70
|
||||
InputFilter0.band2_begin=0.80
|
||||
InputFilter0.band2_end=1.0
|
||||
InputFilter0.ampl1_begin=1.0
|
||||
InputFilter0.ampl1_end=1.0
|
||||
InputFilter0.ampl2_begin=0.0
|
||||
InputFilter0.ampl2_end=0.0
|
||||
InputFilter0.band1_error=1.0
|
||||
InputFilter0.band2_error=1.0
|
||||
InputFilter0.filter_type=bandpass
|
||||
InputFilter0.grid_density=16
|
||||
InputFilter0.sampling_frequency=10000000
|
||||
InputFilter0.IF=420000
|
||||
Resampler0.implementation=Pass_Through
|
||||
Resampler0.sample_freq_in=10000000
|
||||
Resampler0.sample_freq_out=10000000
|
||||
Resampler0.item_type=gr_complex
|
||||
|
||||
;# Signal Conditioner config for BDS signals
|
||||
SignalConditioner1.implementation=Signal_Conditioner
|
||||
DataTypeAdapter1.implementation=Ibyte_To_Complex
|
||||
InputFilter1.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter1.input_item_type=gr_complex
|
||||
InputFilter1.output_item_type=gr_complex
|
||||
InputFilter1.taps_item_type=float
|
||||
InputFilter1.number_of_taps=5
|
||||
InputFilter1.number_of_bands=2
|
||||
InputFilter1.band1_begin=0.0
|
||||
InputFilter1.band1_end=0.70
|
||||
InputFilter1.band2_begin=0.80
|
||||
InputFilter1.band2_end=1.0
|
||||
InputFilter1.ampl1_begin=1.0
|
||||
InputFilter1.ampl1_end=1.0
|
||||
InputFilter1.ampl2_begin=0.0
|
||||
InputFilter1.ampl2_end=0.0
|
||||
InputFilter1.band1_error=1.0
|
||||
InputFilter1.band2_error=1.0
|
||||
InputFilter1.filter_type=bandpass
|
||||
InputFilter1.grid_density=16
|
||||
InputFilter1.sampling_frequency=10000000
|
||||
InputFilter1.IF=1098000
|
||||
Resampler1.implementation=Pass_Through
|
||||
Resampler1.sample_freq_in=10000000
|
||||
Resampler1.sample_freq_out=10000000
|
||||
Resampler1.item_type=gr_complex
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_1C.count=7
|
||||
Channels_1B.count=7
|
||||
Channels_B1.count=4
|
||||
Channels.in_acquisition=18
|
||||
|
||||
;# Preparing collection for GPS satellites
|
||||
Channel0.RF_channel_ID=0
|
||||
Channel1.RF_channel_ID=0
|
||||
Channel2.RF_channel_ID=0
|
||||
Channel3.RF_channel_ID=0
|
||||
Channel4.RF_channel_ID=0
|
||||
Channel5.RF_channel_ID=0
|
||||
Channel6.RF_channel_ID=0
|
||||
Channel0.signal=1C
|
||||
Channel0.satellite = 2
|
||||
Channel1.signal=1C
|
||||
Channel1.satellite = 5
|
||||
Channel2.signal=1C
|
||||
Channel2.satellite = 25
|
||||
Channel3.signal=1C
|
||||
Channel3.satellite = 31
|
||||
Channel4.signal=1C
|
||||
Channel4.satellite = 24
|
||||
Channel5.signal=1C
|
||||
Channel5.satellite = 6
|
||||
Channel6.signal=1C
|
||||
Channel6.satellite = 29
|
||||
|
||||
;# Preparing collection for Galileo satellites
|
||||
Channel7.RF_channel_ID=0
|
||||
Channel8.RF_channel_ID=0
|
||||
Channel9.RF_channel_ID=0
|
||||
Channel10.RF_channel_ID=0
|
||||
Channel11.RF_channel_ID=0
|
||||
Channel12.RF_channel_ID=0
|
||||
Channel13.RF_channel_ID=0
|
||||
Channel7.signal=1B
|
||||
Channel7.satellite = 30
|
||||
Channel8.signal=1B
|
||||
Channel8.satellite = 21
|
||||
Channel9.signal=1B
|
||||
Channel9.satellite = 5
|
||||
Channel10.signal=1B
|
||||
Channel10.satellite = 3
|
||||
Channel11.signal=1B
|
||||
Channel11.satellite = 27
|
||||
Channel12.signal=1B
|
||||
Channel12.satellite = 9
|
||||
Channel13.signal=1B
|
||||
Channel13.satellite = 10
|
||||
|
||||
;# Preparing collection for BDS satellites
|
||||
Channel14.RF_channel_ID=1
|
||||
Channel15.RF_channel_ID=1
|
||||
Channel16.RF_channel_ID=1
|
||||
Channel17.RF_channel_ID=1
|
||||
Channel18.RF_channel_ID=1
|
||||
Channel19.RF_channel_ID=1
|
||||
Channel20.RF_channel_ID=1
|
||||
Channel21.RF_channel_ID=1
|
||||
Channel22.RF_channel_ID=1
|
||||
Channel23.RF_channel_ID=1
|
||||
|
||||
Channel14.signal=B1
|
||||
Channel14.satellite = 29
|
||||
Channel15.signal=B1
|
||||
Channel15.satellite = 19
|
||||
Channel16.signal=B1
|
||||
Channel16.satellite = 20
|
||||
Channel17.signal=B1
|
||||
Channel17.satellite = 30
|
||||
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
;# Acquisition config for BDS signals
|
||||
Acquisition_B1.implementation=BEIDOU_B1I_PCPS_Acquisition
|
||||
Acquisition_B1.item_type=gr_complex
|
||||
Acquisition_B1.coherent_integration_time_ms=1
|
||||
Acquisition_B1.threshold=0.0005
|
||||
Acquisition_B1.doppler_max=15000
|
||||
Acquisition_B1.doppler_step=100
|
||||
Acquisition_B1.dump=false
|
||||
Acquisition_B1.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_acq
|
||||
Acquisition_B1.blocking=false;
|
||||
Acquisition_B1.use_CFAR_algorithm=true;
|
||||
Acquisition_B1.bit_transition_flag = false;
|
||||
|
||||
;# Acquisition config for GPS signals
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.coherent_integration_time_ms=1
|
||||
Acquisition_1C.threshold=0.0005
|
||||
Acquisition_1C.doppler_max=15000
|
||||
Acquisition_1C.doppler_step=100
|
||||
Acquisition_1C.dump=true
|
||||
Acquisition_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_acq
|
||||
Acquisition_1C.blocking=false;
|
||||
Acquisition_1C.use_CFAR_algorithm=true;
|
||||
Acquisition_1C.bit_transition_flag = false;
|
||||
|
||||
;# Acquisition config for Galileo signals
|
||||
Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition
|
||||
Acquisition_1B.item_type=gr_complex
|
||||
Acquisition_1B.coherent_integration_time_ms=4
|
||||
Acquisition_1B.threshold=0.0015
|
||||
Acquisition_1B.doppler_max=15000
|
||||
Acquisition_1B.doppler_step=100
|
||||
Acquisition_1B.dump=true
|
||||
Acquisition_1B.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gal_e1b_acq
|
||||
Acquisition_1B.blocking=false;
|
||||
Acquisition_1B.use_CFAR_algorithm=true;
|
||||
Acquisition_1B.bit_transition_flag = false;
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B1.implementation=BEIDOU_B1I_DLL_PLL_Tracking
|
||||
Tracking_B1.item_type=gr_complex
|
||||
Tracking_B1.pll_bw_hz=25.0;
|
||||
Tracking_B1.dll_bw_hz=2.50;
|
||||
Tracking_B1.dump=true;
|
||||
Tracking_B1.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_trk_ch_
|
||||
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.pll_bw_hz=25.0;
|
||||
Tracking_1C.dll_bw_hz=2.50;
|
||||
Tracking_1C.dump=true;
|
||||
Tracking_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_trk_ch_
|
||||
|
||||
Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking
|
||||
Tracking_1B.item_type=gr_complex
|
||||
Tracking_1B.pll_bw_hz=25.0;
|
||||
Tracking_1B.dll_bw_hz=2.50;
|
||||
Tracking_1B.dump=true;
|
||||
Tracking_1B.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gal_e1b_trk_ch_
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B1.implementation=BEIDOU_B1I_Telemetry_Decoder
|
||||
TelemetryDecoder_B1.dump=true
|
||||
TelemetryDecoder_B1.dump_filename = ./bds_tel_dec
|
||||
|
||||
TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_1C.dump=true
|
||||
TelemetryDecoder_1C.dump_filename=./gps_tel_dec
|
||||
|
||||
TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder
|
||||
TelemetryDecoder_1B.dump=false
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=true
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
|
||||
PVT.iono_model=OFF ; 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.dump=true
|
||||
PVT.dump_filename = /home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/pvt_l1
|
||||
PVT.kml_output_enabled = false;
|
||||
PVT.xml_output_enabled = false;
|
||||
PVT.gpx_output_enabled = false;
|
||||
PVT.rinex_output_enabled = false;
|
||||
PVT.rtcm_output_enabled = false;
|
||||
PVT.nmea_output_enabled = false;
|
||||
PVT.geojson_output_enabled = false;
|
@ -16,7 +16,7 @@ ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
SignalSource.filename=/home/dmiralles/Documents/GNSS-Metadata-Standard/install/BdsB1IStr01.dat
|
||||
SignalSource.filename=/home/dmiralles/Documents/gnss-metadata-standard/install/BdsB1IStr01.dat
|
||||
SignalSource.item_type=byte
|
||||
SignalSource.sampling_frequency=25000000
|
||||
SignalSource.samples=0
|
||||
@ -75,9 +75,9 @@ Acquisition_B1.item_type=gr_complex
|
||||
Acquisition_B1.coherent_integration_time_ms=1
|
||||
Acquisition_B1.threshold=0.0038
|
||||
;Acquisition_B1.pfa=0.0000001;
|
||||
Acquisition_B1.doppler_max=15000
|
||||
Acquisition_B1.doppler_max=10000
|
||||
Acquisition_B1.doppler_step=100
|
||||
Acquisition_B1.dump=true
|
||||
Acquisition_B1.dump=false
|
||||
Acquisition_B1.dump_filename=./bds_acq
|
||||
Acquisition_B1.blocking=false;
|
||||
Acquisition_B1.use_CFAR_algorithm=true;
|
||||
@ -89,13 +89,13 @@ Tracking_B1.implementation=BEIDOU_B1I_DLL_PLL_Tracking
|
||||
Tracking_B1.item_type=gr_complex
|
||||
Tracking_B1.pll_bw_hz=25.0;
|
||||
Tracking_B1.dll_bw_hz=2.50;
|
||||
Tracking_B1.dump=true;
|
||||
Tracking_B1.dump=false;
|
||||
Tracking_B1.dump_filename=./epl_tracking_ch_
|
||||
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B1.implementation=BEIDOU_B1I_Telemetry_Decoder
|
||||
TelemetryDecoder_B1.dump=false
|
||||
TelemetryDecoder_B1.dump=true
|
||||
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
|
127
conf/gnss-sdr_BDS_B1I_ibyte.conf
Normal file
127
conf/gnss-sdr_BDS_B1I_ibyte.conf
Normal file
@ -0,0 +1,127 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://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=10000000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
SignalSource.filename=/archive/BDS3_datasets/long/20180713_211400_1.dat
|
||||
SignalSource.item_type=ibyte
|
||||
SignalSource.sampling_frequency=10000000
|
||||
SignalSource.samples=0
|
||||
SignalSource.repeat=false
|
||||
SignalSource.dump=false
|
||||
SignalSource.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
SignalConditioner.implementation=Signal_Conditioner
|
||||
DataTypeAdapter.implementation=Ibyte_To_Complex
|
||||
InputFilter.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter.input_item_type=gr_complex
|
||||
InputFilter.output_item_type=gr_complex
|
||||
InputFilter.taps_item_type=float
|
||||
InputFilter.number_of_taps=5
|
||||
InputFilter.number_of_bands=2
|
||||
InputFilter.band1_begin=0.0
|
||||
InputFilter.band1_end=0.70
|
||||
InputFilter.band2_begin=0.80
|
||||
InputFilter.band2_end=1.0
|
||||
InputFilter.ampl1_begin=1.0
|
||||
InputFilter.ampl1_end=1.0
|
||||
InputFilter.ampl2_begin=0.0
|
||||
InputFilter.ampl2_end=0.0
|
||||
InputFilter.band1_error=1.0
|
||||
InputFilter.band2_error=1.0
|
||||
InputFilter.filter_type=bandpass
|
||||
InputFilter.grid_density=16
|
||||
InputFilter.sampling_frequency=10000000
|
||||
InputFilter.IF=1098000
|
||||
Resampler.implementation=Pass_Through
|
||||
Resampler.sample_freq_in=10000000
|
||||
Resampler.sample_freq_out=10000000
|
||||
Resampler.item_type=gr_complex
|
||||
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_B1.count=4
|
||||
Channels.in_acquisition=1
|
||||
Channel.signal=B1
|
||||
|
||||
Channel0.satellite = 29;
|
||||
Channel1.satellite = 19;
|
||||
Channel2.satellite = 20;
|
||||
Channel3.satellite = 30;
|
||||
|
||||
|
||||
;Channel0.satellite = 6;
|
||||
;Channel1.satellite = 8;
|
||||
;Channel2.satellite = 9;
|
||||
;Channel3.satellite = 13;
|
||||
;Channel4.satellite = 17;
|
||||
;Channel5.satellite = 1;
|
||||
;Channel6.satellite = 2;
|
||||
;Channel7.satellite = 3;
|
||||
;Channel8.satellite = 4;
|
||||
;Channel9.satellite = 5;
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
Acquisition_B1.implementation=BEIDOU_B1I_PCPS_Acquisition
|
||||
Acquisition_B1.item_type=gr_complex
|
||||
Acquisition_B1.coherent_integration_time_ms=1
|
||||
Acquisition_B1.threshold=0.0004
|
||||
;Acquisition_B1.pfa=0.0000001;
|
||||
Acquisition_B1.doppler_max=10000
|
||||
Acquisition_B1.doppler_step=50
|
||||
Acquisition_B1.dump=true
|
||||
Acquisition_B1.dump_filename=./bds_acq
|
||||
Acquisition_B1.blocking=false;
|
||||
Acquisition_B1.use_CFAR_algorithm=true;
|
||||
Acquisition_B1.bit_transition_flag = false;
|
||||
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B1.implementation=BEIDOU_B1I_DLL_PLL_Tracking
|
||||
Tracking_B1.item_type=gr_complex
|
||||
Tracking_B1.pll_bw_hz=25.0;
|
||||
Tracking_B1.dll_bw_hz=2.50;
|
||||
Tracking_B1.dump=true;
|
||||
Tracking_B1.dump_filename=./epl_tracking_ch_
|
||||
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B1.implementation=BEIDOU_B1I_Telemetry_Decoder
|
||||
TelemetryDecoder_B1.dump=false
|
||||
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=true
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
|
||||
PVT.iono_model=OFF ; 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.dump_filename=./PVT
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
PVT.flag_nmea_tty_port=false;
|
||||
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
|
||||
PVT.dump=true
|
210
conf/gnss-sdr_BDS_B3I_GPS_L1_CA_ibyte.conf
Normal file
210
conf/gnss-sdr_BDS_B3I_GPS_L1_CA_ibyte.conf
Normal file
@ -0,0 +1,210 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://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=30000000
|
||||
Receiver.sources_count=2
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
;# Signal Source config for GPS, Galileo signals
|
||||
SignalSource0.implementation=File_Signal_Source
|
||||
SignalSource0.filename=/archive/BDS3_datasets/long/20180713_211400_3.dat
|
||||
SignalSource0.item_type=ibyte
|
||||
SignalSource0.sampling_frequency=10000000
|
||||
SignalSource0.samples=0
|
||||
SignalSource0.repeat=false
|
||||
SignalSource0.dump=false
|
||||
SignalSource0.enable_throttle_control=false
|
||||
|
||||
;# Signal Source config for BDS signals
|
||||
SignalSource1.implementation=File_Signal_Source
|
||||
SignalSource1.filename=/archive/BDS3_datasets/long/20180713_211400_2.dat
|
||||
SignalSource1.item_type=ibyte
|
||||
SignalSource1.sampling_frequency=30000000
|
||||
SignalSource1.samples=0
|
||||
SignalSource1.repeat=false
|
||||
SignalSource1.dump=false
|
||||
SignalSource1.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
;# Signal Conditioner config for GPS, Galileo signals
|
||||
SignalConditioner0.implementation=Signal_Conditioner
|
||||
DataTypeAdapter0.implementation=Ibyte_To_Complex
|
||||
InputFilter0.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter0.input_item_type=gr_complex
|
||||
InputFilter0.output_item_type=gr_complex
|
||||
InputFilter0.taps_item_type=float
|
||||
InputFilter0.number_of_taps=5
|
||||
InputFilter0.number_of_bands=2
|
||||
InputFilter0.band1_begin=0.0
|
||||
InputFilter0.band1_end=0.70
|
||||
InputFilter0.band2_begin=0.80
|
||||
InputFilter0.band2_end=1.0
|
||||
InputFilter0.ampl1_begin=1.0
|
||||
InputFilter0.ampl1_end=1.0
|
||||
InputFilter0.ampl2_begin=0.0
|
||||
InputFilter0.ampl2_end=0.0
|
||||
InputFilter0.band1_error=1.0
|
||||
InputFilter0.band2_error=1.0
|
||||
InputFilter0.filter_type=bandpass
|
||||
InputFilter0.grid_density=16
|
||||
InputFilter0.sampling_frequency=10000000
|
||||
InputFilter0.IF=420000
|
||||
Resampler0.implementation=Direct_Resampler
|
||||
Resampler0.sample_freq_in=10000000
|
||||
Resampler0.sample_freq_out=30000000
|
||||
Resampler0.item_type=gr_complex
|
||||
|
||||
;# Signal Conditioner config for BDS signals
|
||||
SignalConditioner1.implementation=Signal_Conditioner
|
||||
DataTypeAdapter1.implementation=Ibyte_To_Complex
|
||||
InputFilter1.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter1.input_item_type=gr_complex
|
||||
InputFilter1.output_item_type=gr_complex
|
||||
InputFilter1.taps_item_type=float
|
||||
InputFilter1.number_of_taps=5
|
||||
InputFilter1.number_of_bands=2
|
||||
InputFilter1.band1_begin=0.0
|
||||
InputFilter1.band1_end=0.70
|
||||
InputFilter1.band2_begin=0.80
|
||||
InputFilter1.band2_end=1.0
|
||||
InputFilter1.ampl1_begin=1.0
|
||||
InputFilter1.ampl1_end=1.0
|
||||
InputFilter1.ampl2_begin=0.0
|
||||
InputFilter1.ampl2_end=0.0
|
||||
InputFilter1.band1_error=1.0
|
||||
InputFilter1.band2_error=1.0
|
||||
InputFilter1.filter_type=bandpass
|
||||
InputFilter1.grid_density=16
|
||||
InputFilter1.sampling_frequency=10000000
|
||||
InputFilter1.IF=1020000
|
||||
Resampler1.implementation=Pass_Through
|
||||
Resampler1.sample_freq_in=30000000
|
||||
Resampler1.sample_freq_out=30000000
|
||||
Resampler1.item_type=gr_complex
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_1C.count=7
|
||||
Channels_B3.count=4
|
||||
Channels.in_acquisition=11
|
||||
|
||||
;# Preparing collection for GPS satellites
|
||||
Channel0.RF_channel_ID=0
|
||||
Channel1.RF_channel_ID=0
|
||||
Channel2.RF_channel_ID=0
|
||||
Channel3.RF_channel_ID=0
|
||||
Channel4.RF_channel_ID=0
|
||||
Channel5.RF_channel_ID=0
|
||||
Channel6.RF_channel_ID=0
|
||||
Channel0.signal=1C
|
||||
Channel0.satellite = 2
|
||||
Channel1.signal=1C
|
||||
Channel1.satellite = 5
|
||||
Channel2.signal=1C
|
||||
Channel2.satellite = 25
|
||||
Channel3.signal=1C
|
||||
Channel3.satellite = 31
|
||||
Channel4.signal=1C
|
||||
Channel4.satellite = 24
|
||||
Channel5.signal=1C
|
||||
Channel5.satellite = 6
|
||||
Channel6.signal=1C
|
||||
Channel6.satellite = 29
|
||||
|
||||
;# Preparing collection for BDS satellites
|
||||
Channel7.RF_channel_ID=1
|
||||
Channel8.RF_channel_ID=1
|
||||
Channel9.RF_channel_ID=1
|
||||
Channel10.RF_channel_ID=1
|
||||
|
||||
Channel7.signal=B3
|
||||
Channel7.satellite = 29
|
||||
Channel8.signal=B3
|
||||
Channel8.satellite = 19
|
||||
Channel9.signal=B3
|
||||
Channel9.satellite = 20
|
||||
Channel10.signal=B3
|
||||
Channel10.satellite = 30
|
||||
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
;# Acquisition config for BDS signals
|
||||
Acquisition_B3.implementation=BEIDOU_B3I_PCPS_Acquisition
|
||||
Acquisition_B3.item_type=gr_complex
|
||||
Acquisition_B3.coherent_integration_time_ms=1
|
||||
Acquisition_B3.threshold=0.00025
|
||||
Acquisition_B3.doppler_max=15000
|
||||
Acquisition_B3.doppler_step=50
|
||||
Acquisition_B3.dump=false
|
||||
Acquisition_B3.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_acq
|
||||
Acquisition_B3.blocking=false;
|
||||
Acquisition_B3.use_CFAR_algorithm=true;
|
||||
Acquisition_B3.bit_transition_flag = false;
|
||||
|
||||
;# Acquisition config for GPS signals
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.coherent_integration_time_ms=1
|
||||
Acquisition_1C.threshold=0.001
|
||||
Acquisition_1C.doppler_max=15000
|
||||
Acquisition_1C.doppler_step=50
|
||||
Acquisition_1C.dump=true
|
||||
Acquisition_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_acq
|
||||
Acquisition_1C.blocking=false;
|
||||
Acquisition_1C.use_CFAR_algorithm=true;
|
||||
Acquisition_1C.bit_transition_flag = false;
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B3.implementation=BEIDOU_B3I_DLL_PLL_Tracking
|
||||
Tracking_B3.item_type=gr_complex
|
||||
Tracking_B3.pll_bw_hz=25.0;
|
||||
Tracking_B3.dll_bw_hz=2.50;
|
||||
Tracking_B3.dump=true;
|
||||
Tracking_B3.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_trk_ch_
|
||||
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.pll_bw_hz=25.0;
|
||||
Tracking_1C.dll_bw_hz=2.50;
|
||||
Tracking_1C.dump=true;
|
||||
Tracking_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_trk_ch_
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B3.implementation=BEIDOU_B3I_Telemetry_Decoder
|
||||
TelemetryDecoder_B3.dump=false
|
||||
|
||||
TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_1C.dump=false
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=true
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
|
||||
PVT.iono_model=OFF ; 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.dump=true
|
||||
PVT.dump_filename = /home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/pvt_l1
|
||||
PVT.kml_output_enabled = false;
|
||||
PVT.xml_output_enabled = false;
|
||||
PVT.gpx_output_enabled = false;
|
||||
PVT.rinex_output_enabled = false;
|
||||
PVT.rtcm_output_enabled = false;
|
||||
PVT.nmea_output_enabled = false;
|
||||
PVT.geojson_output_enabled = false;
|
119
conf/gnss-sdr_BDS_B3I_byte.conf
Normal file
119
conf/gnss-sdr_BDS_B3I_byte.conf
Normal file
@ -0,0 +1,119 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://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=50000000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
SignalSource.filename=/home/dmiralles/Documents/gnss-metadata-standard/install/BdsB3IStr01.dat
|
||||
SignalSource.item_type=byte
|
||||
SignalSource.sampling_frequency=50000000
|
||||
SignalSource.samples=0
|
||||
SignalSource.repeat=false
|
||||
SignalSource.dump=false
|
||||
SignalSource.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
SignalConditioner.implementation=Signal_Conditioner
|
||||
DataTypeAdapter.implementation=Byte_To_Short
|
||||
InputFilter.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter.input_item_type=short
|
||||
InputFilter.output_item_type=gr_complex
|
||||
InputFilter.taps_item_type=float
|
||||
InputFilter.number_of_taps=5
|
||||
InputFilter.number_of_bands=2
|
||||
InputFilter.band1_begin=0.0
|
||||
InputFilter.band1_end=0.70
|
||||
InputFilter.band2_begin=0.80
|
||||
InputFilter.band2_end=1.0
|
||||
InputFilter.ampl1_begin=1.0
|
||||
InputFilter.ampl1_end=1.0
|
||||
InputFilter.ampl2_begin=0.0
|
||||
InputFilter.ampl2_end=0.0
|
||||
InputFilter.band1_error=1.0
|
||||
InputFilter.band2_error=1.0
|
||||
InputFilter.filter_type=bandpass
|
||||
InputFilter.grid_density=16
|
||||
InputFilter.sampling_frequency=50000000
|
||||
InputFilter.IF=12500000
|
||||
Resampler.implementation=Pass_Through
|
||||
Resampler.sample_freq_in=50000000
|
||||
Resampler.sample_freq_out=50000000
|
||||
Resampler.item_type=gr_complex
|
||||
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_B3.count=10
|
||||
Channels.in_acquisition=10
|
||||
Channel.signal=B3
|
||||
|
||||
Channel0.satellite = 6;
|
||||
Channel1.satellite = 23;
|
||||
Channel2.satellite = 16;
|
||||
Channel3.satellite = 18;
|
||||
Channel4.satellite = 7;
|
||||
Channel5.satellite = 1;
|
||||
Channel6.satellite = 2;
|
||||
Channel7.satellite = 3;
|
||||
Channel8.satellite = 4;
|
||||
Channel9.satellite = 5;
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
Acquisition_B3.implementation=BEIDOU_B3I_PCPS_Acquisition
|
||||
Acquisition_B3.item_type=gr_complex
|
||||
Acquisition_B3.coherent_integration_time_ms=3
|
||||
Acquisition_B3.max_dwells = 2
|
||||
Acquisition_B3.threshold=0.0004
|
||||
Acquisition_B3.doppler_max=10000
|
||||
Acquisition_B3.doppler_step=100
|
||||
Acquisition_B3.dump=false
|
||||
Acquisition_B3.dump_filename=./bds_acq
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B3.implementation=BEIDOU_B3I_DLL_PLL_Tracking
|
||||
Tracking_B3.item_type=gr_complex
|
||||
Tracking_B3.pll_bw_hz=40.0;
|
||||
Tracking_B3.dll_bw_hz=4.0;
|
||||
Tracking_B3.pll_bw_narrow_hz=20.0;
|
||||
Tracking_B3.dll_bw_narrow_hz=3.0;
|
||||
Tracking_B3.dump=false;
|
||||
Tracking_B3.dump_filename=./epl_tracking_ch_
|
||||
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B3.implementation=BEIDOU_B3I_Telemetry_Decoder
|
||||
TelemetryDecoder_B3.dump=true
|
||||
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=true
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
|
||||
PVT.iono_model=OFF ; 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.dump_filename=./PVT
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
PVT.flag_nmea_tty_port=false;
|
||||
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
|
||||
PVT.dump=true
|
131
conf/gnss-sdr_BDS_B3I_ibyte.conf
Normal file
131
conf/gnss-sdr_BDS_B3I_ibyte.conf
Normal file
@ -0,0 +1,131 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://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=30000000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
SignalSource.filename=/archive/BDS3_datasets/long/20180713_211400_2.dat
|
||||
SignalSource.item_type=ibyte
|
||||
SignalSource.sampling_frequency=30000000
|
||||
SignalSource.samples=0
|
||||
SignalSource.repeat=false
|
||||
SignalSource.dump=false
|
||||
SignalSource.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
SignalConditioner.implementation=Signal_Conditioner
|
||||
DataTypeAdapter.implementation=Ibyte_To_Complex
|
||||
InputFilter.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter.input_item_type=gr_complex
|
||||
InputFilter.output_item_type=gr_complex
|
||||
InputFilter.taps_item_type=float
|
||||
InputFilter.number_of_taps=5
|
||||
InputFilter.number_of_bands=2
|
||||
InputFilter.band1_begin=0.0
|
||||
InputFilter.band1_end=0.70
|
||||
InputFilter.band2_begin=0.80
|
||||
InputFilter.band2_end=1.0
|
||||
InputFilter.ampl1_begin=1.0
|
||||
InputFilter.ampl1_end=1.0
|
||||
InputFilter.ampl2_begin=0.0
|
||||
InputFilter.ampl2_end=0.0
|
||||
InputFilter.band1_error=1.0
|
||||
InputFilter.band2_error=1.0
|
||||
InputFilter.filter_type=bandpass
|
||||
InputFilter.grid_density=16
|
||||
InputFilter.sampling_frequency=30000000
|
||||
InputFilter.IF=1020000
|
||||
Resampler.implementation=Pass_Through
|
||||
Resampler.sample_freq_in=30000000
|
||||
Resampler.sample_freq_out=30000000
|
||||
Resampler.item_type=gr_complex
|
||||
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_B3.count=4
|
||||
Channels.in_acquisition=1
|
||||
Channel.signal=B3
|
||||
|
||||
Channel0.satellite = 29;
|
||||
Channel1.satellite = 19;
|
||||
Channel2.satellite = 20;
|
||||
Channel3.satellite = 30;
|
||||
|
||||
|
||||
;Channel0.satellite = 6;
|
||||
;Channel1.satellite = 7;
|
||||
;Channel2.satellite = 9;
|
||||
;Channel3.satellite = 16;
|
||||
;Channel4.satellite = 18;
|
||||
;Channel5.satellite = 1;
|
||||
;Channel6.satellite = 2;
|
||||
;Channel7.satellite = 3;
|
||||
;Channel8.satellite = 4;
|
||||
;Channel9.satellite = 5;
|
||||
;Channel10.satellite = 23;
|
||||
;Channel11.satellite = 25;
|
||||
;Channel12.satellite = 32;
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
Acquisition_B3.implementation=BEIDOU_B3I_PCPS_Acquisition
|
||||
Acquisition_B3.item_type=gr_complex
|
||||
Acquisition_B3.coherent_integration_time_ms=1
|
||||
Acquisition_B3.max_dwells = 1
|
||||
Acquisition_B3.threshold=0.0004
|
||||
;Acquisition_B3.pfa=0.0000001;
|
||||
Acquisition_B3.doppler_max=10000
|
||||
Acquisition_B3.doppler_step=50
|
||||
Acquisition_B3.dump=false
|
||||
Acquisition_B3.dump_filename=./bds_acq
|
||||
Acquisition_B3.blocking=false;
|
||||
Acquisition_B3.use_CFAR_algorithm=true;
|
||||
Acquisition_B3.bit_transition_flag = false;
|
||||
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B3.implementation=BEIDOU_B3I_DLL_PLL_Tracking
|
||||
Tracking_B3.item_type=gr_complex
|
||||
Tracking_B3.pll_bw_hz=25.0;
|
||||
Tracking_B3.dll_bw_hz=2.50;
|
||||
Tracking_B3.dump=false;
|
||||
Tracking_B3.dump_filename=./epl_tracking_ch_
|
||||
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B3.implementation=BEIDOU_B3I_Telemetry_Decoder
|
||||
TelemetryDecoder_B3.dump=false
|
||||
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=false
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
|
||||
PVT.iono_model=OFF ; 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.dump_filename=./PVT
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
PVT.flag_nmea_tty_port=false;
|
||||
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
|
||||
PVT.dump=true
|
83
conf/gnss-sdr_BDS_B3I_short.conf
Normal file
83
conf/gnss-sdr_BDS_B3I_short.conf
Normal file
@ -0,0 +1,83 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://gnss-sdr.org/docs/sp-blocks/
|
||||
; 5C is the channel identifier for BeiDou B2a, both the data signal and the pilot signal
|
||||
|
||||
[GNSS-SDR]
|
||||
|
||||
;######### GLOBAL OPTIONS ##################
|
||||
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second].
|
||||
GNSS-SDR.internal_fs_sps=30000000
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
;SignalSource.filename=/home/dmiralles/Documents/gnss-sdr/src/tests/signal_samples/USRP_BDS_B2a_201805171115_fs_25e6_if0e3_ishort_200ms.bin
|
||||
SignalSource.filename=/archive/USRP_BDS_B3I_201805171118_fs_25e6_if0e3_ishort.bin
|
||||
SignalSource.item_type=ishort
|
||||
SignalSource.sampling_frequency=30000000
|
||||
SignalSource.samples=0
|
||||
SignalSource.repeat=false
|
||||
SignalSource.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
SignalConditioner.implementation=Signal_Conditioner
|
||||
InputFilter.implementation=Pass_Through
|
||||
DataTypeAdapter.implementation=Ishort_To_Complex
|
||||
Resampler.implementation=Direct_Resampler
|
||||
Resampler.sample_freq_in=30000000
|
||||
Resampler.sample_freq_out=30000000
|
||||
Resampler.item_type=gr_complex
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channel.signal=B3
|
||||
Channels.in_acquisition=1
|
||||
Channels_B3.count=5;
|
||||
|
||||
Channel0.satellite = 27;
|
||||
Channel1.satellite = 22;
|
||||
Channel2.satellite = 21;
|
||||
Channel3.satellite = 28;
|
||||
Channel4.satellite = 30;
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
Acquisition_B3.implementation=BEIDOU_B3I_PCPS_Acquisition
|
||||
Acquisition_B3.item_type=gr_complex
|
||||
Acquisition_B3.coherent_integration_time_ms = 1
|
||||
Acquisition_B3.max_dwells = 1
|
||||
Acquisition_B3.threshold=0.0010
|
||||
Acquisition_B3.doppler_max=10000
|
||||
Acquisition_B3.doppler_step=50
|
||||
Acquisition_B3.dump=true
|
||||
Acquisition_B3.dump_channel = 0;
|
||||
Acquisition_B3.dump_filename=/archive/bds_b3i_acq
|
||||
Acquisition_B3.blocking=false;
|
||||
Acquisition_B3.use_CFAR_algorithm=true;
|
||||
Acquisition_B3.bit_transition_flag = false;
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B3.implementation= BEIDOU_B3I_DLL_PLL_Tracking;
|
||||
Tracking_B3.item_type=gr_complex
|
||||
Tracking_B3.early_late_space_chips=0.5
|
||||
Tracking_B3.pll_bw_hz=25.0;
|
||||
Tracking_B3.dll_bw_hz=2.0;
|
||||
Tracking_B3.dump=true;
|
||||
Tracking_B3.dump_filename=/archive/bds_b3i_trk_ch_
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B3.implementation=BEIDOU_B3I_Telemetry_Decoder
|
||||
TelemetryDecoder_B3.dump=true
|
||||
TelemetryDecoder_B3.dump_filename=/archive/bds_b3i_tel_dec.dat
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=true;
|
||||
Observables.dump_filename=/archive/bds_b3i_observables.dat
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.averaging_depth=100
|
||||
PVT.flag_averaging=true
|
||||
PVT.output_rate_ms=10
|
||||
PVT.display_rate_ms=500
|
||||
|
||||
|
||||
|
@ -180,6 +180,12 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
* 53 | Beidou B1I + GLONASS L1 C/A
|
||||
* 54 | Beidou B1I + GPS L1 C/A + Galileo E1B
|
||||
* 55 | Beidou B1I + GPS L1 C/A + GLONASS L1 C/A + Galileo E1B
|
||||
* 56 | Beidou B1I + Beidou B3I
|
||||
* Skipped previous values to avoid overlapping
|
||||
* 60 | Beidou B3I
|
||||
* 61 | Beidou B3I + GPS L2C
|
||||
* 62 | Beidou B3I + GLONASS L2 C/A
|
||||
* 63 | Beidou B3I + GPS L2C + GLONASS L2 C/A
|
||||
*/
|
||||
int gps_1C_count = configuration->property("Channels_1C.count", 0);
|
||||
int gps_2S_count = configuration->property("Channels_2S.count", 0);
|
||||
@ -190,149 +196,171 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
int glo_1G_count = configuration->property("Channels_1G.count", 0);
|
||||
int glo_2G_count = configuration->property("Channels_2G.count", 0);
|
||||
int bds_B1_count = configuration->property("Channels_B1.count", 0);
|
||||
int bds_B3_count = configuration->property("Channels_B3.count", 0);
|
||||
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 1; // L1
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 2;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 3; // L5
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 4; // E1
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 5; // E5a
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 6;
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 7;
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 8; // L1+L5
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 9; // L1+E1
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 10;
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 11;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 12;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 13; // L5+E5a
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 14;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 15;
|
||||
}
|
||||
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) pvt_output_parameters.type_of_receiver = 16;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 17;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 18;
|
||||
}
|
||||
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) pvt_output_parameters.type_of_receiver = 19;
|
||||
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) pvt_output_parameters.type_of_receiver = 20;
|
||||
if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 21;
|
||||
}
|
||||
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count = 0)) pvt_output_parameters.type_of_receiver = 22;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 23;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 24;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 25;
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 26;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 27;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 28;
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 29;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 30;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 31;
|
||||
}
|
||||
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 32; // L1+E1+L5+E5a
|
||||
}
|
||||
// BeiDou B1I Receiver
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 50;
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 51;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 52;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0))
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 53;
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 54;
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0))
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 55;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count != 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 56;
|
||||
}
|
||||
// BeiDou B3I Receiver
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 60;
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 61;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 62;
|
||||
}
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 63;
|
||||
}
|
||||
|
||||
// RTKLIB PVT solver options
|
||||
// Settings 1
|
||||
@ -376,15 +404,15 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
{
|
||||
num_bands = 1;
|
||||
}
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0)) && ((gps_2S_count > 0) || (glo_2G_count > 0)))
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) && ((gps_2S_count > 0) || (glo_2G_count > 0) || (bds_B3_count > 0)))
|
||||
{
|
||||
num_bands = 2;
|
||||
}
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0) || (gps_L5_count > 0)))
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0) || (gps_L5_count > 0)))
|
||||
{
|
||||
num_bands = 2;
|
||||
}
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0)) && ((gps_2S_count > 0) || (glo_2G_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0) || (gps_L5_count > 0)))
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) && ((gps_2S_count > 0) || (glo_2G_count > 0) || (bds_B3_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0) || (gps_L5_count > 0)))
|
||||
{
|
||||
num_bands = 3;
|
||||
}
|
||||
@ -513,7 +541,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
{
|
||||
nsys += SYS_GLO;
|
||||
}
|
||||
if ((bds_B1_count > 0))
|
||||
if ((bds_B1_count > 0) || (bds_B3_count > 0))
|
||||
{
|
||||
nsys += SYS_BDS;
|
||||
}
|
||||
|
@ -1355,7 +1355,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "1G")) or
|
||||
((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "2G")) or
|
||||
((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "L5")) or
|
||||
((tmp_eph_iter_bds_dnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "B1")))
|
||||
((tmp_eph_iter_bds_dnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "B1")) or
|
||||
((tmp_eph_iter_bds_dnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "B3")))
|
||||
{
|
||||
// store valid observables in a map.
|
||||
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(i, in[i][epoch]));
|
||||
@ -1848,6 +1849,15 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
b_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
|
||||
break;
|
||||
case 60: // BDS B1I only
|
||||
if (beidou_dnav_ephemeris_iter != d_pvt_solver->beidou_dnav_ephemeris_map.cend())
|
||||
{
|
||||
rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B3");
|
||||
rp->rinex_nav_header(rp->navFile, d_pvt_solver->beidou_dnav_iono, d_pvt_solver->beidou_dnav_utc_model);
|
||||
b_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -191,6 +191,10 @@ Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path)
|
||||
observationCode["COMPASS_E6_IQ"] = "6X";
|
||||
observationCode["BEIDOU_B1_I"] = "1I";
|
||||
observationCode["BEIDOU_B1_Q"] = "1Q";
|
||||
observationCode["BEIDOU_B1_IQ"] = "1X";
|
||||
observationCode["BEIDOU_B3_I"] = "6I";
|
||||
observationCode["BEIDOU_B3_Q"] = "6Q";
|
||||
observationCode["BEIDOU_B3_IQ"] = "6X";
|
||||
|
||||
observationType["PSEUDORANGE"] = "C";
|
||||
observationType["CARRIER_PHASE"] = "L";
|
||||
|
@ -53,6 +53,7 @@
|
||||
|
||||
#include "rtklib_solver.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "Beidou_B3I.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "Galileo_E1.h"
|
||||
@ -833,6 +834,47 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->first;
|
||||
}
|
||||
}
|
||||
// BeiDou B3
|
||||
if (sig_ == "B3")
|
||||
{
|
||||
beidou_ephemeris_iter = beidou_dnav_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||
if (beidou_ephemeris_iter != beidou_dnav_ephemeris_map.cend())
|
||||
{
|
||||
bool found_B1I_obs = false;
|
||||
for (int i = 0; i < valid_obs; i++)
|
||||
{
|
||||
if (eph_data[i].sat == (static_cast<int>(gnss_observables_iter->second.PRN + NSATGPS + NSATGLO + NSATGAL + NSATQZS)))
|
||||
{
|
||||
obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i + glo_valid_obs],
|
||||
gnss_observables_iter->second,
|
||||
beidou_ephemeris_iter->second.i_BEIDOU_week + 1356,
|
||||
1); // Band 3 (L2/G2/B3)
|
||||
found_B1I_obs = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found_B1I_obs)
|
||||
{
|
||||
// insert BeiDou B3I obs as new obs and also insert its ephemeris
|
||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
eph_data[valid_obs] = eph_to_rtklib(beidou_ephemeris_iter->second);
|
||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||
auto default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
||||
{default_code_, default_code_, default_code_},
|
||||
{}, {0.0, 0.0, 0.0}, {}};
|
||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||
gnss_observables_iter->second,
|
||||
beidou_ephemeris_iter->second.i_BEIDOU_week + 1356,
|
||||
1); // Band 2 (L2/G2)
|
||||
valid_obs++;
|
||||
}
|
||||
}
|
||||
else // the ephemeris are not available for this SV
|
||||
{
|
||||
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
std::map<int, Gps_Ephemeris> gps_ephemeris_map; //!< Map storing new GPS_Ephemeris
|
||||
std::map<int, Gps_CNAV_Ephemeris> gps_cnav_ephemeris_map; //!< Map storing new GPS_CNAV_Ephemeris
|
||||
std::map<int, Glonass_Gnav_Ephemeris> glonass_gnav_ephemeris_map; //!< Map storing new GLONASS GNAV Ephemeris
|
||||
std::map<int, Beidou_Dnav_Ephemeris> beidou_dnav_ephemeris_map; //!< Map storing new GLONASS GNAV Ephmeris
|
||||
std::map<int, Beidou_Dnav_Ephemeris> beidou_dnav_ephemeris_map; //!< Map storing new BeiDou DNAV Ephmeris
|
||||
|
||||
Galileo_Utc_Model galileo_utc_model;
|
||||
Galileo_Iono galileo_iono;
|
||||
|
@ -35,6 +35,7 @@ set(ACQ_ADAPTER_SOURCES
|
||||
glonass_l1_ca_pcps_acquisition.cc
|
||||
glonass_l2_ca_pcps_acquisition.cc
|
||||
beidou_b1i_pcps_acquisition.cc
|
||||
beidou_b3i_pcps_acquisition.cc
|
||||
)
|
||||
|
||||
set(ACQ_ADAPTER_HEADERS
|
||||
@ -54,6 +55,8 @@ set(ACQ_ADAPTER_HEADERS
|
||||
galileo_e5a_pcps_acquisition.h
|
||||
glonass_l1_ca_pcps_acquisition.h
|
||||
glonass_l2_ca_pcps_acquisition.h
|
||||
beidou_b1i_pcps_acquisition.h
|
||||
beidou_b3i_pcps_acquisition.h
|
||||
)
|
||||
|
||||
if(ENABLE_FPGA)
|
||||
|
@ -0,0 +1,341 @@
|
||||
/*!
|
||||
* \file beidou_b3i_pcps_acquisition.cc
|
||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||
* BeiDou B3I signals
|
||||
* \author Damian Miralles, 2019. dmiralles2009@gmail.com
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2019 (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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "beidou_b3i_pcps_acquisition.h"
|
||||
#include "Beidou_B3I.h"
|
||||
#include "acq_conf.h"
|
||||
#include "beidou_b3i_signal_processing.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
BeidouB3iPcpsAcquisition::BeidouB3iPcpsAcquisition(
|
||||
ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
Acq_Conf acq_parameters = Acq_Conf();
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
|
||||
item_type_ = configuration_->property(role + ".item_type", default_item_type);
|
||||
|
||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
acq_parameters.dump = dump_;
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters.blocking = blocking_;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
|
||||
acq_parameters.sampled_ms = sampled_ms_;
|
||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||
acq_parameters.bit_transition_flag = bit_transition_flag_;
|
||||
use_CFAR_algorithm_flag_ = configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions
|
||||
acq_parameters.use_CFAR_algorithm_flag = use_CFAR_algorithm_flag_;
|
||||
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
||||
acq_parameters.max_dwells = max_dwells_;
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
acq_parameters.dump_filename = dump_filename_;
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / (BEIDOU_B3I_CODE_RATE_HZ / BEIDOU_B3I_CODE_LENGTH_CHIPS)));
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
if (bit_transition_flag_)
|
||||
{
|
||||
vector_length_ *= 2;
|
||||
}
|
||||
|
||||
code_ = new gr_complex[vector_length_];
|
||||
|
||||
if (item_type_ == "cshort")
|
||||
{
|
||||
item_size_ = sizeof(lv_16sc_t);
|
||||
}
|
||||
else
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
}
|
||||
acq_parameters.it_size = item_size_;
|
||||
acq_parameters.sampled_ms = sampled_ms_;
|
||||
acq_parameters.samples_per_ms = code_length_;
|
||||
acq_parameters.samples_per_code = code_length_;
|
||||
acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false);
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
|
||||
|
||||
if (item_type_ == "cbyte")
|
||||
{
|
||||
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "This implementation does not provide an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BeidouB3iPcpsAcquisition::~BeidouB3iPcpsAcquisition()
|
||||
{
|
||||
delete[] code_;
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::stop_acquisition()
|
||||
{
|
||||
}
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
threshold_ = threshold;
|
||||
}
|
||||
else
|
||||
{
|
||||
threshold_ = calculate_threshold(pfa);
|
||||
}
|
||||
|
||||
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
|
||||
|
||||
acquisition_->set_threshold(threshold_);
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_doppler_max(unsigned int doppler_max)
|
||||
{
|
||||
doppler_max_ = doppler_max;
|
||||
|
||||
acquisition_->set_doppler_max(doppler_max_);
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
|
||||
{
|
||||
doppler_step_ = doppler_step;
|
||||
|
||||
acquisition_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
|
||||
acquisition_->set_gnss_synchro(gnss_synchro_);
|
||||
}
|
||||
|
||||
|
||||
signed int BeidouB3iPcpsAcquisition::mag()
|
||||
{
|
||||
return acquisition_->mag();
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::init()
|
||||
{
|
||||
acquisition_->init();
|
||||
set_local_code();
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_local_code()
|
||||
{
|
||||
auto* code = new std::complex<float>[code_length_];
|
||||
|
||||
beidou_b3i_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
for (unsigned int i = 0; i < sampled_ms_; i++)
|
||||
{
|
||||
memcpy(&(code_[i * code_length_]), code,
|
||||
sizeof(gr_complex) * code_length_);
|
||||
}
|
||||
|
||||
acquisition_->set_local_code(code_);
|
||||
delete[] code;
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::reset()
|
||||
{
|
||||
acquisition_->set_active(true);
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_state(int state)
|
||||
{
|
||||
acquisition_->set_state(state);
|
||||
}
|
||||
|
||||
|
||||
float BeidouB3iPcpsAcquisition::calculate_threshold(float pfa)
|
||||
{
|
||||
//Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
/*
|
||||
for (int doppler = (int)(-doppler_max_); doppler <= (int)doppler_max_; doppler += doppler_step_)
|
||||
{
|
||||
frequency_bins++;
|
||||
}
|
||||
*/
|
||||
|
||||
frequency_bins = (2 * doppler_max_ + doppler_step_) / doppler_step_;
|
||||
|
||||
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
auto lambda = static_cast<double>(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
else if (item_type_ == "cbyte")
|
||||
{
|
||||
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
else if (item_type_ == "cbyte")
|
||||
{
|
||||
// Since a byte-based acq implementation is not available,
|
||||
// we just convert cshorts to gr_complex
|
||||
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
|
||||
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
|
||||
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr BeidouB3iPcpsAcquisition::get_left_block()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
else if (item_type_ == "cbyte")
|
||||
{
|
||||
return cbyte_to_float_x2_;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr BeidouB3iPcpsAcquisition::get_right_block()
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_resampler_latency(uint32_t latency_samples)
|
||||
{
|
||||
acquisition_->set_resampler_latency(latency_samples);
|
||||
}
|
@ -0,0 +1,179 @@
|
||||
/*!
|
||||
* \file beidou_b3i_pcps_acquisition.h
|
||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||
* Beidou B3I signals
|
||||
* \author Damian Miralles, 2019. dmiralles2009@gmail.com
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2019 (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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_BEIDOU_B3I_PCPS_ACQUISITION_H_
|
||||
#define GNSS_SDR_BEIDOU_B3I_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acq_conf.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
/*!
|
||||
* \brief This class adapts a PCPS acquisition block to an AcquisitionInterface
|
||||
* for BeiDou B3I signals
|
||||
*/
|
||||
class BeidouB3iPcpsAcquisition : public AcquisitionInterface
|
||||
{
|
||||
public:
|
||||
BeidouB3iPcpsAcquisition(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
virtual ~BeidouB3iPcpsAcquisition();
|
||||
|
||||
inline std::string role() override
|
||||
{
|
||||
return role_;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns "BEIDOU_B1I_PCPS_Acquisition"
|
||||
*/
|
||||
inline std::string implementation() override
|
||||
{
|
||||
return "BEIDOU_B3I_PCPS_Acquisition";
|
||||
}
|
||||
|
||||
inline size_t item_size() override
|
||||
{
|
||||
return item_size_;
|
||||
}
|
||||
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
void disconnect(gr::top_block_sptr top_block) override;
|
||||
gr::basic_block_sptr get_left_block() override;
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to efficiently exchange synchronization data between acquisition and
|
||||
* tracking blocks
|
||||
*/
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
void set_threshold(float threshold) override;
|
||||
|
||||
/*!
|
||||
* \brief Set maximum Doppler off grid search
|
||||
*/
|
||||
void set_doppler_max(unsigned int doppler_max) override;
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler steps for the grid search
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step) override;
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
void init() override;
|
||||
|
||||
/*!
|
||||
* \brief Sets local code for GPS L1/CA PCPS acquisition algorithm.
|
||||
*/
|
||||
void set_local_code() override;
|
||||
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search
|
||||
*/
|
||||
signed int mag() override;
|
||||
|
||||
/*!
|
||||
* \brief Restart acquisition algorithm
|
||||
*/
|
||||
void reset() override;
|
||||
|
||||
/*!
|
||||
* \brief If state = 1, it forces the block to start acquiring from the first sample
|
||||
*/
|
||||
void set_state(int state) override;
|
||||
|
||||
/*!
|
||||
* \brief Stop running acquisition
|
||||
*/
|
||||
void stop_acquisition() override;
|
||||
|
||||
/*!
|
||||
* \brief Sets the resampler latency to account it in the acquisition code delay estimation
|
||||
*/
|
||||
void set_resampler_latency(uint32_t latency_samples) override;
|
||||
|
||||
|
||||
private:
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
size_t item_size_;
|
||||
std::string item_type_;
|
||||
unsigned int vector_length_;
|
||||
unsigned int code_length_;
|
||||
bool bit_transition_flag_;
|
||||
bool use_CFAR_algorithm_flag_;
|
||||
unsigned int channel_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
unsigned int sampled_ms_;
|
||||
unsigned int max_dwells_;
|
||||
int64_t fs_in_;
|
||||
bool dump_;
|
||||
bool blocking_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float>* code_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
|
||||
float calculate_threshold(float pfa);
|
||||
};
|
||||
|
||||
#endif /* GNSS_SDR_BEIDOU_B3I_PCPS_ACQUISITION_H_ */
|
@ -106,6 +106,7 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::s
|
||||
|
||||
channel_fsm_->set_acquisition(acq_);
|
||||
channel_fsm_->set_tracking(trk_);
|
||||
channel_fsm_->set_telemetry(nav_);
|
||||
channel_fsm_->set_channel(channel_);
|
||||
channel_fsm_->set_queue(queue_);
|
||||
|
||||
@ -129,6 +130,8 @@ void Channel::connect(gr::top_block_sptr top_block)
|
||||
|
||||
//Synchronous ports
|
||||
top_block->connect(trk_->get_right_block(), 0, nav_->get_left_block(), 0);
|
||||
// Message ports
|
||||
top_block->msg_connect(nav_->get_left_block(), pmt::mp("telemetry_to_trk"), trk_->get_right_block(), pmt::mp("telemetry_to_trk"));
|
||||
DLOG(INFO) << "tracking -> telemetry_decoder";
|
||||
|
||||
// Message ports
|
||||
|
@ -157,7 +157,11 @@ void ChannelFsm::set_tracking(std::shared_ptr<TrackingInterface> tracking)
|
||||
trk_ = std::move(tracking);
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::set_telemetry(std::shared_ptr<TelemetryDecoderInterface> telemetry)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
nav_ = std::move(telemetry);
|
||||
}
|
||||
void ChannelFsm::set_queue(gr::msg_queue::sptr queue)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
@ -186,6 +190,7 @@ void ChannelFsm::stop_tracking()
|
||||
void ChannelFsm::start_acquisition()
|
||||
{
|
||||
acq_->reset();
|
||||
nav_->reset();
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,6 +33,7 @@
|
||||
#define GNSS_SDR_CHANNEL_FSM_H
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "telemetry_decoder_interface.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <cstdint>
|
||||
@ -51,6 +52,7 @@ public:
|
||||
|
||||
void set_acquisition(std::shared_ptr<AcquisitionInterface> acquisition);
|
||||
void set_tracking(std::shared_ptr<TrackingInterface> tracking);
|
||||
void set_telemetry(std::shared_ptr<TelemetryDecoderInterface> telemetry);
|
||||
void set_queue(gr::msg_queue::sptr queue);
|
||||
void set_channel(uint32_t channel);
|
||||
|
||||
@ -72,10 +74,11 @@ private:
|
||||
|
||||
std::shared_ptr<AcquisitionInterface> acq_;
|
||||
std::shared_ptr<TrackingInterface> trk_;
|
||||
std::shared_ptr<TelemetryDecoderInterface> nav_;
|
||||
gr::msg_queue::sptr queue_;
|
||||
uint32_t channel_;
|
||||
uint32_t d_state;
|
||||
std::mutex mx;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_CHANNEL_FSM_H
|
||||
#endif // GNSS_SDR_CHANNEL_FSM_H
|
||||
|
@ -29,6 +29,7 @@ set(GNSS_SPLIBS_SOURCES
|
||||
pass_through.cc
|
||||
galileo_e5_signal_processing.cc
|
||||
beidou_b1i_signal_processing.cc
|
||||
beidou_b3i_signal_processing.cc
|
||||
complex_byte_to_float_x2.cc
|
||||
byte_x2_to_complex_byte.cc
|
||||
cshort_to_float_x2.cc
|
||||
@ -52,6 +53,7 @@ set(GNSS_SPLIBS_HEADERS
|
||||
pass_through.h
|
||||
galileo_e5_signal_processing.h
|
||||
beidou_b1i_signal_processing.h
|
||||
beidou_b3i_signal_processing.h
|
||||
complex_byte_to_float_x2.h
|
||||
byte_x2_to_complex_byte.h
|
||||
cshort_to_float_x2.h
|
||||
|
246
src/algorithms/libs/beidou_b3i_signal_processing.cc
Normal file
246
src/algorithms/libs/beidou_b3i_signal_processing.cc
Normal file
@ -0,0 +1,246 @@
|
||||
/*!
|
||||
* \file beidou_b3i_signal_processing.cc
|
||||
* \brief This class implements various functions for BeiDou B1I signal
|
||||
* \author Damian Miralles, 2019. dmiralles2009@gmail.com
|
||||
*
|
||||
* Detailed description of the file here if needed.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "beidou_b3i_signal_processing.h"
|
||||
|
||||
auto auxCeil = [](float x) { return static_cast<int>(static_cast<long>((x) + 1)); };
|
||||
|
||||
void beidou_b3i_code_gen_int(int* _dest, signed int _prn, unsigned int _chip_shift)
|
||||
{
|
||||
const unsigned int _code_length = 10230;
|
||||
bool G1[_code_length];
|
||||
bool G2[_code_length];
|
||||
std::array<bool, 13> G1_register = {{true, true, true, true, true, true, true, true, true, true, true, true, true}};
|
||||
std::array<bool, 13> G2_register = {{true, true, true, true, true, true, true, true, true, true, true, true, true}};
|
||||
std::array<bool, 13> G1_register_reset = {{false, false, true, true, true, true, true, true, true, true, true, true, true}};
|
||||
bool feedback1, feedback2, aux;
|
||||
uint32_t lcv, lcv2, delay;
|
||||
int32_t prn_idx = _prn - 1;
|
||||
// clang-format off
|
||||
std::array<std::array<bool, 13>, 63> G2_register_shifted = {{
|
||||
{{true, false, true, false, true, true, true, true, true, true, true, true, true}},
|
||||
{{true, true, true, true, false, false, false, true, false, true, false, true, true}},
|
||||
{{true, false, true, true, true, true, false, false, false, true, false, true, false}},
|
||||
{{true, true, true, true, true, true, true, true, true, true, false, true, true}},
|
||||
{{true, true, false, false, true, false, false, false, true, true, true, true, true}},
|
||||
{{true, false, false, true, false, false, true, true, false, false, true, false, false}},
|
||||
{{true, true, true, true, true, true, true, false, true, false, false, true, false}},
|
||||
{{true, true, true, false, true, true, true, true, true, true, true, false, true}},
|
||||
{{true, false, true, false, false, false, false, false, false, false, false, true, false}},
|
||||
{{false, false, true, false, false, false, false, false, true, true, false, true, true}},
|
||||
{{true, true, true, false, true, false, true, true, true, false, false, false, false}},
|
||||
{{false, false, true, false, true, true, false, false, true, true, true, true, false}},
|
||||
{{false, true, true, false, false, true, false, false, true, false, true, false, true}},
|
||||
{{false, true, true, true, false, false, false, true, false, false, true, true, false}},
|
||||
{{true, false, false, false, true, true, false, false, false, true, false, false, true}},
|
||||
{{true, true, true, false, false, false, true, true, true, true, true, false, false}},
|
||||
{{false, false, true, false, false, true, true, false, false, false, true, false, true}},
|
||||
{{false, false, false, false, false, true, true, true, false, true, true, false, false}},
|
||||
{{true, false, false, false, true, false, true, false, true, false, true, true, true}},
|
||||
{{false, false, false, true, false, true, true, false, true, true, true, true, false}},
|
||||
{{false, false, true, false, false, false, false, true, false, true, true, false, true}},
|
||||
{{false, false, true, false, true, true, false, false, false, true, false, true, false}},
|
||||
{{false, false, false, true, false, true, true, false, false, true, true, true, true}},
|
||||
{{false, false, true, true, false, false, true, true, false, false, false, true, false}},
|
||||
{{false, false, true, true, true, false, true, false, false, true, false, false, false}},
|
||||
{{false, true, false, false, true, false, false, true, false, true, false, false, true}},
|
||||
{{true, false, true, true, false, true, true, false, true, false, false, true, true}},
|
||||
{{true, false, true, false, true, true, true, true, false, false, false, true, false}},
|
||||
{{false, false, false, true, false, true, true, true, true, false, true, false, true}},
|
||||
{{false, true, true, true, true, true, true, true, true, true, true, true, true}},
|
||||
{{false, true, true, false, true, true, false, false, false, true, true, true, true}},
|
||||
{{true, false, true, false, true, true, false, false, false, true, false, false, true}},
|
||||
{{true, false, false, true, false, true, false, true, false, true, false, true, true}},
|
||||
{{true, true, false, false, true, true, false, true, false, false, true, false, true}},
|
||||
{{true, true, false, true, false, false, true, false, true, true, true, false, true}},
|
||||
{{true, true, true, true, true, false, true, true, true, false, true, false, false}},
|
||||
{{false, false, true, false, true, false, true, true, false, false, true, true, true}},
|
||||
{{true, true, true, false, true, false, false, false, true, false, false, false, false}},
|
||||
{{true, true, false, true, true, true, false, false, true, false, false, false, false}},
|
||||
{{true, true, false, true, false, true, true, false, false, true, true, true, false}},
|
||||
{{true, false, false, false, false, false, false, true, true, false, true, false, false}},
|
||||
{{false, true, false, true, true, true, true, false, true, true, false, false, true}},
|
||||
{{false, true, true, false, true, true, false, true, true, true, true, false, false}},
|
||||
{{true, true, false, true, false, false, true, true, true, false, false, false, true}},
|
||||
{{false, false, true, true, true, false, false, true, false, false, false, true, false}},
|
||||
{{false, true, false, true, false, true, true, false, false, false, true, false, true}},
|
||||
{{true, false, false, true, true, true, true, true, false, false, true, true, false}},
|
||||
{{true, true, true, true, true, false, true, false, false, true, false, false, false}},
|
||||
{{false, false, false, false, true, false, true, false, false, true, false, false, true}},
|
||||
{{true, false, false, false, false, true, false, true, false, true, true, false, false}},
|
||||
{{true, true, true, true, false, false, true, false, false, true, true, false, false}},
|
||||
{{false, true, false, false, true, true, false, false, false, true, true, true, true}},
|
||||
{{false, false, false, false, false, false, false, false, true, true, false, false, false}},
|
||||
{{true, false, false, false, false, false, false, false, false, false, true, false, false}},
|
||||
{{false, false, true, true, false, true, false, true, false, false, true, true, false}},
|
||||
{{true, false, true, true, false, false, true, false, false, false, true, true, false}},
|
||||
{{false, true, true, true, false, false, true, true, true, true, false, false, false}},
|
||||
{{false, false, true, false, true, true, true, false, false, true, false, true, false}},
|
||||
{{true, true, false, false, true, true, true, true, true, false, true, true, false}},
|
||||
{{true, false, false, true, false, false, true, false, false, false, true, false, true}},
|
||||
{{false, true, true, true, false, false, false, true, false, false, false, false, false}},
|
||||
{{false, false, true, true, false, false, true, false, false, false, false, true, false}},
|
||||
{{false, false, true, false, false, false, true, false, false, true, true, true, false}}}};
|
||||
// clang-format on
|
||||
// A simple error check
|
||||
if ((prn_idx < 0) || (prn_idx > 63))
|
||||
return;
|
||||
|
||||
// Assign shifted G2 register based on prn number
|
||||
G2_register = G2_register_shifted[prn_idx];
|
||||
std::reverse(G2_register.begin(), G2_register.end());
|
||||
|
||||
// Generate G1 and G2 Register
|
||||
for (lcv = 0; lcv < _code_length; lcv++)
|
||||
{
|
||||
G1[lcv] = G1_register[0];
|
||||
G2[lcv] = G2_register[0];
|
||||
|
||||
//feedback1 = (test_G1_register[0]+test_G1_register[2]+test_G1_register[3]+test_G1_register[12]) & 0x1;
|
||||
feedback1 = (G1_register[0] + G1_register[9] + G1_register[10] + G1_register[12]) & 0x01;
|
||||
feedback2 = (G2_register[0] + G2_register[1] + G2_register[3] + G2_register[4] +
|
||||
G2_register[6] + G2_register[7] + G2_register[8] + G2_register[12]) &
|
||||
0x01;
|
||||
|
||||
for (lcv2 = 0; lcv2 < 12; lcv2++)
|
||||
{
|
||||
G1_register[lcv2] = G1_register[lcv2 + 1];
|
||||
G2_register[lcv2] = G2_register[lcv2 + 1];
|
||||
}
|
||||
|
||||
G1_register[12] = feedback1;
|
||||
G2_register[12] = feedback2;
|
||||
|
||||
// Reset G1 register if sequence found
|
||||
if (G1_register == G1_register_reset)
|
||||
{
|
||||
G1_register = {{true, true, true, true, true, true, true, true, true, true, true, true, true}};
|
||||
}
|
||||
}
|
||||
|
||||
delay = _code_length;
|
||||
delay += _chip_shift;
|
||||
delay %= _code_length;
|
||||
|
||||
/* Generate PRN from G1 and G2 Registers */
|
||||
for (lcv = 0; lcv < _code_length; lcv++)
|
||||
{
|
||||
aux = (G1[(lcv + _chip_shift) % _code_length] + G2[delay]) & 0x01;
|
||||
if (aux == true)
|
||||
{
|
||||
_dest[lcv] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
_dest[lcv] = -1;
|
||||
}
|
||||
|
||||
delay++;
|
||||
delay %= _code_length;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void beidou_b3i_code_gen_float(float* _dest, signed int _prn, unsigned int _chip_shift)
|
||||
{
|
||||
unsigned int _code_length = 10230;
|
||||
int b3i_code_int[10230];
|
||||
|
||||
beidou_b3i_code_gen_int(b3i_code_int, _prn, _chip_shift);
|
||||
|
||||
for (unsigned int ii = 0; ii < _code_length; ++ii)
|
||||
{
|
||||
_dest[ii] = static_cast<float>(b3i_code_int[ii]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void beidou_b3i_code_gen_complex(std::complex<float>* _dest, signed int _prn, unsigned int _chip_shift)
|
||||
{
|
||||
unsigned int _code_length = 10230;
|
||||
int b3i_code_int[10230];
|
||||
|
||||
beidou_b3i_code_gen_int(b3i_code_int, _prn, _chip_shift);
|
||||
|
||||
for (unsigned int ii = 0; ii < _code_length; ++ii)
|
||||
{
|
||||
_dest[ii] = std::complex<float>(static_cast<float>(b3i_code_int[ii]), 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void beidou_b3i_code_gen_complex_sampled(std::complex<float>* _dest, unsigned int _prn, int _fs, unsigned int _chip_shift)
|
||||
{
|
||||
// This function is based on the GNU software GPS for MATLAB in the Kay Borre book
|
||||
std::complex<float> _code[10230];
|
||||
signed int _samplesPerCode, _codeValueIndex;
|
||||
float _ts;
|
||||
float _tc;
|
||||
float aux;
|
||||
const signed int _codeFreqBasis = 10230000; //Hz
|
||||
const signed int _codeLength = 10230;
|
||||
|
||||
//--- Find number of samples per spreading code ----------------------------
|
||||
_samplesPerCode = static_cast<signed int>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength));
|
||||
|
||||
//--- Find time constants --------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(_codeFreqBasis); // C/A chip period in sec
|
||||
beidou_b3i_code_gen_complex(_code, _prn, _chip_shift); //generate C/A code 1 sample per chip
|
||||
|
||||
for (signed int i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
//=== Digitizing =======================================================
|
||||
|
||||
//--- Make index array to read C/A code values -------------------------
|
||||
// The length of the index array depends on the sampling frequency -
|
||||
// number of samples per millisecond (because one C/A code period is one
|
||||
// millisecond).
|
||||
|
||||
// _codeValueIndex = ceil((_ts * ((float)i + 1)) / _tc) - 1;
|
||||
aux = (_ts * (i + 1)) / _tc;
|
||||
_codeValueIndex = auxCeil(aux) - 1;
|
||||
|
||||
//--- Make the digitized version of the C/A code -----------------------
|
||||
// The "upsampled" code is made by selecting values form the CA code
|
||||
// chip array (caCode) for the time instances of each sample.
|
||||
if (i == _samplesPerCode - 1)
|
||||
{
|
||||
//--- Correct the last index (due to number rounding issues) -----------
|
||||
_dest[i] = _code[_codeLength - 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
_dest[i] = _code[_codeValueIndex]; //repeat the chip -> upsample
|
||||
}
|
||||
}
|
||||
}
|
57
src/algorithms/libs/beidou_b3i_signal_processing.h
Normal file
57
src/algorithms/libs/beidou_b3i_signal_processing.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*!
|
||||
* \file beidou_b3i_signal_processing.h
|
||||
* \brief This class implements various functions for BeiDou B3I signals
|
||||
* \author Damian Miralles, 2019. dmiralles2009@gmail.com
|
||||
*
|
||||
* Detailed description of the file here if needed.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2019 (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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_BEIDOU_B3I_SIGNAL_PROCESSING_H_
|
||||
#define GNSS_SDR_BEIDOU_B3I_SIGNAL_PROCESSING_H_
|
||||
|
||||
#include <complex>
|
||||
#include <iostream>
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
#include <algorithm>
|
||||
|
||||
//! Generates int BeiDou B3I code for the desired SV ID and code shift
|
||||
void beidou_b3i_code_gen_int(int* _dest, signed int _prn, unsigned int _chip_shift);
|
||||
|
||||
//! Generates float BeiDou B3I code for the desired SV ID and code shift
|
||||
void beidou_b3i_code_gen_float(float* _dest, signed int _prn, unsigned int _chip_shift);
|
||||
|
||||
//! Generates complex BeiDou B3I code for the desired SV ID and code shift, and sampled to specific sampling frequency
|
||||
void beidou_b3i_code_gen_complex(std::complex<float>* _dest, signed int _prn, unsigned int _chip_shift);
|
||||
|
||||
//! Generates N complex BeiDou B3I codes for the desired SV ID and code shift
|
||||
void beidou_b3i_code_gen_complex_sampled(std::complex<float>* _dest, unsigned int _prn, int _fs, unsigned int _chip_shift, unsigned int _ncodes);
|
||||
|
||||
//! Generates complex BeiDou B3I code for the desired SV ID and code shift
|
||||
void beidou_b3i_code_gen_complex_sampled(std::complex<float>* _dest, unsigned int _prn, int _fs, unsigned int _chip_shift);
|
||||
|
||||
#endif /* GNSS_SDR_BEIDOU_B3I_SIGNAL_PROCESSING_H_ */
|
@ -261,6 +261,7 @@ eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph)
|
||||
return rtklib_sat;
|
||||
}
|
||||
|
||||
|
||||
eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
|
||||
{
|
||||
eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
@ -389,6 +390,7 @@ eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris& gps_cnav_eph)
|
||||
return rtklib_sat;
|
||||
}
|
||||
|
||||
|
||||
alm_t alm_to_rtklib(const Gps_Almanac& gps_alm)
|
||||
{
|
||||
alm_t rtklib_alm;
|
||||
|
@ -27,6 +27,7 @@ set(TELEMETRY_DECODER_ADAPTER_SOURCES
|
||||
glonass_l1_ca_telemetry_decoder.cc
|
||||
glonass_l2_ca_telemetry_decoder.cc
|
||||
beidou_b1i_telemetry_decoder.cc
|
||||
beidou_b3i_telemetry_decoder.cc
|
||||
)
|
||||
|
||||
set(TELEMETRY_DECODER_ADAPTER_HEADERS
|
||||
@ -39,6 +40,7 @@ set(TELEMETRY_DECODER_ADAPTER_HEADERS
|
||||
glonass_l1_ca_telemetry_decoder.h
|
||||
glonass_l2_ca_telemetry_decoder.h
|
||||
beidou_b1i_telemetry_decoder.h
|
||||
beidou_b3i_telemetry_decoder.h
|
||||
)
|
||||
|
||||
list(SORT TELEMETRY_DECODER_ADAPTER_HEADERS)
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -74,9 +74,9 @@ public:
|
||||
|
||||
void set_satellite(const Gnss_Satellite& satellite) override;
|
||||
inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); }
|
||||
|
||||
inline void reset() override
|
||||
{
|
||||
telemetry_decoder_->reset();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,100 @@
|
||||
/*!
|
||||
* \file beidou_b3i_telemetry_decoder.cc
|
||||
* \brief Implementation of an adapter of a Beidou B3I NAV data decoder block
|
||||
* to a TelemetryDecoderInterface
|
||||
* \author Damian Miralles, 2019. dmiralles2009@gmail.com
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2019 (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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "beidou_b3i_telemetry_decoder.h"
|
||||
#include "configuration_interface.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
BeidouB3iTelemetryDecoder::BeidouB3iTelemetryDecoder(
|
||||
ConfigurationInterface *configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams)
|
||||
: role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
std::string default_dump_filename = "./navigation.dat";
|
||||
DLOG(INFO) << "role " << role;
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
dump_filename_ =
|
||||
configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
// make telemetry decoder object
|
||||
telemetry_decoder_ = beidou_b3i_make_telemetry_decoder_gs(satellite_, dump_);
|
||||
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||
channel_ = 0;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BeidouB3iTelemetryDecoder::~BeidouB3iTelemetryDecoder() = default;
|
||||
|
||||
|
||||
void BeidouB3iTelemetryDecoder::set_satellite(const Gnss_Satellite &satellite)
|
||||
{
|
||||
satellite_ = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
telemetry_decoder_->set_satellite(satellite_);
|
||||
DLOG(INFO) << "TELEMETRY DECODER: satellite set to " << satellite_;
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iTelemetryDecoder::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
};
|
||||
// Nothing to connect internally
|
||||
DLOG(INFO) << "nothing to connect internally";
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iTelemetryDecoder::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
};
|
||||
// Nothing to disconnect
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr BeidouB3iTelemetryDecoder::get_left_block()
|
||||
{
|
||||
return telemetry_decoder_;
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr BeidouB3iTelemetryDecoder::get_right_block()
|
||||
{
|
||||
return telemetry_decoder_;
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
/*!
|
||||
* \file beidou_b3i_telemetry_decoder.h
|
||||
* \brief Interface of an adapter of a Beidou B3I NAV data decoder block
|
||||
* to a TelemetryDecoderInterface
|
||||
* \author Damian Miralles, 2019. dmiralles2009@gmail.com
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2019 (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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_BEIDOU_B3I_TELEMETRY_DECODER_H_
|
||||
#define GNSS_SDR_BEIDOU_B3I_TELEMETRY_DECODER_H_
|
||||
|
||||
#include "beidou_b3i_telemetry_decoder_gs.h"
|
||||
#include "gnss_satellite.h" // for Gnss_Satellite
|
||||
#include "telemetry_decoder_interface.h"
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <cstddef> // for size_t
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
/*!
|
||||
* \brief This class implements a NAV data decoder for BEIDOU B1I
|
||||
*/
|
||||
class BeidouB3iTelemetryDecoder : public TelemetryDecoderInterface
|
||||
{
|
||||
public:
|
||||
BeidouB3iTelemetryDecoder(ConfigurationInterface *configuration,
|
||||
const std::string& role, unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
virtual ~BeidouB3iTelemetryDecoder();
|
||||
|
||||
inline std::string role() override { return role_; }
|
||||
|
||||
//! Returns "BEIDOU_B3I_Telemetry_Decoder"
|
||||
inline std::string implementation() override
|
||||
{
|
||||
return "BEIDOU_B3I_Telemetry_Decoder";
|
||||
}
|
||||
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
void disconnect(gr::top_block_sptr top_block) override;
|
||||
gr::basic_block_sptr get_left_block() override;
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
|
||||
void set_satellite(const Gnss_Satellite &satellite) override;
|
||||
inline void set_channel(int channel) override
|
||||
{
|
||||
telemetry_decoder_->set_channel(channel);
|
||||
}
|
||||
|
||||
inline void reset() override { return; }
|
||||
|
||||
inline size_t item_size() override { return 0; }
|
||||
|
||||
private:
|
||||
beidou_b3i_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||
Gnss_Satellite satellite_;
|
||||
int channel_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
};
|
||||
|
||||
#endif
|
@ -80,6 +80,7 @@ public:
|
||||
inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); }
|
||||
inline void reset() override
|
||||
{
|
||||
telemetry_decoder_->reset();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); }
|
||||
inline void reset() override
|
||||
{
|
||||
telemetry_decoder_->reset();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -71,8 +71,9 @@ public:
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
void set_satellite(const Gnss_Satellite& satellite) override;
|
||||
void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); }
|
||||
void reset() override
|
||||
inline void reset() override
|
||||
{
|
||||
telemetry_decoder_->reset();
|
||||
return;
|
||||
}
|
||||
size_t item_size() override
|
||||
|
@ -33,8 +33,8 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_H_
|
||||
#define GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_H_
|
||||
|
||||
#include "gnss_satellite.h" // for Gnss_Satellite
|
||||
#include "glonass_l2_ca_telemetry_decoder_gs.h"
|
||||
#include "gnss_satellite.h" // for Gnss_Satellite
|
||||
#include "telemetry_decoder_interface.h"
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <cstddef> // for size_t
|
||||
@ -70,8 +70,9 @@ public:
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
void set_satellite(const Gnss_Satellite& satellite) override;
|
||||
void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); }
|
||||
void reset() override
|
||||
inline void reset() override
|
||||
{
|
||||
telemetry_decoder_->reset();
|
||||
return;
|
||||
}
|
||||
size_t item_size() override
|
||||
|
@ -73,9 +73,9 @@ public:
|
||||
|
||||
void set_satellite(const Gnss_Satellite& satellite) override;
|
||||
inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); }
|
||||
|
||||
inline void reset() override
|
||||
{
|
||||
telemetry_decoder_->reset();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -73,9 +73,9 @@ public:
|
||||
|
||||
void set_satellite(const Gnss_Satellite& satellite) override;
|
||||
inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); }
|
||||
|
||||
inline void reset() override
|
||||
{
|
||||
telemetry_decoder_->reset();
|
||||
return;
|
||||
}
|
||||
inline size_t item_size() override
|
||||
|
@ -75,9 +75,9 @@ public:
|
||||
|
||||
void set_satellite(const Gnss_Satellite& satellite) override;
|
||||
inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); }
|
||||
|
||||
inline void reset() override
|
||||
{
|
||||
telemetry_decoder_->reset();
|
||||
return;
|
||||
}
|
||||
inline size_t item_size() override
|
||||
|
@ -77,9 +77,9 @@ public:
|
||||
|
||||
void set_satellite(const Gnss_Satellite& satellite) override;
|
||||
inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); }
|
||||
|
||||
inline void reset() override
|
||||
{
|
||||
telemetry_decoder_->reset();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@ set(TELEMETRY_DECODER_GR_BLOCKS_SOURCES
|
||||
glonass_l2_ca_telemetry_decoder_gs.cc
|
||||
galileo_telemetry_decoder_gs.cc
|
||||
beidou_b1i_telemetry_decoder_gs.cc
|
||||
beidou_b3i_telemetry_decoder_gs.cc
|
||||
)
|
||||
|
||||
set(TELEMETRY_DECODER_GR_BLOCKS_HEADERS
|
||||
@ -36,6 +37,7 @@ set(TELEMETRY_DECODER_GR_BLOCKS_HEADERS
|
||||
glonass_l2_ca_telemetry_decoder_gs.h
|
||||
galileo_telemetry_decoder_gs.h
|
||||
beidou_b1i_telemetry_decoder_gs.h
|
||||
beidou_b3i_telemetry_decoder_gs.h
|
||||
)
|
||||
|
||||
list(SORT TELEMETRY_DECODER_GR_BLOCKS_HEADERS)
|
||||
|
@ -65,10 +65,12 @@ beidou_b1i_telemetry_decoder_gs::beidou_b1i_telemetry_decoder_gs(
|
||||
{
|
||||
// Ephemeris data port out
|
||||
this->message_port_register_out(pmt::mp("telemetry"));
|
||||
// Control messages to tracking block
|
||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||
// initialize internal vars
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
LOG(INFO) << "Initializing BeiDou B1i Telemetry Decoding for satellite " << this->d_satellite;
|
||||
LOG(INFO) << "Initializing BeiDou B1I Telemetry Decoding for satellite " << this->d_satellite;
|
||||
|
||||
d_samples_per_symbol = (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS) / BEIDOU_D1NAV_SYMBOL_RATE_SPS;
|
||||
d_symbols_per_preamble = BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS;
|
||||
@ -119,8 +121,8 @@ beidou_b1i_telemetry_decoder_gs::beidou_b1i_telemetry_decoder_gs(
|
||||
|
||||
d_subframe_symbols = static_cast<double *>(volk_gnsssdr_malloc(BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * sizeof(double), volk_gnsssdr_get_alignment()));
|
||||
d_required_symbols = BEIDOU_DNAV_SUBFRAME_SYMBOLS * d_samples_per_symbol + d_samples_per_preamble;
|
||||
|
||||
d_symbol_history.set_capacity(d_required_symbols + 1);
|
||||
|
||||
// Generic settings
|
||||
d_sample_counter = 0;
|
||||
d_stat = 0;
|
||||
@ -310,6 +312,7 @@ void beidou_b1i_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satell
|
||||
// Update satellite information for DNAV decoder
|
||||
sat_prn = d_satellite.get_PRN();
|
||||
d_nav.i_satellite_PRN = sat_prn;
|
||||
d_nav.i_signal_type = 1; //!< BDS: data source (0:unknown,1:B1I,2:B1Q,3:B2I,4:B2Q,5:B3I,6:B3Q)
|
||||
|
||||
// Update tel dec parameters for D2 NAV Messages
|
||||
if (sat_prn > 0 and sat_prn < 6)
|
||||
@ -350,6 +353,7 @@ void beidou_b1i_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satell
|
||||
|
||||
d_subframe_symbols = static_cast<double *>(volk_gnsssdr_malloc(BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * sizeof(double), volk_gnsssdr_get_alignment()));
|
||||
d_required_symbols = BEIDOU_DNAV_SUBFRAME_SYMBOLS * d_samples_per_symbol + d_samples_per_preamble;
|
||||
d_symbol_history.set_capacity(d_required_symbols + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -569,12 +573,14 @@ int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute_
|
||||
{
|
||||
double tmp_double;
|
||||
uint64_t tmp_ulong_int;
|
||||
tmp_double = d_TOW_at_current_symbol_ms;
|
||||
tmp_double = static_cast<double>(d_TOW_at_current_symbol_ms);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = current_symbol.Tracking_sample_counter;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
|
||||
tmp_double = 0;
|
||||
tmp_double = d_nav.d_SOW;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = static_cast<uint64_t>(d_required_symbols);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
|
||||
}
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
* \brief Implementation of a BEIDOU BI1 DNAV data decoder block
|
||||
* \details Code added as part of GSoC 2018 program.
|
||||
* \author Damian Miralles, 2018. dmiralles2009(at)gmail.com
|
||||
* \author Sergi Segura, 2018. sergi.segura.munoz(at)gmail.es
|
||||
* \author Sergi Segura, 2018. sergi.segura.munoz(at)gmail.es
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
@ -39,7 +39,7 @@
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include <boost/shared_ptr.hpp> // for boost::shared_ptr
|
||||
#include <gnuradio/block.h> // for block
|
||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
@ -53,7 +53,7 @@ beidou_b1i_telemetry_decoder_gs_sptr beidou_b1i_make_telemetry_decoder_gs(const
|
||||
|
||||
|
||||
/*!
|
||||
* \brief This class implements a block that decodes the GNAV data defined in BEIDOU ICD v5.1
|
||||
* \brief This class implements a block that decodes the BeiDou DNAV data.
|
||||
* \note Code added as part of GSoC 2018 program
|
||||
*/
|
||||
class beidou_b1i_telemetry_decoder_gs : public gr::block
|
||||
@ -62,7 +62,10 @@ public:
|
||||
~beidou_b1i_telemetry_decoder_gs(); //!< Class destructor
|
||||
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
|
||||
void set_channel(int channel); //!< Set receiver's channel
|
||||
|
||||
inline void reset()
|
||||
{
|
||||
return;
|
||||
}
|
||||
/*!
|
||||
* \brief This is where all signal processing takes place
|
||||
*/
|
||||
|
@ -0,0 +1,657 @@
|
||||
/*!
|
||||
* \file beidou_b3i_telemetry_decoder_gs.cc
|
||||
* \brief Implementation of an adapter of a BEIDOU B31 DNAV data decoder block
|
||||
* \author Damian Miralles, 2019. dmiralles2009(at)gmail.com
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2019 (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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "beidou_b3i_telemetry_decoder_gs.h"
|
||||
#include "Beidou_B3I.h"
|
||||
#include "Beidou_DNAV.h"
|
||||
#include "beidou_dnav_almanac.h"
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "beidou_dnav_iono.h"
|
||||
#include "beidou_dnav_utc_model.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <pmt/pmt.h> // for make_any
|
||||
#include <pmt/pmt_sugar.h> // for mp
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cstdlib> // for abs
|
||||
#include <exception> // for exception
|
||||
#include <iostream> // for cout
|
||||
#include <memory> // for shared_ptr, make_shared
|
||||
|
||||
#define CRC_ERROR_LIMIT 8
|
||||
|
||||
beidou_b3i_telemetry_decoder_gs_sptr
|
||||
beidou_b3i_make_telemetry_decoder_gs(const Gnss_Satellite &satellite,
|
||||
bool dump)
|
||||
{
|
||||
return beidou_b3i_telemetry_decoder_gs_sptr(
|
||||
new beidou_b3i_telemetry_decoder_gs(satellite, dump));
|
||||
}
|
||||
|
||||
beidou_b3i_telemetry_decoder_gs::beidou_b3i_telemetry_decoder_gs(
|
||||
const Gnss_Satellite &satellite, bool dump)
|
||||
: gr::block("beidou_b3i_telemetry_decoder_gs",
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
// Ephemeris data port out
|
||||
this->message_port_register_out(pmt::mp("telemetry"));
|
||||
// initialize internal vars
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
LOG(INFO) << "Initializing BeiDou B3I Telemetry Decoding for satellite "
|
||||
<< this->d_satellite;
|
||||
|
||||
d_samples_per_symbol =
|
||||
(BEIDOU_B3I_CODE_RATE_HZ / BEIDOU_B3I_CODE_LENGTH_CHIPS) /
|
||||
BEIDOU_D1NAV_SYMBOL_RATE_SPS;
|
||||
d_symbols_per_preamble = BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS;
|
||||
d_samples_per_preamble =
|
||||
BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS * d_samples_per_symbol;
|
||||
d_secondary_code_symbols = static_cast<int32_t *>(
|
||||
volk_gnsssdr_malloc(BEIDOU_B3I_SECONDARY_CODE_LENGTH * sizeof(int32_t),
|
||||
volk_gnsssdr_get_alignment()));
|
||||
d_preamble_samples = static_cast<int32_t *>(volk_gnsssdr_malloc(
|
||||
d_samples_per_preamble * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
d_preamble_period_samples =
|
||||
BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * d_samples_per_symbol;
|
||||
|
||||
// Setting samples of secondary code
|
||||
for (int32_t i = 0; i < BEIDOU_B3I_SECONDARY_CODE_LENGTH; i++)
|
||||
{
|
||||
if (BEIDOU_B3I_SECONDARY_CODE.at(i) == '1')
|
||||
{
|
||||
d_secondary_code_symbols[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_secondary_code_symbols[i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Setting samples of preamble code
|
||||
int32_t n = 0;
|
||||
for (int32_t i = 0; i < d_symbols_per_preamble; i++)
|
||||
{
|
||||
int32_t m = 0;
|
||||
if (BEIDOU_DNAV_PREAMBLE.at(i) == '1')
|
||||
{
|
||||
for (uint32_t j = 0; j < d_samples_per_symbol; j++)
|
||||
{
|
||||
d_preamble_samples[n] = d_secondary_code_symbols[m];
|
||||
n++;
|
||||
m++;
|
||||
m = m % BEIDOU_B3I_SECONDARY_CODE_LENGTH;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (uint32_t j = 0; j < d_samples_per_symbol; j++)
|
||||
{
|
||||
d_preamble_samples[n] = -d_secondary_code_symbols[m];
|
||||
n++;
|
||||
m++;
|
||||
m = m % BEIDOU_B3I_SECONDARY_CODE_LENGTH;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
d_subframe_symbols = static_cast<double *>(
|
||||
volk_gnsssdr_malloc(BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * sizeof(double),
|
||||
volk_gnsssdr_get_alignment()));
|
||||
d_required_symbols = BEIDOU_DNAV_SUBFRAME_SYMBOLS * d_samples_per_symbol +
|
||||
d_samples_per_preamble;
|
||||
d_symbol_history.set_capacity(d_required_symbols + 1);
|
||||
|
||||
// Generic settings
|
||||
d_sample_counter = 0;
|
||||
d_stat = 0;
|
||||
d_preamble_index = 0;
|
||||
d_flag_frame_sync = false;
|
||||
d_TOW_at_current_symbol_ms = 0;
|
||||
Flag_valid_word = false;
|
||||
d_CRC_error_counter = 0;
|
||||
d_flag_preamble = false;
|
||||
d_channel = 0;
|
||||
flag_SOW_set = false;
|
||||
}
|
||||
|
||||
|
||||
beidou_b3i_telemetry_decoder_gs::~beidou_b3i_telemetry_decoder_gs()
|
||||
{
|
||||
volk_gnsssdr_free(d_preamble_samples);
|
||||
volk_gnsssdr_free(d_secondary_code_symbols);
|
||||
volk_gnsssdr_free(d_subframe_symbols);
|
||||
|
||||
if (d_dump_file.is_open() == true)
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor closing the dump file "
|
||||
<< ex.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void beidou_b3i_telemetry_decoder_gs::decode_bch15_11_01(const int32_t *bits,
|
||||
int32_t *decbits)
|
||||
{
|
||||
int32_t bit, err, reg[4] = {1, 1, 1, 1};
|
||||
int32_t errind[15] = {14, 13, 10, 12, 6, 9, 4, 11, 0, 5, 7, 8, 1, 3, 2};
|
||||
|
||||
for (uint32_t i = 0; i < 15; i++)
|
||||
{
|
||||
decbits[i] = bits[i];
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < 15; i++)
|
||||
{
|
||||
bit = reg[3];
|
||||
reg[3] = reg[2];
|
||||
reg[2] = reg[1];
|
||||
reg[1] = reg[0];
|
||||
reg[0] = bits[i] * bit;
|
||||
reg[1] *= bit;
|
||||
}
|
||||
|
||||
err = errind[reg[0] + reg[1] * 2 + reg[2] * 4 + reg[3] * 8];
|
||||
|
||||
if (err > 0)
|
||||
{
|
||||
decbits[err - 1] *= -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void beidou_b3i_telemetry_decoder_gs::decode_word(
|
||||
int32_t word_counter, const double *enc_word_symbols,
|
||||
int32_t *dec_word_symbols)
|
||||
{
|
||||
int32_t bitsbch[30], first_branch[15], second_branch[15];
|
||||
|
||||
if (word_counter == 1)
|
||||
{
|
||||
for (uint32_t j = 0; j < 30; j++)
|
||||
{
|
||||
dec_word_symbols[j] =
|
||||
static_cast<int32_t>(enc_word_symbols[j] > 0) ? (1) : (-1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (uint32_t r = 0; r < 2; r++)
|
||||
{
|
||||
for (uint32_t c = 0; c < 15; c++)
|
||||
{
|
||||
bitsbch[r * 15 + c] =
|
||||
static_cast<int32_t>(enc_word_symbols[c * 2 + r] > 0) ? (1) : (-1);
|
||||
}
|
||||
}
|
||||
|
||||
decode_bch15_11_01(&bitsbch[0], first_branch);
|
||||
decode_bch15_11_01(&bitsbch[15], second_branch);
|
||||
|
||||
for (uint32_t j = 0; j < 11; j++)
|
||||
{
|
||||
dec_word_symbols[j] = first_branch[j];
|
||||
dec_word_symbols[j + 11] = second_branch[j];
|
||||
}
|
||||
|
||||
for (uint32_t j = 0; j < 4; j++)
|
||||
{
|
||||
dec_word_symbols[j + 22] = first_branch[11 + j];
|
||||
dec_word_symbols[j + 26] = second_branch[11 + j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void beidou_b3i_telemetry_decoder_gs::decode_subframe(double *frame_symbols)
|
||||
{
|
||||
// 1. Transform from symbols to bits
|
||||
std::string data_bits;
|
||||
int32_t dec_word_bits[30];
|
||||
|
||||
// Decode each word in subframe
|
||||
for (uint32_t ii = 0; ii < BEIDOU_DNAV_WORDS_SUBFRAME; ii++)
|
||||
{
|
||||
// decode the word
|
||||
decode_word((ii + 1), &frame_symbols[ii * 30], dec_word_bits);
|
||||
|
||||
// Save word to string format
|
||||
for (uint32_t jj = 0; jj < (BEIDOU_DNAV_WORD_LENGTH_BITS); jj++)
|
||||
{
|
||||
data_bits.push_back((dec_word_bits[jj] > 0) ? ('1') : ('0'));
|
||||
}
|
||||
}
|
||||
|
||||
if (d_satellite.get_PRN() > 0 and d_satellite.get_PRN() < 6)
|
||||
{
|
||||
d_nav.d2_subframe_decoder(data_bits);
|
||||
}
|
||||
else
|
||||
{
|
||||
d_nav.d1_subframe_decoder(data_bits);
|
||||
}
|
||||
|
||||
// 3. Check operation executed correctly
|
||||
if (d_nav.flag_crc_test == true)
|
||||
{
|
||||
LOG(INFO) << "BeiDou DNAV CRC correct in channel " << d_channel
|
||||
<< " from satellite " << d_satellite;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(INFO) << "BeiDou DNAV CRC error in channel " << d_channel
|
||||
<< " from satellite " << d_satellite;
|
||||
}
|
||||
// 4. Push the new navigation data to the queues
|
||||
if (d_nav.have_new_ephemeris() == true)
|
||||
{
|
||||
// get object for this SV (mandatory)
|
||||
std::shared_ptr<Beidou_Dnav_Ephemeris> tmp_obj =
|
||||
std::make_shared<Beidou_Dnav_Ephemeris>(d_nav.get_ephemeris());
|
||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||
LOG(INFO) << "BEIDOU DNAV Ephemeris have been received in channel"
|
||||
<< d_channel << " from satellite " << d_satellite;
|
||||
std::cout << "New BEIDOU B3I DNAV message received in channel " << d_channel
|
||||
<< ": ephemeris from satellite " << d_satellite << std::endl;
|
||||
}
|
||||
if (d_nav.have_new_utc_model() == true)
|
||||
{
|
||||
// get object for this SV (mandatory)
|
||||
std::shared_ptr<Beidou_Dnav_Utc_Model> tmp_obj =
|
||||
std::make_shared<Beidou_Dnav_Utc_Model>(d_nav.get_utc_model());
|
||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||
LOG(INFO) << "BEIDOU DNAV UTC Model have been received in channel"
|
||||
<< d_channel << " from satellite " << d_satellite;
|
||||
std::cout << "New BEIDOU B3I DNAV utc model message received in channel "
|
||||
<< d_channel << ": UTC model parameters from satellite "
|
||||
<< d_satellite << std::endl;
|
||||
}
|
||||
if (d_nav.have_new_iono() == true)
|
||||
{
|
||||
// get object for this SV (mandatory)
|
||||
std::shared_ptr<Beidou_Dnav_Iono> tmp_obj =
|
||||
std::make_shared<Beidou_Dnav_Iono>(d_nav.get_iono());
|
||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||
LOG(INFO) << "BEIDOU DNAV Iono have been received in channel" << d_channel
|
||||
<< " from satellite " << d_satellite;
|
||||
std::cout << "New BEIDOU B3I DNAV Iono message received in channel "
|
||||
<< d_channel << ": Iono model parameters from satellite "
|
||||
<< d_satellite << std::endl;
|
||||
}
|
||||
if (d_nav.have_new_almanac() == true)
|
||||
{
|
||||
// unsigned int slot_nbr = d_nav.i_alm_satellite_PRN;
|
||||
// std::shared_ptr<Beidou_Dnav_Almanac> tmp_obj =
|
||||
// std::make_shared<Beidou_Dnav_Almanac>(d_nav.get_almanac(slot_nbr));
|
||||
// this->message_port_pub(pmt::mp("telemetry"),
|
||||
// pmt::make_any(tmp_obj));
|
||||
LOG(INFO) << "BEIDOU DNAV Almanac have been received in channel"
|
||||
<< d_channel << " from satellite " << d_satellite << std::endl;
|
||||
std::cout << "New BEIDOU B3I DNAV almanac received in channel " << d_channel
|
||||
<< " from satellite " << d_satellite << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void beidou_b3i_telemetry_decoder_gs::set_satellite(
|
||||
const Gnss_Satellite &satellite)
|
||||
{
|
||||
uint32_t sat_prn = 0;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
DLOG(INFO) << "Setting decoder Finite State Machine to satellite "
|
||||
<< d_satellite;
|
||||
DLOG(INFO) << "Navigation Satellite set to " << d_satellite;
|
||||
|
||||
// Update satellite information for DNAV decoder
|
||||
sat_prn = d_satellite.get_PRN();
|
||||
d_nav.i_satellite_PRN = sat_prn;
|
||||
d_nav.i_signal_type = 5; // BDS: data source (0:unknown,1:B1I,2:B1Q,3:B2I,4:B2Q,5:B3I,6:B3Q)
|
||||
|
||||
// Update tel dec parameters for D2 NAV Messages
|
||||
if (sat_prn > 0 and sat_prn < 6)
|
||||
{
|
||||
// Clear values from previous declaration
|
||||
volk_gnsssdr_free(d_preamble_samples);
|
||||
volk_gnsssdr_free(d_secondary_code_symbols);
|
||||
volk_gnsssdr_free(d_subframe_symbols);
|
||||
|
||||
d_samples_per_symbol =
|
||||
(BEIDOU_B3I_CODE_RATE_HZ / BEIDOU_B3I_CODE_LENGTH_CHIPS) /
|
||||
BEIDOU_D2NAV_SYMBOL_RATE_SPS;
|
||||
d_symbols_per_preamble = BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS;
|
||||
d_samples_per_preamble =
|
||||
BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS * d_samples_per_symbol;
|
||||
d_secondary_code_symbols = nullptr;
|
||||
d_preamble_samples = static_cast<int32_t *>(
|
||||
volk_gnsssdr_malloc(d_samples_per_preamble * sizeof(int32_t),
|
||||
volk_gnsssdr_get_alignment()));
|
||||
d_preamble_period_samples =
|
||||
BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * d_samples_per_symbol;
|
||||
|
||||
// Setting samples of preamble code
|
||||
int32_t n = 0;
|
||||
for (int32_t i = 0; i < d_symbols_per_preamble; i++)
|
||||
{
|
||||
if (BEIDOU_DNAV_PREAMBLE.at(i) == '1')
|
||||
{
|
||||
for (uint32_t j = 0; j < d_samples_per_symbol; j++)
|
||||
{
|
||||
d_preamble_samples[n] = 1;
|
||||
n++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (uint32_t j = 0; j < d_samples_per_symbol; j++)
|
||||
{
|
||||
d_preamble_samples[n] = -1;
|
||||
n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
d_subframe_symbols = static_cast<double *>(volk_gnsssdr_malloc(
|
||||
BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS * sizeof(double),
|
||||
volk_gnsssdr_get_alignment()));
|
||||
d_required_symbols = BEIDOU_DNAV_SUBFRAME_SYMBOLS * d_samples_per_symbol +
|
||||
d_samples_per_preamble;
|
||||
d_symbol_history.set_capacity(d_required_symbols + 1);
|
||||
}
|
||||
}
|
||||
|
||||
void beidou_b3i_telemetry_decoder_gs::set_channel(int32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
LOG(INFO) << "Navigation channel set to " << channel;
|
||||
// ############# ENABLE DATA FILE LOG #################
|
||||
if (d_dump == true)
|
||||
{
|
||||
if (d_dump_file.is_open() == false)
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_filename = "telemetry";
|
||||
d_dump_filename.append(std::to_string(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) << "Telemetry decoder 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 Beidou TLM dump file. "
|
||||
<< e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int beidou_b3i_telemetry_decoder_gs::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)
|
||||
{
|
||||
int32_t corr_value = 0;
|
||||
int32_t preamble_diff = 0;
|
||||
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
|
||||
const auto **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
|
||||
Gnss_Synchro current_symbol; // structure to save the synchronization
|
||||
// information and send the output object to the
|
||||
// next block
|
||||
// 1. Copy the current tracking output
|
||||
current_symbol = in[0][0];
|
||||
d_symbol_history.push_back(current_symbol.Prompt_I); // add new symbol to the symbol queue
|
||||
d_sample_counter++; // count for the processed samples
|
||||
consume_each(1);
|
||||
|
||||
d_flag_preamble = false;
|
||||
|
||||
if (d_symbol_history.size() > d_required_symbols)
|
||||
{
|
||||
//******* preamble correlation ********
|
||||
for (int32_t i = 0; i < d_samples_per_preamble; i++)
|
||||
{
|
||||
if (d_symbol_history[i] < 0) // symbols clipping
|
||||
{
|
||||
corr_value -= d_preamble_samples[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
corr_value += d_preamble_samples[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//******* frame sync ******************
|
||||
if (d_stat == 0) // no preamble information
|
||||
{
|
||||
if (abs(corr_value) >= d_samples_per_preamble)
|
||||
{
|
||||
// Record the preamble sample stamp
|
||||
d_preamble_index = d_sample_counter;
|
||||
LOG(INFO) << "Preamble detection for BEIDOU B3I SAT "
|
||||
<< this->d_satellite;
|
||||
// Enter into frame pre-detection status
|
||||
d_stat = 1;
|
||||
}
|
||||
}
|
||||
else if (d_stat == 1) // possible preamble lock
|
||||
{
|
||||
if (abs(corr_value) >= d_samples_per_preamble)
|
||||
{
|
||||
// check preamble separation
|
||||
preamble_diff = static_cast<int32_t>(d_sample_counter - d_preamble_index);
|
||||
if (abs(preamble_diff - d_preamble_period_samples) == 0)
|
||||
{
|
||||
// try to decode frame
|
||||
LOG(INFO) << "Starting BeiDou DNAV frame decoding for BeiDou B3I SAT "
|
||||
<< this->d_satellite;
|
||||
d_preamble_index = d_sample_counter; // record the preamble sample stamp
|
||||
d_stat = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (preamble_diff > d_preamble_period_samples)
|
||||
{
|
||||
d_stat = 0; // start again
|
||||
}
|
||||
DLOG(INFO) << "Failed BeiDou DNAV frame decoding for BeiDou B3I SAT "
|
||||
<< this->d_satellite;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (d_stat == 2) // preamble acquired
|
||||
{
|
||||
if (d_sample_counter ==
|
||||
d_preamble_index + static_cast<uint64_t>(d_preamble_period_samples))
|
||||
{
|
||||
//******* SAMPLES TO SYMBOLS *******
|
||||
if (corr_value > 0) // normal PLL lock
|
||||
{
|
||||
int32_t k = 0;
|
||||
for (uint32_t i = 0; i < BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS; i++)
|
||||
{
|
||||
d_subframe_symbols[i] = 0;
|
||||
// integrate samples into symbols
|
||||
for (uint32_t m = 0; m < d_samples_per_symbol; m++)
|
||||
{
|
||||
if (d_satellite.get_PRN() > 0 and d_satellite.get_PRN() < 6)
|
||||
{
|
||||
// because last symbol of the preamble is just received now!
|
||||
d_subframe_symbols[i] +=
|
||||
d_symbol_history.at(i * d_samples_per_symbol + m);
|
||||
}
|
||||
else
|
||||
{
|
||||
// because last symbol of the preamble is just received now!
|
||||
d_subframe_symbols[i] +=
|
||||
static_cast<float>(d_secondary_code_symbols[k]) *
|
||||
d_symbol_history.at(i * d_samples_per_symbol + m);
|
||||
k++;
|
||||
k = k % BEIDOU_B3I_SECONDARY_CODE_LENGTH;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else // 180 deg. inverted carrier phase PLL lock
|
||||
{
|
||||
int32_t k = 0;
|
||||
for (uint32_t i = 0; i < BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS; i++)
|
||||
{
|
||||
d_subframe_symbols[i] = 0;
|
||||
// integrate samples into symbols
|
||||
for (uint32_t m = 0; m < d_samples_per_symbol; m++)
|
||||
{
|
||||
if (d_satellite.get_PRN() > 0 and d_satellite.get_PRN() < 6)
|
||||
{
|
||||
// because last symbol of the preamble is just received now!
|
||||
d_subframe_symbols[i] -=
|
||||
d_symbol_history.at(i * d_samples_per_symbol + m);
|
||||
}
|
||||
else
|
||||
{
|
||||
// because last symbol of the preamble is just received now!
|
||||
d_subframe_symbols[i] -=
|
||||
static_cast<float>(d_secondary_code_symbols[k]) *
|
||||
d_symbol_history.at(i * d_samples_per_symbol + m);
|
||||
k++;
|
||||
k = k % BEIDOU_B3I_SECONDARY_CODE_LENGTH;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// call the decoder
|
||||
decode_subframe(d_subframe_symbols);
|
||||
|
||||
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)
|
||||
if (!d_flag_frame_sync)
|
||||
{
|
||||
d_flag_frame_sync = true;
|
||||
DLOG(INFO) << "BeiDou DNAV frame sync found for SAT "
|
||||
<< this->d_satellite;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
d_CRC_error_counter++;
|
||||
d_preamble_index = d_sample_counter; // record the preamble sample stamp
|
||||
if (d_CRC_error_counter > CRC_ERROR_LIMIT)
|
||||
{
|
||||
LOG(INFO) << "BeiDou DNAV frame sync lost for SAT "
|
||||
<< this->d_satellite;
|
||||
d_flag_frame_sync = false;
|
||||
d_stat = 0;
|
||||
flag_SOW_set = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UPDATE GNSS SYNCHRO DATA
|
||||
// 2. Add the telemetry decoder information
|
||||
if (this->d_flag_preamble == true and d_nav.flag_new_SOW_available == true)
|
||||
// update TOW at the preamble instant
|
||||
{
|
||||
// Reporting sow as gps time of week
|
||||
d_TOW_at_Preamble_ms = static_cast<uint32_t>((d_nav.d_SOW + 14) * 1000.0);
|
||||
d_TOW_at_current_symbol_ms =
|
||||
d_TOW_at_Preamble_ms + static_cast<uint32_t>((d_required_symbols + 1) *
|
||||
BEIDOU_B3I_CODE_PERIOD_MS);
|
||||
flag_SOW_set = true;
|
||||
d_nav.flag_new_SOW_available = false;
|
||||
}
|
||||
else // if there is not a new preamble, we define the TOW of the current
|
||||
// symbol
|
||||
{
|
||||
d_TOW_at_current_symbol_ms +=
|
||||
static_cast<uint32_t>(BEIDOU_B3I_CODE_PERIOD_MS);
|
||||
}
|
||||
|
||||
if (d_flag_frame_sync == true and flag_SOW_set == true)
|
||||
{
|
||||
current_symbol.Flag_valid_word = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
current_symbol.Flag_valid_word = false;
|
||||
}
|
||||
|
||||
current_symbol.PRN = this->d_satellite.get_PRN();
|
||||
current_symbol.TOW_at_current_symbol_ms = d_TOW_at_current_symbol_ms;
|
||||
|
||||
if (d_dump == true)
|
||||
{
|
||||
// MULTIPLEXED FILE RECORDING - Record results to file
|
||||
try
|
||||
{
|
||||
double tmp_double;
|
||||
uint64_t tmp_ulong_int;
|
||||
tmp_double = static_cast<double>(d_TOW_at_current_symbol_ms);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = current_symbol.Tracking_sample_counter;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
|
||||
tmp_double = d_nav.d_SOW;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = static_cast<uint64_t>(d_required_symbols);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(uint64_t));
|
||||
}
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "Exception writing observables dump file " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
// 3. Make the output (copy the object contents to the GNURadio reserved memory)
|
||||
*out[0] = current_symbol;
|
||||
|
||||
return 1;
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
/*!
|
||||
* \file beidou_b3i_telemetry_decoder_gs.h
|
||||
* \brief Implementation of a BEIDOU B3I DNAV data decoder block
|
||||
* \author Damian Miralles, 2019. dmiralles2009(at)gmail.com
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2019 (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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_BEIDOU_B3I_TELEMETRY_DECODER_GS_H
|
||||
#define GNSS_SDR_BEIDOU_B3I_TELEMETRY_DECODER_GS_H
|
||||
|
||||
#include "beidou_dnav_navigation_message.h"
|
||||
#include "gnss_satellite.h"
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include <boost/shared_ptr.hpp> // for boost::shared_ptr
|
||||
#include <gnuradio/block.h> // for block
|
||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
class beidou_b3i_telemetry_decoder_gs;
|
||||
|
||||
using beidou_b3i_telemetry_decoder_gs_sptr =
|
||||
boost::shared_ptr<beidou_b3i_telemetry_decoder_gs>;
|
||||
|
||||
beidou_b3i_telemetry_decoder_gs_sptr
|
||||
beidou_b3i_make_telemetry_decoder_gs(const Gnss_Satellite &satellite,
|
||||
bool dump);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a block that decodes the BeiDou DNAV data.
|
||||
*
|
||||
*/
|
||||
class beidou_b3i_telemetry_decoder_gs : public gr::block
|
||||
{
|
||||
public:
|
||||
~beidou_b3i_telemetry_decoder_gs(); //!< Class destructor
|
||||
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
|
||||
void set_channel(int channel); //!< Set receiver's channel
|
||||
|
||||
/*!
|
||||
* \brief This is where all signal processing takes place
|
||||
*/
|
||||
int general_work(int noutput_items, gr_vector_int &ninput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
friend beidou_b3i_telemetry_decoder_gs_sptr
|
||||
beidou_b3i_make_telemetry_decoder_gs(const Gnss_Satellite &satellite,
|
||||
bool dump);
|
||||
beidou_b3i_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
|
||||
|
||||
void decode_subframe(double *symbols);
|
||||
void decode_word(int32_t word_counter, const double *enc_word_symbols,
|
||||
int32_t *dec_word_symbols);
|
||||
void decode_bch15_11_01(const int32_t *bits, int32_t *decbits);
|
||||
|
||||
// Preamble decoding
|
||||
int32_t *d_preamble_samples;
|
||||
int32_t *d_secondary_code_symbols;
|
||||
uint32_t d_samples_per_symbol;
|
||||
int32_t d_symbols_per_preamble;
|
||||
int32_t d_samples_per_preamble;
|
||||
int32_t d_preamble_period_samples;
|
||||
double *d_subframe_symbols;
|
||||
uint32_t d_required_symbols;
|
||||
|
||||
// Storage for incoming data
|
||||
boost::circular_buffer<float> d_symbol_history;
|
||||
|
||||
// Variables for internal functionality
|
||||
uint64_t d_sample_counter; // Sample counter as an index (1,2,3,..etc)
|
||||
// indicating number of samples processed
|
||||
uint64_t d_preamble_index; // Index of sample number where preamble was found
|
||||
uint32_t d_stat; // Status of decoder
|
||||
bool d_flag_frame_sync; // Indicate when a frame sync is achieved
|
||||
bool d_flag_preamble; // Flag indicating when preamble was found
|
||||
int32_t d_CRC_error_counter; // Number of failed CRC operations
|
||||
bool flag_SOW_set; // Indicates when time of week is set
|
||||
|
||||
// Navigation Message variable
|
||||
Beidou_Dnav_Navigation_Message d_nav;
|
||||
|
||||
// Values to populate gnss synchronization structure
|
||||
uint32_t d_TOW_at_Preamble_ms;
|
||||
uint32_t d_TOW_at_current_symbol_ms;
|
||||
bool Flag_valid_word;
|
||||
|
||||
// Satellite Information and logging capacity
|
||||
Gnss_Satellite d_satellite;
|
||||
int32_t d_channel;
|
||||
bool d_dump;
|
||||
std::string d_dump_filename;
|
||||
std::ofstream d_dump_file;
|
||||
};
|
||||
|
||||
#endif
|
@ -68,6 +68,12 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
|
||||
{
|
||||
// Ephemeris data port out
|
||||
this->message_port_register_out(pmt::mp("telemetry"));
|
||||
// Control messages to tracking block
|
||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||
d_last_valid_preamble = 0;
|
||||
d_sent_tlm_failed_msg = false;
|
||||
|
||||
|
||||
// initialize internal vars
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
@ -91,6 +97,8 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
|
||||
d_frame_length_symbols = GALILEO_INAV_PAGE_PART_SYMBOLS - GALILEO_INAV_PREAMBLE_LENGTH_BITS;
|
||||
CodeLength = GALILEO_INAV_PAGE_PART_SYMBOLS - GALILEO_INAV_PREAMBLE_LENGTH_BITS;
|
||||
DataLength = (CodeLength / nn) - mm;
|
||||
d_max_symbols_without_valid_frame = GALILEO_INAV_PAGE_PART_SYMBOLS * 10; //rise alarm 10 seconds without valid tlm
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: // FNAV
|
||||
@ -119,6 +127,7 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
|
||||
d_secondary_code_samples[i] = -1;
|
||||
}
|
||||
}
|
||||
d_max_symbols_without_valid_frame = GALILEO_FNAV_CODES_PER_SYMBOL * GALILEO_FNAV_SYMBOLS_PER_PAGE * 10; //rise alarm 10 seconds without valid tlm
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -133,6 +142,7 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
|
||||
d_frame_length_symbols = 0U;
|
||||
CodeLength = 0;
|
||||
DataLength = 0;
|
||||
d_max_symbols_without_valid_frame = 0;
|
||||
std::cout << "Galileo unified telemetry decoder error: Unknown frame type " << std::endl;
|
||||
}
|
||||
|
||||
@ -431,12 +441,23 @@ void galileo_telemetry_decoder_gs::decode_FNAV_word(double *page_symbols, int32_
|
||||
|
||||
void galileo_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satellite)
|
||||
{
|
||||
gr::thread::scoped_lock lock(d_setlock);
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
d_last_valid_preamble = d_sample_counter;
|
||||
d_sent_tlm_failed_msg = false;
|
||||
DLOG(INFO) << "Setting decoder Finite State Machine to satellite " << d_satellite;
|
||||
DLOG(INFO) << "Navigation Satellite set to " << d_satellite;
|
||||
}
|
||||
|
||||
|
||||
void galileo_telemetry_decoder_gs::reset()
|
||||
{
|
||||
d_last_valid_preamble = d_sample_counter;
|
||||
d_sent_tlm_failed_msg = false;
|
||||
DLOG(INFO) << "Telemetry decoder reset for satellite " << d_satellite;
|
||||
}
|
||||
|
||||
|
||||
void galileo_telemetry_decoder_gs::set_channel(int32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
@ -478,10 +499,20 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
|
||||
current_symbol = in[0][0];
|
||||
// add new symbol to the symbol queue
|
||||
d_symbol_history.push_back(current_symbol.Prompt_I);
|
||||
d_sample_counter++; // count for the processed samples
|
||||
d_sample_counter++; // count for the processed symbols
|
||||
consume_each(1);
|
||||
d_flag_preamble = false;
|
||||
|
||||
// check if there is a problem with the telemetry of the current satellite
|
||||
if (d_stat < 1 and d_sent_tlm_failed_msg == false)
|
||||
{
|
||||
if ((d_sample_counter - d_last_valid_preamble) > d_max_symbols_without_valid_frame)
|
||||
{
|
||||
int message = 1; //bad telemetry
|
||||
this->message_port_pub(pmt::mp("telemetry_to_trk"), pmt::make_any(message));
|
||||
d_sent_tlm_failed_msg = true;
|
||||
}
|
||||
}
|
||||
if (d_symbol_history.size() > d_required_symbols)
|
||||
{
|
||||
// ******* preamble correlation ********
|
||||
@ -604,6 +635,7 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
|
||||
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_last_valid_preamble = d_sample_counter;
|
||||
if (!d_flag_frame_sync)
|
||||
{
|
||||
d_flag_frame_sync = true;
|
||||
|
@ -59,6 +59,7 @@ public:
|
||||
~galileo_telemetry_decoder_gs();
|
||||
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
|
||||
void set_channel(int32_t channel); //!< Set receiver's channel
|
||||
void reset();
|
||||
int32_t flag_even_word_arrived;
|
||||
|
||||
/*!
|
||||
@ -95,6 +96,10 @@ private:
|
||||
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_preamble_index;
|
||||
uint64_t d_last_valid_preamble;
|
||||
uint32_t d_max_symbols_without_valid_frame;
|
||||
|
||||
bool d_sent_tlm_failed_msg;
|
||||
uint32_t d_stat;
|
||||
bool d_flag_frame_sync;
|
||||
|
||||
|
@ -62,6 +62,8 @@ glonass_l1_ca_telemetry_decoder_gs::glonass_l1_ca_telemetry_decoder_gs(
|
||||
{
|
||||
// Ephemeris data port out
|
||||
this->message_port_register_out(pmt::mp("telemetry"));
|
||||
// Control messages to tracking block
|
||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||
// initialize internal vars
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
|
@ -64,7 +64,10 @@ public:
|
||||
~glonass_l1_ca_telemetry_decoder_gs(); //!< Class destructor
|
||||
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
|
||||
void set_channel(int32_t channel); //!< Set receiver's channel
|
||||
|
||||
inline void reset()
|
||||
{
|
||||
return;
|
||||
}
|
||||
/*!
|
||||
* \brief This is where all signal processing takes place
|
||||
*/
|
||||
|
@ -62,6 +62,8 @@ glonass_l2_ca_telemetry_decoder_gs::glonass_l2_ca_telemetry_decoder_gs(
|
||||
{
|
||||
// Ephemeris data port out
|
||||
this->message_port_register_out(pmt::mp("telemetry"));
|
||||
// Control messages to tracking block
|
||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||
// initialize internal vars
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
|
@ -62,7 +62,10 @@ public:
|
||||
~glonass_l2_ca_telemetry_decoder_gs(); //!< Class destructor
|
||||
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
|
||||
void set_channel(int32_t channel); //!< Set receiver's channel
|
||||
|
||||
inline void reset()
|
||||
{
|
||||
return;
|
||||
}
|
||||
/*!
|
||||
* \brief This is where all signal processing takes place
|
||||
*/
|
||||
|
@ -64,6 +64,12 @@ gps_l1_ca_telemetry_decoder_gs::gps_l1_ca_telemetry_decoder_gs(
|
||||
{
|
||||
// Ephemeris data port out
|
||||
this->message_port_register_out(pmt::mp("telemetry"));
|
||||
// Control messages to tracking block
|
||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||
d_last_valid_preamble = 0;
|
||||
d_sent_tlm_failed_msg = false;
|
||||
d_max_symbols_without_valid_frame = GPS_SUBFRAME_BITS * GPS_CA_TELEMETRY_SYMBOLS_PER_BIT * 5; //rise alarm if 5 consecutive subframes have no valid CRC
|
||||
|
||||
// initialize internal vars
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
@ -103,6 +109,7 @@ gps_l1_ca_telemetry_decoder_gs::gps_l1_ca_telemetry_decoder_gs(
|
||||
d_symbol_history.set_capacity(GPS_CA_PREAMBLE_LENGTH_SYMBOLS);
|
||||
d_crc_error_synchronization_counter = 0;
|
||||
d_current_subframe_symbol = 0;
|
||||
d_sample_counter = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -318,6 +325,14 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe()
|
||||
}
|
||||
|
||||
|
||||
void gps_l1_ca_telemetry_decoder_gs::reset()
|
||||
{
|
||||
d_last_valid_preamble = d_sample_counter;
|
||||
d_sent_tlm_failed_msg = false;
|
||||
DLOG(INFO) << "Telemetry decoder reset for satellite " << d_satellite;
|
||||
}
|
||||
|
||||
|
||||
int gps_l1_ca_telemetry_decoder_gs::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)
|
||||
{
|
||||
@ -342,6 +357,19 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
|
||||
|
||||
d_flag_preamble = false;
|
||||
|
||||
// check if there is a problem with the telemetry of the current satellite
|
||||
d_sample_counter++; // count for the processed symbols
|
||||
if (d_sent_tlm_failed_msg == false)
|
||||
{
|
||||
if ((d_sample_counter - d_last_valid_preamble) > d_max_symbols_without_valid_frame)
|
||||
{
|
||||
int message = 1; //bad telemetry
|
||||
this->message_port_pub(pmt::mp("telemetry_to_trk"), pmt::make_any(message));
|
||||
d_sent_tlm_failed_msg = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ******* preamble correlation ********
|
||||
int32_t corr_value = 0;
|
||||
if ((d_symbol_history.size() == GPS_CA_PREAMBLE_LENGTH_SYMBOLS))
|
||||
@ -442,6 +470,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
|
||||
d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_nav.d_TOW * 1000.0);
|
||||
flag_TOW_set = true;
|
||||
d_flag_new_tow_available = false;
|
||||
d_last_valid_preamble = d_sample_counter;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -33,8 +33,8 @@
|
||||
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gnss_satellite.h"
|
||||
#include "gps_navigation_message.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_navigation_message.h"
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include <boost/shared_ptr.hpp> // for boost::shared_ptr
|
||||
#include <gnuradio/block.h> // for block
|
||||
@ -61,7 +61,7 @@ public:
|
||||
~gps_l1_ca_telemetry_decoder_gs();
|
||||
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
|
||||
void set_channel(int channel); //!< Set receiver's channel
|
||||
|
||||
void reset();
|
||||
/*!
|
||||
* \brief This is where all signal processing takes place
|
||||
*/
|
||||
@ -79,6 +79,10 @@ private:
|
||||
bool decode_subframe();
|
||||
bool new_decoder();
|
||||
int d_crc_error_synchronization_counter;
|
||||
uint64_t d_sample_counter;
|
||||
bool d_sent_tlm_failed_msg;
|
||||
uint64_t d_last_valid_preamble;
|
||||
uint32_t d_max_symbols_without_valid_frame;
|
||||
|
||||
int *d_preambles_symbols;
|
||||
uint32_t d_stat;
|
||||
|
@ -62,6 +62,13 @@ gps_l2c_telemetry_decoder_gs::gps_l2c_telemetry_decoder_gs(
|
||||
{
|
||||
// Ephemeris data port out
|
||||
this->message_port_register_out(pmt::mp("telemetry"));
|
||||
// Control messages to tracking block
|
||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||
d_last_valid_preamble = 0;
|
||||
d_sent_tlm_failed_msg = false;
|
||||
d_max_symbols_without_valid_frame = GPS_L2_CNAV_DATA_PAGE_BITS * GPS_L2_SYMBOLS_PER_BIT * 5; //rise alarm if 5 consecutive subframes have no valid CRC
|
||||
|
||||
|
||||
// initialize internal vars
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
@ -76,6 +83,8 @@ gps_l2c_telemetry_decoder_gs::gps_l2c_telemetry_decoder_gs(
|
||||
|
||||
// initialize the CNAV frame decoder (libswiftcnav)
|
||||
cnav_msg_decoder_init(&d_cnav_decoder);
|
||||
|
||||
d_sample_counter = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -130,6 +139,14 @@ void gps_l2c_telemetry_decoder_gs::set_channel(int channel)
|
||||
}
|
||||
|
||||
|
||||
void gps_l2c_telemetry_decoder_gs::reset()
|
||||
{
|
||||
d_last_valid_preamble = d_sample_counter;
|
||||
d_sent_tlm_failed_msg = false;
|
||||
DLOG(INFO) << "Telemetry decoder reset for satellite " << d_satellite;
|
||||
}
|
||||
|
||||
|
||||
int gps_l2c_telemetry_decoder_gs::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)
|
||||
{
|
||||
@ -147,6 +164,18 @@ int gps_l2c_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
|
||||
|
||||
consume_each(1); // one by one
|
||||
|
||||
// check if there is a problem with the telemetry of the current satellite
|
||||
d_sample_counter++; // count for the processed symbols
|
||||
if (d_sent_tlm_failed_msg == false)
|
||||
{
|
||||
if ((d_sample_counter - d_last_valid_preamble) > d_max_symbols_without_valid_frame)
|
||||
{
|
||||
int message = 1; //bad telemetry
|
||||
this->message_port_pub(pmt::mp("telemetry_to_trk"), pmt::make_any(message));
|
||||
d_sent_tlm_failed_msg = true;
|
||||
}
|
||||
}
|
||||
|
||||
// UPDATE GNSS SYNCHRO DATA
|
||||
Gnss_Synchro current_synchro_data{}; // structure to save the synchronization information and send the output object to the next block
|
||||
|
||||
@ -190,6 +219,7 @@ int gps_l2c_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
|
||||
|
||||
// update TOW at the preamble instant
|
||||
d_TOW_at_Preamble = static_cast<double>(msg.tow);
|
||||
d_last_valid_preamble = d_sample_counter;
|
||||
// The time of the last input symbol can be computed from the message ToW and
|
||||
// delay by the formulae:
|
||||
// \code
|
||||
|
@ -41,8 +41,7 @@
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#include "cnav_msg.h"
|
||||
}
|
||||
|
||||
@ -64,7 +63,7 @@ public:
|
||||
~gps_l2c_telemetry_decoder_gs();
|
||||
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
|
||||
void set_channel(int32_t channel); //!< Set receiver's channel
|
||||
|
||||
void reset();
|
||||
/*!
|
||||
* \brief This is where all signal processing takes place
|
||||
*/
|
||||
@ -87,6 +86,10 @@ private:
|
||||
|
||||
int32_t d_state;
|
||||
int32_t d_crc_error_count;
|
||||
uint64_t d_sample_counter;
|
||||
bool d_sent_tlm_failed_msg;
|
||||
uint64_t d_last_valid_preamble;
|
||||
uint32_t d_max_symbols_without_valid_frame;
|
||||
|
||||
double d_TOW_at_current_symbol;
|
||||
double d_TOW_at_Preamble;
|
||||
|
@ -60,6 +60,12 @@ gps_l5_telemetry_decoder_gs::gps_l5_telemetry_decoder_gs(
|
||||
{
|
||||
// Ephemeris data port out
|
||||
this->message_port_register_out(pmt::mp("telemetry"));
|
||||
// Control messages to tracking block
|
||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||
d_last_valid_preamble = 0;
|
||||
d_sent_tlm_failed_msg = false;
|
||||
d_max_symbols_without_valid_frame = GPS_L5_CNAV_DATA_PAGE_BITS * GPS_L5_SAMPLES_PER_SYMBOL * GPS_L5_SYMBOLS_PER_BIT * 5; //rise alarm if 5 consecutive subframes have no valid CRC
|
||||
|
||||
// initialize internal vars
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
@ -85,6 +91,8 @@ gps_l5_telemetry_decoder_gs::gps_l5_telemetry_decoder_gs(
|
||||
}
|
||||
sync_NH = false;
|
||||
new_sym = false;
|
||||
|
||||
d_sample_counter = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -141,6 +149,14 @@ void gps_l5_telemetry_decoder_gs::set_channel(int32_t channel)
|
||||
}
|
||||
|
||||
|
||||
void gps_l5_telemetry_decoder_gs::reset()
|
||||
{
|
||||
d_last_valid_preamble = d_sample_counter;
|
||||
d_sent_tlm_failed_msg = false;
|
||||
DLOG(INFO) << "Telemetry decoder reset for satellite " << d_satellite;
|
||||
}
|
||||
|
||||
|
||||
int gps_l5_telemetry_decoder_gs::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)
|
||||
{
|
||||
@ -157,6 +173,18 @@ int gps_l5_telemetry_decoder_gs::general_work(int noutput_items __attribute__((u
|
||||
int32_t corr_NH = 0;
|
||||
int32_t symbol_value = 0;
|
||||
|
||||
// check if there is a problem with the telemetry of the current satellite
|
||||
d_sample_counter++; // count for the processed symbols
|
||||
if (d_sent_tlm_failed_msg == false)
|
||||
{
|
||||
if ((d_sample_counter - d_last_valid_preamble) > d_max_symbols_without_valid_frame)
|
||||
{
|
||||
int message = 1; //bad telemetry
|
||||
this->message_port_pub(pmt::mp("telemetry_to_trk"), pmt::make_any(message));
|
||||
d_sent_tlm_failed_msg = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Search correlation with Neuman-Hofman Code (see IS-GPS-705D)
|
||||
if (sym_hist.size() == GPS_L5I_NH_CODE_LENGTH)
|
||||
{
|
||||
@ -240,6 +268,7 @@ int gps_l5_telemetry_decoder_gs::general_work(int noutput_items __attribute__((u
|
||||
|
||||
// update TOW at the preamble instant
|
||||
d_TOW_at_Preamble_ms = msg.tow * 6000;
|
||||
d_last_valid_preamble = d_sample_counter;
|
||||
// The time of the last input symbol can be computed from the message ToW and
|
||||
// delay by the formulae:
|
||||
// \code
|
||||
|
@ -42,8 +42,7 @@
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#include "cnav_msg.h"
|
||||
}
|
||||
|
||||
@ -65,6 +64,7 @@ public:
|
||||
~gps_l5_telemetry_decoder_gs();
|
||||
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
|
||||
void set_channel(int32_t channel); //!< Set receiver's channel
|
||||
void reset();
|
||||
int general_work(int noutput_items, gr_vector_int &ninput_items,
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
|
||||
|
||||
@ -85,6 +85,10 @@ private:
|
||||
uint32_t d_TOW_at_current_symbol_ms;
|
||||
uint32_t d_TOW_at_Preamble_ms;
|
||||
bool d_flag_valid_word;
|
||||
uint64_t d_sample_counter;
|
||||
bool d_sent_tlm_failed_msg;
|
||||
uint64_t d_last_valid_preamble;
|
||||
uint32_t d_max_symbols_without_valid_frame;
|
||||
|
||||
Gps_CNAV_Navigation_Message d_CNAV_Message;
|
||||
float bits_NH[GPS_L5I_NH_CODE_LENGTH]{};
|
||||
|
@ -60,6 +60,8 @@ sbas_l1_telemetry_decoder_gs::sbas_l1_telemetry_decoder_gs(
|
||||
{
|
||||
// Ephemeris data port out
|
||||
this->message_port_register_out(pmt::mp("telemetry"));
|
||||
// Control messages to tracking block
|
||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||
// initialize internal vars
|
||||
d_dump = dump;
|
||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||
|
@ -63,7 +63,10 @@ public:
|
||||
~sbas_l1_telemetry_decoder_gs();
|
||||
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
|
||||
void set_channel(int32_t channel); //!< Set receiver's channel
|
||||
|
||||
inline void reset()
|
||||
{
|
||||
return;
|
||||
}
|
||||
/*!
|
||||
* \brief This is where all signal processing takes place
|
||||
*/
|
||||
|
@ -62,6 +62,7 @@ set(TRACKING_ADAPTER_SOURCES
|
||||
glonass_l2_ca_dll_pll_tracking.cc
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking.cc
|
||||
beidou_b1i_dll_pll_tracking.cc
|
||||
beidou_b3i_dll_pll_tracking.cc
|
||||
${OPT_TRACKING_ADAPTERS_SOURCES}
|
||||
)
|
||||
|
||||
@ -80,6 +81,7 @@ set(TRACKING_ADAPTER_HEADERS
|
||||
glonass_l2_ca_dll_pll_tracking.h
|
||||
glonass_l2_ca_dll_pll_c_aid_tracking.h
|
||||
beidou_b1i_dll_pll_tracking.h
|
||||
beidou_b3i_dll_pll_tracking.h
|
||||
${OPT_TRACKING_ADAPTERS_HEADERS}
|
||||
)
|
||||
|
||||
|
203
src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.cc
Normal file
203
src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.cc
Normal file
@ -0,0 +1,203 @@
|
||||
/*!
|
||||
* \file beidou_b3i_dll_pll_tracking.cc
|
||||
* \brief Implementation of an adapter of a DLL+PLL tracking loop block
|
||||
* for Beidou B3I to a TrackingInterface
|
||||
* \author Damian Miralles, 2019. dmiralles2009(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-2019 (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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "beidou_b3i_dll_pll_tracking.h"
|
||||
#include "Beidou_B3I.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
BeidouB3iDllPllTracking::BeidouB3iDllPllTracking(
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
Dll_Pll_Conf trk_param = Dll_Pll_Conf();
|
||||
DLOG(INFO) << "role " << role;
|
||||
//################# CONFIGURATION PARAMETERS ########################
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string item_type = configuration->property(role + ".item_type", default_item_type);
|
||||
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
int fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
trk_param.fs_in = fs_in;
|
||||
bool dump = configuration->property(role + ".dump", false);
|
||||
trk_param.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<float>(FLAGS_pll_bw_hz);
|
||||
trk_param.pll_bw_hz = pll_bw_hz;
|
||||
float pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0);
|
||||
trk_param.pll_bw_narrow_hz = pll_bw_narrow_hz;
|
||||
float dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
|
||||
trk_param.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<float>(FLAGS_dll_bw_hz);
|
||||
trk_param.dll_bw_hz = dll_bw_hz;
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||
trk_param.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.early_late_space_narrow_chips = early_late_space_narrow_chips;
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
trk_param.dump_filename = dump_filename;
|
||||
int vector_length = std::round(fs_in / (BEIDOU_B3I_CODE_RATE_HZ / BEIDOU_B3I_CODE_LENGTH_CHIPS));
|
||||
trk_param.vector_length = vector_length;
|
||||
int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
if (symbols_extended_correlator < 1)
|
||||
{
|
||||
symbols_extended_correlator = 1;
|
||||
std::cout << TEXT_RED << "WARNING: BEIDOU B3I. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
else if (symbols_extended_correlator > 20)
|
||||
{
|
||||
symbols_extended_correlator = 20;
|
||||
std::cout << TEXT_RED << "WARNING: BEIDOU B3I. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
trk_param.extend_correlation_symbols = symbols_extended_correlator;
|
||||
bool track_pilot = configuration->property(role + ".track_pilot", false);
|
||||
if (track_pilot)
|
||||
{
|
||||
std::cout << TEXT_RED << "WARNING: BEIDOU B3I 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: BEIDOU B3I. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
|
||||
}
|
||||
trk_param.very_early_late_space_chips = 0.0;
|
||||
trk_param.very_early_late_space_narrow_chips = 0.0;
|
||||
trk_param.track_pilot = false;
|
||||
trk_param.system = 'C';
|
||||
char sig_[3] = "B3";
|
||||
std::memcpy(trk_param.signal, sig_, 3);
|
||||
int cn0_samples = configuration->property(role + ".cn0_samples", 20);
|
||||
if (FLAGS_cn0_samples != 20) cn0_samples = FLAGS_cn0_samples;
|
||||
trk_param.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.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.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.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = dll_pll_veml_make_tracking(trk_param);
|
||||
}
|
||||
else
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type << " unknown tracking item type.";
|
||||
}
|
||||
channel_ = 0;
|
||||
DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")";
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
}
|
||||
if (out_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BeidouB3iDllPllTracking::~BeidouB3iDllPllTracking()
|
||||
= default;
|
||||
|
||||
|
||||
void BeidouB3iDllPllTracking::start_tracking()
|
||||
{
|
||||
tracking_->start_tracking();
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iDllPllTracking::stop_tracking()
|
||||
{
|
||||
tracking_->stop_tracking();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set tracking channel unique ID
|
||||
*/
|
||||
void BeidouB3iDllPllTracking::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
tracking_->set_channel(channel);
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
{
|
||||
tracking_->set_gnss_synchro(p_gnss_synchro);
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iDllPllTracking::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
};
|
||||
//nothing to connect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iDllPllTracking::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
};
|
||||
//nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr BeidouB3iDllPllTracking::get_left_block()
|
||||
{
|
||||
return tracking_;
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr BeidouB3iDllPllTracking::get_right_block()
|
||||
{
|
||||
return tracking_;
|
||||
}
|
106
src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.h
Normal file
106
src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.h
Normal file
@ -0,0 +1,106 @@
|
||||
/*!
|
||||
* \file beidou_b3i_dll_pll_tracking.h
|
||||
* \brief Interface of an adapter of a DLL+PLL tracking loop block
|
||||
* for Beidou B3I to a TrackingInterface
|
||||
* \author Damian Miralles, 2019. dmiralles2009(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-2019 (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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_BEIDOU_B3I_DLL_PLL_TRACKING_H_
|
||||
#define GNSS_SDR_BEIDOU_B3I_DLL_PLL_TRACKING_H_
|
||||
|
||||
#include "dll_pll_veml_tracking.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
/*!
|
||||
* \brief This class implements a code DLL + carrier PLL tracking loop
|
||||
*/
|
||||
class BeidouB3iDllPllTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
BeidouB3iDllPllTracking(ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
virtual ~BeidouB3iDllPllTracking();
|
||||
|
||||
inline std::string role() override
|
||||
{
|
||||
return role_;
|
||||
}
|
||||
|
||||
inline std::string implementation() override
|
||||
{
|
||||
return "BEIDOU_B3I_DLL_PLL_Tracking";
|
||||
}
|
||||
|
||||
inline size_t item_size() override
|
||||
{
|
||||
return item_size_;
|
||||
}
|
||||
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
void disconnect(gr::top_block_sptr top_block) override;
|
||||
gr::basic_block_sptr get_left_block() override;
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
|
||||
/*!
|
||||
* \brief Set tracking channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to efficiently exchange synchronization data between acquisition and tracking blocks
|
||||
*/
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
void start_tracking() override;
|
||||
|
||||
/*!
|
||||
* \brief Stop running tracking
|
||||
*/
|
||||
void stop_tracking() override;
|
||||
|
||||
private:
|
||||
dll_pll_veml_tracking_sptr tracking_;
|
||||
size_t item_size_;
|
||||
unsigned int channel_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_BEIDOU_B3I_DLL_PLL_TRACKING_H_
|
@ -36,6 +36,7 @@
|
||||
|
||||
#include "dll_pll_veml_tracking.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "Beidou_B3I.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include "GPS_L5.h"
|
||||
@ -43,9 +44,9 @@
|
||||
#include "Galileo_E5a.h"
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include "beidou_b1i_signal_processing.h"
|
||||
#include "beidou_b3i_signal_processing.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "gnss_satellite.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
@ -62,11 +63,9 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm> // for fill_n
|
||||
#include <cmath> // for fmod, round, floor
|
||||
#include <complex> // for complex
|
||||
#include <cstdlib> // for abs, size_t
|
||||
#include <exception> // for exception
|
||||
#include <iostream> // for cout, cerr
|
||||
#include <map> // for map
|
||||
#include <map>
|
||||
|
||||
|
||||
dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(const Dll_Pll_Conf &conf_)
|
||||
@ -84,7 +83,36 @@ void dll_pll_veml_tracking::forecast(int noutput_items,
|
||||
}
|
||||
}
|
||||
|
||||
void dll_pll_veml_tracking::msg_handler_telemetry_to_trk(const pmt::pmt_t &msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (pmt::any_ref(msg).type() == typeid(int))
|
||||
{
|
||||
int tlm_event;
|
||||
tlm_event = boost::any_cast<int>(pmt::any_ref(msg));
|
||||
|
||||
switch (tlm_event)
|
||||
{
|
||||
case 1: //tlm fault in current channel
|
||||
{
|
||||
DLOG(INFO) << "Telemetry fault received in ch " << this->d_channel;
|
||||
gr::thread::scoped_lock lock(d_setlock);
|
||||
d_carrier_lock_fail_counter = 10000; //force loss-of-lock condition
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (boost::bad_any_cast &e)
|
||||
{
|
||||
LOG(WARNING) << "msg_handler_telemetry_to_trk Bad any cast!";
|
||||
}
|
||||
}
|
||||
dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::block("dll_pll_veml_tracking", gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
@ -93,12 +121,14 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
this->set_relative_rate(1.0 / static_cast<double>(trk_parameters.vector_length));
|
||||
|
||||
// Telemetry bit synchronization message port input (mainly for GPS L1 CA)
|
||||
this->message_port_register_in(pmt::mp("preamble_samplestamp"));
|
||||
// Telemetry message port input
|
||||
this->message_port_register_in(pmt::mp("telemetry_to_trk"));
|
||||
this->set_msg_handler(pmt::mp("telemetry_to_trk"), boost::bind(&dll_pll_veml_tracking::msg_handler_telemetry_to_trk, this, _1));
|
||||
|
||||
// initialize internal vars
|
||||
d_veml = false;
|
||||
d_cloop = true;
|
||||
d_pull_in_transitory = true;
|
||||
d_code_chip_rate = 0.0;
|
||||
d_secondary_code_length = 0U;
|
||||
d_secondary_code_string = nullptr;
|
||||
@ -115,6 +145,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
map_signal_pretty_name["5X"] = "E5a";
|
||||
map_signal_pretty_name["L5"] = "L5";
|
||||
map_signal_pretty_name["B1"] = "B1I";
|
||||
map_signal_pretty_name["B3"] = "B3I";
|
||||
|
||||
signal_pretty_name = map_signal_pretty_name[signal_type];
|
||||
|
||||
@ -288,16 +319,32 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
d_signal_carrier_freq = BEIDOU_B1I_FREQ_HZ;
|
||||
d_code_period = BEIDOU_B1I_CODE_PERIOD;
|
||||
d_code_chip_rate = BEIDOU_B1I_CODE_RATE_HZ;
|
||||
d_code_length_chips = static_cast<unsigned int>(BEIDOU_B1I_CODE_LENGTH_CHIPS);
|
||||
d_code_length_chips = static_cast<uint32_t>(BEIDOU_B1I_CODE_LENGTH_CHIPS);
|
||||
d_symbols_per_bit = BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
d_secondary = true;
|
||||
trk_parameters.track_pilot = false;
|
||||
interchange_iq = false;
|
||||
d_secondary_code_length = static_cast<unsigned int>(BEIDOU_B1I_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_length = static_cast<uint32_t>(BEIDOU_B1I_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&BEIDOU_B1I_SECONDARY_CODE_STR);
|
||||
}
|
||||
else if (signal_type == "B3")
|
||||
{
|
||||
// GEO Satellites use different secondary code
|
||||
d_signal_carrier_freq = BEIDOU_B3I_FREQ_HZ;
|
||||
d_code_period = BEIDOU_B3I_CODE_PERIOD;
|
||||
d_code_chip_rate = BEIDOU_B3I_CODE_RATE_HZ;
|
||||
d_code_length_chips = static_cast<uint32_t>(BEIDOU_B3I_CODE_LENGTH_CHIPS);
|
||||
d_symbols_per_bit = BEIDOU_B3I_TELEMETRY_SYMBOLS_PER_BIT;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
d_secondary = true;
|
||||
trk_parameters.track_pilot = false;
|
||||
interchange_iq = false;
|
||||
d_secondary_code_length = static_cast<uint32_t>(BEIDOU_B3I_SECONDARY_CODE_LENGTH);
|
||||
d_secondary_code_string = const_cast<std::string *>(&BEIDOU_B3I_SECONDARY_CODE_STR);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << "Invalid Signal argument when instantiating tracking blocks";
|
||||
@ -332,10 +379,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
K_blk_samples = 0.0;
|
||||
|
||||
// Initialize tracking ==========================================
|
||||
d_code_loop_filter = Tracking_2nd_DLL_filter(static_cast<float>(d_code_period));
|
||||
d_carrier_loop_filter = Tracking_2nd_PLL_filter(static_cast<float>(d_code_period));
|
||||
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_code_loop_filter = Tracking_loop_filter(d_code_period, trk_parameters.dll_bw_hz, trk_parameters.dll_filter_order, false);
|
||||
d_carrier_loop_filter.set_params(trk_parameters.fll_bw_hz, trk_parameters.pll_bw_hz, trk_parameters.pll_filter_order);
|
||||
|
||||
// Initialization of local code replica
|
||||
// Get space for a vector with the sinboc(1,1) replica sampled 2x/chip
|
||||
@ -446,7 +491,6 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
d_carrier_phase_step_rad = 0.0;
|
||||
d_carrier_phase_rate_step_rad = 0.0;
|
||||
d_rem_code_phase_chips = 0.0;
|
||||
d_last_prompt = gr_complex(0.0, 0.0);
|
||||
d_state = 0; // initial state: standby
|
||||
clear_tracking_vars();
|
||||
if (trk_parameters.smoother_length > 0)
|
||||
@ -513,8 +557,8 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
d_carr_ph_history.clear();
|
||||
d_code_ph_history.clear();
|
||||
// DLL/PLL filter initialization
|
||||
d_carrier_loop_filter.initialize(); // initialize the carrier filter
|
||||
d_code_loop_filter.initialize(); // initialize the code filter
|
||||
d_carrier_loop_filter.initialize(static_cast<float>(d_acq_carrier_doppler_hz)); // initialize the carrier filter
|
||||
d_code_loop_filter.initialize(); // initialize the code filter
|
||||
|
||||
if (systemName == "GPS" and signal_type == "1C")
|
||||
{
|
||||
@ -596,8 +640,48 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
d_preamble_length_symbols = 22;
|
||||
d_preambles_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(22 * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
int32_t n = 0;
|
||||
uint16_t preambles_bits[BEIDOU_B1I_PREAMBLE_LENGTH_BITS] = {1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0};
|
||||
for (uint16_t preambles_bit : preambles_bits)
|
||||
uint32_t preambles_bits[BEIDOU_B1I_PREAMBLE_LENGTH_BITS] = {1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0};
|
||||
for (uint32_t preambles_bit : preambles_bits)
|
||||
{
|
||||
for (uint32_t j = 0; j < d_symbols_per_bit; j++)
|
||||
{
|
||||
if (preambles_bit == 1)
|
||||
{
|
||||
d_preambles_symbols[n] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_preambles_symbols[n] = -1;
|
||||
}
|
||||
n++;
|
||||
}
|
||||
}
|
||||
d_symbol_history.resize(22); // Change fixed buffer size
|
||||
d_symbol_history.clear();
|
||||
}
|
||||
}
|
||||
|
||||
else if (systemName == "Beidou" and signal_type == "B3")
|
||||
{
|
||||
beidou_b3i_code_gen_float(d_tracking_code, d_acquisition_gnss_synchro->PRN, 0);
|
||||
// Update secondary code settings for geo satellites
|
||||
if (d_acquisition_gnss_synchro->PRN > 0 and d_acquisition_gnss_synchro->PRN < 6)
|
||||
{
|
||||
d_symbols_per_bit = 2;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
d_secondary = false;
|
||||
trk_parameters.track_pilot = false;
|
||||
interchange_iq = false;
|
||||
d_secondary_code_length = 0;
|
||||
d_secondary_code_string = const_cast<std::string *>(&BEIDOU_B3I_D2_SECONDARY_CODE_STR);
|
||||
|
||||
// preamble bits to sampled symbols
|
||||
d_preamble_length_symbols = 22;
|
||||
d_preambles_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(22 * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
int32_t n = 0;
|
||||
uint32_t preambles_bits[BEIDOU_B3I_PREAMBLE_LENGTH_BITS] = {1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0};
|
||||
for (uint32_t preambles_bit : preambles_bits)
|
||||
{
|
||||
for (int32_t j = 0; j < d_symbols_per_bit; j++)
|
||||
{
|
||||
@ -612,7 +696,7 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
n++;
|
||||
}
|
||||
}
|
||||
d_symbol_history.set_capacity(22); // Change fixed buffer size
|
||||
d_symbol_history.resize(22); // Change fixed buffer size
|
||||
d_symbol_history.clear();
|
||||
}
|
||||
}
|
||||
@ -642,10 +726,10 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
d_local_code_shift_chips[2] = trk_parameters.early_late_space_chips * static_cast<float>(d_code_samples_per_chip);
|
||||
}
|
||||
|
||||
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<float>(d_code_period));
|
||||
d_code_loop_filter.set_pdi(static_cast<float>(d_code_period));
|
||||
d_current_correlation_time_s = d_code_period;
|
||||
|
||||
d_code_loop_filter.set_noise_bandwidth(trk_parameters.dll_bw_hz);
|
||||
d_code_loop_filter.set_update_interval(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;
|
||||
@ -654,8 +738,8 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
// enable tracking pull-in
|
||||
d_state = 1;
|
||||
d_cloop = true;
|
||||
d_pull_in_transitory = true;
|
||||
d_Prompt_circular_buffer.clear();
|
||||
d_last_prompt = gr_complex(0.0, 0.0);
|
||||
}
|
||||
|
||||
|
||||
@ -764,15 +848,18 @@ bool dll_pll_veml_tracking::cn0_and_tracking_lock_status(double coh_integration_
|
||||
// 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)
|
||||
if (!d_pull_in_transitory)
|
||||
{
|
||||
d_carrier_lock_fail_counter++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (d_carrier_lock_fail_counter > 0)
|
||||
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < trk_parameters.cn0_min)
|
||||
{
|
||||
d_carrier_lock_fail_counter--;
|
||||
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)
|
||||
@ -827,20 +914,43 @@ void dll_pll_veml_tracking::run_dll_pll()
|
||||
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;
|
||||
d_carr_phase_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;
|
||||
d_carr_phase_error_hz = pll_four_quadrant_atan(d_P_accu) / PI_2;
|
||||
}
|
||||
|
||||
if ((d_pull_in_transitory == true and trk_parameters.enable_fll_pull_in == true) or trk_parameters.enable_fll_steady_state)
|
||||
{
|
||||
// FLL discriminator
|
||||
d_carr_freq_error_hz = fll_four_quadrant_atan(d_P_accu_old, d_P_accu, 0, d_current_correlation_time_s) / GPS_TWO_PI;
|
||||
d_P_accu_old = d_P_accu;
|
||||
//std::cout << "d_carr_freq_error_hz: " << d_carr_freq_error_hz << std::endl;
|
||||
// Carrier discriminator filter
|
||||
if ((d_pull_in_transitory == true and trk_parameters.enable_fll_pull_in == true))
|
||||
{
|
||||
//pure FLL, disable PLL
|
||||
d_carr_error_filt_hz = d_carrier_loop_filter.get_carrier_error(d_carr_freq_error_hz, 0, d_current_correlation_time_s);
|
||||
}
|
||||
else
|
||||
{
|
||||
//FLL-aided PLL
|
||||
d_carr_error_filt_hz = d_carrier_loop_filter.get_carrier_error(d_carr_freq_error_hz, d_carr_phase_error_hz, d_current_correlation_time_s);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Carrier discriminator filter
|
||||
d_carr_error_filt_hz = d_carrier_loop_filter.get_carrier_error(0, d_carr_phase_error_hz, d_current_correlation_time_s);
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
||||
d_carrier_doppler_hz = d_carr_error_filt_hz;
|
||||
|
||||
// std::cout << "d_carrier_doppler_hz: " << d_carrier_doppler_hz << std::endl;
|
||||
// std::cout << "d_CN0_SNV_dB_Hz: " << this->d_CN0_SNV_dB_Hz << std::endl;
|
||||
// ################## DLL ##########################################################
|
||||
// DLL discriminator
|
||||
if (d_veml)
|
||||
@ -852,7 +962,7 @@ void dll_pll_veml_tracking::run_dll_pll()
|
||||
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]
|
||||
d_code_error_filt_chips = d_code_loop_filter.apply(d_code_error_chips); // [chips/second]
|
||||
|
||||
// New code Doppler frequency estimation
|
||||
d_code_freq_chips = (1.0 + (d_carrier_doppler_hz / d_signal_carrier_freq)) * d_code_chip_rate - d_code_error_filt_chips;
|
||||
@ -866,13 +976,14 @@ void dll_pll_veml_tracking::clear_tracking_vars()
|
||||
{
|
||||
d_Prompt_Data[0] = gr_complex(0.0, 0.0);
|
||||
}
|
||||
d_carr_error_hz = 0.0;
|
||||
d_P_accu_old = gr_complex(0.0, 0.0);
|
||||
d_carr_phase_error_hz = 0.0;
|
||||
d_carr_freq_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_circular_buffer.clear();
|
||||
d_last_prompt = gr_complex(0.0, 0.0);
|
||||
d_carrier_phase_rate_step_rad = 0.0;
|
||||
d_code_phase_rate_step_chips = 0.0;
|
||||
d_carr_ph_history.clear();
|
||||
@ -1104,7 +1215,7 @@ void dll_pll_veml_tracking::log_data(bool integrating)
|
||||
tmp_float = d_code_phase_rate_step_chips * trk_parameters.fs_in * trk_parameters.fs_in;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
// PLL commands
|
||||
tmp_float = d_carr_error_hz;
|
||||
tmp_float = d_carr_phase_error_hz;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
tmp_float = d_carr_error_filt_hz;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
@ -1434,6 +1545,13 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
|
||||
if (d_pull_in_transitory == true)
|
||||
{
|
||||
if (trk_parameters.pull_in_time_s < (d_sample_counter - d_acq_sample_stamp) / static_cast<int>(trk_parameters.fs_in))
|
||||
{
|
||||
d_pull_in_transitory = false;
|
||||
}
|
||||
}
|
||||
switch (d_state)
|
||||
{
|
||||
case 0: // Standby - Consume samples at full throttle, do nothing
|
||||
@ -1609,7 +1727,6 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
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_circular_buffer.clear();
|
||||
d_current_symbol = 0;
|
||||
|
||||
@ -1617,9 +1734,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
{
|
||||
// UPDATE INTEGRATION TIME
|
||||
d_extend_correlation_symbols_count = 0;
|
||||
float new_correlation_time = static_cast<float>(trk_parameters.extend_correlation_symbols) * static_cast<float>(d_code_period);
|
||||
d_carrier_loop_filter.set_pdi(new_correlation_time);
|
||||
d_code_loop_filter.set_pdi(new_correlation_time);
|
||||
d_current_correlation_time_s = static_cast<float>(trk_parameters.extend_correlation_symbols) * static_cast<float>(d_code_period);
|
||||
d_state = 3; // next state is the extended correlator integrator
|
||||
LOG(INFO) << "Enabled " << trk_parameters.extend_correlation_symbols * static_cast<int32_t>(d_code_period * 1000.0) << " ms extended correlator in channel "
|
||||
<< d_channel
|
||||
@ -1628,8 +1743,9 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
<< 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);
|
||||
d_code_loop_filter.set_update_interval(d_current_correlation_time_s);
|
||||
d_code_loop_filter.set_noise_bandwidth(trk_parameters.dll_bw_narrow_hz);
|
||||
d_carrier_loop_filter.set_params(trk_parameters.fll_bw_hz, trk_parameters.pll_bw_narrow_hz, trk_parameters.pll_filter_order);
|
||||
if (d_veml)
|
||||
{
|
||||
d_local_code_shift_chips[0] = -trk_parameters.very_early_late_space_narrow_chips * static_cast<float>(d_code_samples_per_chip);
|
||||
|
@ -34,8 +34,8 @@
|
||||
|
||||
#include "cpu_multicorrelator_real_codes.h"
|
||||
#include "dll_pll_conf.h"
|
||||
#include "tracking_2nd_DLL_filter.h"
|
||||
#include "tracking_2nd_PLL_filter.h"
|
||||
#include "tracking_FLL_PLL_filter.h" // for PLL/FLL filter
|
||||
#include "tracking_loop_filter.h" // for DLL filter
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include <boost/shared_ptr.hpp> // for boost::shared_ptr
|
||||
#include <gnuradio/block.h> // for block
|
||||
@ -44,10 +44,8 @@
|
||||
#include <pmt/pmt.h> // for pmt_t
|
||||
#include <cstdint> // for int32_t
|
||||
#include <fstream> // for string, ofstream
|
||||
#include <string> // for string
|
||||
#include <utility> // for pair
|
||||
|
||||
|
||||
class Gnss_Synchro;
|
||||
class dll_pll_veml_tracking;
|
||||
|
||||
@ -75,9 +73,8 @@ public:
|
||||
|
||||
private:
|
||||
friend dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(const Dll_Pll_Conf &conf_);
|
||||
|
||||
void msg_handler_telemetry_to_trk(const pmt::pmt_t &msg);
|
||||
dll_pll_veml_tracking(const Dll_Pll_Conf &conf_);
|
||||
void msg_handler_preamble_index(pmt::pmt_t msg);
|
||||
|
||||
bool cn0_and_tracking_lock_status(double coh_integration_time_s);
|
||||
bool acquire_secondary();
|
||||
@ -147,9 +144,9 @@ private:
|
||||
gr_complex d_VE_accu;
|
||||
gr_complex d_E_accu;
|
||||
gr_complex d_P_accu;
|
||||
gr_complex d_P_accu_old;
|
||||
gr_complex d_L_accu;
|
||||
gr_complex d_VL_accu;
|
||||
gr_complex d_last_prompt;
|
||||
|
||||
gr_complex *d_Prompt_Data;
|
||||
|
||||
@ -163,16 +160,18 @@ private:
|
||||
double d_rem_code_phase_samples;
|
||||
float 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;
|
||||
Tracking_loop_filter d_code_loop_filter;
|
||||
Tracking_FLL_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;
|
||||
bool d_pull_in_transitory;
|
||||
double d_current_correlation_time_s;
|
||||
double d_carr_phase_error_hz;
|
||||
double d_carr_freq_error_hz;
|
||||
double d_carr_error_filt_hz;
|
||||
double d_code_error_chips;
|
||||
double d_code_error_filt_chips;
|
||||
|
@ -43,6 +43,13 @@ Dll_Pll_Conf::Dll_Pll_Conf()
|
||||
dump = false;
|
||||
dump_mat = true;
|
||||
dump_filename = std::string("./dll_pll_dump.dat");
|
||||
enable_fll_pull_in = false;
|
||||
enable_fll_steady_state = false;
|
||||
pull_in_time_s = 2;
|
||||
fll_filter_order = 1;
|
||||
pll_filter_order = 3;
|
||||
dll_filter_order = 2;
|
||||
fll_bw_hz = 35.0;
|
||||
pll_pull_in_bw_hz = 50.0;
|
||||
dll_pull_in_bw_hz = 3.0;
|
||||
pll_bw_hz = 35.0;
|
||||
|
@ -40,6 +40,14 @@ class Dll_Pll_Conf
|
||||
{
|
||||
public:
|
||||
/* DLL/PLL tracking configuration */
|
||||
|
||||
int fll_filter_order;
|
||||
bool enable_fll_pull_in;
|
||||
bool enable_fll_steady_state;
|
||||
unsigned int pull_in_time_s;
|
||||
int pll_filter_order;
|
||||
int dll_filter_order;
|
||||
|
||||
double fs_in;
|
||||
uint32_t vector_length;
|
||||
bool dump;
|
||||
@ -47,6 +55,7 @@ public:
|
||||
std::string dump_filename;
|
||||
float pll_pull_in_bw_hz;
|
||||
float dll_pull_in_bw_hz;
|
||||
float fll_bw_hz;
|
||||
float pll_bw_hz;
|
||||
float dll_bw_hz;
|
||||
float pll_bw_narrow_hz;
|
||||
|
@ -39,9 +39,6 @@
|
||||
#include "acquisition_interface.h" // for AcquisitionInterface
|
||||
#include "array_signal_conditioner.h"
|
||||
#include "beamformer_filter.h"
|
||||
#include "beidou_b1i_dll_pll_tracking.h"
|
||||
#include "beidou_b1i_pcps_acquisition.h"
|
||||
#include "beidou_b1i_telemetry_decoder.h"
|
||||
#include "byte_to_short.h"
|
||||
#include "channel.h"
|
||||
#include "configuration_interface.h"
|
||||
@ -69,6 +66,12 @@
|
||||
#include "glonass_l2_ca_dll_pll_tracking.h"
|
||||
#include "glonass_l2_ca_pcps_acquisition.h"
|
||||
#include "glonass_l2_ca_telemetry_decoder.h"
|
||||
#include "beidou_b1i_pcps_acquisition.h"
|
||||
#include "beidou_b1i_dll_pll_tracking.h"
|
||||
#include "beidou_b1i_telemetry_decoder.h"
|
||||
#include "beidou_b3i_pcps_acquisition.h"
|
||||
#include "beidou_b3i_dll_pll_tracking.h"
|
||||
#include "beidou_b3i_telemetry_decoder.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "gps_l1_ca_dll_pll_c_aid_tracking.h"
|
||||
#include "gps_l1_ca_dll_pll_tracking.h"
|
||||
@ -280,17 +283,18 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetObservables(const std::
|
||||
unsigned int Glonass_channels = configuration->property("Channels_1G.count", 0);
|
||||
Glonass_channels += configuration->property("Channels_2G.count", 0);
|
||||
unsigned int Beidou_channels = configuration->property("Channels_B1.count", 0);
|
||||
Beidou_channels += configuration->property("Channels_B3.count", 0);
|
||||
unsigned int extra_channels = 1; // For monitor channel sample counter
|
||||
return GetBlock(configuration, "Observables", implementation,
|
||||
Galileo_channels +
|
||||
GPS_channels +
|
||||
Glonass_channels +
|
||||
Beidou_channels +
|
||||
Beidou_channels +
|
||||
extra_channels,
|
||||
Galileo_channels +
|
||||
Galileo_channels +
|
||||
GPS_channels +
|
||||
Glonass_channels +
|
||||
Beidou_channels);
|
||||
Beidou_channels);
|
||||
}
|
||||
|
||||
|
||||
@ -307,8 +311,9 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetPVT(const std::shared_p
|
||||
unsigned int Glonass_channels = configuration->property("Channels_1G.count", 0);
|
||||
Glonass_channels += configuration->property("Channels_2G.count", 0);
|
||||
unsigned int Beidou_channels = configuration->property("Channels_B1.count", 0);
|
||||
Beidou_channels += configuration->property("Channels_B3.count", 0);
|
||||
return GetBlock(configuration, "PVT", implementation,
|
||||
Galileo_channels + GPS_channels + Glonass_channels + Beidou_channels, 0);
|
||||
Galileo_channels + GPS_channels + Glonass_channels + Beidou_channels, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -847,6 +852,74 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_B1(
|
||||
return channel_;
|
||||
}
|
||||
|
||||
|
||||
//********* BeiDou B3I CHANNEL *****************
|
||||
std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_B3(
|
||||
const std::shared_ptr<ConfigurationInterface>& configuration,
|
||||
const std::string& acq, const std::string& trk, const std::string& tlm, int channel,
|
||||
gr::msg_queue::sptr queue)
|
||||
{
|
||||
std::stringstream stream;
|
||||
stream << channel;
|
||||
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_B3" + std::to_string(channel) + ".implementation", std::string("W"));
|
||||
std::string appendix1;
|
||||
if (aux != "W")
|
||||
{
|
||||
appendix1 = std::to_string(channel);
|
||||
}
|
||||
else
|
||||
{
|
||||
appendix1 = "";
|
||||
}
|
||||
aux = configuration->property("Tracking_B3" + std::to_string(channel) + ".implementation", std::string("W"));
|
||||
std::string appendix2;
|
||||
if (aux != "W")
|
||||
{
|
||||
appendix2 = std::to_string(channel);
|
||||
}
|
||||
else
|
||||
{
|
||||
appendix2 = "";
|
||||
}
|
||||
aux = configuration->property("TelemetryDecoder_B3" + std::to_string(channel) + ".implementation", std::string("W"));
|
||||
std::string appendix3;
|
||||
if (aux != "W")
|
||||
{
|
||||
appendix3 = std::to_string(channel);
|
||||
}
|
||||
else
|
||||
{
|
||||
appendix3 = "";
|
||||
}
|
||||
// Automatically detect input data type
|
||||
std::shared_ptr<InMemoryConfiguration> config;
|
||||
config = std::make_shared<InMemoryConfiguration>();
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string acq_item_type = configuration->property("Acquisition_B3" + appendix1 + ".item_type", default_item_type);
|
||||
std::string trk_item_type = configuration->property("Tracking_B3" + appendix2 + ".item_type", default_item_type);
|
||||
if (acq_item_type != trk_item_type)
|
||||
{
|
||||
LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!";
|
||||
}
|
||||
config->set_property("Channel.item_type", acq_item_type);
|
||||
|
||||
std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_B3" + appendix1, acq, 1, 0);
|
||||
std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_B3" + appendix2, trk, 1, 1);
|
||||
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_B3" + appendix3, tlm, 1, 1);
|
||||
|
||||
std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel,
|
||||
std::move(acq_),
|
||||
std::move(trk_),
|
||||
std::move(tlm_),
|
||||
"Channel", "B3", std::move(queue)));
|
||||
|
||||
return channel_;
|
||||
}
|
||||
|
||||
|
||||
std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFactory::GetChannels(
|
||||
const std::shared_ptr<ConfigurationInterface>& configuration, const gr::msg_queue::sptr queue) // NOLINT(performance-unnecessary-value-param)
|
||||
{
|
||||
@ -865,6 +938,7 @@ std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFacto
|
||||
unsigned int Channels_5X_count = configuration->property("Channels_5X.count", 0);
|
||||
unsigned int Channels_L5_count = configuration->property("Channels_L5.count", 0);
|
||||
unsigned int Channels_B1_count = configuration->property("Channels_B1.count", 0);
|
||||
unsigned int Channels_B3_count = configuration->property("Channels_B3.count", 0);
|
||||
|
||||
unsigned int total_channels = Channels_1C_count +
|
||||
Channels_1B_count +
|
||||
@ -873,7 +947,8 @@ std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFacto
|
||||
Channels_2G_count +
|
||||
Channels_5X_count +
|
||||
Channels_L5_count +
|
||||
Channels_B1_count;
|
||||
Channels_B1_count +
|
||||
Channels_B3_count;
|
||||
|
||||
std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> channels(new std::vector<std::unique_ptr<GNSSBlockInterface>>(total_channels));
|
||||
try
|
||||
@ -1113,6 +1188,37 @@ std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFacto
|
||||
queue);
|
||||
channel_absolute_id++;
|
||||
}
|
||||
|
||||
//**************** BEIDOU B3I CHANNELS **********************
|
||||
LOG(INFO) << "Getting " << Channels_B3_count << " BEIDOU B3I channels";
|
||||
acquisition_implementation = configuration->property("Acquisition_B3.implementation", default_implementation);
|
||||
tracking_implementation = configuration->property("Tracking_B3.implementation", default_implementation);
|
||||
telemetry_decoder_implementation = configuration->property("TelemetryDecoder_B3.implementation", default_implementation);
|
||||
|
||||
for (unsigned int i = 0; i < Channels_B3_count; i++)
|
||||
{
|
||||
//(i.e. Acquisition_2G0.implementation=xxxx)
|
||||
std::string acquisition_implementation_specific = configuration->property(
|
||||
"Acquisition_B3" + std::to_string(channel_absolute_id) + ".implementation",
|
||||
acquisition_implementation);
|
||||
//(i.e. Tracking_2G0.implementation=xxxx)
|
||||
std::string tracking_implementation_specific = configuration->property(
|
||||
"Tracking_B3" + std::to_string(channel_absolute_id) + ".implementation",
|
||||
tracking_implementation);
|
||||
std::string telemetry_decoder_implementation_specific = configuration->property(
|
||||
"TelemetryDecoder_B3" + std::to_string(channel_absolute_id) + ".implementation",
|
||||
telemetry_decoder_implementation);
|
||||
|
||||
// Push back the channel to the vector of channels
|
||||
channels->at(channel_absolute_id) = GetChannel_B3(configuration,
|
||||
acquisition_implementation_specific,
|
||||
tracking_implementation_specific,
|
||||
telemetry_decoder_implementation_specific,
|
||||
channel_absolute_id,
|
||||
queue);
|
||||
channel_absolute_id++;
|
||||
}
|
||||
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
@ -1597,6 +1703,12 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
else if (implementation == "BEIDOU_B3I_PCPS_Acquisition")
|
||||
{
|
||||
std::unique_ptr<AcquisitionInterface> block_(new BeidouB3iPcpsAcquisition(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
|
||||
// TRACKING BLOCKS -------------------------------------------------------------
|
||||
else if (implementation == "GPS_L1_CA_DLL_PLL_Tracking")
|
||||
@ -1608,7 +1720,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
else if (implementation == "GPS_L1_CA_KF_Tracking")
|
||||
{
|
||||
std::unique_ptr<GNSSBlockInterface> block_(new GpsL1CaKfTracking(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
else if (implementation == "GPS_L1_CA_DLL_PLL_C_Aid_Tracking")
|
||||
@ -1731,6 +1843,12 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
else if (implementation == "BEIDOU_B3I_DLL_PLL_Tracking")
|
||||
{
|
||||
std::unique_ptr<GNSSBlockInterface> block_(new BeidouB3iDllPllTracking(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
// TELEMETRY DECODERS ----------------------------------------------------------
|
||||
else if (implementation == "GPS_L1_CA_Telemetry_Decoder")
|
||||
{
|
||||
@ -1786,6 +1904,12 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
else if (implementation == "BEIDOU_B3I_Telemetry_Decoder")
|
||||
{
|
||||
std::unique_ptr<GNSSBlockInterface> block_(new BeidouB3iTelemetryDecoder(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
|
||||
// OBSERVABLES -----------------------------------------------------------------
|
||||
else if ((implementation == "Hybrid_Observables") || (implementation == "GPS_L1_CA_Observables") || (implementation == "GPS_L2C_Observables") ||
|
||||
@ -1981,7 +2105,12 @@ std::unique_ptr<AcquisitionInterface> GNSSBlockFactory::GetAcqBlock(
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
|
||||
else if (implementation == "BEIDOU_B3I_PCPS_Acquisition")
|
||||
{
|
||||
std::unique_ptr<AcquisitionInterface> block_(new BeidouB3iPcpsAcquisition(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Log fatal. This causes execution to stop.
|
||||
@ -2009,7 +2138,7 @@ std::unique_ptr<TrackingInterface> GNSSBlockFactory::GetTrkBlock(
|
||||
else if (implementation == "GPS_L1_CA_KF_Tracking")
|
||||
{
|
||||
std::unique_ptr<TrackingInterface> block_(new GpsL1CaKfTracking(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
else if (implementation == "GPS_L1_CA_DLL_PLL_C_Aid_Tracking")
|
||||
@ -2132,6 +2261,12 @@ std::unique_ptr<TrackingInterface> GNSSBlockFactory::GetTrkBlock(
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
else if (implementation == "BEIDOU_B3I_DLL_PLL_Tracking")
|
||||
{
|
||||
std::unique_ptr<TrackingInterface> block_(new BeidouB3iDllPllTracking(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
@ -2205,7 +2340,12 @@ std::unique_ptr<TelemetryDecoderInterface> GNSSBlockFactory::GetTlmBlock(
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
|
||||
else if (implementation == "BEIDOU_B3I_Telemetry_Decoder")
|
||||
{
|
||||
std::unique_ptr<TelemetryDecoderInterface> block_(new BeidouB3iTelemetryDecoder(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
@ -110,6 +110,10 @@ private:
|
||||
const std::string& acq, const std::string& trk, const std::string& tlm, int channel,
|
||||
gr::msg_queue::sptr queue);
|
||||
|
||||
std::unique_ptr<GNSSBlockInterface> GetChannel_B3(const std::shared_ptr<ConfigurationInterface>& configuration,
|
||||
const std::string& acq, const std::string& trk, const std::string& tlm, int channel,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
std::unique_ptr<AcquisitionInterface> GetAcqBlock(
|
||||
const std::shared_ptr<ConfigurationInterface>& configuration,
|
||||
const std::string& role,
|
||||
|
@ -154,7 +154,6 @@ void GNSSFlowgraph::connect()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Signal Source > Signal conditioner >
|
||||
for (unsigned int i = 0; i < sig_conditioner_.size(); i++)
|
||||
{
|
||||
@ -216,20 +215,18 @@ void GNSSFlowgraph::connect()
|
||||
|
||||
DLOG(INFO) << "blocks connected internally";
|
||||
// Signal Source (i) > Signal conditioner (i) >
|
||||
|
||||
#ifndef ENABLE_FPGA
|
||||
|
||||
int RF_Channels = 0;
|
||||
int signal_conditioner_ID = 0;
|
||||
for (int i = 0; i < sources_count_; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
//TODO: Remove this array implementation and create generic multistream connector
|
||||
//(if a signal source has more than 1 stream, then connect it to the multistream signal conditioner)
|
||||
// TODO: Remove this array implementation and create generic multistream connector
|
||||
// (if a signal source has more than 1 stream, then connect it to the multistream signal conditioner)
|
||||
if (sig_source_.at(i)->implementation() == "Raw_Array_Signal_Source")
|
||||
{
|
||||
//Multichannel Array
|
||||
// Multichannel Array
|
||||
std::cout << "ARRAY MODE" << std::endl;
|
||||
for (int j = 0; j < GNSS_SDR_ARRAY_SIGNAL_CONDITIONER_CHANNELS; j++)
|
||||
{
|
||||
@ -239,14 +236,14 @@ void GNSSFlowgraph::connect()
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO: Create a class interface for SignalSources, derived from GNSSBlockInterface.
|
||||
//Include GetRFChannels in the interface to avoid read config parameters here
|
||||
//read the number of RF channels for each front-end
|
||||
// TODO: Create a class interface for SignalSources, derived from GNSSBlockInterface.
|
||||
// Include GetRFChannels in the interface to avoid read config parameters here
|
||||
// read the number of RF channels for each front-end
|
||||
RF_Channels = configuration_->property(sig_source_.at(i)->role() + ".RF_channels", 1);
|
||||
|
||||
for (int j = 0; j < RF_Channels; j++)
|
||||
{
|
||||
//Connect the multichannel signal source to multiple signal conditioners
|
||||
// Connect the multichannel signal source to multiple signal conditioners
|
||||
// GNURADIO max_streams=-1 means infinite ports!
|
||||
LOG(INFO) << "sig_source_.at(i)->get_right_block()->output_signature()->max_streams()=" << sig_source_.at(i)->get_right_block()->output_signature()->max_streams();
|
||||
LOG(INFO) << "sig_conditioner_.at(signal_conditioner_ID)->get_left_block()->input_signature()=" << sig_conditioner_.at(signal_conditioner_ID)->get_left_block()->input_signature()->max_streams();
|
||||
@ -284,15 +281,13 @@ void GNSSFlowgraph::connect()
|
||||
}
|
||||
}
|
||||
DLOG(INFO) << "Signal source connected to signal conditioner";
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLE_FPGA
|
||||
|
||||
if (configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false) == false)
|
||||
{
|
||||
//connect the signal source to sample counter
|
||||
//connect the sample counter to Observables
|
||||
// connect the signal source to sample counter
|
||||
// connect the sample counter to Observables
|
||||
try
|
||||
{
|
||||
double fs = static_cast<double>(configuration_->property("GNSS-SDR.internal_fs_sps", 0));
|
||||
@ -317,7 +312,7 @@ void GNSSFlowgraph::connect()
|
||||
}
|
||||
else
|
||||
{
|
||||
//create a hardware-defined gnss_synchro pulse for the observables block
|
||||
// create a hardware-defined gnss_synchro pulse for the observables block
|
||||
try
|
||||
{
|
||||
double fs = static_cast<double>(configuration_->property("GNSS-SDR.internal_fs_sps", 0));
|
||||
@ -370,7 +365,6 @@ void GNSSFlowgraph::connect()
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
{
|
||||
#ifndef ENABLE_FPGA
|
||||
|
||||
int selected_signal_conditioner_ID = 0;
|
||||
bool use_acq_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false);
|
||||
uint32_t fs = configuration_->property("GNSS-SDR.internal_fs_sps", 0);
|
||||
@ -389,10 +383,10 @@ void GNSSFlowgraph::connect()
|
||||
// Enable automatic resampler for the acquisition, if required
|
||||
if (use_acq_resampler == true)
|
||||
{
|
||||
//create acquisition resamplers if required
|
||||
// create acquisition resamplers if required
|
||||
double resampler_ratio = 1.0;
|
||||
double acq_fs = fs;
|
||||
//find the signal associated to this channel
|
||||
// find the signal associated to this channel
|
||||
switch (mapStringValues_[channels_.at(i)->implementation()])
|
||||
{
|
||||
case evGPS_1C:
|
||||
@ -422,11 +416,14 @@ void GNSSFlowgraph::connect()
|
||||
case evBDS_B1:
|
||||
acq_fs = fs;
|
||||
break;
|
||||
case evBDS_B3:
|
||||
acq_fs = fs;
|
||||
break;
|
||||
}
|
||||
|
||||
if (acq_fs < fs)
|
||||
{
|
||||
//check if the resampler is already created for the channel system/signal and for the specific RF Channel
|
||||
// check if the resampler is already created for the channel system/signal and for the specific RF Channel
|
||||
std::string map_key = channels_.at(i)->implementation() + std::to_string(selected_signal_conditioner_ID);
|
||||
resampler_ratio = static_cast<double>(fs) / acq_fs;
|
||||
int decimation = floor(resampler_ratio);
|
||||
@ -438,7 +435,7 @@ void GNSSFlowgraph::connect()
|
||||
|
||||
if (decimation > 1)
|
||||
{
|
||||
//create a FIR low pass filter
|
||||
// create a FIR low pass filter
|
||||
std::vector<float> taps;
|
||||
taps = gr::filter::firdes::low_pass(1.0,
|
||||
fs,
|
||||
@ -465,13 +462,9 @@ void GNSSFlowgraph::connect()
|
||||
<< " acquisition resampler for RF channel " << std::to_string(signal_conditioner_ID) << " with " << taps.size() << " taps and decimation factor of " << decimation;
|
||||
}
|
||||
|
||||
|
||||
top_block_->connect(acq_resamplers_.at(map_key), 0,
|
||||
channels_.at(i)->get_left_block_acq(), 0);
|
||||
|
||||
top_block_->connect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0,
|
||||
channels_.at(i)->get_left_block_trk(), 0);
|
||||
|
||||
std::shared_ptr<Channel> channel_ptr;
|
||||
channel_ptr = std::dynamic_pointer_cast<Channel>(channels_.at(i));
|
||||
channel_ptr->acquisition()->set_resampler_latency((taps.size() - 1) / 2);
|
||||
@ -479,11 +472,9 @@ void GNSSFlowgraph::connect()
|
||||
else
|
||||
{
|
||||
LOG(INFO) << "Disabled acquisition resampler because the input sampling frequency is too low";
|
||||
//resampler not required!
|
||||
// resampler not required!
|
||||
top_block_->connect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0,
|
||||
channels_.at(i)->get_left_block_acq(), 0);
|
||||
top_block_->connect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0,
|
||||
channels_.at(i)->get_left_block_trk(), 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -491,17 +482,15 @@ void GNSSFlowgraph::connect()
|
||||
LOG(INFO) << "Disabled acquisition resampler because the input sampling frequency is too low";
|
||||
top_block_->connect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0,
|
||||
channels_.at(i)->get_left_block_acq(), 0);
|
||||
top_block_->connect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0,
|
||||
channels_.at(i)->get_left_block_trk(), 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
top_block_->connect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0,
|
||||
channels_.at(i)->get_left_block_acq(), 0);
|
||||
top_block_->connect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0,
|
||||
channels_.at(i)->get_left_block_trk(), 0);
|
||||
}
|
||||
top_block_->connect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0,
|
||||
channels_.at(i)->get_left_block_trk(), 0);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
@ -624,6 +613,12 @@ void GNSSFlowgraph::connect()
|
||||
available_BDS_B1_signals_.remove(signal_value);
|
||||
break;
|
||||
|
||||
case evBDS_B3:
|
||||
gnss_system = "Beidou";
|
||||
signal_value = Gnss_Signal(Gnss_Satellite(gnss_system, sat), gnss_signal);
|
||||
available_BDS_B3_signals_.remove(signal_value);
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG(ERROR) << "This should not happen :-(";
|
||||
gnss_system = "GPS";
|
||||
@ -671,8 +666,6 @@ void GNSSFlowgraph::connect()
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef ENABLE_FPGA
|
||||
// Activate acquisition in enabled channels
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
@ -689,7 +682,6 @@ void GNSSFlowgraph::connect()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
connected_ = true;
|
||||
LOG(INFO) << "Flowgraph connected";
|
||||
top_block_->dump();
|
||||
@ -709,8 +701,6 @@ void GNSSFlowgraph::disconnect()
|
||||
// Signal Source (i) > Signal conditioner (i) >
|
||||
int RF_Channels = 0;
|
||||
int signal_conditioner_ID = 0;
|
||||
|
||||
|
||||
#ifdef ENABLE_FPGA
|
||||
if (configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false) == false)
|
||||
{
|
||||
@ -722,7 +712,7 @@ void GNSSFlowgraph::disconnect()
|
||||
// (if a signal source has more than 1 stream, then connect it to the multistream signal conditioner)
|
||||
if (sig_source_.at(i)->implementation() == "Raw_Array_Signal_Source")
|
||||
{
|
||||
//Multichannel Array
|
||||
// Multichannel Array
|
||||
for (int j = 0; j < GNSS_SDR_ARRAY_SIGNAL_CONDITIONER_CHANNELS; j++)
|
||||
{
|
||||
top_block_->disconnect(sig_source_.at(i)->get_right_block(), j, sig_conditioner_.at(i)->get_left_block(), j);
|
||||
@ -766,10 +756,7 @@ void GNSSFlowgraph::disconnect()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
for (int i = 0; i < sources_count_; i++)
|
||||
{
|
||||
try
|
||||
@ -872,7 +859,6 @@ void GNSSFlowgraph::disconnect()
|
||||
}
|
||||
#endif
|
||||
// Signal conditioner (selected_signal_source) >> channels (i) (dependent of their associated SignalSource_ID)
|
||||
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
{
|
||||
#ifndef ENABLE_FPGA
|
||||
@ -1108,7 +1094,13 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
||||
break;
|
||||
|
||||
case evBDS_B1:
|
||||
available_BDS_B1_signals_.push_back(channels_[who]->get_signal());
|
||||
available_BDS_B1_signals_.remove(gs);
|
||||
available_BDS_B1_signals_.push_back(gs);
|
||||
break;
|
||||
|
||||
case evBDS_B3:
|
||||
available_BDS_B3_signals_.remove(gs);
|
||||
available_BDS_B3_signals_.push_back(gs);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1190,6 +1182,10 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
||||
available_BDS_B1_signals_.remove(channels_[who]->get_signal());
|
||||
break;
|
||||
|
||||
case evBDS_B3:
|
||||
available_BDS_B3_signals_.remove(channels_[who]->get_signal());
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG(ERROR) << "This should not happen :-(";
|
||||
break;
|
||||
@ -1286,6 +1282,10 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
||||
available_BDS_B1_signals_.push_back(channels_[who]->get_signal());
|
||||
break;
|
||||
|
||||
case evBDS_B3:
|
||||
available_BDS_B3_signals_.push_back(channels_[who]->get_signal());
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG(ERROR) << "This should not happen :-(";
|
||||
break;
|
||||
@ -1300,7 +1300,6 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
||||
if (channels_state_[n] == 1 or channels_state_[n] == 2) //channel in acquisition or in tracking
|
||||
{
|
||||
//recover the satellite assigned
|
||||
|
||||
Gnss_Signal gs = channels_[n]->get_signal();
|
||||
switch (mapStringValues_[gs.get_signal_str()])
|
||||
{
|
||||
@ -1339,11 +1338,21 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
||||
available_GLO_2G_signals_.push_back(gs);
|
||||
break;
|
||||
|
||||
case evBDS_B1:
|
||||
available_BDS_B1_signals_.remove(gs);
|
||||
available_BDS_B1_signals_.push_back(gs);
|
||||
break;
|
||||
|
||||
case evBDS_B3:
|
||||
available_BDS_B3_signals_.remove(gs);
|
||||
available_BDS_B3_signals_.push_back(gs);
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG(ERROR) << "This should not happen :-(";
|
||||
break;
|
||||
}
|
||||
channels_[n]->stop_channel(); //stop the acquisition or tracking operation
|
||||
channels_[n]->stop_channel(); // stop the acquisition or tracking operation
|
||||
channels_state_[n] = 0;
|
||||
}
|
||||
}
|
||||
@ -1351,7 +1360,7 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
||||
break;
|
||||
case 11: // request coldstart mode
|
||||
LOG(INFO) << "TC request flowgraph coldstart";
|
||||
//start again the satellite acquisitions
|
||||
// start again the satellite acquisitions
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
{
|
||||
unsigned int ch_index = (who + i + 1) % channels_count_;
|
||||
@ -1420,7 +1429,7 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
||||
break;
|
||||
case 13: // request warmstart mode
|
||||
LOG(INFO) << "TC request flowgraph warmstart";
|
||||
//start again the satellite acquisitions
|
||||
// start again the satellite acquisitions
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
{
|
||||
unsigned int ch_index = (who + i + 1) % channels_count_;
|
||||
@ -1528,8 +1537,8 @@ void GNSSFlowgraph::set_configuration(std::shared_ptr<ConfigurationInterface> co
|
||||
configuration_ = std::move(configuration);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FPGA
|
||||
|
||||
#ifdef ENABLE_FPGA
|
||||
void GNSSFlowgraph::start_acquisition_helper()
|
||||
{
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
@ -1549,9 +1558,9 @@ void GNSSFlowgraph::perform_hw_reset()
|
||||
channel_ptr = std::dynamic_pointer_cast<Channel>(channels_.at(0));
|
||||
channel_ptr->acquisition()->stop_acquisition();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void GNSSFlowgraph::init()
|
||||
{
|
||||
/*
|
||||
@ -1645,6 +1654,7 @@ void GNSSFlowgraph::init()
|
||||
mapStringValues_["1G"] = evGLO_1G;
|
||||
mapStringValues_["2G"] = evGLO_2G;
|
||||
mapStringValues_["B1"] = evBDS_B1;
|
||||
mapStringValues_["B3"] = evBDS_B3;
|
||||
|
||||
// fill the signals queue with the satellites ID's to be searched by the acquisition
|
||||
set_signals_list();
|
||||
@ -1672,6 +1682,21 @@ void GNSSFlowgraph::init()
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::string> GNSSFlowgraph::split_string(const std::string& s, char delim)
|
||||
{
|
||||
std::vector<std::string> v;
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
|
||||
while (std::getline(ss, item, delim))
|
||||
{
|
||||
*(std::back_inserter(v)++) = item;
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
void GNSSFlowgraph::set_signals_list()
|
||||
{
|
||||
// Set a sequential list of GNSS satellites
|
||||
@ -1693,7 +1718,8 @@ void GNSSFlowgraph::set_signals_list()
|
||||
|
||||
std::set<unsigned int> available_beidou_prn = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
|
||||
30, 31, 32, 33, 34, 35, 36, 37};
|
||||
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
|
||||
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63};
|
||||
|
||||
std::string sv_list = configuration_->property("Galileo.prns", std::string(""));
|
||||
|
||||
@ -1758,8 +1784,8 @@ void GNSSFlowgraph::set_signals_list()
|
||||
available_glonass_prn = tmp_set;
|
||||
}
|
||||
}
|
||||
sv_list = configuration_->property("Beidou.prns", std::string(""));
|
||||
|
||||
sv_list = configuration_->property("Beidou.prns", std::string(""));
|
||||
|
||||
if (sv_list.length() > 0)
|
||||
{
|
||||
@ -1775,7 +1801,6 @@ void GNSSFlowgraph::set_signals_list()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (configuration_->property("Channels_1C.count", 0) > 0)
|
||||
{
|
||||
// Loop to create GPS L1 C/A signals
|
||||
@ -1894,6 +1919,21 @@ void GNSSFlowgraph::set_signals_list()
|
||||
std::string("B1")));
|
||||
}
|
||||
}
|
||||
|
||||
if (configuration_->property("Channels_B3.count", 0) > 0)
|
||||
{
|
||||
/*
|
||||
* Loop to create the list of BeiDou B1C signals
|
||||
*/
|
||||
for (available_gnss_prn_iter = available_beidou_prn.cbegin();
|
||||
available_gnss_prn_iter != available_beidou_prn.cend();
|
||||
available_gnss_prn_iter++)
|
||||
{
|
||||
available_BDS_B3_signals_.push_back(Gnss_Signal(
|
||||
Gnss_Satellite(std::string("Beidou"), *available_gnss_prn_iter),
|
||||
std::string("B3")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2153,20 +2193,44 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
|
||||
}
|
||||
if (tracked)
|
||||
{
|
||||
// In the near future Beidou B2a will be added
|
||||
// if (configuration_->property("Channels_5C.count", 0) > 0)
|
||||
// {
|
||||
// for (unsigned int ch = 0; ch < channels_count_; ch++)
|
||||
// {
|
||||
// if ((channels_[ch]->get_signal().get_satellite() == result.get_satellite()) and (channels_[ch]->get_signal().get_signal_str().compare("5C") != 0)) untracked_satellite = false;
|
||||
// }
|
||||
// if (untracked_satellite)
|
||||
// {
|
||||
// Gnss_Signal gs = Gnss_Signal(result.get_satellite(), "5C");
|
||||
// available_BDS_5C_signals_.remove(gs);
|
||||
// available_BDS_5C_signals_.push_front(gs);
|
||||
// }
|
||||
// }
|
||||
if (configuration_->property("Channels_B3.count", 0) > 0)
|
||||
{
|
||||
for (unsigned int ch = 0; ch < channels_count_; ch++)
|
||||
{
|
||||
if ((channels_[ch]->get_signal().get_satellite() == result.get_satellite()) and (channels_[ch]->get_signal().get_signal_str() != "2G")) untracked_satellite = false;
|
||||
}
|
||||
if (untracked_satellite)
|
||||
{
|
||||
Gnss_Signal gs = Gnss_Signal(result.get_satellite(), "B3");
|
||||
available_BDS_B3_signals_.remove(gs);
|
||||
available_BDS_B3_signals_.push_front(gs);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case evBDS_B3:
|
||||
result = available_BDS_B3_signals_.front();
|
||||
available_BDS_B3_signals_.pop_front();
|
||||
if (!pop)
|
||||
{
|
||||
available_BDS_B3_signals_.push_back(result);
|
||||
}
|
||||
if (tracked)
|
||||
{
|
||||
if (configuration_->property("Channels_B1.count", 0) > 0)
|
||||
{
|
||||
for (unsigned int ch = 0; ch < channels_count_; ch++)
|
||||
{
|
||||
if ((channels_[ch]->get_signal().get_satellite() == result.get_satellite()) and (channels_[ch]->get_signal().get_signal_str() != "2G")) untracked_satellite = false;
|
||||
}
|
||||
if (untracked_satellite)
|
||||
{
|
||||
Gnss_Signal gs = Gnss_Signal(result.get_satellite(), "B1");
|
||||
available_BDS_B1_signals_.remove(gs);
|
||||
available_BDS_B1_signals_.push_front(gs);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2181,17 +2245,3 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector<std::string> GNSSFlowgraph::split_string(const std::string& s, char delim)
|
||||
{
|
||||
std::vector<std::string> v;
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
|
||||
while (std::getline(ss, item, delim))
|
||||
{
|
||||
*(std::back_inserter(v)++) = item;
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
@ -184,6 +184,7 @@ private:
|
||||
std::list<Gnss_Signal> available_GLO_1G_signals_;
|
||||
std::list<Gnss_Signal> available_GLO_2G_signals_;
|
||||
std::list<Gnss_Signal> available_BDS_B1_signals_;
|
||||
std::list<Gnss_Signal> available_BDS_B3_signals_;
|
||||
enum StringValue
|
||||
{
|
||||
evGPS_1C,
|
||||
@ -194,7 +195,8 @@ private:
|
||||
evGAL_5X,
|
||||
evGLO_1G,
|
||||
evGLO_2G,
|
||||
evBDS_B1
|
||||
evBDS_B1,
|
||||
evBDS_B3
|
||||
};
|
||||
std::map<std::string, StringValue> mapStringValues_;
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
@ -58,290 +58,19 @@ const int32_t BEIDOU_B1I_SECONDARY_CODE_LENGTH = 20;
|
||||
const std::string BEIDOU_B1I_SECONDARY_CODE = "00000100110101001110";
|
||||
const std::string BEIDOU_B1I_SECONDARY_CODE_STR = "00000100110101001110";
|
||||
const std::string BEIDOU_B1I_D2_SECONDARY_CODE_STR = "00";
|
||||
|
||||
/*!
|
||||
* \brief Maximum Time-Of-Arrival (TOA) difference between satellites for a receiver operated on Earth surface is 20 ms
|
||||
*
|
||||
* According to the GPS orbit model described in [1] Pag. 32.
|
||||
* It should be taken into account to set the buffer size for the PRN start timestamp in the pseudoranges block.
|
||||
* [1] J. Bao-Yen Tsui, Fundamentals of Global Positioning System Receivers. A Software Approach, John Wiley & Sons,
|
||||
* Inc., Hoboken, NJ, 2nd edition, 2005.
|
||||
*/
|
||||
const double BEIDOU_MAX_TOA_DELAY_MS = 20; //******************
|
||||
|
||||
//#define NAVIGATION_SOLUTION_RATE_MS 1000 // this cannot go here
|
||||
const double BEIDOU_STARTOFFSET_MS = 68.802; //**************[ms] Initial sign. travel time (this cannot go here)
|
||||
|
||||
|
||||
// OBSERVABLE HISTORY DEEP FOR INTERPOLATION
|
||||
const int32_t BEIDOU_B1I_HISTORY_DEEP = 100; // ****************
|
||||
|
||||
// NAVIGATION MESSAGE DEMODULATION AND DECODING
|
||||
|
||||
const int32_t BEIDOU_B1I_PREAMBLE_LENGTH_BITS = 11;
|
||||
const int32_t BEIDOU_B1I_PREAMBLE_LENGTH_SYMBOLS = 220; // **************
|
||||
const int BEIDOU_B1I_PREAMBLE_LENGTH_BITS = 11;
|
||||
const int BEIDOU_B1I_PREAMBLE_LENGTH_SYMBOLS = 220; // **************
|
||||
const double BEIDOU_B1I_PREAMBLE_DURATION_S = 0.220;
|
||||
const int32_t BEIDOU_B1I_PREAMBLE_DURATION_MS = 220;
|
||||
const int32_t BEIDOU_B1I_TELEMETRY_RATE_BITS_SECOND = 50; //!< D1 NAV message bit rate [bits/s]
|
||||
const int32_t BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT = 20; // *************
|
||||
const int32_t BEIDOU_B1I_TELEMETRY_RATE_SYMBOLS_SECOND = BEIDOU_B1I_TELEMETRY_RATE_BITS_SECOND * BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT; //************!< NAV message bit rate [symbols/s]
|
||||
const int32_t BEIDOU_WORD_LENGTH = 4; //**************!< CRC + BEIDOU WORD (-2 -1 0 ... 29) Bits = 4 bytes
|
||||
const int32_t BEIDOU_SUBFRAME_LENGTH = 40; //**************!< BEIDOU_WORD_LENGTH x 10 = 40 bytes
|
||||
const int32_t BEIDOU_DNAV_SUBFRAME_DATA_BITS = 300; //!< Number of bits per subframe in the NAV message [bits]
|
||||
const int32_t BEIDOU_SUBFRAME_SECONDS = 6; //!< Subframe duration [seconds]
|
||||
const int32_t BEIDOU_SUBFRAME_MS = 6000; //!< Subframe duration [miliseconds]
|
||||
const int32_t BEIDOU_WORD_BITS = 30; //!< Number of bits per word in the NAV message [bits]
|
||||
const int BEIDOU_B1I_PREAMBLE_DURATION_MS = 220;
|
||||
const int BEIDOU_B1I_TELEMETRY_RATE_BITS_SECOND = 50; //!< D1 NAV message bit rate [bits/s]
|
||||
const int BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT = 20; // *************
|
||||
const int BEIDOU_B1I_TELEMETRY_RATE_SYMBOLS_SECOND = BEIDOU_B1I_TELEMETRY_RATE_BITS_SECOND * BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT; //************!< NAV message bit rate [symbols/s]
|
||||
const int BEIDOU_WORD_LENGTH = 4; //**************!< CRC + BEIDOU WORD (-2 -1 0 ... 29) Bits = 4 bytes
|
||||
const int BEIDOU_SUBFRAME_LENGTH = 40; //**************!< BEIDOU_WORD_LENGTH x 10 = 40 bytes
|
||||
const int BEIDOU_DNAV_SUBFRAME_DATA_BITS = 300; //!< Number of bits per subframe in the NAV message [bits]
|
||||
const int BEIDOU_SUBFRAME_SECONDS = 6; //!< Subframe duration [seconds]
|
||||
const int BEIDOU_SUBFRAME_MS = 6000; //!< Subframe duration [miliseconds]
|
||||
const int BEIDOU_WORD_BITS = 30; //!< Number of bits per word in the NAV message [bits]
|
||||
|
||||
const std::string BEIDOU_DNAV_PREAMBLE = "11100010010";
|
||||
const int32_t BEIDOU_DNAV_PREAMBLE_LENGTH_BITS = 11;
|
||||
const int32_t BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS = 11; // **************
|
||||
const uint32_t BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS = 300;
|
||||
const uint32_t BEIDOU_DNAV_SUBFRAME_SYMBOLS = 300;
|
||||
const double BEIDOU_DNAV_DATA_BITS = 300;
|
||||
const double BEIDOU_DNAV_WORDS_SUBFRAME = 10;
|
||||
const double BEIDOU_DNAV_WORD_LENGTH_BITS = 30;
|
||||
|
||||
const double BEIDOU_D1NAV_SYMBOL_RATE_SPS = 50;
|
||||
const double BEIDOU_D2NAV_SYMBOL_RATE_SPS = 500;
|
||||
const double BEIDOU_B1I_PREAMBLE_PERIOD_SYMBOLS = 300;
|
||||
|
||||
// BEIDOU D1 NAVIGATION MESSAGE STRUCTURE
|
||||
// GENERAL
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_PRE({{1, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_FRAID({{16, 3}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_SOW({{19, 8}, {31, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_PNUM({{44, 7}});
|
||||
|
||||
// DNAV SCALE FACTORS
|
||||
// EPH
|
||||
const double D1_TOC_LSB = TWO_P3;
|
||||
const double D1_TGD1_LSB = 0.1e-9;
|
||||
const double D1_TGD2_LSB = 0.1e-9;
|
||||
const double D1_ALPHA0_LSB = TWO_N30;
|
||||
const double D1_ALPHA1_LSB = TWO_N27;
|
||||
const double D1_ALPHA2_LSB = TWO_N24;
|
||||
const double D1_ALPHA3_LSB = TWO_N24;
|
||||
const double D1_BETA0_LSB = TWO_P11;
|
||||
const double D1_BETA1_LSB = TWO_P14;
|
||||
const double D1_BETA2_LSB = TWO_P16;
|
||||
const double D1_BETA3_LSB = TWO_P16;
|
||||
const double D1_A2_LSB = TWO_N66;
|
||||
const double D1_A0_LSB = TWO_N33;
|
||||
const double D1_A1_LSB = TWO_N50;
|
||||
const double D1_DELTA_N_LSB = PI_TWO_N43;
|
||||
const double D1_CUC_LSB = TWO_N31;
|
||||
const double D1_M0_LSB = PI_TWO_N31;
|
||||
const double D1_E_LSB = TWO_N33;
|
||||
const double D1_CUS_LSB = TWO_N31;
|
||||
const double D1_CRC_LSB = TWO_N6;
|
||||
const double D1_CRS_LSB = TWO_N6;
|
||||
const double D1_SQRT_A_LSB = TWO_N19;
|
||||
const double D1_TOE_LSB = TWO_P3;
|
||||
const double D1_I0_LSB = PI_TWO_N31;
|
||||
const double D1_CIC_LSB = TWO_N31;
|
||||
const double D1_OMEGA_DOT_LSB = PI_TWO_N43;
|
||||
const double D1_CIS_LSB = TWO_N31;
|
||||
const double D1_IDOT_LSB = PI_TWO_N43;
|
||||
const double D1_OMEGA0_LSB = PI_TWO_N31;
|
||||
const double D1_OMEGA_LSB = PI_TWO_N31;
|
||||
//ALM
|
||||
const double D1_SQRT_A_ALMANAC_LSB = TWO_N11;
|
||||
const double D1_A1_ALMANAC_LSB = TWO_N38;
|
||||
const double D1_A0_ALMANAC_LSB = TWO_N20;
|
||||
const double D1_OMEGA0_ALMANAC_LSB = PI_TWO_N23;
|
||||
const double D1_E_ALMANAC_LSB = TWO_N21;
|
||||
const double D1_DELTA_I_LSB = PI_TWO_N19;
|
||||
const double D1_TOA_LSB = TWO_P12;
|
||||
const double D1_OMEGA_DOT_ALMANAC_LSB = PI_TWO_N38;
|
||||
const double D1_OMEGA_ALMANAC_LSB = PI_TWO_N23;
|
||||
const double D1_M0_ALMANAC_LSB = PI_TWO_N23;
|
||||
const double D1_A0GPS_LSB = 0.1e-9;
|
||||
const double D1_A1GPS_LSB = 0.1e-9;
|
||||
const double D1_A0GAL_LSB = 0.1e-9;
|
||||
const double D1_A1GAL_LSB = 0.1e-9;
|
||||
const double D1_A0GLO_LSB = 0.1e-9;
|
||||
const double D1_A1GLO_LSB = 0.1e-9;
|
||||
const double D1_A0UTC_LSB = TWO_N30;
|
||||
const double D1_A1UTC_LSB = TWO_N50;
|
||||
|
||||
// SUBFRAME 1
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_SAT_H1({{43, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_AODC({{44, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_URAI({{49, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_WN({{61, 13}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TOC({{74, 9}, {91, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TGD1({{99, 10}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TGD2({{121, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA0({{127, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA1({{135, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA2({{151, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA3({{159, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_BETA0({{167, 6}, {181, 2}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_BETA1({{183, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_BETA2({{191, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_BETA3({{199, 4}, {211, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A2({{215, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0({{226, 7}, {241, 17}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1({{258, 5}, {271, 17}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_AODE({{288, 5}});
|
||||
|
||||
//SUBFRAME 2
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_N({{43, 10}, {61, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CUC({{67, 16}, {91, 2}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_M0({{93, 20}, {121, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_E({{133, 10}, {151, 22}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CUS({{181, 18}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CRC({{199, 4}, {211, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CRS({{225, 8}, {241, 10}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_SQRT_A({{251, 12}, {271, 20}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TOE_SF2({{291, 2}});
|
||||
|
||||
//SUBFRAME 3
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TOE_SF3({{43, 10}, {61, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_I0({{66, 17}, {91, 15}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CIC({{106, 7}, {121, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA_DOT({{132, 11}, {151, 13}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CIS({{164, 9}, {181, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_IDOT({{190, 13}, {211, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA0({{212, 21}, {241, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA({{252, 11}, {271, 21}});
|
||||
|
||||
//SUBFRAME 4 AND PAGES 1 THROUGH 6 IN SUBFRAME 5
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_SQRT_A_ALMANAC({{51, 2}, {61, 22}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1_ALMANAC({{91, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0_ALMANAC({{102, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA0_ALMANAC({{121, 22}, {151, 2}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_E_ALMANAC({{153, 17}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_I({{170, 3}, {181, 13}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TOA({{194, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA_DOT_ALMANAC({{202, 1}, {211, 16}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA_ALMANAC({{227, 6}, {241, 18}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_M0_ALMANAC({{259, 4}, {271, 20}});
|
||||
|
||||
//SUBFRAME 5 PAGE 7
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA1({{51, 2}, {61, 7}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA2({{68, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA3({{77, 6}, {91, 3}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA4({{94, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA5({{103, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA6({{112, 1}, {121, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA7({{129, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA8({{138, 5}, {151, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA9({{155, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA10({{164, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA11({{181, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA12({{190, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA13({{199, 4}, {211, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA14({{216, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA15({{225, 8}, {241, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA16({{242, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA17({{251, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA18({{260, 3}, {271, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA19({{277, 9}});
|
||||
|
||||
//SUBFRAME 5 PAGE 8
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA20({{51, 2}, {61, 7}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA21({{68, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA22({{77, 6}, {91, 3}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA23({{94, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA24({{103, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA25({{112, 1}, {121, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA26({{129, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA27({{138, 5}, {151, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA28({{155, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA29({{164, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA30({{181, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_WNA({{190, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TOA2({{198, 5}, {211, 3}});
|
||||
|
||||
//SUBFRAME 5 PAGE 9
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0GPS({{97, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1GPS({{111, 2}, {121, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0GAL({{135, 8}, {151, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1GAL({{157, 16}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0GLO({{181, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1GLO({{195, 8}, {211, 8}});
|
||||
|
||||
//SUBFRAME 5 PAGE 10
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_T_LS({{51, 2}, {61, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_T_LSF({{67, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_WN_LSF({{75, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0UTC({{91, 22}, {121, 10}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1UTC({{131, 12}, {151, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_DN({{163, 8}});
|
||||
|
||||
// D2 NAV Message Decoding Information
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_PRE({{1, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_FRAID({{16, 3}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_SOW({{19, 8}, {31, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_PNUM({{43, 4}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 1
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_SAT_H1({{47, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_AODC({{48, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_URAI({{61, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_WN({{65, 13}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_TOC({{78, 5}, {91, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_TGD1({{103, 10}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_TGD2({{121, 10}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 2
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA0({{47, 6}, {61, 2}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA1({{63, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA2({{71, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA3({{79, 4}, {91, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_BETA0({{95, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_BETA1({{103, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_BETA2({{111, 2}, {121, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_BETA3({{127, 8}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 3
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_A0({{101, 12}, {121, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_A1_MSB({{133, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_A1_LSB({{47, 6}, {61, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_A1({{279, 22}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 4
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_A2({{73, 10}, {91, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_AODE({{92, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_DELTA_N({{97, 16}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CUC_MSB({{121, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CUC_LSB({{47, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CUC({{283, 18}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 5
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_M0({{51, 2}, {61, 22}, {91, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CUS({{99, 14}, {121, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_E_MSB({{125, 10}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 6
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_E_LSB({{47, 6}, {61, 16}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_SQRT_A({{77, 6}, {91, 22}, {121, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CIC_MSB({{125, 10}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CIC_LSB({{47, 6}, {61, 2}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CIC({{283, 18}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 7
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CIS({{63, 18}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_TOE({{81, 2}, {91, 15}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_I0_MSB({{106, 7}, {121, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_I0_LSB({{47, 6}, {61, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_I0({{269, 32}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 8
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CRC({{66, 17}, {91, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CRS({{92, 18}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_DOT_MSB({{110, 3}, {121, 16}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_DOT_LSB({{47, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_DOT({{277, 24}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 9
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA0({{52, 1}, {61, 22}, {91, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_MSB({{100, 13}, {121, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_LSB({{47, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA({{269, 32}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 10
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_IDOT({{52, 1}, {61, 13}});
|
||||
|
||||
#endif /* GNSS_SDR_BEIDOU_B1I_H_ */
|
||||
|
57
src/core/system_parameters/Beidou_B3I.h
Normal file
57
src/core/system_parameters/Beidou_B3I.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*!
|
||||
* \file Beidou_B3I.h
|
||||
* \brief Defines system parameters for BeiDou B3I signal and DNAV data
|
||||
* \author Damian Miralles, 2019. dmiralles2009@gmail.com
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2019 (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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef GNSS_SDR_BEIDOU_B3I_H_
|
||||
#define GNSS_SDR_BEIDOU_B3I_H_
|
||||
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include <cstdint>
|
||||
#include <utility> // std::pair
|
||||
#include <vector>
|
||||
|
||||
// carrier and code frequencies
|
||||
const double BEIDOU_B3I_FREQ_HZ = 1.268520e9; //!< BeiDou B3I [Hz]
|
||||
const double BEIDOU_B3I_CODE_RATE_HZ = 10.23e6; //!< BeiDou B3I code rate [chips/s]
|
||||
const double BEIDOU_B3I_CODE_LENGTH_CHIPS = 10230.0; //!< BeiDou B3I code length [chips]
|
||||
const double BEIDOU_B3I_CODE_PERIOD = 0.001; //!< BeiDou B3I code period [seconds]
|
||||
const uint32_t BEIDOU_B3I_CODE_PERIOD_MS = 1; //!< GPS L1 C/A code period [ms]
|
||||
const int32_t BEIDOU_B3I_SECONDARY_CODE_LENGTH = 20;
|
||||
const std::string BEIDOU_B3I_SECONDARY_CODE = "00000100110101001110";
|
||||
const std::string BEIDOU_B3I_SECONDARY_CODE_STR = "00000100110101001110";
|
||||
const std::string BEIDOU_B3I_D2_SECONDARY_CODE_STR = "00";
|
||||
const uint32_t BEIDOU_B3I_PREAMBLE_LENGTH_BITS = 11;
|
||||
const uint32_t BEIDOU_B3I_PREAMBLE_LENGTH_SYMBOLS = 220; // **************
|
||||
const double BEIDOU_B3I_PREAMBLE_DURATION_S = 0.220;
|
||||
const int32_t BEIDOU_B3I_PREAMBLE_DURATION_MS = 220;
|
||||
const int32_t BEIDOU_B3I_TELEMETRY_RATE_BITS_SECOND = 50; //!< D1 NAV message bit rate [bits/s]
|
||||
const int32_t BEIDOU_B3I_TELEMETRY_SYMBOLS_PER_BIT = 20; // *************
|
||||
const int32_t BEIDOU_B3I_TELEMETRY_RATE_SYMBOLS_SECOND = BEIDOU_B3I_TELEMETRY_RATE_BITS_SECOND * BEIDOU_B3I_TELEMETRY_SYMBOLS_PER_BIT; //************!< NAV message bit rate [symbols/s]
|
||||
|
||||
#endif /* GNSS_SDR_BEIDOU_B3I_H_ */
|
293
src/core/system_parameters/Beidou_DNAV.h
Normal file
293
src/core/system_parameters/Beidou_DNAV.h
Normal file
@ -0,0 +1,293 @@
|
||||
/*!
|
||||
* \file Beidou_DNAV.h
|
||||
* \brief Defines system parameters for BeiDou DNAV data processing
|
||||
* \author Damian Miralles, 2018. dmiralles2009@gmail.com
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2019 (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 <httpS://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef GNSS_SDR_BEIDOU_DNAV_H_
|
||||
#define GNSS_SDR_BEIDOU_DNAV_H_
|
||||
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
const double BEIDOU_DNAV_C_M_S = 299792458.0; //!< The speed of light, [m/s]
|
||||
const double BEIDOU_DNAV_C_M_MS = 299792.4580; //!< The speed of light, [m/ms]
|
||||
const double BEIDOU_DNAV_PI = 3.1415926535898; //!< Pi
|
||||
const double BEIDOU_DNAV_TWO_PI = 6.283185307179586; //!< 2Pi
|
||||
const int32_t BEIDOU_DNAV_PREAMBLE_LENGTH_BITS = 11;
|
||||
const int32_t BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS = 11; // **************
|
||||
const double BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS = 300;
|
||||
const double BEIDOU_DNAV_SUBFRAME_SYMBOLS = 300;
|
||||
const double BEIDOU_DNAV_DATA_BITS = 300;
|
||||
const double BEIDOU_DNAV_WORDS_SUBFRAME = 10;
|
||||
const double BEIDOU_DNAV_WORD_LENGTH_BITS = 30;
|
||||
const double BEIDOU_D1NAV_SYMBOL_RATE_SPS = 50;
|
||||
const double BEIDOU_D2NAV_SYMBOL_RATE_SPS = 500;
|
||||
const std::string BEIDOU_DNAV_PREAMBLE = "11100010010";
|
||||
|
||||
// BEIDOU D1 NAVIGATION MESSAGE STRUCTURE
|
||||
// GENERAL
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_PRE({{1, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_FRAID({{16, 3}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_SOW({{19, 8}, {31, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_PNUM({{44, 7}});
|
||||
|
||||
// DNAV SCALE FACTORS
|
||||
// EPH
|
||||
const double D1_TOC_LSB = TWO_P3;
|
||||
const double D1_TGD1_LSB = 0.1e-9;
|
||||
const double D1_TGD2_LSB = 0.1e-9;
|
||||
const double D1_ALPHA0_LSB = TWO_N30;
|
||||
const double D1_ALPHA1_LSB = TWO_N27;
|
||||
const double D1_ALPHA2_LSB = TWO_N24;
|
||||
const double D1_ALPHA3_LSB = TWO_N24;
|
||||
const double D1_BETA0_LSB = TWO_P11;
|
||||
const double D1_BETA1_LSB = TWO_P14;
|
||||
const double D1_BETA2_LSB = TWO_P16;
|
||||
const double D1_BETA3_LSB = TWO_P16;
|
||||
const double D1_A2_LSB = TWO_N66;
|
||||
const double D1_A0_LSB = TWO_N33;
|
||||
const double D1_A1_LSB = TWO_N50;
|
||||
const double D1_DELTA_N_LSB = PI_TWO_N43;
|
||||
const double D1_CUC_LSB = TWO_N31;
|
||||
const double D1_M0_LSB = PI_TWO_N31;
|
||||
const double D1_E_LSB = TWO_N33;
|
||||
const double D1_CUS_LSB = TWO_N31;
|
||||
const double D1_CRC_LSB = TWO_N6;
|
||||
const double D1_CRS_LSB = TWO_N6;
|
||||
const double D1_SQRT_A_LSB = TWO_N19;
|
||||
const double D1_TOE_LSB = TWO_P3;
|
||||
const double D1_I0_LSB = PI_TWO_N31;
|
||||
const double D1_CIC_LSB = TWO_N31;
|
||||
const double D1_OMEGA_DOT_LSB = PI_TWO_N43;
|
||||
const double D1_CIS_LSB = TWO_N31;
|
||||
const double D1_IDOT_LSB = PI_TWO_N43;
|
||||
const double D1_OMEGA0_LSB = PI_TWO_N31;
|
||||
const double D1_OMEGA_LSB = PI_TWO_N31;
|
||||
//ALM
|
||||
const double D1_SQRT_A_ALMANAC_LSB = TWO_N11;
|
||||
const double D1_A1_ALMANAC_LSB = TWO_N38;
|
||||
const double D1_A0_ALMANAC_LSB = TWO_N20;
|
||||
const double D1_OMEGA0_ALMANAC_LSB = PI_TWO_N23;
|
||||
const double D1_E_ALMANAC_LSB = TWO_N21;
|
||||
const double D1_DELTA_I_LSB = PI_TWO_N19;
|
||||
const double D1_TOA_LSB = TWO_P12;
|
||||
const double D1_OMEGA_DOT_ALMANAC_LSB = PI_TWO_N38;
|
||||
const double D1_OMEGA_ALMANAC_LSB = PI_TWO_N23;
|
||||
const double D1_M0_ALMANAC_LSB = PI_TWO_N23;
|
||||
const double D1_A0GPS_LSB = 0.1e-9;
|
||||
const double D1_A1GPS_LSB = 0.1e-9;
|
||||
const double D1_A0GAL_LSB = 0.1e-9;
|
||||
const double D1_A1GAL_LSB = 0.1e-9;
|
||||
const double D1_A0GLO_LSB = 0.1e-9;
|
||||
const double D1_A1GLO_LSB = 0.1e-9;
|
||||
const double D1_A0UTC_LSB = TWO_N30;
|
||||
const double D1_A1UTC_LSB = TWO_N50;
|
||||
|
||||
// SUBFRAME 1
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_SAT_H1({{43, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_AODC({{44, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_URAI({{49, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_WN({{61, 13}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TOC({{74, 9}, {91, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TGD1({{99, 10}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TGD2({{121, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA0({{127, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA1({{135, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA2({{151, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_ALPHA3({{159, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_BETA0({{167, 6}, {181, 2}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_BETA1({{183, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_BETA2({{191, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_BETA3({{199, 4}, {211, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A2({{215, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0({{226, 7}, {241, 17}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1({{258, 5}, {271, 17}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_AODE({{288, 5}});
|
||||
|
||||
//SUBFRAME 2
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_N({{43, 10}, {61, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CUC({{67, 16}, {91, 2}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_M0({{93, 20}, {121, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_E({{133, 10}, {151, 22}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CUS({{181, 18}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CRC({{199, 4}, {211, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CRS({{225, 8}, {241, 10}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_SQRT_A({{251, 12}, {271, 20}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TOE_SF2({{291, 2}});
|
||||
|
||||
//SUBFRAME 3
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TOE_SF3({{43, 10}, {61, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_I0({{66, 17}, {91, 15}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CIC({{106, 7}, {121, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA_DOT({{132, 11}, {151, 13}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_CIS({{164, 9}, {181, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_IDOT({{190, 13}, {211, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA0({{212, 21}, {241, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA({{252, 11}, {271, 21}});
|
||||
|
||||
//SUBFRAME 4 AND PAGES 1 THROUGH 6 IN SUBFRAME 5
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_SQRT_A_ALMANAC({{51, 2}, {61, 22}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1_ALMANAC({{91, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0_ALMANAC({{102, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA0_ALMANAC({{121, 22}, {151, 2}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_E_ALMANAC({{153, 17}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_I({{170, 3}, {181, 13}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TOA({{194, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA_DOT_ALMANAC({{202, 1}, {211, 16}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_OMEGA_ALMANAC({{227, 6}, {241, 18}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_M0_ALMANAC({{259, 4}, {271, 20}});
|
||||
|
||||
//SUBFRAME 5 PAGE 7
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA1({{51, 2}, {61, 7}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA2({{68, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA3({{77, 6}, {91, 3}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA4({{94, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA5({{103, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA6({{112, 1}, {121, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA7({{129, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA8({{138, 5}, {151, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA9({{155, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA10({{164, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA11({{181, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA12({{190, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA13({{199, 4}, {211, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA14({{216, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA15({{225, 8}, {241, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA16({{242, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA17({{251, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA18({{260, 3}, {271, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA19({{277, 9}});
|
||||
|
||||
//SUBFRAME 5 PAGE 8
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA20({{51, 2}, {61, 7}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA21({{68, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA22({{77, 6}, {91, 3}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA23({{94, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA24({{103, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA25({{112, 1}, {121, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA26({{129, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA27({{138, 5}, {151, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA28({{155, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA29({{164, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_HEA30({{181, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_WNA({{190, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_TOA2({{198, 5}, {211, 3}});
|
||||
|
||||
//SUBFRAME 5 PAGE 9
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0GPS({{97, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1GPS({{111, 2}, {121, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0GAL({{135, 8}, {151, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1GAL({{157, 16}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0GLO({{181, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1GLO({{195, 8}, {211, 8}});
|
||||
|
||||
//SUBFRAME 5 PAGE 10
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_T_LS({{51, 2}, {61, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_DELTA_T_LSF({{67, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_WN_LSF({{75, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A0UTC({{91, 22}, {121, 10}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_A1UTC({{131, 12}, {151, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D1_DN({{163, 8}});
|
||||
|
||||
// D2 NAV Message Decoding Information
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_PRE({{1, 11}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_FRAID({{16, 3}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_SOW({{19, 8}, {31, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_PNUM({{43, 4}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 1
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_SAT_H1({{47, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_AODC({{48, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_URAI({{61, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_WN({{65, 13}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_TOC({{78, 5}, {91, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_TGD1({{103, 10}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_TGD2({{121, 10}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 2
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA0({{47, 6}, {61, 2}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA1({{63, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA2({{71, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_ALPHA3({{79, 4}, {91, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_BETA0({{95, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_BETA1({{103, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_BETA2({{111, 2}, {121, 6}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_BETA3({{127, 8}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 3
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_A0({{101, 12}, {121, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_A1_MSB({{133, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_A1_LSB({{47, 6}, {61, 12}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_A1({{279, 22}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 4
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_A2({{73, 10}, {91, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_AODE({{92, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_DELTA_N({{97, 16}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CUC_MSB({{121, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CUC_LSB({{47, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CUC({{283, 18}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 5
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_M0({{51, 2}, {61, 22}, {91, 8}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CUS({{99, 14}, {121, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_E_MSB({{125, 10}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 6
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_E_LSB({{47, 6}, {61, 16}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_SQRT_A({{77, 6}, {91, 22}, {121, 4}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CIC_MSB({{125, 10}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CIC_LSB({{47, 6}, {61, 2}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CIC({{283, 18}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 7
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CIS({{63, 18}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_TOE({{81, 2}, {91, 15}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_I0_MSB({{106, 7}, {121, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_I0_LSB({{47, 6}, {61, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_I0({{269, 32}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 8
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CRC({{66, 17}, {91, 1}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_CRS({{92, 18}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_DOT_MSB({{110, 3}, {121, 16}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_DOT_LSB({{47, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_DOT({{277, 24}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 9
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA0({{52, 1}, {61, 22}, {91, 9}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_MSB({{100, 13}, {121, 14}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA_LSB({{47, 5}});
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_OMEGA({{269, 32}});
|
||||
|
||||
// D2 NAV, SUBFRAME 1, PAGE 10
|
||||
const std::vector<std::pair<int32_t, int32_t> > D2_IDOT({{52, 1}, {61, 13}});
|
||||
|
||||
#endif /* GNSS_SDR_BEIDOU_DNAV_H_ */
|
@ -95,6 +95,8 @@ set(SYSTEM_PARAMETERS_HEADERS
|
||||
GPS_L2C.h
|
||||
GPS_L5.h
|
||||
Beidou_B1I.h
|
||||
Beidou_B3I.h
|
||||
Beidou_DNAV.h
|
||||
MATH_CONSTANTS.h
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -143,6 +143,7 @@ void Beidou_Dnav_Navigation_Message::reset()
|
||||
// info
|
||||
i_channel_ID = 0;
|
||||
i_satellite_PRN = 0;
|
||||
i_signal_type = 0;
|
||||
|
||||
// time synchro
|
||||
d_subframe_timestamp_ms = 0.0;
|
||||
@ -255,7 +256,7 @@ uint64_t Beidou_Dnav_Navigation_Message::read_navigation_unsigned(
|
||||
{
|
||||
for (int32_t j = 0; j < parameter[i].second; j++)
|
||||
{
|
||||
value <<= 1; // shift left
|
||||
value <<= 1; //shift left
|
||||
if (bits[BEIDOU_DNAV_SUBFRAME_DATA_BITS - parameter[i].first - j] == 1)
|
||||
{
|
||||
value += 1; // insert the bit
|
||||
@ -279,7 +280,7 @@ int64_t Beidou_Dnav_Navigation_Message::read_navigation_signed(
|
||||
// read the MSB and perform the sign extension
|
||||
if (bits[BEIDOU_DNAV_SUBFRAME_DATA_BITS - parameter[0].first] == 1)
|
||||
{
|
||||
value ^= 0xFFFFFFFFFFFFFFFF; // 64 bits variable
|
||||
value ^= 0xFFFFFFFFFFFFFFFF; //64 bits variable
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -290,8 +291,8 @@ int64_t Beidou_Dnav_Navigation_Message::read_navigation_signed(
|
||||
{
|
||||
for (int32_t j = 0; j < parameter[i].second; j++)
|
||||
{
|
||||
value <<= 1; // shift left
|
||||
value &= 0xFFFFFFFFFFFFFFFE; // reset the corresponding bit (for the 64 bits variable)
|
||||
value <<= 1; //shift left
|
||||
value &= 0xFFFFFFFFFFFFFFFE; //reset the corresponding bit (for the 64 bits variable)
|
||||
if (bits[BEIDOU_DNAV_SUBFRAME_DATA_BITS - parameter[i].first - j] == 1)
|
||||
{
|
||||
value += 1; // insert the bit
|
||||
@ -315,8 +316,8 @@ int64_t Beidou_Dnav_Navigation_Message::read_navigation_signed(
|
||||
{
|
||||
for (int32_t j = 0; j < parameter[i].second; j++)
|
||||
{
|
||||
value <<= 1; // shift left
|
||||
value &= 0xFFFFFFFE; // reset the corresponding bit
|
||||
value <<= 1; //shift left
|
||||
value &= 0xFFFFFFFE; //reset the corresponding bit
|
||||
if (bits[BEIDOU_DNAV_SUBFRAME_DATA_BITS - parameter[i].first - j] == 1)
|
||||
{
|
||||
value += 1; // insert the bit
|
||||
@ -829,7 +830,7 @@ int32_t Beidou_Dnav_Navigation_Message::d2_subframe_decoder(std::string const& s
|
||||
d_eccentricity_msb = static_cast<double>(read_navigation_unsigned(subframe_bits, D2_E_MSB));
|
||||
d_eccentricity_msb_bits = (read_navigation_unsigned(subframe_bits, D2_E_MSB));
|
||||
// Adjust for lsb in next page (shift number of lsb to the left)
|
||||
d_eccentricity_msb = d_eccentricity_msb << 22;
|
||||
d_eccentricity_msb = static_cast<double>((static_cast<int>(d_eccentricity_msb) << 22));
|
||||
d_eccentricity_msb_bits = d_eccentricity_msb_bits << 22;
|
||||
|
||||
// Set system flags for message reception
|
||||
@ -995,7 +996,7 @@ Beidou_Dnav_Ephemeris Beidou_Dnav_Navigation_Message::get_ephemeris()
|
||||
eph.i_SV_accuracy = i_SV_accuracy;
|
||||
eph.i_SV_health = i_SV_health;
|
||||
eph.i_BEIDOU_week = i_BEIDOU_week;
|
||||
eph.i_sig_type = 1;
|
||||
eph.i_sig_type = i_signal_type;
|
||||
eph.i_nav_type = 2;
|
||||
|
||||
eph.d_TOW = d_SOW;
|
||||
@ -1042,7 +1043,7 @@ Beidou_Dnav_Ephemeris Beidou_Dnav_Navigation_Message::get_ephemeris()
|
||||
eph.i_SV_accuracy = i_SV_accuracy;
|
||||
eph.i_SV_health = i_SV_health;
|
||||
eph.i_BEIDOU_week = i_BEIDOU_week;
|
||||
eph.i_sig_type = 1;
|
||||
eph.i_sig_type = i_signal_type;
|
||||
eph.i_nav_type = 1; // MEO/IGSO
|
||||
|
||||
eph.d_TOW = d_SOW;
|
||||
@ -1095,7 +1096,6 @@ Beidou_Dnav_Iono Beidou_Dnav_Navigation_Message::get_iono()
|
||||
return iono;
|
||||
}
|
||||
|
||||
|
||||
Beidou_Dnav_Utc_Model Beidou_Dnav_Navigation_Message::get_utc_model()
|
||||
{
|
||||
Beidou_Dnav_Utc_Model utc_model;
|
||||
@ -1120,7 +1120,6 @@ Beidou_Dnav_Utc_Model Beidou_Dnav_Navigation_Message::get_utc_model()
|
||||
return utc_model;
|
||||
}
|
||||
|
||||
|
||||
bool Beidou_Dnav_Navigation_Message::have_new_ephemeris() // Check if we have a new ephemeris stored in the galileo navigation class
|
||||
{
|
||||
if (i_satellite_PRN > 0 and i_satellite_PRN < 6)
|
||||
@ -1176,7 +1175,6 @@ bool Beidou_Dnav_Navigation_Message::have_new_ephemeris() // Check if we have a
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Beidou_Dnav_Navigation_Message::have_new_iono()
|
||||
{
|
||||
// the condition on flag_utc_model is added to have a time stamp for iono
|
||||
@ -1188,7 +1186,6 @@ bool Beidou_Dnav_Navigation_Message::have_new_iono()
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Beidou_Dnav_Navigation_Message::have_new_utc_model()
|
||||
{
|
||||
if (flag_d1_sf5_p9 == true and flag_d1_sf5_p10 == true)
|
||||
@ -1203,7 +1200,6 @@ bool Beidou_Dnav_Navigation_Message::have_new_utc_model()
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Beidou_Dnav_Navigation_Message::have_new_almanac()
|
||||
{
|
||||
if ((flag_d1_sf4 == true) and (flag_d1_sf5 == true))
|
||||
@ -1218,7 +1214,6 @@ bool Beidou_Dnav_Navigation_Message::have_new_almanac()
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Beidou_Dnav_Navigation_Message::satellite_validation()
|
||||
{
|
||||
bool flag_data_valid = false;
|
||||
|
@ -35,6 +35,9 @@
|
||||
|
||||
|
||||
#include "Beidou_B1I.h"
|
||||
#include "Beidou_B3I.h"
|
||||
#include "Beidou_DNAV.h"
|
||||
#include "beidou_dnav_almanac.h"
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "beidou_dnav_iono.h"
|
||||
#include "beidou_dnav_utc_model.h"
|
||||
@ -204,6 +207,7 @@ public:
|
||||
|
||||
// satellite identification info
|
||||
int32_t i_channel_ID;
|
||||
int32_t i_signal_type; //!< BDS: data source (0:unknown,1:B1I,2:B1Q,3:B2I,4:B2Q,5:B3I,6:B3Q)
|
||||
uint32_t i_satellite_PRN;
|
||||
|
||||
// time synchro
|
||||
|
@ -232,7 +232,7 @@ void Gnss_Satellite::set_PRN(uint32_t PRN_)
|
||||
}
|
||||
else if (system == "Beidou")
|
||||
{
|
||||
if (PRN_ < 1 or PRN_ > 37)
|
||||
if (PRN_ < 1 or PRN_ > 63)
|
||||
{
|
||||
DLOG(INFO) << "This PRN is not defined";
|
||||
PRN = 0;
|
||||
@ -625,52 +625,100 @@ std::string Gnss_Satellite::what_block(const std::string& system_, uint32_t PRN_
|
||||
if (system_ == "Beidou")
|
||||
{
|
||||
// Check https://en.wikipedia.org/wiki/List_of_BeiDou_satellites
|
||||
switch (PRN_)
|
||||
{
|
||||
case 19:
|
||||
block_ = std::string("BEIDOU-3 M1"); //!<Slot B-7; launched 2017/11/05
|
||||
break;
|
||||
case 20:
|
||||
block_ = std::string("BEIDOU-3 M2"); //!<Slot B-5; launched 2017/11/05
|
||||
break;
|
||||
case 21:
|
||||
block_ = std::string("BEIDOU 3M5"); //!<Slot B-?; launched 2018/02/12
|
||||
break;
|
||||
case 22:
|
||||
block_ = std::string("BEIDOU 3M6"); //!<Slot B-6; launched 2018/02/12
|
||||
break;
|
||||
case 23:
|
||||
block_ = std::string("BEIDOU 3M9"); //!<Slot C-7; launched 2018/07/29
|
||||
break;
|
||||
case 24:
|
||||
block_ = std::string("BEIDOU 3M10"); //!<Slot C-1; launched 2018/07/29
|
||||
break;
|
||||
case 25:
|
||||
block_ = std::string("BEIDOU 3M12"); //!<Slot C-8; launched 2018/08/24
|
||||
break;
|
||||
case 26:
|
||||
block_ = std::string("BEIDOU 3M11"); //!<Slot C-2; launched 2018/08/24
|
||||
break;
|
||||
case 27:
|
||||
block_ = std::string("BEIDOU 3M3"); //!<Slot A-?; launched 2018/01/11
|
||||
break;
|
||||
case 28:
|
||||
block_ = std::string("BEIDOU 3M4"); //!<Slot A-?; launched 2018/01/11
|
||||
break;
|
||||
case 29:
|
||||
block_ = std::string("BEIDOU 3M7"); //!<Slot A-?; launched 2018/03/29
|
||||
break;
|
||||
case 30:
|
||||
block_ = std::string("BEIDOU 3M8"); //!<Slot A-?; launched 2018/03/29
|
||||
break;
|
||||
case 32:
|
||||
block_ = std::string("BEIDOU 3M13"); //!<Slot B-1?; launched 2018/09/19
|
||||
break;
|
||||
case 33:
|
||||
block_ = std::string("BEIDOU 3M14"); //!<Slot B-3; launched 2018/09/19
|
||||
break;
|
||||
default:
|
||||
block_ = std::string("Unknown(Simulated)");
|
||||
switch ( PRN_ )
|
||||
{
|
||||
case 1:
|
||||
block_ = std::string("Compass-G1"); //!<GEO 140.0°E; launched 2010/01/16
|
||||
break;
|
||||
case 2:
|
||||
block_ = std::string("Compass-G6"); //!<GEO 80°E; launched 2012/10/25
|
||||
break;
|
||||
case 3:
|
||||
block_ = std::string("Compass-G7"); //!<GEO 110.5°E; launched 2016/06/12
|
||||
break;
|
||||
case 4:
|
||||
block_ = std::string("Compass-G4"); //!<GEO 160.0°E; launched 2010/10/31
|
||||
break;
|
||||
case 5:
|
||||
block_ = std::string("Compass-G5"); //!<GEO 58.75°E; launched 2012/02/24
|
||||
break;
|
||||
case 6:
|
||||
block_ = std::string("Compass-IGS01"); //!<55° inclination IGSO 118°E; launched 2010/07/31
|
||||
break;
|
||||
case 7:
|
||||
block_ = std::string("Compass-IGS02"); //!<55° inclination IGSO 118°E; launched 2010/12/17
|
||||
break;
|
||||
case 8:
|
||||
block_ = std::string("Compass-IGS03"); //!<55° inclination IGSO 118°E; launched 2011/04/09
|
||||
break;
|
||||
case 9:
|
||||
block_ = std::string("Compass-IGS04"); //!<55° inclination IGSO 95°E; launched 2011/07/27
|
||||
break;
|
||||
case 10:
|
||||
block_ = std::string("Compass-IGS05"); //!<55° inclination IGSO 118°E; launched 2011/12/01
|
||||
break;
|
||||
case 11:
|
||||
block_ = std::string("Compass-M3"); //!<Slot A07; launched 2012/04/29
|
||||
break;
|
||||
case 12:
|
||||
block_ = std::string("Compass-M4"); //!<Slot A08; launched 2012/04/29
|
||||
break;
|
||||
case 19:
|
||||
block_ = std::string("BEIDOU-3 M1"); //!<Slot B-7; launched 2017/11/05
|
||||
break;
|
||||
case 20:
|
||||
block_ = std::string("BEIDOU-3 M2"); //!<Slot B-5; launched 2017/11/05
|
||||
break;
|
||||
case 21:
|
||||
block_ = std::string("BEIDOU 3M5"); //!<Slot B-?; launched 2018/02/12
|
||||
break;
|
||||
case 22:
|
||||
block_ = std::string("BEIDOU 3M6"); //!<Slot B-6; launched 2018/02/12
|
||||
break;
|
||||
case 23:
|
||||
block_ = std::string("BEIDOU 3M9"); //!<Slot C-7; launched 2018/07/29
|
||||
break;
|
||||
case 24:
|
||||
block_ = std::string("BEIDOU 3M10"); //!<Slot C-1; launched 2018/07/29
|
||||
break;
|
||||
case 25:
|
||||
block_ = std::string("BEIDOU 3M12"); //!<Slot C-8; launched 2018/08/24
|
||||
break;
|
||||
case 26:
|
||||
block_ = std::string("BEIDOU 3M11"); //!<Slot C-2; launched 2018/08/24
|
||||
break;
|
||||
case 27:
|
||||
block_ = std::string("BEIDOU 3M3"); //!<Slot A-?; launched 2018/01/11
|
||||
break;
|
||||
case 28:
|
||||
block_ = std::string("BEIDOU 3M4"); //!<Slot A-?; launched 2018/01/11
|
||||
break;
|
||||
case 29:
|
||||
block_ = std::string("BEIDOU 3M7"); //!<Slot A-?; launched 2018/03/29
|
||||
break;
|
||||
case 30:
|
||||
block_ = std::string("BEIDOU 3M8"); //!<Slot A-?; launched 2018/03/29
|
||||
break;
|
||||
case 32:
|
||||
block_ = std::string("BEIDOU 3M13"); //!<Slot B-1?; launched 2018/09/19
|
||||
break;
|
||||
case 33:
|
||||
block_ = std::string("BEIDOU 3M14"); //!<Slot B-3; launched 2018/09/19
|
||||
break;
|
||||
case 34:
|
||||
block_ = std::string("BEIDOU 3M15"); //!<Slot B-3; launched 2018/10/15
|
||||
break;
|
||||
case 35:
|
||||
block_ = std::string("BEIDOU 3M16"); //!<Slot B-3; launched 2018/10/15
|
||||
break;
|
||||
case 36:
|
||||
block_ = std::string("BEIDOU 3M17"); //!<Slot B-3; launched 2018/11/18
|
||||
break;
|
||||
case 37:
|
||||
block_ = std::string("BEIDOU 3M18"); //!<Slot B-3; launched 2018/11/18
|
||||
break;
|
||||
default:
|
||||
block_ = std::string("Unknown(Simulated)");
|
||||
}
|
||||
}
|
||||
return block_;
|
||||
|
@ -34,15 +34,15 @@ if ~exist('dll_pll_veml_read_tracking_dump.m', 'file')
|
||||
addpath('./libs')
|
||||
end
|
||||
|
||||
samplingFreq = 5000000; %[Hz]
|
||||
coherent_integration_time_ms = 20; %[ms]
|
||||
channels = 5; % Number of channels
|
||||
samplingFreq = 25000000; %[Hz]
|
||||
coherent_integration_time_ms = 1; %[ms]
|
||||
channels = 10; % Number of channels
|
||||
first_channel = 0; % Number of the first channel
|
||||
|
||||
path = '/dump_dir/'; %% CHANGE THIS PATH
|
||||
path = '/home/dmiralles/Documents/gnss-sdr/'; %% CHANGE THIS PATH
|
||||
|
||||
for N=1:1:channels
|
||||
tracking_log_path = [path 'track_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE track_ch_ BY YOUR dump_filename
|
||||
tracking_log_path = [path 'epl_tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE track_ch_ BY YOUR dump_filename
|
||||
GNSS_tracking(N) = dll_pll_veml_read_tracking_dump(tracking_log_path);
|
||||
end
|
||||
|
||||
|
@ -26,14 +26,40 @@
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
%close all;
|
||||
%clear all;
|
||||
samplingFreq = 64e6/16; %[Hz]
|
||||
channels=4;
|
||||
path='/home/sergi/gnss/gnss-sdr/install/';
|
||||
close all;clear;
|
||||
samplingFreq = 25000000; %[Hz]
|
||||
channels=[0:9];
|
||||
path='/home/dmiralles/Documents/gnss-sdr/';
|
||||
addpath('libs/');
|
||||
clear PRN_absolute_sample_start;
|
||||
for N=1:1:channels
|
||||
telemetry_log_path=[path 'telemetry' num2str(N-1) '.dat'];
|
||||
for N=1:1:length(channels)
|
||||
telemetry_log_path=[path 'telemetry' num2str(channels(N)) '.dat'];
|
||||
GNSS_telemetry(N)= gps_l1_ca_read_telemetry_dump(telemetry_log_path);
|
||||
end
|
||||
|
||||
%% Plotting values
|
||||
%--- Configurations
|
||||
chn_num_a = 6;
|
||||
chn_num_b = 2;
|
||||
%--- Plot results
|
||||
figure;
|
||||
plot(GNSS_telemetry(chn_num_a).tracking_sample_counter, ...
|
||||
GNSS_telemetry(chn_num_a).tow_current_symbol_ms, 'b+');
|
||||
hold on;
|
||||
grid on;
|
||||
plot(GNSS_telemetry(chn_num_b).tracking_sample_counter, ...
|
||||
GNSS_telemetry(chn_num_b).tow_current_symbol_ms, 'ro');
|
||||
xlabel('TRK Sampling Counter');
|
||||
ylabel('Current Symbol TOW');
|
||||
legend(['CHN-',num2str(chn_num_a-1)], ['CHN-',num2str(chn_num_b-1)]);
|
||||
|
||||
figure;
|
||||
plot(GNSS_telemetry(chn_num_a).tracking_sample_counter, ...
|
||||
GNSS_telemetry(chn_num_a).tow, 'b+');
|
||||
hold on;
|
||||
grid on;
|
||||
plot(GNSS_telemetry(chn_num_b).tracking_sample_counter, ...
|
||||
GNSS_telemetry(chn_num_b).tow, 'ro');
|
||||
xlabel('TRK Sampling Counter');
|
||||
ylabel('Decoded Nav TOW');
|
||||
legend(['CHN-',num2str(chn_num_a-1)], ['CHN-',num2str(chn_num_b-1)]);
|
||||
|
@ -23,9 +23,7 @@
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
% Read observables dump
|
||||
|
||||
%clear all;
|
||||
%% Read Hibrid Observables Dump
|
||||
clearvars;
|
||||
close all;
|
||||
addpath('./libs');
|
||||
@ -35,38 +33,38 @@ path='/home/dmiralles/Documents/gnss-sdr/';
|
||||
observables_log_path=[path 'observables.dat'];
|
||||
GNSS_observables= read_hybrid_observables_dump(channels,observables_log_path);
|
||||
|
||||
%%
|
||||
%optional:
|
||||
%search all channels having good satellite simultaneously
|
||||
min_idx=1;
|
||||
%% Plo data
|
||||
%--- optional: search all channels having good satellite simultaneously
|
||||
min_tow_idx=1;
|
||||
obs_idx=1;
|
||||
for n=1:1:channels
|
||||
idx=find(GNSS_observables.valid(n,:)>0,1,'first');
|
||||
if min_idx<idx
|
||||
min_idx=idx
|
||||
if min_tow_idx<idx
|
||||
min_tow_idx=idx;
|
||||
obs_idx = n;
|
||||
end
|
||||
end
|
||||
|
||||
min_idx=min_idx;
|
||||
%plot observables from that index
|
||||
%--- plot observables from that index
|
||||
figure;
|
||||
plot(GNSS_observables.RX_time(1,min_idx+1:end),GNSS_observables.Pseudorange_m(:,min_idx+1:end)');
|
||||
title('Pseudoranges [m]')
|
||||
plot(GNSS_observables.RX_time(obs_idx,min_tow_idx+1:end),GNSS_observables.Pseudorange_m(:,min_tow_idx+1:end)');
|
||||
grid on;
|
||||
xlabel('TOW [s]')
|
||||
ylabel('[m]');
|
||||
ylabel('Pseudorange [m]');
|
||||
|
||||
figure;
|
||||
plot(GNSS_observables.RX_time(1,min_idx+1:end),GNSS_observables.Carrier_phase_hz(:,min_idx+1:end)');
|
||||
title('Accumulated carrier phase')
|
||||
plot(GNSS_observables.RX_time(obs_idx,min_tow_idx+1:end),GNSS_observables.Carrier_phase_hz(:,min_tow_idx+1:end)');
|
||||
xlabel('TOW [s]')
|
||||
ylabel('[cycles]');
|
||||
ylabel('Accumulated Carrier Phase [cycles]');
|
||||
grid on;
|
||||
|
||||
figure;
|
||||
plot(GNSS_observables.RX_time(1,min_idx+1:end),GNSS_observables.Carrier_Doppler_hz(:,min_idx+1:end)');
|
||||
title('Doppler frequency')
|
||||
xlabel('TOW [s]')
|
||||
ylabel('[Hz]');
|
||||
plot(GNSS_observables.RX_time(obs_idx,min_tow_idx+1:end),GNSS_observables.Carrier_Doppler_hz(:,min_tow_idx+1:end)');
|
||||
xlabel('TOW [s]');
|
||||
ylabel('Doppler Frequency [Hz]');
|
||||
grid on;
|
||||
|
||||
%
|
||||
%% Deprecated Code
|
||||
% %read true obs from simulator (optional)
|
||||
% GPS_STARTOFFSET_s = 68.802e-3;
|
||||
%
|
||||
|
@ -32,7 +32,7 @@ function [telemetry] = gps_l1_ca_read_telemetry_dump (filename, count)
|
||||
%%
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
num_double_vars=3;
|
||||
num_double_vars=4;
|
||||
double_size_bytes=8;
|
||||
skip_bytes_each_read=double_size_bytes*num_double_vars;
|
||||
bytes_shift=0;
|
||||
@ -47,13 +47,16 @@ end
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
telemetry.preamble_delay_ms = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
telemetry.tow_current_symbol_ms = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
telemetry.prn_delay_ms = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
telemetry.tracking_sample_counter = fread (f, count, 'uint64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
telemetry.Preamble_symbol_counter = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
telemetry.tow = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
telemetry.required_symbols = fread (f, count, 'uint64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
|
||||
|
@ -28,13 +28,13 @@
|
||||
|
||||
%%%%%%%%% ?????? CONFIGURE !!! %%%%%%%%%%%%%
|
||||
|
||||
path = '/home/dmiralles/Documents/gnss-sdr/';
|
||||
file = 'bds_acq';
|
||||
path = '/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/'; %% CHANGE THIS PATH
|
||||
file = 'bds_b3i_acq';
|
||||
|
||||
sat = 32;
|
||||
sat = 27;
|
||||
|
||||
channel = 0;
|
||||
execution = 3;
|
||||
execution = 6;
|
||||
% Signal:
|
||||
% 1 GPS L1
|
||||
% 2 GPS L2M
|
||||
@ -44,7 +44,7 @@ execution = 3;
|
||||
% 6 Glo. 1G
|
||||
% 7 BDS B1
|
||||
|
||||
signal_type = 7;
|
||||
signal_type = 8;
|
||||
|
||||
%%% True for light acq_grid representation
|
||||
lite_view = true;
|
||||
@ -83,6 +83,10 @@ switch(signal_type)
|
||||
n_chips = 2046;
|
||||
system = 'C';
|
||||
signal = 'B1';
|
||||
case 8
|
||||
n_chips = 10230;
|
||||
system = 'C';
|
||||
signal = 'B3';
|
||||
end
|
||||
filename = [path file '_' system '_' signal '_ch_' num2str(channel) '_' num2str(execution) '_sat_' num2str(sat) '.mat'];
|
||||
load(filename);
|
||||
|
Loading…
Reference in New Issue
Block a user