mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into fix_observables
This commit is contained in:
commit
03c7278b27
26
AUTHORS
26
AUTHORS
@ -1,7 +1,7 @@
|
||||
GNSS-SDR Authorship
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
The GNSS-SDR project is hosted and sponsored by the Centre Tecnologic de
|
||||
The GNSS-SDR project is hosted and sponsored by the Centre Tecnològic de
|
||||
Telecomunicacions de Catalunya (CTTC), a non-profit research foundation located
|
||||
in Castelldefels (40.396764 N, 3.713379 E), 20 km south of Barcelona, Spain.
|
||||
GNSS-SDR is the by-product of GNSS research conducted at the Communications
|
||||
@ -33,24 +33,24 @@ Contact Information
|
||||
|
||||
List of authors
|
||||
------------------------------------------------------------------------------
|
||||
Carles Fernandez-Prades carles.fernandez@cttc.cat Project manager
|
||||
Carles Fernández-Prades carles.fernandez@cttc.cat Project manager
|
||||
Javier Arribas javier.arribas@cttc.es Developer
|
||||
Luis Esteve Elfau luis@epsilon-formacion.com Developer
|
||||
Antonio Ramos antonio.ramos@cttc.es Developer
|
||||
Antonio Ramos antonio.ramosdet@gmail.com Developer
|
||||
Marc Majoral marc.majoral@cttc.cat Developer
|
||||
Jordi Vilà-Valls jordi.vila@cttc.cat Consultant
|
||||
Pau Closas pau.closas@northeastern.edu Consultant
|
||||
Jordi Vila-Valls jordi.vila@cttc.cat Consultant
|
||||
Carlos Aviles carlos.avilesr@googlemail.com Contributor
|
||||
Andres Cecilia Luque a.cecilia.luque@gmail.com Contributor
|
||||
Anthony Arnold anthony.arnold@uqconnect.edu.au Contributor
|
||||
Carlos Avilés carlos.avilesr@googlemail.com Contributor
|
||||
Cillian O'Driscoll cillian.odriscoll@gmail.com Contributor
|
||||
Damian Miralles dmiralles2009@gmail.com Contributor
|
||||
Daniel Fehr daniel.co@bluewin.ch Contributor
|
||||
David Pubill david.pubill@cttc.cat Contributor
|
||||
Fran Fabra fabra@ice.csic.es Contributor
|
||||
Gabriel Araujo gabriel.araujo.5000@gmail.com Contributor
|
||||
Leonardo Tonetto tonetto.dev@gmail.com Contributor
|
||||
Mara Branzanti mara.branzanti@gmail.com Contributor
|
||||
Marc Molina marc.molina.pena@gmail.com Contributor
|
||||
Daniel Fehr daniel.co@bluewin.ch Contributor
|
||||
Marc Sales marcsales92@gmail.com Contributor
|
||||
Damian Miralles dmiralles2009@gmail.com Contributor
|
||||
Andres Cecilia Luque a.cecilia.luque@gmail.com Contributor
|
||||
Leonardo Tonetto tonetto.dev@gmail.com Contributor
|
||||
Anthony Arnold anthony.arnold@uqconnect.edu.au Contributor
|
||||
Fran Fabra fabra@ice.csic.es Contributor
|
||||
Cillian O'Driscoll cillian.odriscoll@gmail.com Contributor
|
||||
Gabriel Araujo gabriel.araujo.5000@gmail.com Contributor
|
||||
Carlos Paniego carpanie@hotmail.com Artwork
|
||||
|
@ -5,17 +5,18 @@ tags:
|
||||
- gnss
|
||||
- gps
|
||||
- Galileo
|
||||
- Glonass
|
||||
author:
|
||||
- Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
||||
- Javier Arribas <javier.arribas@cttc.es>
|
||||
- et altri (see AUTHORS file for a list of contributors)
|
||||
copyright_owner:
|
||||
- The Authors
|
||||
dependencies: gnuradio (>= 3.7.3), armadillo, gflags, glog, gnutls
|
||||
dependencies: gnuradio (>= 3.7.3), armadillo, gflags, glog, gnutls, matio
|
||||
license: GPLv3+
|
||||
repo: https://github.com/gnss-sdr/gnss-sdr
|
||||
website: https://gnss-sdr.org
|
||||
icon: https://a.fsdn.com/con/app/proj/gnss-sdr/screenshots/logo400x400.jpg
|
||||
icon: https://raw.githubusercontent.com/gnss-sdr/gnss-sdr/master/docs/doxygen/images/gnss-sdr_logo.png
|
||||
---
|
||||
Global Navigation Satellite Systems receiver defined by software. It performs all the signal
|
||||
processing from raw signal samples up to the computation of the Position-Velocity-Time solution,
|
||||
|
40
README.md
40
README.md
@ -121,7 +121,7 @@ Once you have installed these packages, you can jump directly to [download the s
|
||||
|
||||
### Alternative 2: Install dependencies using PyBOMBS
|
||||
|
||||
This option is adequate if you are interested in development, in working with the most recent versions of software dependencies, want more fine tuning on the installed versions, or simply in building everything from the scratch just for the fun of it. In such cases, we recommend to use [PyBOMBS](http://gnuradio.org/pybombs "Python Build Overlay Managed Bundle System wiki") (Python Build Overlay Managed Bundle System), GNU Radio's meta-package manager tool that installs software from source, or whatever the local package manager is, that automatically does all the work for you. Please take a look at the configuration options and general PyBOMBS usage at https://github.com/gnuradio/pybombs. Here we provide a quick step-by-step tutorial.
|
||||
This option is adequate if you are interested in development, in working with the most recent versions of software dependencies, want more fine tuning on the installed versions, or simply in building everything from the scratch just for the fun of it. In such cases, we recommend to use [PyBOMBS](https://github.com/gnuradio/pybombs "Python Build Overlay Managed Bundle System") (Python Build Overlay Managed Bundle System), GNU Radio's meta-package manager tool that installs software from source, or whatever the local package manager is, that automatically does all the work for you. Please take a look at the configuration options and general PyBOMBS usage at https://github.com/gnuradio/pybombs. Here we provide a quick step-by-step tutorial.
|
||||
|
||||
First of all, install some basic packages:
|
||||
|
||||
@ -185,7 +185,7 @@ or manually as explained below, and then please follow instructions on how to [d
|
||||
$ sudo apt-get install libopenblas-dev liblapack-dev # For Debian/Ubuntu/LinuxMint
|
||||
$ sudo yum install lapack-devel blas-devel # For Fedora/CentOS/RHEL
|
||||
$ sudo zypper install lapack-devel blas-devel # For OpenSUSE
|
||||
$ wget http://sourceforge.net/projects/arma/files/armadillo-8.500.0.tar.xz
|
||||
$ wget https://sourceforge.net/projects/arma/files/armadillo-8.500.0.tar.xz
|
||||
$ tar xvfz armadillo-8.500.0.tar.xz
|
||||
$ cd armadillo-8.500.0
|
||||
$ cmake .
|
||||
@ -193,7 +193,7 @@ $ make
|
||||
$ sudo make install
|
||||
~~~~~~
|
||||
|
||||
The full stop separated from ```cmake``` by a space is important. [CMake](http://www.cmake.org/ "CMake's Homepage") will figure out what other libraries are currently installed and will modify Armadillo's configuration correspondingly. CMake will also generate a run-time armadillo library, which is a combined alias for all the relevant libraries present on your system (eg. BLAS, LAPACK and ATLAS).
|
||||
The full stop separated from ```cmake``` by a space is important. [CMake](https://cmake.org/ "CMake's Homepage") will figure out what other libraries are currently installed and will modify Armadillo's configuration correspondingly. CMake will also generate a run-time armadillo library, which is a combined alias for all the relevant libraries present on your system (eg. BLAS, LAPACK and ATLAS).
|
||||
|
||||
|
||||
|
||||
@ -245,7 +245,7 @@ changing `/home/username/googletest-release-1.8.0/googletest` by the actual dire
|
||||
|
||||
|
||||
|
||||
#### Install the [GnuTLS](http://www.gnutls.org/ "GnuTLS's Homepage") or [OpenSSL](https://www.openssl.org/ "OpenSSL's Homepage") libraries:
|
||||
#### Install the [GnuTLS](https://www.gnutls.org/ "GnuTLS's Homepage") or [OpenSSL](https://www.openssl.org/ "OpenSSL's Homepage") libraries:
|
||||
|
||||
~~~~~~
|
||||
$ sudo apt-get install libgnutls-openssl-dev # For Debian/Ubuntu/LinuxMint
|
||||
@ -516,7 +516,7 @@ More details can be found in our tutorial about [GNSS-SDR configuration options
|
||||
|
||||
### macOS 10.13 (High Sierra) and 10.12 (Sierra), Mac OS X 10.11 (El Capitan), 10.10 (Yosemite) and 10.9 (Mavericks).
|
||||
|
||||
If you still have not installed [Xcode](http://developer.apple.com/xcode/ "Xcode"), do it now from the App Store (it's free). You will also need the Xcode Command Line Tools. Launch the Terminal, found in /Applications/Utilities/, and type:
|
||||
If you still have not installed [Xcode](https://developer.apple.com/xcode/ "Xcode"), do it now from the App Store (it's free). You will also need the Xcode Command Line Tools. Launch the Terminal, found in /Applications/Utilities/, and type:
|
||||
|
||||
~~~~~~
|
||||
$ xcode-select --install
|
||||
@ -532,7 +532,7 @@ Software pre-requisites can be installed using either [Macports](#macports) or [
|
||||
|
||||
#### <a name="macports">Macports</a>
|
||||
|
||||
First, [install Macports](http://www.macports.org/install.php). If you are upgrading from a previous installation, please follow the [migration rules](http://trac.macports.org/wiki/Migration).
|
||||
First, [install Macports](https://www.macports.org/install.php). If you are upgrading from a previous installation, please follow the [migration rules](https://trac.macports.org/wiki/Migration).
|
||||
|
||||
In a terminal, type:
|
||||
|
||||
@ -625,7 +625,7 @@ GNSS-SDR comes with a library which is a module of the Vector-Optimized Library
|
||||
|
||||
###### Other package managers
|
||||
|
||||
GNU Radio and other dependencies can also be installed using other package managers than Macports, such as [Fink](http://www.finkproject.org/ "Fink") or [Homebrew](http://brew.sh/ "Homebrew"). Since the version of Python that ships with OS X is great for learning but it is not good for development, you could have another Python executable in a non-standard location. If that is the case, you need to inform GNSS-SDR's configuration system by defining the `PYTHON_EXECUTABLE` variable as:
|
||||
GNU Radio and other dependencies can also be installed using other package managers than Macports, such as [Fink](http://www.finkproject.org/ "Fink") or [Homebrew](https://brew.sh/ "Homebrew"). Since the version of Python that ships with OS X is great for learning but it is not good for development, you could have another Python executable in a non-standard location. If that is the case, you need to inform GNSS-SDR's configuration system by defining the `PYTHON_EXECUTABLE` variable as:
|
||||
|
||||
~~~~~~
|
||||
cmake -DPYTHON_EXECUTABLE=/path/to/bin/python ../
|
||||
@ -646,7 +646,7 @@ Other builds
|
||||
---------
|
||||
* **Docker container**: A technology providing operating-system-level virtualization to build, ship, and run distributed applications, whether on laptops, data center VMs, or the cloud. Visit [https://github.com/carlesfernandez/docker-gnsssdr](https://github.com/carlesfernandez/docker-gnsssdr) or [https://github.com/carlesfernandez/docker-pybombs-gnsssdr](https://github.com/carlesfernandez/docker-pybombs-gnsssdr) for instructions.
|
||||
|
||||
* **Snap packages**: [Snaps](http://snapcraft.io) are universal Linux packages aimed to work on any distribution or device, from IoT devices to servers, desktops to mobile devices. Visit [https://github.com/carlesfernandez/snapcraft-sandbox](https://github.com/carlesfernandez/snapcraft-sandbox) for instructions.
|
||||
* **Snap packages**: [Snaps](https://snapcraft.io) are universal Linux packages aimed to work on any distribution or device, from IoT devices to servers, desktops to mobile devices. Visit [https://github.com/carlesfernandez/snapcraft-sandbox](https://github.com/carlesfernandez/snapcraft-sandbox) for instructions.
|
||||
|
||||
* **GNSS-SDR in embedded platforms**: we provide a Software Development Kit (SDK) based on [OpenEmbedded](http://www.openembedded.org/wiki/Main_Page) for cross-compiling GNSS-SDR in your desktop computer and for producing executables that can run in embedded platforms, such as a Zedboard or a Raspberry Pi 3. Visit [Cross-compiling GNSS-SDR](https://gnss-sdr.org/docs/tutorials/cross-compiling/) for instructions.
|
||||
|
||||
@ -694,11 +694,11 @@ Getting started
|
||||
1. After building the code, you will find the ```gnss-sdr``` executable file at gnss-sdr/install. You can make it available everywhere else by ```sudo make install```. Run the profilers ```volk_profile``` and ```volk_gnsssdr_profile``` for testing all available VOLK kernels for each architecture supported by your processor. This only has to be done once.
|
||||
2. In post-processing mode, you have to provide a captured GNSS signal file.
|
||||
1. The signal file can be easily recorded using the GNU Radio file sink in ```gr_complex<float>``` mode.
|
||||
2. You will need a GPS active antenna, a [USRP](http://www.ettus.com/product) and a suitable USRP daughter board to receive GPS L1 C/A signals. GNSS-SDR require to have at least 2 MHz of bandwidth in 1.57542 GHz. (remember to enable the DC bias with the daughter board jumper).
|
||||
2. You will need a GPS active antenna, a [USRP](https://www.ettus.com/product) and a suitable USRP daughter board to receive GPS L1 C/A signals. GNSS-SDR require to have at least 2 MHz of bandwidth in 1.57542 GHz. (remember to enable the DC bias with the daughter board jumper).
|
||||
We use a [DBSRX2](https://www.ettus.com/product/details/DBSRX2) to do the task, but you can try the newer Ettus' daughter boards as well.
|
||||
3. The easiest way to capture a signal file is to use the GNU Radio Companion GUI. Only two blocks are needed: a USRP signal source connected to complex float file sink. You need to tune the USRP central frequency and decimation factor using USRP signal source properties box. We suggest using a decimation factor of 20 if you use the USRP2. This will give you 100/20 = 5 MSPS which will be enough to receive GPS L1 C/A signals. The front-end gain should also be configured. In our test with the DBSRX2 we obtained good results with ```G=50```.
|
||||
4. Capture at least 80 seconds of signal in open sky conditions. During the process, be aware of USRP driver buffer underruns messages. If your hard disk is not fast enough to write data at this speed you can capture to a virtual RAM drive. 80 seconds of signal at 5 MSPS occupies less than 3 Gbytes using ```gr_complex<float>```.
|
||||
5. If you have no access to an RF front-end, you can download a sample raw data file (that contains GPS and Galileo signals) from [here](http://sourceforge.net/projects/gnss-sdr/files/data/).
|
||||
5. If you have no access to an RF front-end, you can download a sample raw data file (that contains GPS and Galileo signals) from [here](https://sourceforge.net/projects/gnss-sdr/files/data/).
|
||||
3. You are ready to configure the receiver to use your captured file among other parameters:
|
||||
1. The default configuration file resides at [/usr/local/share/gnss-sdr/conf/default.conf](./conf/gnss-sdr.conf).
|
||||
2. You need to review/modify at least the following settings:
|
||||
@ -764,7 +764,7 @@ The name of these parameters can be anything but one reserved word: implementati
|
||||
SignalConditioner.implementation=Pass_Through
|
||||
~~~~~~
|
||||
|
||||
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 the [INI format](http://en.wikipedia.org/wiki/INI_file)).
|
||||
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 the [INI format](https://en.wikipedia.org/wiki/INI_file)).
|
||||
|
||||
|
||||
|
||||
@ -875,7 +875,7 @@ SignalSource.big_endian_bytes=false
|
||||
|
||||
***Example: UHD Signal Source***
|
||||
|
||||
The user may prefer to use a [UHD](http://code.ettus.com/redmine/ettus/projects/uhd/wiki)-compatible RF front-end and try real-time processing. For instance, for a USRP1 + DBSRX daughterboard, use:
|
||||
The user may prefer to use a [UHD](https://files.ettus.com/manual/)-compatible RF front-end and try real-time processing. For instance, for a USRP1 + DBSRX daughterboard, use:
|
||||
|
||||
~~~~~~
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
@ -1031,7 +1031,7 @@ More documentation at the [Data Type Adapter Blocks page](https://gnss-sdr.org/d
|
||||
|
||||
#### Input filter
|
||||
|
||||
This block filters the input data. It can be combined with frequency translation for IF signals. The computation of the filter taps is based on parameters of GNU Radio's function [pm_remez](http://gnuradio.org/doc/doxygen/pm__remez_8h.html), that calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, the desired response on those bands, and the weight given to the error in those bands.
|
||||
This block filters the input data. It can be combined with frequency translation for IF signals. The computation of the filter taps is based on parameters of GNU Radio's function [pm_remez](https://gnuradio.org/doc/doxygen/pm__remez_8h.html), that calculates the optimal (in the Chebyshev/minimax sense) FIR filter impulse response given a set of band edges, the desired response on those bands, and the weight given to the error in those bands.
|
||||
|
||||
The block can be configured like this:
|
||||
|
||||
@ -1301,7 +1301,7 @@ More documentation at the [Observables Blocks page](https://gnss-sdr.org/docs/sp
|
||||
|
||||
|
||||
#### Computation of Position, Velocity and Time
|
||||
Although data processing for obtaining high-accuracy PVT solutions is out of the scope of GNSS-SDR, we provide a module that can compute simple least square solutions (stored in GIS-friendly formats such as [GeoJSON](http://geojson.org/geojson-spec.html) and [KML](http://www.opengeospatial.org/standards/kml), or transmitted via serial port as [NMEA 0183](https://en.wikipedia.org/wiki/NMEA_0183) messages), and leaves room for more sophisticated positioning methods by storing observables and navigation data in [RINEX](https://en.wikipedia.org/wiki/RINEX) files (v2.11 or v3.02), and generating [RTCM](http://www.rtcm.org "Radio Technical Commission for Maritime Services") 3.2 messages that can be disseminated through the Internet in real time.
|
||||
Although data processing for obtaining high-accuracy PVT solutions is out of the scope of GNSS-SDR, we provide a module that can compute simple least square solutions (stored in GIS-friendly formats such as [GeoJSON](https://tools.ietf.org/html/rfc7946) and [KML](http://www.opengeospatial.org/standards/kml), or transmitted via serial port as [NMEA 0183](https://en.wikipedia.org/wiki/NMEA_0183) messages), and leaves room for more sophisticated positioning methods by storing observables and navigation data in [RINEX](https://en.wikipedia.org/wiki/RINEX) files (v2.11 or v3.02), and generating [RTCM](http://www.rtcm.org "Radio Technical Commission for Maritime Services") 3.2 messages that can be disseminated through the Internet in real time.
|
||||
|
||||
The common interface is [PvtInterface](./src/core/interfaces/pvt_interface.h).
|
||||
|
||||
@ -1332,18 +1332,18 @@ PVT.rtcm_MT1077_rate_ms=1000
|
||||
|
||||
**Notes on the output formats:**
|
||||
|
||||
* **GeoJSON** is a geospatial data interchange format based on JavaScript Object Notation (JSON) supported by numerous mapping and GIS software packages, including [OpenLayers](http://openlayers.org), [Leaflet](http://leafletjs.com), [MapServer](http://www.mapserver.org), [GeoServer](http://geoserver.org), [GeoDjango](https://www.djangoproject.com), [GDAL](http://www.gdal.org), and [CartoDB](https://cartodb.com). It is also possible to use GeoJSON with [PostGIS](http://postgis.net) and [Mapnik](http://mapnik.org), both of which handle the format via the GDAL OGR conversion library. The [Google Maps Javascript API](https://developers.google.com/maps/documentation/javascript/) v3 directly supports the [integration of GeoJSON data layers](https://developers.google.com/maps/documentation/javascript/examples/layer-data-simple), and [GitHub also supports GeoJSON rendering](https://github.com/blog/1528-there-s-a-map-for-that).
|
||||
* **GeoJSON** is a geospatial data interchange format based on JavaScript Object Notation (JSON) supported by numerous mapping and GIS software packages, including [OpenLayers](https://openlayers.org), [Leaflet](https://leafletjs.com), [MapServer](http://www.mapserver.org), [GeoServer](http://geoserver.org), [GeoDjango](https://www.djangoproject.com), [GDAL](http://www.gdal.org), and [CartoDB](https://cartodb.com). It is also possible to use GeoJSON with [PostGIS](https://postgis.net/) and [Mapnik](http://mapnik.org), both of which handle the format via the GDAL OGR conversion library. The [Google Maps Javascript API](https://developers.google.com/maps/documentation/javascript/) v3 directly supports the [integration of GeoJSON data layers](https://developers.google.com/maps/documentation/javascript/examples/layer-data-simple), and [GitHub also supports GeoJSON rendering](https://github.com/blog/1528-there-s-a-map-for-that).
|
||||
|
||||
* **KML** (Keyhole Markup Language) is an XML grammar used to encode and transport representations of geographic data for display in an earth browser. KML is an open standard officially named the OpenGIS KML Encoding Standard (OGC KML), and it is maintained by the Open Geospatial Consortium, Inc. (OGC). KML files can be displayed in geobrowsers such as [Google Earth](https://www.google.com/earth/), [Marble](https://marble.kde.org), [osgEarth](http://osgearth.org), or used with the [NASA World Wind SDK for Java](http://worldwind.arc.nasa.gov/java/).
|
||||
* **KML** (Keyhole Markup Language) is an XML grammar used to encode and transport representations of geographic data for display in an earth browser. KML is an open standard officially named the OpenGIS KML Encoding Standard (OGC KML), and it is maintained by the Open Geospatial Consortium, Inc. (OGC). KML files can be displayed in geobrowsers such as [Google Earth](https://www.google.com/earth/), [Marble](https://marble.kde.org), [osgEarth](http://osgearth.org), or used with the [NASA World Wind SDK for Java](https://worldwind.arc.nasa.gov/java/).
|
||||
|
||||
* **NMEA 0183** is a combined electrical and data specification for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GPS receivers and many other types of instruments. It has been defined by, and is controlled by, the U.S. [National Marine Electronics Association](http://www.nmea.org/). The NMEA 0183 standard uses a simple ASCII, serial communications protocol that defines how data are transmitted in a *sentence* from one *talker* to multiple *listeners* at a time. Through the use of intermediate expanders, a talker can have a unidirectional conversation with a nearly unlimited number of listeners, and using multiplexers, multiple sensors can talk to a single computer port. At the application layer, the standard also defines the contents of each sentence (message) type, so that all listeners can parse messages accurately. Those messages can be sent through the serial port (that could be for instance a Bluetooth link) and be used/displayed by a number of software applications such as [gpsd](http://www.catb.org/gpsd/ "The UNIX GPS daemon"), [JOSM](https://josm.openstreetmap.de/ "The Java OpenStreetMap Editor"), [OpenCPN](http://opencpn.org/ocpn/ "Open Chart Plotter Navigator"), and many others (and maybe running on other devices).
|
||||
* **NMEA 0183** is a combined electrical and data specification for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GPS receivers and many other types of instruments. It has been defined by, and is controlled by, the U.S. [National Marine Electronics Association](http://www.nmea.org/). The NMEA 0183 standard uses a simple ASCII, serial communications protocol that defines how data are transmitted in a *sentence* from one *talker* to multiple *listeners* at a time. Through the use of intermediate expanders, a talker can have a unidirectional conversation with a nearly unlimited number of listeners, and using multiplexers, multiple sensors can talk to a single computer port. At the application layer, the standard also defines the contents of each sentence (message) type, so that all listeners can parse messages accurately. Those messages can be sent through the serial port (that could be for instance a Bluetooth link) and be used/displayed by a number of software applications such as [gpsd](http://www.catb.org/gpsd/ "The UNIX GPS daemon"), [JOSM](https://josm.openstreetmap.de/ "The Java OpenStreetMap Editor"), [OpenCPN](https://opencpn.org/ "Open Chart Plotter Navigator"), and many others (and maybe running on other devices).
|
||||
|
||||
* **RINEX** (Receiver Independent Exchange Format) is an interchange format for raw satellite navigation system data, covering observables and the information contained in the navigation message broadcast by GNSS satellites. This allows the user to post-process the received data to produce a more accurate result (usually with other data unknown to the original receiver, such as better models of the atmospheric conditions at time of measurement). RINEX files can be used by software packages such as [GPSTk](http://www.gpstk.org), [RTKLIB](http://www.rtklib.com/) and [gLAB](http://gage14.upc.es/gLAB/). GNSS-SDR by default generates RINEX version [3.02](https://igscb.jpl.nasa.gov/igscb/data/format/rinex302.pdf). If [2.11](https://igscb.jpl.nasa.gov/igscb/data/format/rinex211.txt) is needed, it can be requested through the `rinex_version` parameter in the configuration file:
|
||||
~~~~~~
|
||||
PVT.rinex_version=2
|
||||
~~~~~~
|
||||
|
||||
* **RTCM SC-104** provides standards that define the data structure for differential GNSS correction information for a variety of differential correction applications. Developed by the Radio Technical Commission for Maritime Services ([RTCM](http://www.rtcm.org/overview.php#Standards "Radio Technical Commission for Maritime Services")), they have become an industry standard for communication of correction information. GNSS-SDR implements RTCM version 3.2, defined in the document *RTCM 10403.2, Differential GNSS (Global Navigation Satellite Systems) Services - Version 3* (February 1, 2013), which can be [purchased online](https://ssl29.pair.com/dmarkle/puborder.php?show=3 "RTCM Online Publication Order Form"). By default, the generated RTCM binary messages are dumped into a text file in hexadecimal format. However, GNSS-SDR is equipped with a TCP/IP server, acting as an NTRIP source that can feed an NTRIP server. NTRIP (Networked Transport of RTCM via Internet Protocol) is an open standard protocol that can be freely downloaded from [BKG](http://igs.bkg.bund.de/root_ftp/NTRIP/documentation/NtripDocumentation.pdf "Networked Transport of RTCM via Internet Protocol (Ntrip) Version 1.0"), and it is designed for disseminating differential correction data (*e.g.* in the RTCM-104 format) or other kinds of GNSS streaming data to stationary or mobile users over the Internet. The TCP/IP server can be enabled by setting ```PVT.flag_rtcm_server=true``` in the configuration file, and will be active during the execution of the software receiver. By default, the server will operate on port 2101 (which is the recommended port for RTCM services according to the Internet Assigned Numbers Authority, [IANA](http://www.iana.org/assignments/service-names-port-numbers "Service Name and Transport Protocol Port Number Registry")), and will identify the Reference Station with ID=1234. This behaviour can be changed in the configuration file:
|
||||
* **RTCM SC-104** provides standards that define the data structure for differential GNSS correction information for a variety of differential correction applications. Developed by the Radio Technical Commission for Maritime Services ([RTCM](http://www.rtcm.org/differential-global-navigation-satellite--dgnss--standards.html "Radio Technical Commission for Maritime Services")), they have become an industry standard for communication of correction information. GNSS-SDR implements RTCM version 3.2, defined in the document *RTCM 10403.2, Differential GNSS (Global Navigation Satellite Systems) Services - Version 3* (February 1, 2013), which can be [purchased online](https://ssl29.pair.com/dmarkle/puborder.php?show=3 "RTCM Online Publication Order Form"). By default, the generated RTCM binary messages are dumped into a text file in hexadecimal format. However, GNSS-SDR is equipped with a TCP/IP server, acting as an NTRIP source that can feed an NTRIP server. NTRIP (Networked Transport of RTCM via Internet Protocol) is an open standard protocol that can be freely downloaded from [BKG](https://igs.bkg.bund.de/root_ftp/NTRIP/documentation/NtripDocumentation.pdf "Networked Transport of RTCM via Internet Protocol (Ntrip) Version 1.0"), and it is designed for disseminating differential correction data (*e.g.* in the RTCM-104 format) or other kinds of GNSS streaming data to stationary or mobile users over the Internet. The TCP/IP server can be enabled by setting ```PVT.flag_rtcm_server=true``` in the configuration file, and will be active during the execution of the software receiver. By default, the server will operate on port 2101 (which is the recommended port for RTCM services according to the Internet Assigned Numbers Authority, [IANA](https://www.iana.org/assignments/service-names-port-numbers/ "Service Name and Transport Protocol Port Number Registry")), and will identify the Reference Station with ID=1234. This behaviour can be changed in the configuration file:
|
||||
~~~~~~
|
||||
PVT.flag_rtcm_server=true
|
||||
PVT.rtcm_tcp_port=2102
|
||||
@ -1402,9 +1402,9 @@ Ok, now what?
|
||||
|
||||
In order to start using GNSS-SDR, you may want to populate ```gnss-sdr/data``` folder (or anywhere else on your system) with raw data files. By "raw data" we mean the output of a Radio Frequency front-end's Analog-to-Digital converter. GNSS-SDR needs signal samples already in baseband or in passband, at a suitable intermediate frequency (on the order of MHz). Prepare your configuration file, and then you are ready for running ```gnss-sdr --config_file=your_configuration.conf```, and seeing how the file is processed.
|
||||
|
||||
Another interesting option is working in real-time with an RF front-end. We provide drivers for UHD-compatible hardware such as the [USRP family](http://www.ettus.com/product), for OsmoSDR and other front-ends (HackRF, bladeRF, LimeSDR), for the GN3S v2 USB dongle and for some DVB-T USB dongles. Start with a low number of channels and then increase it in order to test how many channels your processor can handle in real-time.
|
||||
Another interesting option is working in real-time with an RF front-end. We provide drivers for UHD-compatible hardware such as the [USRP family](https://www.ettus.com/product), for OsmoSDR and other front-ends (HackRF, bladeRF, LimeSDR), for the GN3S v2 USB dongle and for some DVB-T USB dongles. Start with a low number of channels and then increase it in order to test how many channels your processor can handle in real-time.
|
||||
|
||||
You can find more information at the [GNSS-SDR Documentation page](https://gnss-sdr.org/docs/) or directly asking to the [GNSS-SDR Developers mailing list](http://lists.sourceforge.net/lists/listinfo/gnss-sdr-developers).
|
||||
You can find more information at the [GNSS-SDR Documentation page](https://gnss-sdr.org/docs/) or directly asking to the [GNSS-SDR Developers mailing list](https://lists.sourceforge.net/lists/listinfo/gnss-sdr-developers).
|
||||
|
||||
You are also very welcome to contribute to the project, there are many ways to [participate in GNSS-SDR](https://gnss-sdr.org/contribute/). If you need some special feature not yet implemented, the Developer Team would love to be hired for developing it. Please do not hesitate to [contact them](https://gnss-sdr.org/team/).
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all
|
||||
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
|
||||
# iconv built into libc) for the transcoding. See
|
||||
# http://www.gnu.org/software/libiconv for the list of possible encodings.
|
||||
# https://www.gnu.org/software/libiconv for the list of possible encodings.
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
|
||||
@ -551,7 +551,7 @@ LAYOUT_FILE =
|
||||
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
|
||||
# the reference definitions. This must be a list of .bib files. The .bib
|
||||
# extension is automatically appended if omitted. This requires the bibtex tool
|
||||
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# For LaTeX the style of the bibliography can be controlled using
|
||||
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
|
||||
# search path. See also \cite for info how to create references.
|
||||
@ -623,7 +623,7 @@ INPUT = @top_srcdir@/src @top_srcdir@/docs/doxygen/other
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
# also the default input encoding. Doxygen uses libiconv (or the iconv built
|
||||
# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
|
||||
# into libc) for the transcoding. See https://www.gnu.org/software/libiconv for
|
||||
# the list of possible encodings.
|
||||
|
||||
INPUT_ENCODING = UTF-8
|
||||
@ -796,7 +796,7 @@ SOURCE_TOOLTIPS = YES
|
||||
# If the USE_HTAGS tag is set to YES then the references to source code
|
||||
# will point to the HTML generated by the htags(1) tool instead of doxygen
|
||||
# built-in source browser. The htags tool is part of GNU's global source
|
||||
# tagging system (see http://www.gnu.org/software/global/global.html). You
|
||||
# tagging system (see https://www.gnu.org/software/global/global.html). You
|
||||
# will need version 4.8.6 or higher.
|
||||
|
||||
USE_HTAGS = NO
|
||||
@ -875,7 +875,7 @@ HTML_STYLESHEET =
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
|
||||
# Doxygen will adjust the colors in the stylesheet and background images
|
||||
# according to this color. Hue is specified as an angle on a colorwheel,
|
||||
# see http://en.wikipedia.org/wiki/Hue for more information.
|
||||
# see https://en.wikipedia.org/wiki/Hue for more information.
|
||||
# For instance the value 0 represents red, 60 is yellow, 120 is green,
|
||||
# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
|
||||
# The allowed range is 0 to 359.
|
||||
@ -925,8 +925,6 @@ HTML_DYNAMIC_SECTIONS = NO
|
||||
# directory and running "make install" will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
|
||||
# it at startup.
|
||||
# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# for more information.
|
||||
|
||||
GENERATE_DOCSET = NO
|
||||
|
||||
@ -1123,7 +1121,7 @@ FORMULA_FONTSIZE = 10
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
|
||||
# (see http://www.mathjax.org) which uses client side Javascript for the
|
||||
# (see https://www.mathjax.org) which uses client side Javascript for the
|
||||
# rendering instead of using prerendered bitmaps. Use this if you do not
|
||||
# have LaTeX installed or if you want to formulas look prettier in the HTML
|
||||
# output. When enabled you also need to install MathJax separately and
|
||||
@ -1133,7 +1131,7 @@ USE_MATHJAX = @GNSSSDR_USE_MATHJAX@
|
||||
|
||||
# When MathJax is enabled you can set the default output format to be used for
|
||||
# the MathJax output. See the MathJax site (see:
|
||||
# http://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# https://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# Possible values are: HTML-CSS (which is slower, but has the best
|
||||
# compatibility), NativeMML (i.e. MathML) and SVG.
|
||||
# The default value is: HTML-CSS.
|
||||
@ -1149,7 +1147,7 @@ MATHJAX_FORMAT = HTML-CSS
|
||||
# MathJax, but it is strongly recommended to install a local copy of MathJax
|
||||
# before deployment.
|
||||
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
MATHJAX_RELPATH = https://cdnjs.com/libraries/mathjax/
|
||||
|
||||
# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
|
||||
# extension names that should be enabled during MathJax rendering. For example
|
||||
@ -1160,7 +1158,7 @@ MATHJAX_EXTENSIONS =
|
||||
|
||||
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
|
||||
# of code that will be used on startup of the MathJax code. See the MathJax site
|
||||
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# (see: https://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# example see the documentation.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
@ -1194,7 +1192,7 @@ SERVER_BASED_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/).
|
||||
# Xapian (see: https://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
@ -1207,7 +1205,7 @@ EXTERNAL_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/). See the section "External Indexing and
|
||||
# Xapian (see: https://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
@ -1358,7 +1356,7 @@ LATEX_SOURCE_CODE = NO
|
||||
|
||||
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
|
||||
# bibliography, e.g. plainnat, or ieeetr. See
|
||||
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# The default value is: plain.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
|
@ -471,7 +471,7 @@ void *rtksvrthread(void *arg)
|
||||
q = svr->buff[i] + svr->buffsize;
|
||||
|
||||
/* read receiver raw/rtcm data from input stream */
|
||||
if ((n = strread(svr->stream + i, p, q - p)) <= 0)
|
||||
if ((n = strread(svr->stream + i, p, static_cast<int>(q[0]) - static_cast<int>(p[0]))) <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -120,8 +120,8 @@ serial_t *openserial(const char *path, int mode, char *msg)
|
||||
std::string s_aux = "/dev/" + std::string(port);
|
||||
s_aux.resize(128, '\0');
|
||||
int n = s_aux.length();
|
||||
if (n < 128)
|
||||
for (int i = 0; i < n; i++) dev[i] = s_aux[i];
|
||||
if (n == 0) dev[0] = '\0';
|
||||
|
||||
if ((mode & STR_MODE_R) && (mode & STR_MODE_W))
|
||||
rw = O_RDWR;
|
||||
@ -1493,7 +1493,6 @@ void decodeftppath(const char *path, char *addr, char *file, char *user,
|
||||
*q = '\0';
|
||||
if (passwd) strcpy(passwd, q + 1);
|
||||
}
|
||||
*q = '\0';
|
||||
if (user) strcpy(user, buff);
|
||||
}
|
||||
else
|
||||
|
@ -20,7 +20,7 @@
|
||||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all text
|
||||
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
|
||||
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
|
||||
# built into libc) for the transcoding. See https://www.gnu.org/software/libiconv
|
||||
# for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
@ -287,7 +287,7 @@ EXTENSION_MAPPING =
|
||||
|
||||
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
|
||||
# according to the Markdown format, which allows for more readable
|
||||
# documentation. See http://daringfireball.net/projects/markdown/ for details.
|
||||
# documentation. See https://daringfireball.net/projects/markdown/ for details.
|
||||
# The output of markdown processing is further processed by doxygen, so you can
|
||||
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
|
||||
# case of backward compatibilities issues.
|
||||
@ -320,7 +320,7 @@ BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
|
||||
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
|
||||
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
|
||||
# https://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
|
||||
# will parse them like normal C++ but will assume all classes use public instead
|
||||
# of private inheritance when no explicit protection keyword is present.
|
||||
# The default value is: NO.
|
||||
@ -679,7 +679,7 @@ LAYOUT_FILE = @PROJECT_SOURCE_DIR@/DoxygenLayout.xml
|
||||
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
|
||||
# the reference definitions. This must be a list of .bib files. The .bib
|
||||
# extension is automatically appended if omitted. This requires the bibtex tool
|
||||
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# For LaTeX the style of the bibliography can be controlled using
|
||||
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
|
||||
# search path. Do not use file names with spaces, bibtex cannot handle them. See
|
||||
@ -761,7 +761,7 @@ INPUT = @PROJECT_SOURCE_DIR@
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||
# documentation (see: http://www.gnu.org/software/libiconv) for the list of
|
||||
# documentation (see: https://www.gnu.org/software/libiconv) for the list of
|
||||
# possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
@ -994,7 +994,7 @@ SOURCE_TOOLTIPS = YES
|
||||
# If the USE_HTAGS tag is set to YES then the references to source code will
|
||||
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
|
||||
# source browser. The htags tool is part of GNU's global source tagging system
|
||||
# (see http://www.gnu.org/software/global/global.html). You will need version
|
||||
# (see https://www.gnu.org/software/global/global.html). You will need version
|
||||
# 4.8.6 or higher.
|
||||
#
|
||||
# To use it do the following:
|
||||
@ -1137,7 +1137,7 @@ HTML_EXTRA_FILES =
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the stylesheet and background images according to
|
||||
# this color. Hue is specified as an angle on a colorwheel, see
|
||||
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
|
||||
# purple, and 360 is red again.
|
||||
# Minimum value: 0, maximum value: 359, default value: 220.
|
||||
@ -1195,13 +1195,12 @@ HTML_INDEX_NUM_ENTRIES = 100
|
||||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
|
||||
# generated that can be used as input for Apple's Xcode 3 integrated development
|
||||
# environment (see: http://developer.apple.com/tools/xcode/), introduced with
|
||||
# environment (see: https://developer.apple.com/xcode/), introduced with
|
||||
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# Makefile in the HTML output directory. Running make will produce the docset in
|
||||
# that directory and running make install will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
|
||||
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# for more information.
|
||||
# startup.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
@ -1240,7 +1239,7 @@ DOCSET_PUBLISHER_NAME = Publisher
|
||||
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
|
||||
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
|
||||
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
|
||||
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# Windows.
|
||||
#
|
||||
# The HTML Help Workshop contains a compiler that can convert all HTML output
|
||||
@ -1453,7 +1452,7 @@ FORMULA_FONTSIZE = 10
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# http://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# https://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# instead of using prerendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
@ -1465,7 +1464,7 @@ USE_MATHJAX = NO
|
||||
|
||||
# When MathJax is enabled you can set the default output format to be used for
|
||||
# the MathJax output. See the MathJax site (see:
|
||||
# http://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# https://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# Possible values are: HTML-CSS (which is slower, but has the best
|
||||
# compatibility), NativeMML (i.e. MathML) and SVG.
|
||||
# The default value is: HTML-CSS.
|
||||
@ -1480,11 +1479,11 @@ MATHJAX_FORMAT = HTML-CSS
|
||||
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
|
||||
# Content Delivery Network so you can quickly see the result without installing
|
||||
# MathJax. However, it is strongly recommended to install a local copy of
|
||||
# MathJax from http://www.mathjax.org before deployment.
|
||||
# The default value is: http://cdn.mathjax.org/mathjax/latest.
|
||||
# MathJax from https://www.mathjax.org before deployment.
|
||||
# The default value is: https://cdnjs.com/libraries/mathjax/.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
MATHJAX_RELPATH = https://cdnjs.com/libraries/mathjax/
|
||||
|
||||
# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
|
||||
# extension names that should be enabled during MathJax rendering. For example
|
||||
@ -1495,7 +1494,7 @@ MATHJAX_EXTENSIONS =
|
||||
|
||||
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
|
||||
# of code that will be used on startup of the MathJax code. See the MathJax site
|
||||
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# (see: https://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# example see the documentation.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
@ -1542,7 +1541,7 @@ SERVER_BASED_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer ( doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/).
|
||||
# Xapian (see: https://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
@ -1555,7 +1554,7 @@ EXTERNAL_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer ( doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/). See the section "External Indexing and
|
||||
# Xapian (see: https://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
@ -1726,7 +1725,7 @@ LATEX_SOURCE_CODE = NO
|
||||
|
||||
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
|
||||
# bibliography, e.g. plainnat, or ieeetr. See
|
||||
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# The default value is: plain.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
|
@ -565,6 +565,11 @@ bool run_volk_gnsssdr_tests(volk_gnsssdr_func_desc_t desc,
|
||||
std::cerr << " - " << name << std::endl;
|
||||
return false;
|
||||
}
|
||||
catch (std::string s)
|
||||
{
|
||||
std::cerr << "Error: " << s << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
//pull the input scalars into their own vector
|
||||
std::vector<volk_gnsssdr_type_t> inputsc;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <iostream> // for operator<<, basic_ostream, endl, char...
|
||||
#include <fstream> // IWYU pragma: keep
|
||||
#include <map> // for map, map<>::iterator, _Rb_tree_iterator
|
||||
#include <sstream> // for stringstream
|
||||
#include <string> // for string, operator<<
|
||||
#include <utility> // for pair
|
||||
#include <vector> // for vector
|
||||
@ -48,15 +49,16 @@ int main(int argc, char* argv[])
|
||||
std::vector<volk_gnsssdr_test_results_t> results;
|
||||
if (argc > 1)
|
||||
{
|
||||
const size_t len = std::char_traits<char>::length(argv[1]);
|
||||
if (len == 0 || len > 2046)
|
||||
std::stringstream ss;
|
||||
ss << argv[1];
|
||||
if (ss.fail())
|
||||
{
|
||||
std::cerr << "Test name is too long." << std::endl;
|
||||
std::cerr << "Test name not correctly set." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
for (unsigned int ii = 0; ii < test_cases.size(); ++ii)
|
||||
{
|
||||
if (std::string(argv[1]) == test_cases[ii].name())
|
||||
if (ss.str() == test_cases[ii].name())
|
||||
{
|
||||
volk_gnsssdr_test_case_t test_case = test_cases[ii];
|
||||
if (run_volk_gnsssdr_tests(test_case.desc(), test_case.kernel_ptr(),
|
||||
|
@ -76,8 +76,7 @@ This will put the code for the new kernel into
|
||||
|
||||
Other kernels must be added by hand. See the following webpages for
|
||||
more information about creating VOLK kernels:
|
||||
http://gnuradio.org/doc/doxygen/volk_gnsssdr_guide.html
|
||||
http://gnuradio.org/redmine/projects/gnuradio/wiki/Volk
|
||||
https://www.gnuradio.org/doc/doxygen/volk_guide.html
|
||||
|
||||
|
||||
======================================================================
|
||||
|
@ -22,30 +22,10 @@ list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
|
||||
# Optional drivers
|
||||
|
||||
if(ENABLE_RAW_UDP)
|
||||
# - Try to find libpcap include dirs and libraries
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# find_package(PCAP)
|
||||
#
|
||||
# Variables used by this module, they can change the default behaviour and need
|
||||
# to be set before calling find_package:
|
||||
#
|
||||
# PCAP_ROOT_DIR Set this variable to the root installation of
|
||||
# libpcap if the module has problems finding the
|
||||
# proper installation path.
|
||||
#
|
||||
# Variables defined by this module:
|
||||
#
|
||||
# PCAP_FOUND System has libpcap, include and library dirs found
|
||||
# PCAP_INCLUDE_DIR The libpcap include directories.
|
||||
# PCAP_LIBRARY The libpcap library (possibly includes a thread
|
||||
# library e.g. required by pf_ring's libpcap)
|
||||
# HAVE_PF_RING If a found version of libpcap supports PF_RING
|
||||
find_package(PCAP)
|
||||
if(NOT PCAP_FOUND)
|
||||
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
|
||||
endif()
|
||||
endif(NOT PCAP_FOUND)
|
||||
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include <glog/logging.h>
|
||||
#include <exception>
|
||||
#include <iostream> // for cout, endl
|
||||
|
||||
#ifdef __APPLE__
|
||||
@ -121,9 +122,16 @@ Ad9361FpgaSignalSource::~Ad9361FpgaSignalSource()
|
||||
//if (rx0_q) { iio_channel_disable(rx0_q); }
|
||||
|
||||
if (enable_dds_lo_)
|
||||
{
|
||||
try
|
||||
{
|
||||
ad9361_disable_lo_local();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG(WARNING) << "Problem closing the Ad9361FpgaSignalSource: " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
// std::cout<<"* AD9361 Destroying context\n";
|
||||
//if (ctx) { iio_context_destroy(ctx); }
|
||||
@ -132,12 +140,18 @@ Ad9361FpgaSignalSource::~Ad9361FpgaSignalSource()
|
||||
|
||||
void Ad9361FpgaSignalSource::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
};
|
||||
DLOG(INFO) << "AD9361 FPGA source nothing to connect";
|
||||
}
|
||||
|
||||
|
||||
void Ad9361FpgaSignalSource::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
};
|
||||
DLOG(INFO) << "AD9361 FPGA source nothing to disconnect";
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* \filei fmcomms2_signal_source.cc
|
||||
* \brief signal source for sdr hardware from analog devices based on
|
||||
* \file fmcomms2_signal_source.cc
|
||||
* \brief Signal source for SDR hardware from Analog Devices based on
|
||||
* fmcomms2 evaluation board.
|
||||
* \author Rodrigo Muñoz, 2017, rmunozl(at)inacap.cl
|
||||
*
|
||||
@ -36,6 +36,7 @@
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include <glog/logging.h>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@ -178,9 +179,16 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration
|
||||
Fmcomms2SignalSource::~Fmcomms2SignalSource()
|
||||
{
|
||||
if (enable_dds_lo_ == true)
|
||||
{
|
||||
try
|
||||
{
|
||||
ad9361_disable_lo_remote(uri_);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG(WARNING) << "Exception thrown in Fmcomms2SignalSource destructor: " << e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -18,30 +18,10 @@
|
||||
|
||||
|
||||
if(ENABLE_RAW_UDP)
|
||||
# - Try to find libpcap include dirs and libraries
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# find_package(PCAP)
|
||||
#
|
||||
# Variables used by this module, they can change the default behaviour and need
|
||||
# to be set before calling find_package:
|
||||
#
|
||||
# PCAP_ROOT_DIR Set this variable to the root installation of
|
||||
# libpcap if the module has problems finding the
|
||||
# proper installation path.
|
||||
#
|
||||
# Variables defined by this module:
|
||||
#
|
||||
# PCAP_FOUND System has libpcap, include and library dirs found
|
||||
# PCAP_INCLUDE_DIR The libpcap include directories.
|
||||
# PCAP_LIBRARY The libpcap library (possibly includes a thread
|
||||
# library e.g. required by pf_ring's libpcap)
|
||||
# HAVE_PF_RING If a found version of libpcap supports PF_RING
|
||||
find_package(PCAP)
|
||||
if(NOT PCAP_FOUND)
|
||||
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
|
||||
endif()
|
||||
endif(NOT PCAP_FOUND)
|
||||
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
|
||||
|
@ -33,10 +33,8 @@
|
||||
#include "gr_complex_ip_packet_source.h"
|
||||
#include <gnuradio/io_signature.h>
|
||||
|
||||
//#include <cstdlib>
|
||||
|
||||
|
||||
#define FIFO_SIZE 1472000
|
||||
const int FIFO_SIZE = 1472000;
|
||||
|
||||
|
||||
/* 4 bytes IP address */
|
||||
@ -48,6 +46,7 @@ typedef struct gr_ip_address
|
||||
u_char byte4;
|
||||
} gr_ip_address;
|
||||
|
||||
|
||||
/* IPv4 header */
|
||||
typedef struct gr_ip_header
|
||||
{
|
||||
@ -64,6 +63,7 @@ typedef struct gr_ip_header
|
||||
u_int op_pad; // Option + Padding
|
||||
} gr_ip_header;
|
||||
|
||||
|
||||
/* UDP header*/
|
||||
typedef struct gr_udp_header
|
||||
{
|
||||
@ -73,6 +73,7 @@ typedef struct gr_udp_header
|
||||
u_short crc; // Checksum
|
||||
} gr_udp_header;
|
||||
|
||||
|
||||
gr_complex_ip_packet_source::sptr
|
||||
gr_complex_ip_packet_source::make(std::string src_device,
|
||||
std::string origin_address,
|
||||
@ -93,6 +94,7 @@ gr_complex_ip_packet_source::make(std::string src_device,
|
||||
IQ_swap_));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The private constructor
|
||||
*/
|
||||
@ -108,7 +110,6 @@ gr_complex_ip_packet_source::gr_complex_ip_packet_source(std::string src_device,
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(1, 4, item_size)) // 1 to 4 baseband complex channels
|
||||
{
|
||||
// constructor code here
|
||||
std::cout << "Start Ethernet packet capture\n";
|
||||
|
||||
d_n_baseband_channels = n_baseband_channels;
|
||||
@ -143,6 +144,8 @@ gr_complex_ip_packet_source::gr_complex_ip_packet_source(std::string src_device,
|
||||
d_sock_raw = 0;
|
||||
d_pcap_thread = NULL;
|
||||
descr = NULL;
|
||||
|
||||
memset(reinterpret_cast<char *>(&si_me), 0, sizeof(si_me));
|
||||
}
|
||||
|
||||
|
||||
@ -163,6 +166,7 @@ bool gr_complex_ip_packet_source::start()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Called by gnuradio to disable drivers, etc for i/o devices.
|
||||
bool gr_complex_ip_packet_source::stop()
|
||||
{
|
||||
@ -176,42 +180,44 @@ bool gr_complex_ip_packet_source::stop()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool gr_complex_ip_packet_source::open()
|
||||
{
|
||||
char errbuf[PCAP_ERRBUF_SIZE];
|
||||
boost::mutex::scoped_lock lock(d_mutex); // hold mutex for duration of this function
|
||||
/* open device for reading */
|
||||
// open device for reading
|
||||
descr = pcap_open_live(d_src_device.c_str(), 1500, 1, 1000, errbuf);
|
||||
if (descr == NULL)
|
||||
{
|
||||
std::cout << "Error openning Ethernet device " << d_src_device << std::endl;
|
||||
printf("Fatal Error in pcap_open_live(): %s\n", errbuf);
|
||||
std::cout << "Error opening Ethernet device " << d_src_device << std::endl;
|
||||
std::cout << "Fatal Error in pcap_open_live(): " << std::string(errbuf) << std::endl;
|
||||
return false;
|
||||
}
|
||||
//bind UDP port to avoid automatic reply with ICMP port ureacheable packets from kernel
|
||||
// bind UDP port to avoid automatic reply with ICMP port unreachable packets from kernel
|
||||
d_sock_raw = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
if (d_sock_raw == -1)
|
||||
{
|
||||
std::cout << "Error openning UDP socket" << std::endl;
|
||||
std::cout << "Error opening UDP socket" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// zero out the structure
|
||||
memset((char *)&si_me, 0, sizeof(si_me));
|
||||
memset(reinterpret_cast<char *>(&si_me), 0, sizeof(si_me));
|
||||
|
||||
si_me.sin_family = AF_INET;
|
||||
si_me.sin_port = htons(d_udp_port);
|
||||
si_me.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
|
||||
// bind socket to port
|
||||
if (bind(d_sock_raw, (struct sockaddr *)&si_me, sizeof(si_me)) == -1)
|
||||
if (bind(d_sock_raw, reinterpret_cast<struct sockaddr *>(&si_me), sizeof(si_me)) == -1)
|
||||
{
|
||||
std::cout << "Error openning UDP socket" << std::endl;
|
||||
std::cout << "Error opening UDP socket" << std::endl;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
gr_complex_ip_packet_source::~gr_complex_ip_packet_source()
|
||||
{
|
||||
if (d_pcap_thread != NULL)
|
||||
@ -222,35 +228,36 @@ gr_complex_ip_packet_source::~gr_complex_ip_packet_source()
|
||||
std::cout << "Stop Ethernet packet capture\n";
|
||||
}
|
||||
|
||||
|
||||
void gr_complex_ip_packet_source::static_pcap_callback(u_char *args, const struct pcap_pkthdr *pkthdr,
|
||||
const u_char *packet)
|
||||
{
|
||||
gr_complex_ip_packet_source *bridge = (gr_complex_ip_packet_source *)args;
|
||||
gr_complex_ip_packet_source *bridge = reinterpret_cast<gr_complex_ip_packet_source *>(args);
|
||||
bridge->pcap_callback(args, pkthdr, packet);
|
||||
}
|
||||
|
||||
|
||||
void gr_complex_ip_packet_source::pcap_callback(__attribute__((unused)) u_char *args, __attribute__((unused)) const struct pcap_pkthdr *pkthdr,
|
||||
const u_char *packet)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(d_mutex); // hold mutex for duration of this function
|
||||
|
||||
gr_ip_header *ih;
|
||||
gr_udp_header *uh;
|
||||
const gr_ip_header *ih;
|
||||
const gr_udp_header *uh;
|
||||
|
||||
// eth frame parameters
|
||||
// **** UDP RAW PACKET DECODER ****
|
||||
if ((packet[12] == 0x08) & (packet[13] == 0x00)) // IP FRAME
|
||||
{
|
||||
/* retireve the position of the ip header */
|
||||
ih = (gr_ip_header *)(packet +
|
||||
14); //length of ethernet header
|
||||
// retrieve the position of the ip header
|
||||
ih = reinterpret_cast<const gr_ip_header *>(packet + 14); // length of ethernet header
|
||||
|
||||
/* retireve the position of the udp header */
|
||||
// retrieve the position of the udp header
|
||||
u_int ip_len;
|
||||
ip_len = (ih->ver_ihl & 0xf) * 4;
|
||||
uh = (gr_udp_header *)((u_char *)ih + ip_len);
|
||||
uh = reinterpret_cast<const gr_udp_header *>(reinterpret_cast<const u_char *>(ih) + ip_len);
|
||||
|
||||
/* convert from network byte order to host byte order */
|
||||
// convert from network byte order to host byte order
|
||||
//u_short sport;
|
||||
u_short dport;
|
||||
dport = ntohs(uh->dport);
|
||||
@ -271,27 +278,27 @@ void gr_complex_ip_packet_source::pcap_callback(__attribute__((unused)) u_char *
|
||||
// dport);
|
||||
// std::cout<<"uh->len:"<<ntohs(uh->len)<<std::endl;
|
||||
|
||||
int payload_lenght_bytes = ntohs(uh->len) - 8; //total udp packet lenght minus the header lenght
|
||||
int payload_length_bytes = ntohs(uh->len) - 8; // total udp packet length minus the header length
|
||||
// read the payload bytes and insert them into the shared circular buffer
|
||||
u_char *udp_payload = ((u_char *)uh + sizeof(gr_udp_header));
|
||||
if (fifo_items <= (FIFO_SIZE - payload_lenght_bytes))
|
||||
const u_char *udp_payload = (reinterpret_cast<const u_char *>(uh) + sizeof(gr_udp_header));
|
||||
if (fifo_items <= (FIFO_SIZE - payload_length_bytes))
|
||||
{
|
||||
int aligned_write_items = FIFO_SIZE - fifo_write_ptr;
|
||||
if (aligned_write_items >= payload_lenght_bytes)
|
||||
if (aligned_write_items >= payload_length_bytes)
|
||||
{
|
||||
// write all in a single memcpy
|
||||
memcpy(&fifo_buff[fifo_write_ptr], &udp_payload[0], payload_lenght_bytes); //size in bytes
|
||||
fifo_write_ptr += payload_lenght_bytes;
|
||||
memcpy(&fifo_buff[fifo_write_ptr], &udp_payload[0], payload_length_bytes); // size in bytes
|
||||
fifo_write_ptr += payload_length_bytes;
|
||||
if (fifo_write_ptr == FIFO_SIZE) fifo_write_ptr = 0;
|
||||
fifo_items += payload_lenght_bytes;
|
||||
fifo_items += payload_length_bytes;
|
||||
}
|
||||
else
|
||||
{
|
||||
// two step wrap write
|
||||
memcpy(&fifo_buff[fifo_write_ptr], &udp_payload[0], aligned_write_items); // size in bytes
|
||||
fifo_write_ptr = payload_lenght_bytes - aligned_write_items;
|
||||
fifo_write_ptr = payload_length_bytes - aligned_write_items;
|
||||
memcpy(&fifo_buff[0], &udp_payload[aligned_write_items], fifo_write_ptr); // size in bytes
|
||||
fifo_items += payload_lenght_bytes;
|
||||
fifo_items += payload_length_bytes;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -303,12 +310,13 @@ void gr_complex_ip_packet_source::pcap_callback(__attribute__((unused)) u_char *
|
||||
}
|
||||
}
|
||||
|
||||
void gr_complex_ip_packet_source::my_pcap_loop_thread(pcap_t *pcap_handle)
|
||||
|
||||
void gr_complex_ip_packet_source::my_pcap_loop_thread(pcap_t *pcap_handle)
|
||||
{
|
||||
pcap_loop(pcap_handle, -1, gr_complex_ip_packet_source::static_pcap_callback, (u_char *)this);
|
||||
pcap_loop(pcap_handle, -1, gr_complex_ip_packet_source::static_pcap_callback, reinterpret_cast<u_char *>(this));
|
||||
}
|
||||
|
||||
|
||||
void gr_complex_ip_packet_source::demux_samples(gr_vector_void_star output_items, int num_samples_readed)
|
||||
{
|
||||
int8_t real;
|
||||
@ -325,15 +333,15 @@ void gr_complex_ip_packet_source::demux_samples(gr_vector_void_star output_items
|
||||
imag = fifo_buff[fifo_read_ptr++];
|
||||
if (d_IQ_swap)
|
||||
{
|
||||
(static_cast<gr_complex *>(output_items[i]))[n] = gr_complex(real, imag);
|
||||
static_cast<gr_complex *>(output_items[i])[n] = gr_complex(real, imag);
|
||||
}
|
||||
else
|
||||
{
|
||||
(static_cast<gr_complex *>(output_items[i]))[n] = gr_complex(imag, real);
|
||||
static_cast<gr_complex *>(output_items[i])[n] = gr_complex(imag, real);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2: // 4bits samples
|
||||
case 2: // 4-bit samples
|
||||
for (long unsigned int i = 0; i < output_items.size(); i++)
|
||||
{
|
||||
tmp_char2 = fifo_buff[fifo_read_ptr] & 0x0F;
|
||||
@ -357,11 +365,11 @@ void gr_complex_ip_packet_source::demux_samples(gr_vector_void_star output_items
|
||||
}
|
||||
if (d_IQ_swap)
|
||||
{
|
||||
(static_cast<gr_complex *>(output_items[i]))[n] = gr_complex(imag, real);
|
||||
static_cast<gr_complex *>(output_items[i])[n] = gr_complex(imag, real);
|
||||
}
|
||||
else
|
||||
{
|
||||
(static_cast<gr_complex *>(output_items[i]))[n] = gr_complex(real, imag);
|
||||
static_cast<gr_complex *>(output_items[i])[n] = gr_complex(real, imag);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -373,6 +381,7 @@ void gr_complex_ip_packet_source::demux_samples(gr_vector_void_star output_items
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int gr_complex_ip_packet_source::work(int noutput_items,
|
||||
__attribute__((unused)) gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
|
@ -154,7 +154,7 @@ rtl_tcp_signal_source_c::rtl_tcp_signal_source_c(const std::string &address,
|
||||
|
||||
rtl_tcp_signal_source_c::~rtl_tcp_signal_source_c()
|
||||
{
|
||||
boost::mutex::scoped_lock lock(mutex_);
|
||||
mutex_.unlock();
|
||||
io_service_.stop();
|
||||
not_empty_.notify_one();
|
||||
not_full_.notify_one();
|
||||
|
@ -281,7 +281,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(dllpllconf_t conf_) : gr::block("dl
|
||||
|
||||
d_correlator_outs = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_n_correlator_taps * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
d_local_code_shift_chips = static_cast<float *>(volk_gnsssdr_malloc(d_n_correlator_taps * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
std::fill_n(d_correlator_outs, d_n_correlator_taps, gr_complex(0.0, 0.0));
|
||||
clear_tracking_vars();
|
||||
|
||||
// map memory pointers of correlator outputs
|
||||
if (d_veml)
|
||||
@ -328,17 +328,14 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(dllpllconf_t conf_) : gr::block("dl
|
||||
{
|
||||
// Extra correlator for the data component
|
||||
correlator_data_cpu.init(2 * trk_parameters.vector_length, 1);
|
||||
d_Prompt_Data = static_cast<gr_complex *>(volk_gnsssdr_malloc(sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
d_Prompt_Data[0] = gr_complex(0.0, 0.0);
|
||||
d_data_code = static_cast<float *>(volk_gnsssdr_malloc(2 * d_code_length_chips * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
}
|
||||
else
|
||||
{
|
||||
d_Prompt_Data = nullptr;
|
||||
d_data_code = nullptr;
|
||||
}
|
||||
|
||||
//--- Initializations ---//
|
||||
// --- Initializations ---
|
||||
// Initial code frequency basis of NCO
|
||||
d_code_freq_chips = d_code_chip_rate;
|
||||
// Residual code phase (in chips)
|
||||
@ -359,8 +356,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(dllpllconf_t conf_) : gr::block("dl
|
||||
d_CN0_SNV_dB_Hz = 0.0;
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_carrier_lock_threshold = trk_parameters.carrier_lock_th;
|
||||
|
||||
clear_tracking_vars();
|
||||
d_Prompt_Data = static_cast<gr_complex *>(volk_gnsssdr_malloc(sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
d_Prompt_Data[0] = gr_complex(0.0, 0.0);
|
||||
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
@ -383,9 +380,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(dllpllconf_t conf_) : gr::block("dl
|
||||
void dll_pll_veml_tracking::start_tracking()
|
||||
{
|
||||
gr::thread::scoped_lock l(d_setlock);
|
||||
/*
|
||||
* correct the code phase according to the delay between acq and trk
|
||||
*/
|
||||
|
||||
// correct the code phase according to the delay between acq and trk
|
||||
d_acq_code_phase_samples = d_acquisition_gnss_synchro->Acq_delay_samples;
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
@ -396,7 +392,7 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
DLOG(INFO) << "Number of seconds between Acquisition and Tracking = " << acq_trk_diff_seconds;
|
||||
// Doppler effect Fd = (C / (C + Vr)) * F
|
||||
double radial_velocity = (d_signal_carrier_freq + d_acq_carrier_doppler_hz) / d_signal_carrier_freq;
|
||||
// new chip and prn sequence periods based on acq Doppler
|
||||
// new chip and PRN sequence periods based on acq Doppler
|
||||
d_code_freq_chips = radial_velocity * d_code_chip_rate;
|
||||
d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in;
|
||||
double T_chip_mod_seconds = 1.0 / d_code_freq_chips;
|
||||
@ -564,9 +560,9 @@ dll_pll_veml_tracking::~dll_pll_veml_tracking()
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_tracking_code);
|
||||
volk_gnsssdr_free(d_Prompt_Data);
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
volk_gnsssdr_free(d_Prompt_Data);
|
||||
volk_gnsssdr_free(d_data_code);
|
||||
correlator_data_cpu.free();
|
||||
}
|
||||
@ -735,7 +731,7 @@ void dll_pll_veml_tracking::run_dll_pll()
|
||||
void dll_pll_veml_tracking::clear_tracking_vars()
|
||||
{
|
||||
std::fill_n(d_correlator_outs, d_n_correlator_taps, gr_complex(0.0, 0.0));
|
||||
if (trk_parameters.track_pilot) *d_Prompt_Data = gr_complex(0.0, 0.0);
|
||||
if (trk_parameters.track_pilot) d_Prompt_Data[0] = gr_complex(0.0, 0.0);
|
||||
d_carr_error_hz = 0.0;
|
||||
d_carr_error_filt_hz = 0.0;
|
||||
d_code_error_chips = 0.0;
|
||||
|
@ -16,13 +16,11 @@
|
||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
set(GNSS_SDR_OPTIONAL_LIBS "")
|
||||
set(GNSS_SDR_OPTIONAL_HEADERS "")
|
||||
|
||||
if(ENABLE_GPERFTOOLS)
|
||||
if(GPERFTOOLS_FOUND)
|
||||
#set(GNSS_SDR_OPTIONAL_LIBS "${GNSS_SDR_OPTIONAL_LIBS};${GPERFTOOLS_LIBRARIES}")
|
||||
set(GNSS_SDR_OPTIONAL_LIBS "${GNSS_SDR_OPTIONAL_LIBS};${GPERFTOOLS_PROFILER};${GPERFTOOLS_TCMALLOC}")
|
||||
set(GNSS_SDR_OPTIONAL_HEADERS "${GNSS_SDR_OPTIONAL_HEADERS};${GPERFTOOLS_INCLUDE_DIR}")
|
||||
endif(GPERFTOOLS_FOUND)
|
||||
@ -48,7 +46,6 @@ if(ORC_FOUND)
|
||||
set(GNSS_SDR_OPTIONAL_HEADERS ${GNSS_SDR_OPTIONAL_HEADERS} ${ORC_INCLUDE_DIRS})
|
||||
endif(ORC_FOUND)
|
||||
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
@ -76,13 +73,11 @@ if(OS_IS_MACOSX)
|
||||
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
endif(OS_IS_MACOSX)
|
||||
|
||||
|
||||
add_executable(gnss-sdr ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
||||
|
||||
add_custom_command(TARGET gnss-sdr POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:gnss-sdr>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:gnss-sdr>
|
||||
)
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:gnss-sdr> )
|
||||
|
||||
target_link_libraries(gnss-sdr ${MAC_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
@ -97,18 +92,14 @@ target_link_libraries(gnss-sdr ${MAC_LIBRARIES}
|
||||
${GNSS_SDR_OPTIONAL_LIBS}
|
||||
gnss_sp_libs
|
||||
gnss_sdr_flags
|
||||
gnss_rx
|
||||
)
|
||||
|
||||
gnss_rx )
|
||||
|
||||
install(TARGETS gnss-sdr
|
||||
RUNTIME DESTINATION bin
|
||||
COMPONENT "gnss-sdr"
|
||||
)
|
||||
COMPONENT "gnss-sdr" )
|
||||
|
||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/conf DESTINATION share/gnss-sdr
|
||||
FILES_MATCHING PATTERN "*.conf"
|
||||
)
|
||||
FILES_MATCHING PATTERN "*.conf" )
|
||||
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/conf/gnss-sdr.conf DESTINATION share/gnss-sdr/conf
|
||||
RENAME default.conf)
|
||||
@ -118,7 +109,6 @@ if(NOT VOLK_GNSSSDR_FOUND)
|
||||
install(PROGRAMS ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build/apps/volk_gnsssdr-config-info DESTINATION bin COMPONENT "volk_gnsssdr")
|
||||
endif(NOT VOLK_GNSSSDR_FOUND)
|
||||
|
||||
|
||||
find_program(GZIP
|
||||
gzip
|
||||
/bin
|
||||
@ -127,6 +117,7 @@ find_program(GZIP
|
||||
/opt/local/bin
|
||||
/sbin
|
||||
)
|
||||
|
||||
if(NOT GZIP_NOTFOUND)
|
||||
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/docs/manpage/gnss-sdr-manpage
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/gnss-sdr.1.gz")
|
||||
|
@ -298,7 +298,7 @@ else(ENABLE_INSTALL_TESTS)
|
||||
add_definitions(-DTEST_PATH="${CMAKE_SOURCE_DIR}/thirdparty/")
|
||||
endif(ENABLE_INSTALL_TESTS)
|
||||
|
||||
include_directories(
|
||||
set(LIST_INCLUDE_DIRS
|
||||
${GTEST_INCLUDE_DIRECTORIES}
|
||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
@ -346,7 +346,7 @@ include_directories(
|
||||
${GNSS_SDR_TEST_OPTIONAL_HEADERS}
|
||||
)
|
||||
|
||||
|
||||
include_directories(${LIST_INCLUDE_DIRS})
|
||||
|
||||
################################################################################
|
||||
# Unit testing
|
||||
@ -423,6 +423,38 @@ endif(ENABLE_FPGA)
|
||||
################################################################################
|
||||
# System testing
|
||||
################################################################################
|
||||
function(add_system_test executable)
|
||||
## Please call this function with variables OPT_INCLUDES_ and OPT_LIBS_
|
||||
## already defined.
|
||||
set(SYSTEM_TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/${executable}.cc)
|
||||
# Ensure that executable is rebuilt if it was previously built and then removed
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${SYSTEM_TEST_SOURCES})
|
||||
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
||||
add_executable(${executable} ${SYSTEM_TEST_SOURCES})
|
||||
|
||||
if(NOT ${GTEST_DIR_LOCAL})
|
||||
add_dependencies(${executable} gtest-${GNSSSDR_GTEST_LOCAL_VERSION} )
|
||||
else(NOT ${GTEST_DIR_LOCAL})
|
||||
add_dependencies(${executable} gtest)
|
||||
endif(NOT ${GTEST_DIR_LOCAL})
|
||||
|
||||
include_directories(${OPT_INCLUDES_})
|
||||
target_link_libraries(${executable} ${OPT_LIBS_} )
|
||||
|
||||
if(ENABLE_INSTALL_TESTS)
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
||||
file(REMOVE ${CMAKE_SOURCE_DIR}/install/${executable})
|
||||
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
|
||||
install(TARGETS ${executable} RUNTIME DESTINATION bin COMPONENT "${executable}_test")
|
||||
else(ENABLE_INSTALL_TESTS)
|
||||
add_custom_command(TARGET ${executable} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${executable}>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:${executable}> )
|
||||
endif(ENABLE_INSTALL_TESTS)
|
||||
endfunction(add_system_test)
|
||||
|
||||
|
||||
if(ENABLE_SYSTEM_TESTING)
|
||||
set(HOST_SYSTEM "Unknown")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
@ -433,140 +465,33 @@ if(ENABLE_SYSTEM_TESTING)
|
||||
set(HOST_SYSTEM "MacOS")
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
add_definitions(-DHOST_SYSTEM="${HOST_SYSTEM}")
|
||||
set(TTFF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/ttff_gps_l1.cc)
|
||||
|
||||
# Ensure that ttff is rebuilt if it was previously built and then removed
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/ttff)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${TTFF_SOURCES})
|
||||
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/ttff)
|
||||
#### TTFF
|
||||
set(OPT_LIBS_ ${Boost_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES}
|
||||
${GNURADIO_RUNTIME_LIBRARIES} ${GTEST_LIBRARIES}
|
||||
${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}
|
||||
${GNURADIO_ANALOG_LIBRARIES} gnss_sp_libs
|
||||
gnss_rx gnss_system_parameters )
|
||||
|
||||
add_executable(ttff ${TTFF_SOURCES} )
|
||||
if(NOT ${GTEST_DIR_LOCAL})
|
||||
add_dependencies(ttff gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||
else(NOT ${GTEST_DIR_LOCAL})
|
||||
add_dependencies(ttff gtest)
|
||||
endif(NOT ${GTEST_DIR_LOCAL})
|
||||
|
||||
target_link_libraries(ttff
|
||||
${Boost_LIBRARIES}
|
||||
${GFlags_LIBS}
|
||||
${GLOG_LIBRARIES}
|
||||
${GTEST_LIBRARIES}
|
||||
${GNURADIO_RUNTIME_LIBRARIES}
|
||||
${GNURADIO_BLOCKS_LIBRARIES}
|
||||
${GNURADIO_FILTER_LIBRARIES}
|
||||
${GNURADIO_ANALOG_LIBRARIES}
|
||||
${VOLK_GNSSSDR_LIBRARIES}
|
||||
gnss_sp_libs
|
||||
gnss_rx
|
||||
gnss_system_parameters
|
||||
)
|
||||
|
||||
if(ENABLE_INSTALL_TESTS)
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/install/ttff)
|
||||
file(REMOVE ${CMAKE_SOURCE_DIR}/install/ttff)
|
||||
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/ttff)
|
||||
install(TARGETS ttff RUNTIME DESTINATION bin COMPONENT "ttff")
|
||||
else(ENABLE_INSTALL_TESTS)
|
||||
add_custom_command(TARGET ttff POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:ttff>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:ttff> )
|
||||
endif(ENABLE_INSTALL_TESTS)
|
||||
add_system_test(ttff)
|
||||
|
||||
if(ENABLE_SYSTEM_TESTING_EXTRA)
|
||||
set(POSITION_TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/position_test.cc)
|
||||
# Ensure that position_test is rebuilt if it was previously built and then removed
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${POSITION_TEST_SOURCES})
|
||||
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
||||
add_executable(position_test ${POSITION_TEST_SOURCES})
|
||||
if(NOT ${GTEST_DIR_LOCAL})
|
||||
add_dependencies(position_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||
else(NOT ${GTEST_DIR_LOCAL})
|
||||
add_dependencies(position_test gtest)
|
||||
endif(NOT ${GTEST_DIR_LOCAL})
|
||||
target_link_libraries(position_test
|
||||
${Boost_LIBRARIES}
|
||||
${GFlags_LIBS}
|
||||
${GLOG_LIBRARIES}
|
||||
${GTEST_LIBRARIES}
|
||||
${GNURADIO_RUNTIME_LIBRARIES}
|
||||
${GNURADIO_BLOCKS_LIBRARIES}
|
||||
${GNURADIO_FILTER_LIBRARIES}
|
||||
${GNURADIO_ANALOG_LIBRARIES}
|
||||
${VOLK_GNSSSDR_LIBRARIES}
|
||||
gnss_sp_libs
|
||||
gnss_rx
|
||||
gnss_system_parameters
|
||||
)
|
||||
#### POSITION_TEST
|
||||
set(OPT_LIBS_ ${Boost_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES}
|
||||
${GTEST_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}
|
||||
${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}
|
||||
${GNURADIO_ANALOG_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES}
|
||||
gnss_sp_libs gnss_rx gnss_system_parameters )
|
||||
|
||||
if(ENABLE_INSTALL_TESTS)
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
||||
file(REMOVE ${CMAKE_SOURCE_DIR}/install/position_test)
|
||||
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
||||
install(TARGETS position_test RUNTIME DESTINATION bin COMPONENT "position_test")
|
||||
else(ENABLE_INSTALL_TESTS)
|
||||
add_custom_command(TARGET position_test POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:position_test>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:position_test> )
|
||||
endif(ENABLE_INSTALL_TESTS)
|
||||
add_system_test(position_test)
|
||||
|
||||
if(GPSTK_FOUND OR OWN_GPSTK)
|
||||
set(OBS_GPS_L1_TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/obs_gps_l1_system_test.cc)
|
||||
# Ensure that obs_gps_l1_system_test is rebuilt if it was previously built and then removed
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/obs_gps_l1_system_test)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${OBS_GPS_L1_TEST_SOURCES})
|
||||
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/obs_gps_l1_system_test)
|
||||
add_executable(obs_gps_l1_system_test ${OBS_GPS_L1_TEST_SOURCES})
|
||||
|
||||
set(OBS_SYSTEM_TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/obs_system_test.cc)
|
||||
# Ensure that obs_system_test is rebuilt if it was previously built and then removed
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/obs_system_test)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${OBS_SYSTEM_TEST_SOURCES})
|
||||
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/install/obs_system_test)
|
||||
add_executable(obs_system_test ${OBS_SYSTEM_TEST_SOURCES})
|
||||
|
||||
if(NOT ${GTEST_DIR_LOCAL})
|
||||
add_dependencies(obs_gps_l1_system_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION} )
|
||||
add_dependencies(obs_system_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION} )
|
||||
else(NOT ${GTEST_DIR_LOCAL})
|
||||
add_dependencies(obs_gps_l1_system_test gtest)
|
||||
add_dependencies(obs_system_test gtest)
|
||||
endif(NOT ${GTEST_DIR_LOCAL})
|
||||
include_directories(${GPSTK_INCLUDE_DIRS} ${GPSTK_INCLUDE_DIRS}/gpstk)
|
||||
target_link_libraries(obs_gps_l1_system_test ${GFlags_LIBS}
|
||||
${GLOG_LIBRARIES}
|
||||
${GTEST_LIBRARIES}
|
||||
gnss_sp_libs
|
||||
gnss_rx
|
||||
${gpstk_libs})
|
||||
|
||||
target_link_libraries(obs_system_test ${GFlags_LIBS}
|
||||
${GLOG_LIBRARIES}
|
||||
${GTEST_LIBRARIES}
|
||||
gnss_sp_libs
|
||||
gnss_rx
|
||||
${gpstk_libs})
|
||||
|
||||
if(ENABLE_INSTALL_TESTS)
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/install/obs_gps_l1_system_test)
|
||||
file(REMOVE ${CMAKE_SOURCE_DIR}/install/obs_gps_l1_system_test)
|
||||
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/obs_gps_l1_system_test)
|
||||
install(TARGETS obs_gps_l1_system_test RUNTIME DESTINATION bin COMPONENT "obs_gps_l1_system_test")
|
||||
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/install/obs_system_test)
|
||||
file(REMOVE ${CMAKE_SOURCE_DIR}/install/obs_system_test)
|
||||
endif(EXISTS ${CMAKE_SOURCE_DIR}/install/obs_system_test)
|
||||
install(TARGETS obs_system_test RUNTIME DESTINATION bin COMPONENT "obs_system_test")
|
||||
else(ENABLE_INSTALL_TESTS)
|
||||
add_custom_command(TARGET obs_gps_l1_system_test POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:obs_gps_l1_system_test>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:obs_gps_l1_system_test> )
|
||||
add_custom_command(TARGET obs_system_test POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:obs_system_test>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:obs_system_test> )
|
||||
|
||||
endif(ENABLE_INSTALL_TESTS)
|
||||
## OBS_SYSTEM_TEST and OBS_GPS_L1_SYSTEM_TEST
|
||||
set(OPT_LIBS_ ${GFlags_LIBS} ${GLOG_LIBRARIES} ${GTEST_LIBRARIES}
|
||||
gnss_sp_libs gnss_rx ${gpstk_libs} )
|
||||
set(OPT_INCLUDES_ ${GPSTK_INCLUDE_DIRS} ${GPSTK_INCLUDE_DIRS}/gpstk)
|
||||
add_system_test(obs_gps_l1_system_test)
|
||||
add_system_test(obs_system_test)
|
||||
endif(GPSTK_FOUND OR OWN_GPSTK)
|
||||
else(ENABLE_SYSTEM_TESTING_EXTRA)
|
||||
# Avoid working with old executables if they were switched ON and then OFF
|
||||
|
@ -56,8 +56,10 @@
|
||||
#include <stdexcept>
|
||||
#include <cstdio>
|
||||
#include <cstdlib> // for getenv()
|
||||
#include <cstring> // for strncpy
|
||||
#include <cmath>
|
||||
#include <list> // for std::list
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__)
|
||||
@ -1959,18 +1961,18 @@ bool Gnuplot::get_program_path()
|
||||
//
|
||||
// second look in PATH for Gnuplot
|
||||
//
|
||||
char *path;
|
||||
const char *path;
|
||||
// Retrieves a C string containing the value of environment variable PATH
|
||||
path = std::getenv("PATH");
|
||||
|
||||
if (path == NULL || std::char_traits<char>::length(path) > 4096 * sizeof(char))
|
||||
std::stringstream s;
|
||||
s << path;
|
||||
if (s.fail())
|
||||
{
|
||||
throw GnuplotException("Path is not set");
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string path_str = s.str();
|
||||
|
||||
std::list<std::string> ls;
|
||||
std::string path_str(path);
|
||||
|
||||
//split path (one long string) into list ls of strings
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__)
|
||||
@ -2000,7 +2002,6 @@ bool Gnuplot::get_program_path()
|
||||
Gnuplot::m_sGNUPlotPath = "";
|
||||
throw GnuplotException(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -2101,17 +2102,24 @@ std::string Gnuplot::create_tmpfile(std::ofstream &tmp)
|
||||
//
|
||||
// open temporary files for output
|
||||
//
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__)
|
||||
if (_mktemp(name) == NULL)
|
||||
#elif defined(unix) || defined(__unix) || defined(__unix__) || defined(__APPLE__)
|
||||
mode_t mask = umask(S_IXUSR | S_IRWXG | S_IRWXO);
|
||||
if (mkstemp(name) == -1)
|
||||
#endif
|
||||
{
|
||||
std::ostringstream except;
|
||||
except << "Cannot create temporary file \"" << name << "\"";
|
||||
#if defined(unix) || defined(__unix) || defined(__unix__) || defined(__APPLE__)
|
||||
umask(mask);
|
||||
#endif
|
||||
throw GnuplotException(except.str());
|
||||
}
|
||||
|
||||
#if defined(unix) || defined(__unix) || defined(__unix__) || defined(__APPLE__)
|
||||
umask(mask);
|
||||
#endif
|
||||
tmp.open(name);
|
||||
if (tmp.bad())
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* \file ttff_gps_l1.cc
|
||||
* \file ttff.cc
|
||||
* \brief This class implements a test for measuring
|
||||
* the Time-To-First-Fix
|
||||
* \author Carles Fernandez-Prades, 2016. cfernandez(at)cttc.es
|
||||
@ -75,7 +75,7 @@ typedef struct
|
||||
} ttff_msgbuf;
|
||||
|
||||
|
||||
class TfttGpsL1CATest : public ::testing::Test
|
||||
class TtffTest : public ::testing::Test
|
||||
{
|
||||
public:
|
||||
void config_1();
|
||||
@ -124,7 +124,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
void TfttGpsL1CATest::config_1()
|
||||
void TtffTest::config_1()
|
||||
{
|
||||
config = std::make_shared<InMemoryConfiguration>();
|
||||
|
||||
@ -235,7 +235,7 @@ void TfttGpsL1CATest::config_1()
|
||||
}
|
||||
|
||||
|
||||
void TfttGpsL1CATest::config_2()
|
||||
void TtffTest::config_2()
|
||||
{
|
||||
if (FLAGS_config_file_ttff.empty())
|
||||
{
|
||||
@ -300,7 +300,7 @@ void receive_msg()
|
||||
}
|
||||
|
||||
|
||||
void TfttGpsL1CATest::print_TTFF_report(const std::vector<double> &ttff_v, std::shared_ptr<ConfigurationInterface> config_)
|
||||
void TtffTest::print_TTFF_report(const std::vector<double> &ttff_v, std::shared_ptr<ConfigurationInterface> config_)
|
||||
{
|
||||
std::ofstream ttff_report_file;
|
||||
std::string filename = "ttff_report";
|
||||
@ -420,7 +420,7 @@ void TfttGpsL1CATest::print_TTFF_report(const std::vector<double> &ttff_v, std::
|
||||
}
|
||||
|
||||
|
||||
TEST_F(TfttGpsL1CATest, ColdStart)
|
||||
TEST_F(TtffTest, ColdStart)
|
||||
{
|
||||
unsigned int num_measurements = 0;
|
||||
|
||||
@ -503,7 +503,7 @@ TEST_F(TfttGpsL1CATest, ColdStart)
|
||||
}
|
||||
|
||||
|
||||
TEST_F(TfttGpsL1CATest, HotStart)
|
||||
TEST_F(TtffTest, HotStart)
|
||||
{
|
||||
unsigned int num_measurements = 0;
|
||||
TTFF_v.clear();
|
@ -35,12 +35,128 @@
|
||||
#include "nmea_printer.h"
|
||||
|
||||
|
||||
TEST(NmeaPrinterTest, PrintLine)
|
||||
class NmeaPrinterTest : public ::testing::Test
|
||||
{
|
||||
protected:
|
||||
NmeaPrinterTest()
|
||||
{
|
||||
this->conf();
|
||||
}
|
||||
~NmeaPrinterTest()
|
||||
{
|
||||
}
|
||||
void conf();
|
||||
rtk_t rtk;
|
||||
};
|
||||
|
||||
void NmeaPrinterTest::conf()
|
||||
{
|
||||
snrmask_t snrmask = {{}, {{}, {}}};
|
||||
int positioning_mode = 0; // Single
|
||||
int number_of_frequencies = 1;
|
||||
double elevation_mask = 5;
|
||||
int navigation_system = 1; // GPS
|
||||
int integer_ambiguity_resolution_gps = 0;
|
||||
int integer_ambiguity_resolution_glo = 0;
|
||||
int integer_ambiguity_resolution_bds = 0;
|
||||
int outage_reset_ambiguity = 5;
|
||||
int min_lock_to_fix_ambiguity = 0;
|
||||
int iono_model = 0;
|
||||
int trop_model = 0;
|
||||
int dynamics_model = 0;
|
||||
int earth_tide = 0;
|
||||
int number_filter_iter = 1;
|
||||
double code_phase_error_ratio_l1 = 100.0;
|
||||
double code_phase_error_ratio_l2 = 100.0;
|
||||
double code_phase_error_ratio_l5 = 100.0;
|
||||
double carrier_phase_error_factor_a = 0.003;
|
||||
double carrier_phase_error_factor_b = 0.003;
|
||||
double bias_0 = 30.0;
|
||||
double iono_0 = 0.03;
|
||||
double trop_0 = 0.3;
|
||||
double sigma_bias = 1e-4;
|
||||
double sigma_iono = 1e-3;
|
||||
double sigma_trop = 1e-4;
|
||||
double sigma_acch = 1e-1;
|
||||
double sigma_accv = 1e-2;
|
||||
double sigma_pos = 0.0;
|
||||
double min_ratio_to_fix_ambiguity = 3.0;
|
||||
double min_elevation_to_fix_ambiguity = 0.0;
|
||||
double slip_threshold = 0.05;
|
||||
double threshold_reject_innovation = 30.0;
|
||||
double threshold_reject_gdop = 30.0;
|
||||
int sat_PCV = 0;
|
||||
int rec_PCV = 0;
|
||||
int phwindup = 0;
|
||||
int reject_GPS_IIA = 0;
|
||||
int raim_fde = 0;
|
||||
|
||||
prcopt_t rtklib_configuration_options = {
|
||||
positioning_mode, /* positioning mode (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h */
|
||||
0, /* solution type (0:forward,1:backward,2:combined) */
|
||||
number_of_frequencies, /* number of frequencies (1:L1, 2:L1+L2, 3:L1+L2+L5)*/
|
||||
navigation_system, /* navigation system */
|
||||
elevation_mask * D2R, /* elevation mask angle (degrees) */
|
||||
snrmask, /* snrmask_t snrmask SNR mask */
|
||||
0, /* satellite ephemeris/clock (EPHOPT_XXX) */
|
||||
integer_ambiguity_resolution_gps, /* AR mode (0:off,1:continuous,2:instantaneous,3:fix and hold,4:ppp-ar) */
|
||||
integer_ambiguity_resolution_glo, /* GLONASS AR mode (0:off,1:on,2:auto cal,3:ext cal) */
|
||||
integer_ambiguity_resolution_bds, /* BeiDou AR mode (0:off,1:on) */
|
||||
outage_reset_ambiguity, /* obs outage count to reset bias */
|
||||
min_lock_to_fix_ambiguity, /* min lock count to fix ambiguity */
|
||||
10, /* min fix count to hold ambiguity */
|
||||
1, /* max iteration to resolve ambiguity */
|
||||
iono_model, /* ionosphere option (IONOOPT_XXX) */
|
||||
trop_model, /* troposphere option (TROPOPT_XXX) */
|
||||
dynamics_model, /* dynamics model (0:none, 1:velocity, 2:accel) */
|
||||
earth_tide, /* earth tide correction (0:off,1:solid,2:solid+otl+pole) */
|
||||
number_filter_iter, /* number of filter iteration */
|
||||
0, /* code smoothing window size (0:none) */
|
||||
0, /* interpolate reference obs (for post mission) */
|
||||
0, /* sbssat_t sbssat SBAS correction options */
|
||||
0, /* sbsion_t sbsion[MAXBAND+1] SBAS satellite selection (0:all) */
|
||||
0, /* rover position for fixed mode */
|
||||
0, /* base position for relative mode */
|
||||
/* 0:pos in prcopt, 1:average of single pos, */
|
||||
/* 2:read from file, 3:rinex header, 4:rtcm pos */
|
||||
{code_phase_error_ratio_l1, code_phase_error_ratio_l2, code_phase_error_ratio_l5}, /* eratio[NFREQ] code/phase error ratio */
|
||||
{100.0, carrier_phase_error_factor_a, carrier_phase_error_factor_b, 0.0, 1.0}, /* err[5]: measurement error factor [0]:reserved, [1-3]:error factor a/b/c of phase (m) , [4]:doppler frequency (hz) */
|
||||
{bias_0, iono_0, trop_0}, /* std[3]: initial-state std [0]bias,[1]iono [2]trop*/
|
||||
{sigma_bias, sigma_iono, sigma_trop, sigma_acch, sigma_accv, sigma_pos}, /* prn[6] process-noise std */
|
||||
5e-12, /* sclkstab: satellite clock stability (sec/sec) */
|
||||
{min_ratio_to_fix_ambiguity, 0.9999, 0.25, 0.1, 0.05, 0.0, 0.0, 0.0}, /* thresar[8]: AR validation threshold */
|
||||
min_elevation_to_fix_ambiguity, /* elevation mask of AR for rising satellite (deg) */
|
||||
0.0, /* elevation mask to hold ambiguity (deg) */
|
||||
slip_threshold, /* slip threshold of geometry-free phase (m) */
|
||||
30.0, /* max difference of time (sec) */
|
||||
threshold_reject_innovation, /* reject threshold of innovation (m) */
|
||||
threshold_reject_gdop, /* reject threshold of gdop */
|
||||
{}, /* double baseline[2] baseline length constraint {const,sigma} (m) */
|
||||
{}, /* double ru[3] rover position for fixed mode {x,y,z} (ecef) (m) */
|
||||
{}, /* double rb[3] base position for relative mode {x,y,z} (ecef) (m) */
|
||||
{"", ""}, /* char anttype[2][MAXANT] antenna types {rover,base} */
|
||||
{{}, {}}, /* double antdel[2][3] antenna delta {{rov_e,rov_n,rov_u},{ref_e,ref_n,ref_u}} */
|
||||
{}, /* pcv_t pcvr[2] receiver antenna parameters {rov,base} */
|
||||
{}, /* unsigned char exsats[MAXSAT] excluded satellites (1:excluded, 2:included) */
|
||||
0, /* max averaging epoches */
|
||||
0, /* initialize by restart */
|
||||
1, /* output single by dgps/float/fix/ppp outage */
|
||||
{"", ""}, /* char rnxopt[2][256] rinex options {rover,base} */
|
||||
{sat_PCV, rec_PCV, phwindup, reject_GPS_IIA, raim_fde}, /* posopt[6] positioning options [0]: satellite and receiver antenna PCV model; [1]: interpolate antenna parameters; [2]: apply phase wind-up correction for PPP modes; [3]: exclude measurements of GPS Block IIA satellites satellite [4]: RAIM FDE (fault detection and exclusion) [5]: handle day-boundary clock jump */
|
||||
0, /* solution sync mode (0:off,1:on) */
|
||||
{{}, {}}, /* odisp[2][6*11] ocean tide loading parameters {rov,base} */
|
||||
{{}, {{}, {}}, {{}, {}}, {}, {}}, /* exterr_t exterr extended receiver error model */
|
||||
0, /* disable L2-AR */
|
||||
{} /* char pppopt[256] ppp option "-GAP_RESION=" default gap to reset iono parameters (ep) */
|
||||
};
|
||||
|
||||
rtkinit(&rtk, &rtklib_configuration_options);
|
||||
}
|
||||
|
||||
|
||||
TEST_F(NmeaPrinterTest, PrintLine)
|
||||
{
|
||||
std::string filename("nmea_test.nmea");
|
||||
rtk_t rtk;
|
||||
prcopt_t rtklib_configuration_options;
|
||||
rtkinit(&rtk, &rtklib_configuration_options);
|
||||
std::shared_ptr<rtklib_solver> pvt_solution = std::make_shared<rtklib_solver>(12, "filename", false, rtk);
|
||||
|
||||
boost::posix_time::ptime pt(boost::gregorian::date(1994, boost::date_time::Nov, 19),
|
||||
@ -76,12 +192,9 @@ TEST(NmeaPrinterTest, PrintLine)
|
||||
}
|
||||
|
||||
|
||||
TEST(NmeaPrinterTest, PrintLineLessthan10min)
|
||||
TEST_F(NmeaPrinterTest, PrintLineLessthan10min)
|
||||
{
|
||||
std::string filename("nmea_test.nmea");
|
||||
rtk_t rtk;
|
||||
prcopt_t rtklib_configuration_options;
|
||||
rtkinit(&rtk, &rtklib_configuration_options);
|
||||
std::shared_ptr<rtklib_solver> pvt_solution = std::make_shared<rtklib_solver>(12, "filename", false, rtk);
|
||||
|
||||
boost::posix_time::ptime pt(boost::gregorian::date(1994, boost::date_time::Nov, 19),
|
||||
|
@ -146,8 +146,6 @@ FrontEndCal_msg_rx::FrontEndCal_msg_rx() : gr::block("FrontEndCal_msg_rx", gr::i
|
||||
FrontEndCal_msg_rx::~FrontEndCal_msg_rx() {}
|
||||
|
||||
|
||||
// ###########################################################
|
||||
|
||||
void wait_message()
|
||||
{
|
||||
while (!stop)
|
||||
@ -234,8 +232,6 @@ bool front_end_capture(std::shared_ptr<ConfigurationInterface> configuration)
|
||||
return false;
|
||||
}
|
||||
|
||||
//delete conditioner;
|
||||
//delete source;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -275,7 +271,6 @@ int main(int argc, char** argv)
|
||||
if (FLAGS_log_dir.empty())
|
||||
{
|
||||
std::cout << "Logging will be done at "
|
||||
|
||||
<< "/tmp"
|
||||
<< std::endl
|
||||
<< "Use front-end-cal --log_dir=/path/to/log to change that."
|
||||
@ -296,18 +291,16 @@ int main(int argc, char** argv)
|
||||
<< FLAGS_log_dir << std::endl;
|
||||
}
|
||||
|
||||
|
||||
// 0. Instantiate the FrontEnd Calibration class
|
||||
FrontEndCal front_end_cal;
|
||||
|
||||
// 1. Load configuration parameters from config file
|
||||
|
||||
std::shared_ptr<ConfigurationInterface> configuration = std::make_shared<FileConfiguration>(FLAGS_config_file);
|
||||
|
||||
front_end_cal.set_configuration(configuration);
|
||||
|
||||
|
||||
// 2. Get SUPL information from server: Ephemeris record, assistance info and TOW
|
||||
try
|
||||
{
|
||||
if (front_end_cal.get_ephemeris() == true)
|
||||
{
|
||||
std::cout << "SUPL data received OK!" << std::endl;
|
||||
@ -316,6 +309,11 @@ int main(int argc, char** argv)
|
||||
{
|
||||
std::cout << "Failure connecting to SUPL server" << std::endl;
|
||||
}
|
||||
}
|
||||
catch (const boost::exception& e)
|
||||
{
|
||||
std::cout << "Failure connecting to SUPL server" << std::endl;
|
||||
}
|
||||
|
||||
// 3. Capture some front-end samples to hard disk
|
||||
try
|
||||
@ -378,11 +376,6 @@ int main(int argc, char** argv)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
//gr_basic_block_sptr head = gr_make_head(sizeof(gr_complex), nsamples);
|
||||
//gr_head_sptr head_sptr = boost::dynamic_pointer_cast<gr_head>(head);
|
||||
//head_sptr->set_length(nsamples);
|
||||
//head_sptr->reset();
|
||||
|
||||
try
|
||||
{
|
||||
acquisition->connect(top_block);
|
||||
@ -449,7 +442,14 @@ int main(int argc, char** argv)
|
||||
{
|
||||
std::cout << " . ";
|
||||
}
|
||||
try
|
||||
{
|
||||
channel_internal_queue.push(3);
|
||||
}
|
||||
catch (const boost::exception& e)
|
||||
{
|
||||
LOG(INFO) << "Exception caught while pushing to he internal queue.";
|
||||
}
|
||||
try
|
||||
{
|
||||
ch_thread.join();
|
||||
@ -472,8 +472,9 @@ int main(int argc, char** argv)
|
||||
<< " [seconds]" << std::endl;
|
||||
|
||||
// 6. find TOW from SUPL assistance
|
||||
|
||||
double current_TOW = 0;
|
||||
try
|
||||
{
|
||||
if (global_gps_ephemeris_map.size() > 0)
|
||||
{
|
||||
std::map<int, Gps_Ephemeris> Eph_map;
|
||||
@ -497,6 +498,16 @@ int main(int argc, char** argv)
|
||||
std::cout << "GNSS-SDR Front-end calibration program ended." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
catch (const boost::exception& e)
|
||||
{
|
||||
std::cout << "Exception in getting Global ephemeris map" << std::endl;
|
||||
delete acquisition;
|
||||
delete gnss_synchro;
|
||||
google::ShutDownCommandLineFlags();
|
||||
std::cout << "GNSS-SDR Front-end calibration program ended." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Get user position from config file (or from SUPL using GSM Cell ID)
|
||||
double lat_deg = configuration->property("GNSS-SDR.init_latitude_deg", 41.0);
|
||||
@ -505,8 +516,8 @@ int main(int argc, char** argv)
|
||||
|
||||
std::cout << "Reference location (defined in config file):" << std::endl;
|
||||
|
||||
std::cout << "Latitude=" << lat_deg << " [<EFBFBD>]" << std::endl;
|
||||
std::cout << "Longitude=" << lon_deg << " [<EFBFBD>]" << std::endl;
|
||||
std::cout << "Latitude=" << lat_deg << " [º]" << std::endl;
|
||||
std::cout << "Longitude=" << lon_deg << " [º]" << std::endl;
|
||||
std::cout << "Altitude=" << altitude_m << " [m]" << std::endl;
|
||||
|
||||
if (doppler_measurements_map.size() == 0)
|
||||
|
@ -1,49 +0,0 @@
|
||||
# CMAKE for GPSTK by Javier Arribas 2012
|
||||
cmake_minimum_required (VERSION 2.6)
|
||||
project (gnsspvt_project)
|
||||
|
||||
include_directories(${gnsspvt_project_SOURCE_DIR}/src)
|
||||
|
||||
add_library (kml_printer_gpstk ${gnsspvt_project_SOURCE_DIR}/src/kml_printer_gpstk.cpp)
|
||||
add_executable(gnsspvt ${gnsspvt_project_SOURCE_DIR}/src/gnsspvt.cpp)
|
||||
|
||||
target_link_libraries (gnsspvt kml_printer_gpstk)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
|
||||
|
||||
find_package(GPSTK REQUIRED)
|
||||
|
||||
if ( NOT GPSTK_FOUND )
|
||||
message(FATAL_ERROR "GPSTK library not found!")
|
||||
endif( NOT GPSTK_FOUND )
|
||||
|
||||
find_package(GLOG REQUIRED)
|
||||
if ( NOT GLOG_FOUND )
|
||||
message(FATAL_ERROR "GLOG library not found!")
|
||||
endif( NOT GLOG_FOUND )
|
||||
|
||||
include_directories(${GLOG_INCLUDE_DIRS})
|
||||
|
||||
# IMPORTANT NOTICE: The GPSTK linking order is critical. First it is required to link agains libprocframe to avoid vtable errors
|
||||
include_directories(${GPSTK_INCLUDE_DIR}/gpstk ${GEOMATICS_INCLUDE_DIR} ${PROCFRAME_INCLUDE_DIR} ${VDRAW_INCLUDE_DIR} ${VPLOT_INCLUDE_DIR} ${RXIO_INCLUDE_DIR})
|
||||
# set(LIBS ${LIBS} ${GPSTK_LIBRARIES} ${GEOMATICS_LIBRARIES} ${VDRAW_LIBRARIES} ${VPLOT_LIBRARIES} ${RXIO_LIBRARIES})
|
||||
set(LIBS ${LIBS} ${PROCFRAME_LIBRARIES} ${GPSTK_LIBRARIES} ${GEOMATICS_LIBRARIES} ${GLOG_LIBRARIES})
|
||||
|
||||
|
||||
target_link_libraries(gnsspvt ${LIBS})
|
||||
|
||||
message(STATUS "GPSTK_INCLUDE_DIR="${GLOG_LIBRARIES})
|
||||
#message(STATUS "GPSTK_LIBRARIES=${GPSTK_LIBRARIES}")
|
||||
#message(STATUS "LIBS=${LIBS}")
|
||||
|
||||
# debug info: print all variables
|
||||
#get_cmake_property(_variableNames VARIABLES)
|
||||
#foreach (_variableName ${_variableNames})
|
||||
# message(STATUS "${_variableName}=${${_variableName}}")
|
||||
#endforeach()
|
||||
|
||||
#get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
|
||||
#foreach(dir ${dirs})
|
||||
# message(STATUS "INCLUDE_DIRECTORIES='${dir}'")
|
||||
#endforeach()
|
||||
|
@ -1,103 +0,0 @@
|
||||
# - Try to find the Google Glog library
|
||||
#
|
||||
# This module defines the following variables
|
||||
#
|
||||
# GLOG_FOUND - Was Glog found
|
||||
# GLOG_INCLUDE_DIRS - the Glog include directories
|
||||
# GLOG_LIBRARIES - Link to this
|
||||
#
|
||||
# This module accepts the following variables
|
||||
#
|
||||
# GLOG_ROOT - Can be set to Glog install path or Windows build path
|
||||
#
|
||||
#=============================================================================
|
||||
# FindGlog.cmake, adapted from FindBullet.cmake which has the following
|
||||
# copyright -
|
||||
#-----------------------------------------------------------------------------
|
||||
# Copyright 2009 Kitware, Inc.
|
||||
# Copyright 2009 Philip Lowman <philip@yhbt.com>
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
if (NOT DEFINED GLOG_ROOT)
|
||||
set (GLOG_ROOT /usr /usr/local)
|
||||
endif (NOT DEFINED GLOG_ROOT)
|
||||
|
||||
if(MSVC)
|
||||
set(LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/Release)
|
||||
else(MSVC)
|
||||
set (LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/lib)
|
||||
endif(MSVC)
|
||||
|
||||
macro(_FIND_GLOG_LIBRARIES _var)
|
||||
find_library(${_var}
|
||||
NAMES
|
||||
${ARGN}
|
||||
PATHS
|
||||
${LIB_PATHS}
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
mark_as_advanced(${_var})
|
||||
endmacro()
|
||||
|
||||
macro(_GLOG_APPEND_LIBRARIES _list _release)
|
||||
set(_debug ${_release}_DEBUG)
|
||||
if(${_debug})
|
||||
set(${_list} ${${_list}} optimized ${${_release}} debug ${${_debug}})
|
||||
else()
|
||||
set(${_list} ${${_list}} ${${_release}})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
if(MSVC)
|
||||
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
|
||||
PATHS
|
||||
${GLOG_ROOT}/src/windows
|
||||
${GLOG_ROOT}/src/windows/glog
|
||||
)
|
||||
else(MSVC)
|
||||
# Linux/OS X builds
|
||||
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
|
||||
PATHS
|
||||
${GLOG_ROOT}/include/glog
|
||||
)
|
||||
endif(MSVC)
|
||||
|
||||
# Find the libraries
|
||||
if(MSVC)
|
||||
_FIND_GLOG_LIBRARIES(GLOG_LIBRARIES libglog.lib)
|
||||
else(MSVC)
|
||||
# Linux/OS X builds
|
||||
_FIND_GLOG_LIBRARIES(GLOG_LIBRARIES libglog.so)
|
||||
endif(MSVC)
|
||||
|
||||
message("glog library = " ${GLOG_LIBRARIES})
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set GLOG_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include("${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake")
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Glog DEFAULT_MSG
|
||||
GLOG_LIBRARIES)
|
||||
|
||||
if(MSVC)
|
||||
string(REGEX REPLACE "/glog$" "" VAR_WITHOUT ${GLOG_INCLUDE_DIR})
|
||||
string(REGEX REPLACE "/windows$" "" VAR_WITHOUT ${VAR_WITHOUT})
|
||||
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIRS} "${VAR_WITHOUT}")
|
||||
string(REGEX REPLACE "/libglog.lib" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES})
|
||||
else(MSVC)
|
||||
# Linux/OS X builds
|
||||
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})
|
||||
string(REGEX REPLACE "/libglog.so" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES})
|
||||
endif(MSVC)
|
||||
|
||||
if(GLOG_FOUND)
|
||||
# _GLOG_APPEND_LIBRARIES(GLOG GLOG_LIBRARIES)
|
||||
endif()
|
@ -1,87 +0,0 @@
|
||||
# - Find gpstk library
|
||||
# Find the native gpstk includes and library
|
||||
# This module defines
|
||||
# GPSTK_INCLUDE_DIR, where to find tiff.h, etc.
|
||||
# GPSTK_LIBRARIES, libraries to link against to use GPSTK.
|
||||
# GPSTK_FOUND, If false, do not try to use GPSTK.
|
||||
# also defined, but not for general use are
|
||||
# GPSTK_LIBRARY, where to find the GPSTK library.
|
||||
|
||||
FIND_PATH(GPSTK_INCLUDE_DIR gpstk/Matrix.hpp)
|
||||
FIND_PATH(GEOMATICS_INCLUDE_DIR gpstk/random.hpp)
|
||||
FIND_PATH(PROCFRAME_INCLUDE_DIR gpstk/SolverWMS.hpp)
|
||||
FIND_PATH(VDRAW_INCLUDE_DIR gpstk/Layout.hpp)
|
||||
FIND_PATH(VPLOT_INCLUDE_DIR gpstk/ScatterPlot.hpp)
|
||||
FIND_PATH(RXIO_INCLUDE_DIR gpstk/EphReader.hpp)
|
||||
|
||||
SET(GPSTK_NAMES ${GPSTK_NAMES} gpstk libgpstk)
|
||||
FIND_LIBRARY(GPSTK_LIBRARY NAMES ${GPSTK_NAMES} )
|
||||
|
||||
SET(GEOMATICS_NAMES ${GEOMATICS_NAMES} geomatics libgeomatics)
|
||||
FIND_LIBRARY(GEOMATICS_LIBRARY NAMES ${GEOMATICS_NAMES} )
|
||||
|
||||
SET(PROCFRAME_NAMES ${PROCFRAME_NAMES} procframe libprocframe)
|
||||
FIND_LIBRARY(PROCFRAME_LIBRARY NAMES ${PROCFRAME_NAMES} )
|
||||
|
||||
SET(VDRAW_NAMES ${VDRAW_NAMES} vdraw libvdraw)
|
||||
FIND_LIBRARY(VDRAW_LIBRARY NAMES ${VDRAW_NAMES} )
|
||||
|
||||
SET(VPLOT_NAMES ${VPLOT_NAMES} vplot libvplot)
|
||||
FIND_LIBRARY(VPLOT_LIBRARY NAMES ${VPLOT_NAMES} )
|
||||
|
||||
SET(RXIO_NAMES ${RXIO_NAMES} rxio librxio)
|
||||
FIND_LIBRARY(RXIO_LIBRARY NAMES ${RXIO_NAMES} )
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set GPSTK_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GPSTK DEFAULT_MSG GPSTK_LIBRARY GPSTK_INCLUDE_DIR)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GEOMATICS DEFAULT_MSG GEOMATICS_LIBRARY GEOMATICS_INCLUDE_DIR)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROCFRAME DEFAULT_MSG PROCFRAME_LIBRARY PROCFRAME_INCLUDE_DIR)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VDRAW DEFAULT_MSG VDRAW_LIBRARY VDRAW_INCLUDE_DIR)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VPLOT DEFAULT_MSG VPLOT_LIBRARY VPLOT_INCLUDE_DIR)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(RXIO DEFAULT_MSG RXIO_LIBRARY RXIO_INCLUDE_DIR)
|
||||
|
||||
IF(GPSTK_FOUND)
|
||||
SET( GPSTK_LIBRARIES ${GPSTK_LIBRARY} )
|
||||
ENDIF(GPSTK_FOUND)
|
||||
|
||||
IF(GEOMATICS_FOUND)
|
||||
SET( GEOMATICS_LIBRARIES ${GEOMATICS_LIBRARY} )
|
||||
ENDIF(GEOMATICS_FOUND)
|
||||
|
||||
IF(PROCFRAME_FOUND)
|
||||
SET( PROCFRAME_LIBRARIES ${PROCFRAME_LIBRARY} )
|
||||
ENDIF(PROCFRAME_FOUND)
|
||||
|
||||
IF(VDRAW_FOUND)
|
||||
SET( VDRAW_LIBRARIES ${VDRAW_LIBRARY} )
|
||||
ENDIF(VDRAW_FOUND)
|
||||
|
||||
IF(VPLOT_FOUND)
|
||||
SET( VPLOT_LIBRARIES ${VPLOT_LIBRARY} )
|
||||
ENDIF(VPLOT_FOUND)
|
||||
|
||||
IF(RXIO_FOUND)
|
||||
SET( RXIO_LIBRARIES ${RXIO_LIBRARY} )
|
||||
ENDIF(RXIO_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(GPSTK_INCLUDE_DIR GPSTK_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(GEOMATICS_INCLUDE_DIR GEOMATICS_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(PROCFRAME_INCLUDE_DIR PROCFRAME_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(VDRAW_INCLUDE_DIR VDRAW_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(VPLOT_INCLUDE_DIR VPLOT_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(RXIO_INCLUDE_DIR RXIO_LIBRARY)
|
||||
|
||||
|
@ -1,62 +0,0 @@
|
||||
ABOUT GNSSPVT
|
||||
----------------------
|
||||
This program uses the high level GpsTk classes to implement a simple PVT solver
|
||||
that uses RINEX files as an input.
|
||||
The output is written both in the console and in a Google Earth KML file.
|
||||
|
||||
HOW TO BUILD GNSSPVT
|
||||
----------------------
|
||||
|
||||
Installation in Ubuntu 11.04, 11.10, 12.04 (32 and 64 bits)
|
||||
-----------------------------------------------------------
|
||||
|
||||
- Install CMake through your OS's package manager or by some other means.
|
||||
|
||||
- Install GpsTk:
|
||||
|
||||
The following procedure will build and install the GPSTk.
|
||||
|
||||
Ensure that prerequisites such as jam have been installed.
|
||||
Download the GPSTk source distribution from http://www.gpstk.org/bin/view/Documentation/GPSTkDownloads
|
||||
Extract the GPSTk tarball. For example, using GNU tar
|
||||
|
||||
tar xvzf gpstk.tar.gz
|
||||
|
||||
Change into the gpstk/dev directory (if using Subversion) or the gpstk/ directory (if using the tarball)and type
|
||||
|
||||
jam
|
||||
|
||||
To build the source documentation using doxygen:
|
||||
|
||||
doxygen
|
||||
|
||||
To install GPSTk as a system library in /usr/local, assume root privileges then execute
|
||||
|
||||
jam install
|
||||
|
||||
To install to a different directory, define the environment variable PREFIX to point to the root of the installation
|
||||
|
||||
|
||||
- Download, unzip, configure, build and install glog, a Google's library that implements application-level logging:
|
||||
|
||||
$ wget http://google-glog.googlecode.com/files/glog-0.3.2.tar.gz
|
||||
$ tar xvfz glog-0.3.2.tar.gz
|
||||
$ cd glog-0.3.2
|
||||
$ ./configure
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
- Go to GNSSPVT root directory and compile the gnsspvt:
|
||||
|
||||
$ cd gnss-sdr/src/utils/gpstk/gnsspvt/
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake ../
|
||||
$ make
|
||||
|
||||
If everything goes well, the executable file is available in the build directory.
|
||||
|
||||
USAGE
|
||||
----------------------
|
||||
|
||||
./gnsspvt -i path_to_rinex_observable_file -n path_to_rinex_navigation_file -k path_to_kml_output_file
|
@ -1,593 +0,0 @@
|
||||
/*!
|
||||
* \file gnsspvt.cpp
|
||||
* \brief Adapted version of high level gpstk PVT solver to read RINEX files,
|
||||
* compute the position, velocity and time solution, and write Google Earth KML output file.
|
||||
* The input Observables and Navigation files can be RINEX 2.10 or RINEX 3.00.
|
||||
* It is a modified version of the example5.cpp code provided in gpstk source code.
|
||||
*
|
||||
* \author Javier Arribas, 2012. jarribas(at)cttc.es
|
||||
*
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2012 (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/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Modified Example program Nro 5 for GPSTk
|
||||
// This program shows how to use some high-level GPSTk classes
|
||||
|
||||
// Basic input/output C++ class
|
||||
#include <iostream>
|
||||
|
||||
// Classes for handling observations RINEX files (data)
|
||||
#include "gpstk/Rinex3ObsData.hpp"
|
||||
#include "gpstk/Rinex3ObsStream.hpp"
|
||||
|
||||
// Class to easily extract data from Rinex3ObsData objects
|
||||
#include "gpstk/ExtractData.hpp"
|
||||
|
||||
// Classes for handling satellite navigation parameters RINEX files
|
||||
// (Broadcast ephemerides)
|
||||
#include "gpstk/Rinex3NavHeader.hpp"
|
||||
#include "gpstk/Rinex3NavData.hpp"
|
||||
#include "gpstk/Rinex3NavStream.hpp"
|
||||
|
||||
// Class to store satellite broadcast navigation data
|
||||
#include "gpstk/GPSEphemerisStore.hpp"
|
||||
|
||||
// Class to model GPS data for a mobile receiver
|
||||
#include "gpstk/ModeledPR.hpp"
|
||||
|
||||
#include "gpstk/GNSSconstants.hpp"
|
||||
#include "gpstk/CommonTime.hpp"
|
||||
#include "gpstk/SatID.hpp"
|
||||
#include "gpstk/Matrix.hpp"
|
||||
#include "gpstk/XvtStore.hpp"
|
||||
#include "gpstk/TropModel.hpp"
|
||||
|
||||
// Class to model the tropospheric delays
|
||||
#include "gpstk/TropModel.hpp"
|
||||
|
||||
// Classes to model ans store ionospheric delays
|
||||
#include "gpstk/IonoModel.hpp"
|
||||
#include "gpstk/IonoModelStore.hpp"
|
||||
|
||||
// Class to solve the equations system using a Weighted Least Mean Square method
|
||||
#include "gpstk/SolverWMS.hpp"
|
||||
|
||||
// Class to compute the weights to be used for each satellite
|
||||
#include "gpstk/MOPSWeight.hpp"
|
||||
|
||||
// Basic framework for programs in the GPSTk. The 'process()' method MUST
|
||||
// be implemented
|
||||
#include "gpstk/BasicFramework.hpp"
|
||||
|
||||
#include "gpstk/geometry.hpp" // DEG_TO_RAD
|
||||
|
||||
// Time-class year-day-second
|
||||
#include "gpstk/YDSTime.hpp"
|
||||
|
||||
#include "kml_printer_gpstk.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace gpstk;
|
||||
|
||||
|
||||
// A new class is declared that will handle program behaviour
|
||||
// This class inherits from BasicFramework
|
||||
class gpstk_solver : public BasicFramework
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructor declaration
|
||||
gpstk_solver(char* arg0);
|
||||
~gpstk_solver();
|
||||
|
||||
protected:
|
||||
|
||||
// Method that will take care of processing
|
||||
virtual void process();
|
||||
|
||||
// Method that hold code to be run BEFORE processing
|
||||
virtual void spinUp();
|
||||
|
||||
virtual int Prepare( const CommonTime& Tr,
|
||||
std::vector<SatID>& Satellite,
|
||||
std::vector<double>& Pseudorange,
|
||||
const XvtStore<SatID>& Eph );
|
||||
virtual int Prepare2( const CommonTime& Tr,
|
||||
const Vector<SatID>& Satellite,
|
||||
const Vector<double>& Pseudorange,
|
||||
const XvtStore<SatID>& Eph );
|
||||
|
||||
private:
|
||||
|
||||
// These field represent options at command line interface (CLI)
|
||||
CommandOptionWithArg dataFile;
|
||||
CommandOptionWithArg navFile;
|
||||
CommandOptionWithArg kmlFile;
|
||||
|
||||
Kml_Printer_gpstk kml_printer;
|
||||
|
||||
// If you want to share objects and variables among methods, you'd
|
||||
// better declare them here
|
||||
Rinex3ObsStream rObsFile; // Object to read Rinex observation data files
|
||||
Rinex3ObsData rData; // Object to store Rinex observation data
|
||||
Rinex3NavStream rNavFile; // Object to read Rinex navigation data files
|
||||
Rinex3NavData rNavData; // Object to store Rinex navigation data
|
||||
Rinex3NavHeader rNavHeader; // Object to read the header of Rinex
|
||||
// navigation data files
|
||||
IonoModelStore ionoStore; // Object to store ionospheric models
|
||||
GPSEphemerisStore bceStore; // Object to store ephemeris
|
||||
ModeledPR modelPR; // Declare a ModeledReferencePR object
|
||||
MOPSTropModel mopsTM; // Declare a MOPSTropModel object
|
||||
ExtractData obsC1; // Declare an ExtractData object
|
||||
int indexC1; // Index to "C1" observation
|
||||
bool useFormerPos; // Flag indicating if we have an a priori
|
||||
// position
|
||||
Position formerPosition; // Object to store the former position
|
||||
IonoModel ioModel; // Declare a Ionospheric Model object
|
||||
SolverWMS solver; // Declare an object to apply WMS method
|
||||
MOPSWeight mopsWeights; // Object to compute satellites' weights
|
||||
|
||||
};
|
||||
|
||||
|
||||
// Let's implement constructor details
|
||||
gpstk_solver::gpstk_solver(char* arg0)
|
||||
: BasicFramework(arg0, "\nProgram to print the position solution in ECEF "
|
||||
"and longitude, latitude, height, based in C1 and "
|
||||
"given a RINEX observations file and a RINEX "
|
||||
"broadcast navigation file.\n\n"
|
||||
"The output is: \n"
|
||||
" Time(sec) X(m) Y(m) Z(m) Lon(deg) "
|
||||
" Lat(deg) Height(m)\n"),
|
||||
// Option initialization. "true" means a mandatory option
|
||||
dataFile(CommandOption::stdType, 'i', "datainput",
|
||||
" [-i|--datainput] Name of RINEX observations file.", true),
|
||||
navFile(CommandOption::stdType, 'n', "navinput",
|
||||
" [-n|--navinput] Name of RINEX broadcast navigation file.", true),
|
||||
kmlFile(CommandOption::stdType, 'k', "kmloutput",
|
||||
" [-n|--navinput] Name of KML output file.", true)
|
||||
{
|
||||
// These options may appear just once at CLI
|
||||
dataFile.setMaxCount(1);
|
||||
navFile.setMaxCount(1);
|
||||
kmlFile.setMaxCount(1);
|
||||
} // End of constructor details
|
||||
|
||||
|
||||
|
||||
/* Method to set an a priori position of receiver using
|
||||
* Bancroft's method.
|
||||
*
|
||||
* @param Tr Time of observation
|
||||
* @param Satellite std::vector of satellites in view
|
||||
* @param Pseudorange std::vector of pseudoranges measured from
|
||||
* rover station to satellites
|
||||
* @param Eph Satellites Ephemeris
|
||||
*
|
||||
* @return
|
||||
* 0 if OK
|
||||
* -1 if problems arose
|
||||
*/
|
||||
int gpstk_solver::Prepare( const CommonTime& Tr,
|
||||
std::vector<SatID>& Satellite,
|
||||
std::vector<double>& Pseudorange,
|
||||
const XvtStore<SatID>& Eph )
|
||||
{
|
||||
|
||||
Matrix<double> SVP;
|
||||
Bancroft Ban;
|
||||
Vector<double> vPos;
|
||||
PRSolution2 raimObj;
|
||||
|
||||
try
|
||||
{
|
||||
cerr << "Tr=" <<Tr<<std::endl;
|
||||
for (std::vector<SatID>::iterator it = Satellite.begin() ; it != Satellite.end(); ++it)
|
||||
{
|
||||
cerr << "SatID=" << *it<<endl;
|
||||
cerr << "EphemerisStore Sat XYZ= " << bceStore.getXvt(*it,rData.time).x<<std::endl;
|
||||
}
|
||||
|
||||
for (std::vector<double>::iterator it = Pseudorange.begin() ; it != Pseudorange.end(); ++it)
|
||||
{
|
||||
cerr << "PseudoRanges=" << *it<<endl;
|
||||
}
|
||||
|
||||
//cerr << "Eph=" << Eph <<std::endl;
|
||||
//cerr << "SVP=" << SVP <<std::endl;
|
||||
raimObj.PrepareAutonomousSolution( Tr,
|
||||
Satellite,
|
||||
Pseudorange,
|
||||
Eph,
|
||||
SVP );
|
||||
|
||||
if( Ban.Compute(SVP, vPos) < 0 )
|
||||
{
|
||||
cerr << "Error 1" <<std::endl;
|
||||
cerr << "SVP="<<SVP<<std::endl;
|
||||
cerr << "vPos=" << vPos <<std::endl;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
catch(Exception &error)
|
||||
{
|
||||
cerr << "Excepción 1: "<<error;
|
||||
return -1;
|
||||
}
|
||||
cerr << "OK prepare"<<endl;
|
||||
return 1;
|
||||
|
||||
} // End of method 'ModeledPR::Prepare()'
|
||||
|
||||
/* Method to set an a priori position of receiver using
|
||||
* Bancroft's method.
|
||||
*
|
||||
* @param Tr Time of observation
|
||||
* @param Satellite Vector of satellites in view
|
||||
* @param Pseudorange Pseudoranges measured from rover station to
|
||||
* satellites
|
||||
* @param Eph Satellites Ephemeris
|
||||
*
|
||||
* @return
|
||||
* 0 if OK
|
||||
* -1 if problems arose
|
||||
*/
|
||||
int gpstk_solver::Prepare2( const CommonTime& Tr,
|
||||
const Vector<SatID>& Satellite,
|
||||
const Vector<double>& Pseudorange,
|
||||
const XvtStore<SatID>& Eph )
|
||||
{
|
||||
|
||||
int i;
|
||||
std::vector<SatID> vSat;
|
||||
std::vector<double> vPR;
|
||||
|
||||
// Convert from gpstk::Vector to std::vector
|
||||
for (i = 0; i < (int)Satellite.size(); i++)
|
||||
{
|
||||
vSat.push_back(Satellite[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < (int)Pseudorange.size(); i++)
|
||||
{
|
||||
vPR.push_back(Pseudorange[i]);
|
||||
}
|
||||
|
||||
return Prepare(Tr, vSat, vPR, Eph);
|
||||
|
||||
} // End of method 'ModeledPR::Prepare()'
|
||||
|
||||
|
||||
// Method that will be executed AFTER initialization but BEFORE processing
|
||||
void gpstk_solver::spinUp()
|
||||
{
|
||||
|
||||
|
||||
//open KML output file
|
||||
if (kml_printer.set_headers(kmlFile.getValue()[0].c_str())!=true)
|
||||
{
|
||||
cerr << "Problem creating the kml file "<<kmlFile.getValue()[0].c_str();
|
||||
exit (-1);
|
||||
}
|
||||
// From now on, some parts may look similar to 'example3.cpp' and
|
||||
// 'example4.cpp'
|
||||
// Activate failbit to enable exceptions
|
||||
rObsFile.exceptions(ios::failbit);
|
||||
|
||||
// First, data RINEX reading object
|
||||
try
|
||||
{
|
||||
rObsFile.open(dataFile.getValue()[0].c_str(), std::ios::in);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cerr << "Problem opening file " << dataFile.getValue()[0].c_str()
|
||||
<< endl;
|
||||
cerr << "Maybe it doesn't exist or you don't have proper read "
|
||||
<< "permissions." << endl;
|
||||
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
// We need to read the header of the observations file
|
||||
Rinex3ObsHeader roh;
|
||||
rObsFile >> roh;
|
||||
|
||||
// We need the index pointing to C1-type observations
|
||||
try
|
||||
{
|
||||
indexC1 = roh.getObsIndex( "C1" );
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cerr << "The observation file doesn't have C1 pseudoranges." << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
// Activate failbit to enable exceptions
|
||||
rNavFile.exceptions(ios::failbit);
|
||||
|
||||
// Read nav file and store unique list of ephemerides
|
||||
try
|
||||
{
|
||||
rNavFile.open(navFile.getValue()[0].c_str(), std::ios::in);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cerr << "Problem opening file " << navFile.getValue()[0].c_str() << endl;
|
||||
cerr << "Maybe it doesn't exist or you don't have proper read "
|
||||
<< "permissions." << endl;
|
||||
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
// We will need to read ionospheric parameters (Klobuchar model) from
|
||||
// the file header
|
||||
rNavFile >> rNavHeader;
|
||||
|
||||
// Let's feed the ionospheric model (Klobuchar type) from data in the
|
||||
// navigation (ephemeris) file header. First, we must check if there are
|
||||
// valid ionospheric correction parameters in the header
|
||||
if(rNavHeader.valid & Rinex3NavHeader::validIonoCorrGPS)
|
||||
{
|
||||
// Extract the Alpha and Beta parameters from the header
|
||||
double* ionAlpha = rNavHeader.mapIonoCorr["GPSA"].param;
|
||||
double* ionBeta = rNavHeader.mapIonoCorr["GPSB"].param;
|
||||
|
||||
// Feed the ionospheric model with the parameters
|
||||
ioModel.setModel(ionAlpha, ionBeta);
|
||||
}
|
||||
else
|
||||
{
|
||||
cerr << "WARNING: Navigation file " << navFile.getValue()[0].c_str()
|
||||
<< " doesn't have valid ionospheric correction parameters." << endl;
|
||||
}
|
||||
|
||||
// WARNING-WARNING-WARNING: In this case, the same model will be used
|
||||
// for the full data span
|
||||
ionoStore.addIonoModel(CommonTime::BEGINNING_OF_TIME, ioModel);
|
||||
|
||||
// Storing the ephemeris in "bceStore"
|
||||
while (rNavFile >> rNavData)
|
||||
{
|
||||
bceStore.addEphemeris(rNavData);
|
||||
rNavData.dump(cerr);
|
||||
cerr<<endl;
|
||||
}
|
||||
|
||||
// Setting the criteria for looking up ephemeris
|
||||
bceStore.SearchPast(); // This is the default
|
||||
|
||||
// This is set to true if the former computed positon will be used as
|
||||
// a priori position
|
||||
useFormerPos = false; // At first, we don't have an a priori position
|
||||
|
||||
// Prepare for printing later on
|
||||
cout << fixed << setprecision(8);
|
||||
|
||||
} // End of gpstk_solver::spinUp()
|
||||
|
||||
|
||||
// Method that will really process information
|
||||
void gpstk_solver::process()
|
||||
{
|
||||
|
||||
// Let's read the observations RINEX, epoch by epoch
|
||||
while( rObsFile >> rData )
|
||||
{
|
||||
|
||||
// Begin usable data with enough number of satellites
|
||||
if( (rData.epochFlag == 0 || rData.epochFlag == 1) &&
|
||||
(rData.numSVs > 3) )
|
||||
{
|
||||
|
||||
// Number of satellites with valid data in this epoch
|
||||
int validSats = 0;
|
||||
int prepareResult;
|
||||
double rxAltitude; // Receiver altitude for tropospheric model
|
||||
double rxLatitude; // Receiver latitude for tropospheric model
|
||||
|
||||
// We need to extract C1 data from this epoch. Skip epoch if not
|
||||
// enough data (4 SV at least) is available
|
||||
if( obsC1.getData(rData, indexC1) < 4 )
|
||||
{
|
||||
// The former position will not be valid next time
|
||||
useFormerPos = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// If possible, use former position as a priori
|
||||
if( useFormerPos )
|
||||
{
|
||||
|
||||
prepareResult = modelPR.Prepare(formerPosition);
|
||||
|
||||
// We need to seed this kind of tropospheric model with
|
||||
// receiver altitude
|
||||
rxAltitude = formerPosition.getAltitude();
|
||||
rxLatitude = formerPosition.getGeodeticLatitude();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use Bancroft method is no a priori position is available
|
||||
cerr << "Bancroft method was used at epoch "
|
||||
<< static_cast<YDSTime>(rData.time).sod << endl;
|
||||
|
||||
Prepare2( rData.time,obsC1.availableSV,obsC1.obsData,bceStore );
|
||||
prepareResult = modelPR.Prepare( rData.time,
|
||||
obsC1.availableSV,
|
||||
obsC1.obsData,
|
||||
bceStore );
|
||||
|
||||
// We need to seed this kind of tropospheric model with
|
||||
// receiver altitude
|
||||
rxAltitude = modelPR.rxPos.getAltitude();
|
||||
rxLatitude = modelPR.rxPos.getGeodeticLatitude();
|
||||
}
|
||||
|
||||
// If there were problems with Prepare(), skip this epoch
|
||||
if( prepareResult )
|
||||
{
|
||||
// The former position will not be valid next time
|
||||
useFormerPos = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
// If there were no problems, let's feed the tropospheric model
|
||||
mopsTM.setReceiverHeight(rxAltitude);
|
||||
mopsTM.setReceiverLatitude(rxLatitude);
|
||||
mopsTM.setDayOfYear(static_cast<YDSTime>(rData.time).doy);
|
||||
|
||||
|
||||
// Now, let's compute the GPS model for our observable (C1)
|
||||
validSats = modelPR.Compute( rData.time,
|
||||
obsC1.availableSV,
|
||||
obsC1.obsData,
|
||||
bceStore,
|
||||
&mopsTM,
|
||||
&ionoStore );
|
||||
|
||||
// Only get into further computations if there are enough
|
||||
// satellites
|
||||
if( validSats >= 4 )
|
||||
{
|
||||
|
||||
// Now let's solve the navigation equations using the WMS method
|
||||
try
|
||||
{
|
||||
// First, compute the satellites' weights
|
||||
int goodSv = mopsWeights.getWeights( rData.time,
|
||||
modelPR.availableSV,
|
||||
bceStore,
|
||||
modelPR.ionoCorrections,
|
||||
modelPR.elevationSV,
|
||||
modelPR.azimuthSV,
|
||||
modelPR.rxPos );
|
||||
|
||||
// Some minimum checking is in order
|
||||
if ( goodSv != (int)modelPR.prefitResiduals.size() ) continue;
|
||||
|
||||
// Then, solve the system
|
||||
solver.Compute( modelPR.prefitResiduals,
|
||||
modelPR.geoMatrix,
|
||||
mopsWeights.weightsVector );
|
||||
|
||||
}
|
||||
catch( InvalidSolver& e )
|
||||
{
|
||||
cerr << "Couldn't solve equations system at epoch "
|
||||
<< static_cast<YDSTime>(rData.time).sod << endl;
|
||||
cerr << e << endl;
|
||||
|
||||
// The former position will not be valid next time
|
||||
useFormerPos = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
// With "solver", we got the difference vector between the
|
||||
// a priori position and the computed, 'real' position. Then,
|
||||
// let's convert the solution to a Position object
|
||||
Position solPos( (modelPR.rxPos.X() + solver.solution[0]),
|
||||
(modelPR.rxPos.Y() + solver.solution[1]),
|
||||
(modelPR.rxPos.Z() + solver.solution[2]) );
|
||||
|
||||
// Print results
|
||||
cout << static_cast<YDSTime>(rData.time).sod
|
||||
<< " "; // Output field #1
|
||||
cout << "X="<<solPos.X() << "; "; // Output field #2
|
||||
cout << "Y="<<solPos.Y() << "; "; // Output field #3
|
||||
cout << "Z="<<solPos.Z() << "; "; // Output field #4
|
||||
cout << solPos.longitude() << " "; // Output field #5
|
||||
cout << solPos.geodeticLatitude() << " "; // Output field #6
|
||||
cout << solPos.height() << " "; // Output field #7
|
||||
cout << endl;
|
||||
|
||||
cout << "Geocentric Latitude="<< solPos.geocentricLatitude() << " "; // Output field #5
|
||||
cout << endl;
|
||||
|
||||
// write KML PVT line
|
||||
kml_printer.print_position(solPos);
|
||||
|
||||
formerPosition = solPos;
|
||||
|
||||
// Next time, former position will be used as a priori
|
||||
useFormerPos = true;
|
||||
|
||||
} // End of 'if( validSats >= 4 )'
|
||||
else
|
||||
{
|
||||
// The former position will not be valid next time
|
||||
useFormerPos = false;
|
||||
}
|
||||
|
||||
} // End of 'if( (rData.epochFlag == 0 || rData.epochFlag == 1) &&...'
|
||||
else
|
||||
{
|
||||
// The former position will not be valid next time
|
||||
useFormerPos = false;
|
||||
}
|
||||
|
||||
} // End of 'while( rObsFile >> rData )'
|
||||
|
||||
return;
|
||||
|
||||
} // End of 'gpstk_solver::process()'
|
||||
|
||||
gpstk_solver::~gpstk_solver()
|
||||
{
|
||||
kml_printer.close_file();
|
||||
}
|
||||
// Main function
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
gpstk_solver program(argv[0]);
|
||||
if (!program.initialize(argc, argv))
|
||||
return 0;
|
||||
if (!program.run())
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch(Exception& e)
|
||||
{
|
||||
cout << "Problem: " << e << endl;
|
||||
return 1;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cout << "Unknown error." << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
} // End of 'main()'
|
@ -1,136 +0,0 @@
|
||||
/*!
|
||||
* \file kml_printer.cc
|
||||
* \brief Implementation of a class that prints PVT information to a kml file
|
||||
* for GPSTK data structures
|
||||
* \author Javier Arribas, 2012. jarribas(at)cttc.es
|
||||
*
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2012 (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 "kml_printer_gpstk.h"
|
||||
#include <glog/log_severity.h>
|
||||
#include <glog/logging.h>
|
||||
#include <time.h>
|
||||
|
||||
bool Kml_Printer_gpstk::set_headers(std::string filename)
|
||||
{
|
||||
time_t rawtime;
|
||||
struct tm * timeinfo;
|
||||
time ( &rawtime );
|
||||
timeinfo = localtime ( &rawtime );
|
||||
kml_file.open(filename.c_str());
|
||||
if (kml_file.is_open())
|
||||
{
|
||||
DLOG(INFO) << "KML printer writing on " << filename.c_str();
|
||||
// Set iostream numeric format and precision
|
||||
kml_file.setf(kml_file.fixed,kml_file.floatfield);
|
||||
kml_file << std::setprecision(14);
|
||||
kml_file << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl
|
||||
<< "<kml xmlns=\"http://www.opengis.net/kml/2.2\">" << std::endl
|
||||
<< " <Document>" << std::endl
|
||||
<< " <name>GNSS Track</name>" << std::endl
|
||||
<< " <description>GNSS-SDR Receiver position log file created at " << asctime (timeinfo)
|
||||
<< " </description>" << std::endl
|
||||
<< "<Style id=\"yellowLineGreenPoly\">" << std::endl
|
||||
<< " <LineStyle>" << std::endl
|
||||
<< " <color>7f00ffff</color>" << std::endl
|
||||
<< " <width>1</width>" << std::endl
|
||||
<< " </LineStyle>" << std::endl
|
||||
<< "<PolyStyle>" << std::endl
|
||||
<< " <color>7f00ff00</color>" << std::endl
|
||||
<< "</PolyStyle>" << std::endl
|
||||
<< "</Style>" << std::endl
|
||||
<< "<Placemark>" << std::endl
|
||||
<< "<name>GNSS-SDR PVT</name>" << std::endl
|
||||
<< "<description>GNSS-SDR position log</description>" << std::endl
|
||||
<< "<styleUrl>#yellowLineGreenPoly</styleUrl>" << std::endl
|
||||
<< "<LineString>" << std::endl
|
||||
<< "<extrude>0</extrude>" << std::endl
|
||||
<< "<tessellate>1</tessellate>" << std::endl
|
||||
<< "<altitudeMode>absolute</altitudeMode>" << std::endl
|
||||
<< "<coordinates>" << std::endl;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Kml_Printer_gpstk::print_position(gpstk::Position position)
|
||||
{
|
||||
double latitude;
|
||||
double longitude;
|
||||
double height;
|
||||
latitude = position.geodeticLatitude();
|
||||
longitude = position.getLongitude();
|
||||
if (longitude>190)
|
||||
{
|
||||
longitude=longitude-360;
|
||||
}
|
||||
height = position.getHeight();
|
||||
|
||||
if (kml_file.is_open())
|
||||
{
|
||||
kml_file << longitude << "," << latitude << "," << height << std::endl;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Kml_Printer_gpstk::close_file()
|
||||
{
|
||||
if (kml_file.is_open())
|
||||
{
|
||||
kml_file << "</coordinates>" << std::endl
|
||||
<< "</LineString>" << std::endl
|
||||
<< "</Placemark>" << std::endl
|
||||
<< "</Document>" << std::endl
|
||||
<< "</kml>";
|
||||
kml_file.close();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Kml_Printer_gpstk::Kml_Printer_gpstk () {}
|
||||
|
||||
|
||||
|
||||
Kml_Printer_gpstk::~Kml_Printer_gpstk () {}
|
||||
|
@ -1,60 +0,0 @@
|
||||
/*!
|
||||
* \file kml_printer.h
|
||||
* \brief Interface of a class that prints PVT information to a kml file
|
||||
* for GPSTK data structures
|
||||
* \author Javier Arribas, 2012. jarribas(at)cttc.es
|
||||
*
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef GNSS_SDR_KML_PRINTER_H_
|
||||
#define GNSS_SDR_KML_PRINTER_H_
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "gpstk/Position.hpp"
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Prints PVT information to OGC KML format file (can be viewed with Google Earth)
|
||||
*
|
||||
* See http://www.opengeospatial.org/standards/kml
|
||||
*/
|
||||
class Kml_Printer_gpstk
|
||||
{
|
||||
private:
|
||||
std::ofstream kml_file;
|
||||
|
||||
public:
|
||||
bool set_headers(std::string filename);
|
||||
bool print_position(gpstk::Position position);
|
||||
bool close_file();
|
||||
Kml_Printer_gpstk();
|
||||
~Kml_Printer_gpstk();
|
||||
};
|
||||
|
||||
#endif
|
@ -4,7 +4,7 @@ Continuous Reproducibility in GNSS Signal Processing
|
||||
|
||||
This folder contains files required for the reproduction of the experiment proposed in:
|
||||
|
||||
C. Fernández-Prades, J. Vilà-Valls, J. Arribas and A. Ramos, [*Continuous Reproducibility in GNSS Signal Processing*](http://ieeexplore.ieee.org/document/8331069/), IEEE Access, accepted for publication, April 2018. DOI: 10.1109/ACCESS.2018.2822835
|
||||
C. Fernández-Prades, J. Vilà-Valls, J. Arribas and A. Ramos, [*Continuous Reproducibility in GNSS Signal Processing*](https://ieeexplore.ieee.org/document/8331069/), IEEE Access, Vol. 6, No. 1, pp. 20451-20463, April 2018. DOI: [10.1109/ACCESS.2018.2822835](https://doi.org/10.1109/ACCESS.2018.2822835)
|
||||
|
||||
The data set used in this paper is available at https://zenodo.org/record/1184601
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user