Skip to content
Alan Page edited this page Sep 23, 2018 · 8 revisions

Symbol Encoding

GNSS-SDR requires the 2bit packed symbol to be in 'Sign-Magnitude Adjusted' format, however Peter Monta's original verilog code produces 'Offset-Binary Adjusted' format.

Symbol Offset-Binary Adjusted Sign-Mag Adjusted
Original Firehose GNSS-SDR
-3 00 10
-1 01 11
+1 10 00
+3 11 01

The steam format definitions are from ION GNSS Metadata Standard

The encoding can be changed by editing two files, quantize.v and histogram.v. The PC software also need to understand the new mapping so packet2wav_3ch.c will also need to be updated.

Workflow

For the first test we will use the ibyte input format on GNSS SDR. The updated packet2wav_3ch in this repository will turn each 2bit symbol onto a value of -90,-30,+30 and +90 in an 8bit two's complement format, 8bit I followed by 8bit Q. The command need to convert the data is:

<outfile.pcap ./packet2wav_3ch 1 > outfile.wav

This can then be fed into GNSSS-SDR. The first part of the GNSS-SDR config file is copied below:

[GNSS-SDR]

;######### GLOBAL OPTIONS ##################

;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz].

GNSS-SDR.internal_fs_hz=4096000

;######### SIGNAL_SOURCE CONFIG ############

SignalSource.implementation=File_Signal_Source

SignalSource.filename=/home/alan/fpga/GNSS_Firehose/test/outfile.wav

SignalSource.item_type=ibyte

SignalSource.sampling_frequency=69984000

SignalSource.freq=1584754875

SignalSource.samples=0

SignalSource.repeat=false

SignalSource.dump=false

SignalSource.dump_filename=../data/signal_source.dat

SignalSource.enable_throttle_control=false

;######### SIGNAL_CONDITIONER CONFIG ############

SignalConditioner.implementation=Signal_Conditioner

DataTypeAdapter.implementation=Ibyte_To_Complex

;######### INPUT_FILTER CONFIG ############

InputFilter.implementation=Freq_Xlating_Fir_Filter

InputFilter.dump=false

InputFilter.dump_filename=../data/input_filter.dat

InputFilter.input_item_type=gr_complex

InputFilter.output_item_type=gr_complex

InputFilter.taps_item_type=float

InputFilter.number_of_taps=21

InputFilter.number_of_bands=2

InputFilter.band1_begin=0

InputFilter.band1_end=0.2

InputFilter.band2_begin=0.3

InputFilter.band2_end=1

InputFilter.ampl1_begin=1.0

InputFilter.ampl1_end=1.0

InputFilter.ampl2_begin=0

InputFilter.ampl2_end=0

InputFilter.band1_error=1.0

InputFilter.band2_error=1.0

InputFilter.filter_type=bandpass

InputFilter.grid_density=16

InputFilter.IF=9334875

InputFilter.sampling_frequency=69984000

;######### RESAMPLER CONFIG ############

Resampler.implementation=Direct_Resampler

Resampler.sample_freq_in=69984000

Resampler.sample_freq_out=4096000

Resampler.item_type=gr_complex

Channel 1 of the GNSS-Firehose is set up (in this instance) with an LO frequency of 1.584754875GHz. It has a sampling frequency of the down converted signal of 69.984MHz and the packet2wav command converts the 2bit packed data into 8bit ibyte data. The Freq_Xlating_Fir_Filter is used to moved the GPS signal to baseband.

On an i5-4590/3.3GHz machine 60sec data data took 286sec to process.

VOLK - trick for young players

GNSS-SDR does some pretty heavy processing. It uses a library called VOLK which provides accelerated maths commands tailored for the particular processor you are using. However VOLK needs to figure out which commands to use. The following command need to be run:

volk_profile

volk_gnsssdr_profile

They only need to be run once per user as it will create the $HOME/.volk_gnsssdr/volk_gnsssdr_config file to allow VOLK to know maths commands are the best to use. This file is read each time GNSS-SDR is run.

Clone this wiki locally