Source code

Downloading the source code

GNSS-SDR uses the open source software development and distribution tools provided by SourceForge. Visit the SourceForge page for the project.

The ultimate version of the source code can be freely downloaded from the SourceForge.net repository with Subversion. Open a terminal and type the following command:

$ svn co http://svn.code.sf.net/p/gnss-sdr/code/trunk gnss-sdr

This command creates a copy of the GNSS-SDR source code in your private working area. If you modify the source code and want to share your work with the community, please take a look at how to contribute to the source code.

Checking out GNSS-SDR as in the line above will create a folder named gnss-sdr with the following structure:

 |-gnss-sdr
 |---build      <- where gnss-sdr is built
 |---cmake      <- CMake-related files
 |---conf       <- Configuration files. Each file represents one receiver.
 |---data       <- Populate this folder with your captured data.
 |---docs       <- Contains documentation-related files
 |---drivers    <- Drivers for some RF front-ends
 |---firmware   <- Firmware for some front-ends
 |---install    <- Executables 
 |---src        <- Source code folder
 |-----algorithms
 |-----core
 |-----main
 |-----tests
 |-----utils     <- some utilities (e.g. Matlab scripts)

 

Building the source code

Before building GNSS-SDR, you need all the required dependencies (that is, libraries used by GNSS-SDR: GNU Radio, Armadillo, gperftools, Google C++ Testing framework, gflags and glog, plus some others for optional features) available on your system. Luckily enough, GNSS-SDR uses CMake, a building tool that is able to automatize the process. Check out the Building Guide for more details on how to install those dependencies. Once everything is in place, the workflow is as follows:

$ cd gnss-sdr/build
$ cmake ../
$ make
$ make install

This will compile and link the software. If everything runs well, at the end of the process you will find two executables at the install folder: gnss-sdr, the GNSS software receiver, and run_tests, an executable that runs all the quality assurance code.

From the gnss-sdr/build folder, you can build the documentation by doing:

$ make doc

and then point your browser of preference to gnss-sdr/docs/html/index.html.

Updating GNSS-SDR

If you checked out GNSS-SDR some days ago, it is possible that some developer had updated files at the Subversion repository. You can update your working copy by doing:

$ cd gnss-sdr
$ svn up

Check Version Control with Subversion for more information about Subversion usage.

Before rebuiling the source code, it is safe (and recommended) to remove the remainders of old builds:

$ rm -rf build/*

 

Configuration

Configuration allows users to define in an easy way their own custom receiver by specifying the flowgraph (type of signal source, number of channels, algorithms to be used for each channel and each module, strategies for satellite selection, type of output format, etc.). Every class knows which parameters the user needs to configure and what are the names of these parameters. The names of the parameters are the same internally and externally, meaning that when we store parameter values in a configuration file, the names of the parameters will be the same in the that file as in the code. For instance, parameters param1 and param2 for class Foo will be named Foo.param1 and Foo.param2.

Configuration parameters are stored in a configuration file in the INI format. An INI file is an 8-bit text file in which every property has a name and a value, in the form name = value. Properties are case-insensitive, and cannot contain spacing characters. Semicolons (;) indicate the start of a comment; everything between the semicolon and the end of the line is ignored. Thus, that information would be set in this way:

Foo.param1=value ; this is a comment
Foo.param2=value

The name of these parameters can be anything but one reserved word: implementation. This parameter indicates in its value the name of the class that has to be instantiated by the factory for that role. For instance, if we want to use the implementation DirectResampler for module SignalConditioner, the corresponding line in the configuration file would be:

SignalConditioner.implementation=DirectResampler

Since the configuration is just a set of property names and values without any meaning or syntax, the system is very versatile and easily extendable. Adding new properties to the system only implies modifications in the classes that will make use of these properties. In addition, the configuration files are not checked against any strict syntax so it is always in a correct status (as long as it contains pairs of property names and values in INI format).

The configuration files for GNSS-SDR are in the conf/ folder. In practice, each valid configuration file constitutes a different GNSS receiver. Please take a look at conf/master.conf for a summary of possibilities when configuring a receiver.

With GNSS-SDR, you can define you own receiver, work with captured raw data or from a RF front-end, dump into files intermediate signals, or tune every single algorithm used in the signal processing plane. All the configuration is done in a single file. Those configuration files reside at the gnss-sdr/conf folder. By default, the executable gnss-sdr will read the configuration available at gnss-sdr/conf/gnss-sdr.conf. You can edit that file to fit your needs, or even better, define a new my_receiver.conf file with your own configuration. This new receiver can be done by going to the gnss-sdr/install folder:

$ cd gnss-sdr/install

and invoking gnss-sdr with the --config_file flag pointing to your configuration file:

$ ./gnss-sdr --config_file=../conf/my_receiver.conf

You can see a guide of available implementations at gnss-sdr/conf/master.conf. That folder contains other working examples as well. If you have a working configuration and want to share it will others, please email it to the GNSS-SDR developers mailing list and we will be happy to upload it to the server.

You can use a single configuration file for processing different data files, specifying the file to be processed with the --signal_source flag:

$ ./gnss-sdr --config_file=../conf/my_receiver.conf --signal_source=../data/my_captured_data.dat

This will override the SignalSource.filename specified in the configuration file.

You can get a complete list of available commandline flags by doing:

$ ./gnss-sdr --help

For general usage of commandline flags, see how to use Google Commandline Flags.

 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer