1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-24 05:53:16 +00:00

merging next

This commit is contained in:
Carles Fernandez 2017-04-22 18:31:57 +02:00
commit f4dac04285
22 changed files with 1400 additions and 250 deletions

View File

@ -271,6 +271,14 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
# Append -O2 optimization flag for Debug builds
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")
# allow 'large' files in 32 bit builds
if(UNIX)
add_definitions( -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-D_LARGE_FILES
)
endif(UNIX)
################################################################################
@ -331,7 +339,6 @@ if(OS_IS_LINUX)
endif(OS_IS_LINUX)
################################################################################
# Googletest - https://github.com/google/googletest
################################################################################
@ -508,9 +515,9 @@ if(NOT VOLK_GNSSSDR_FOUND)
set(CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
if(CMAKE_CROSSCOMPILING)
set(VOLK_GNSSSDR_COMPILER "")
else(CMAKE_CROSSCOMPILING)
if(CMAKE_CROSSCOMPILING)
set(VOLK_GNSSSDR_COMPILER "")
else(CMAKE_CROSSCOMPILING)
set(VOLK_GNSSSDR_COMPILER -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
endif(CMAKE_CROSSCOMPILING)
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_COMPILER}
@ -520,11 +527,11 @@ if(NOT VOLK_GNSSSDR_FOUND)
-DCMAKE_CXX_FLAGS=${CXX_FLAGS}
-DCMAKE_C_FLAGS=${C_FLAGS}
-DCMAKE_INCLUDE_PATH=${Boost_INCLUDE_DIR}
-DENABLE_ORC=OFF
${STRIP_VOLK_GNSSSDR_PROFILE}
${USE_THIS_PYTHON} )
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
-DENABLE_ORC=OFF
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake
-DCROSSCOMPILE_MULTILIB=TRUE )
endif(EXISTS $ENV{OECORE_TARGET_SYSROOT})
@ -672,7 +679,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure")
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
set(GLOG_CONFIGURE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/configure_with_gflags)
# Ensure that aclocal and libtool are present
if(OS_IS_LINUX)
if(EXISTS "/usr/bin/libtoolize")
@ -882,28 +889,19 @@ endif(OS_IS_LINUX)
find_package(Armadillo)
if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
message(STATUS " Armadillo has not been found.")
message(STATUS " Armadillo will be downloaded and built automatically ")
message(STATUS " Armadillo will be downloaded and built automatically")
message(STATUS " when doing 'make'. ")
if(CMAKE_VERSION VERSION_LESS 3.1)
# ExternalProject in CMake > 3.1 cannot open .xz files
set(armadillo_RELEASE 6.700.7)
set(armadillo_MD5 "8116185e1d7391eed3bf6c500f81b4d8")
set(ARMA_FILE_EXTENSION "gz")
else(CMAKE_VERSION VERSION_LESS 3.1)
set(armadillo_RELEASE 7.800.1)
set(armadillo_MD5 "e094351771c40a6e06e1a9c1ffdfc2b8")
set(ARMA_FILE_EXTENSION "xz")
endif(CMAKE_VERSION VERSION_LESS 3.1)
set(armadillo_BRANCH 7.800.x)
set(armadillo_RELEASE ${armadillo_BRANCH})
ExternalProject_Add(
armadillo-${armadillo_RELEASE}
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}
URL http://sourceforge.net/projects/arma/files/armadillo-${armadillo_RELEASE}.tar.${ARMA_FILE_EXTENSION}
DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}
URL_MD5 ${armadillo_MD5}
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS=OFF
BUILD_IN_SOURCE 1
GIT_REPOSITORY https://github.com/conradsnicta/armadillo-code.git
GIT_TAG ${armadillo_BRANCH}
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=-std=c++11
BUILD_COMMAND make
UPDATE_COMMAND ""
INSTALL_COMMAND ""
@ -911,7 +909,7 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
# Set up variables
ExternalProject_Get_Property(armadillo-${armadillo_RELEASE} binary_dir)
set(ARMADILLO_INCLUDE_DIRS ${binary_dir}/include )
set(ARMADILLO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include )
find_library(LAPACK NAMES lapack HINTS /usr/lib /usr/local/lib /usr/lib64)
if(OS_IS_MACOSX)
find_library(BLAS blas)
@ -925,10 +923,6 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
endif(NOT GFORTRAN)
set(ARMADILLO_LIBRARIES ${BLAS} ${LAPACK} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo.a)
set(LOCAL_ARMADILLO true CACHE STRING "Armadillo downloaded and built automatically" FORCE)
# Save a copy at the thirdparty folder
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo
)
set(ARMADILLO_VERSION_STRING ${armadillo_RELEASE})
else(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
set(armadillo_RELEASE ${ARMADILLO_VERSION_STRING})
@ -1180,8 +1174,17 @@ if($ENV{RTLSDR_DRIVER})
endif($ENV{RTLSDR_DRIVER})
if(ENABLE_OSMOSDR)
message(STATUS "The driver for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.) will be compiled." )
message(STATUS "You can disable it with 'cmake -DENABLE_OSMOSDR=OFF ../'" )
find_package(GrOsmoSDR)
if(GROSMOSDR_FOUND)
message(STATUS "The driver for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.) will be compiled." )
message(STATUS "You can disable it with 'cmake -DENABLE_OSMOSDR=OFF ../'" )
else(GROSMOSDR_FOUND)
if(ENABLE_PACKAGING)
message(WARNING "gr-osmosdr has not been found. Source blocks depending on it will NOT be built.")
else(ENABLE_PACKAGING)
message(FATAL_ERROR "gr-osmosdr required to build gnss-sdr with the optional OSMOSDR driver")
endif(ENABLE_PACKAGING)
endif(GROSMOSDR_FOUND)
else(ENABLE_OSMOSDR)
message(STATUS "The (optional) driver for OsmoSDR and related front-ends is not enabled." )
message(STATUS "Enable it with 'cmake -DENABLE_OSMOSDR=ON ../' to add support for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based USB dongles, etc.)" )
@ -1314,4 +1317,3 @@ add_custom_target(uninstall
# Add subdirectories (in order of deps)
########################################################################
add_subdirectory(src)

74
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at carles.fernandez@cttc.es. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

176
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,176 @@
# Contributing to GNSS-SDR
:+1::tada: Thanks for taking the time to contribute! :tada::+1:
Third-party contributions are essential for keeping GNSS-SDR
continuously improving. We simply cannot access the huge number of
platforms and myriad configurations for running GNSS-SDR. We want to
keep it as easy as possible to contribute changes that get things
working in your environment. There are a few guidelines that we need
contributors to follow so that we can have a chance of keeping on top of
things.
The following is a set of guidelines for contributing to GNSS-SDR, which
is hosted in the [GNSS-SDR Organization](https://github.com/gnss-sdr) on
GitHub. These are just guidelines, not rules. Use your best judgment,
and feel free to propose changes to this document in a [pull
request](#how-to-submit-a-pull-request).
## Code of Conduct
This project adheres to the Contributor Covenant [code of
conduct](CODE_OF_CONDUCT.md). By participating, you are expected to
uphold this code. Please report unacceptable behavior.
## Reporting an issue
Have you found a bug in the code which is not in the [list of known
bugs](https://github.com/gnss-sdr/gnss-sdr/issues)? Do you have a
suggestion for improvement? Then by all means please [submit a new
issue](https://github.com/gnss-sdr/gnss-sdr/issues/new), and do not
hesitate to comment on existing [open
issues](https://github.com/gnss-sdr/gnss-sdr/issues).
When filling a new issue, please remember to:
* **Use a clear and descriptive title** for the issue to identify the
problem.
* **Describe the exact steps which reproduce the problem** in as many
details as possible. For example, start by describing your computing
platform (Operating System and version, how did you installed GNSS-SDR
and its dependencies, what file or front-end are you using as a signal
source, etc.). You can also include the configuration file you are
using, or a dump of the terminal output you are getting. The more
information you provide, the more chances to get useful answers.
* **Please be patient**. This organization is run on a volunteer basis,
so it can take some time to the Developer Team to reach your issue.
They will do their best to fix it as soon as possible.
* If you opened an issue that is now solved, it is a good practice to
**close it**.
The list of [open issues](https://github.com/gnss-sdr/gnss-sdr/issues)
can be a good starting point and a source of ideas if you are looking to
contribute to the source code.
## Contributing to the source code
### Preliminaries
1. If you still have not done so, [create your personal account on
GitHub](https://github.com/join).
2. [Fork GNSS-SDR from
GitHub](https://github.com/gnss-sdr/gnss-sdr/fork). This will copy the
whole gnss-sdr repository to your personal account.
3. Then, go to your favourite working folder in your computer and
clone your forked repository by typing (replacing ```YOUR_USERNAME``` by
the actual username of your GitHub account):
$ git clone https://github.com/YOUR_USERNAME/gnss-sdr
4. Your forked repository https://github.com/YOUR_USERNAME/gnss-sdr
will receive the default name of `origin`. You can also add the original
gnss-sdr repository, which is usually called `upstream`:
$ cd gnss-sdr
$ git remote add upstream https://github.com/gnss-sdr/gnss-sdr.git
To verify the new upstream repository you have specified for your fork,
type `git remote -v`. You should see the URL for your fork as `origin`,
and the URL for the original repository as `upstream`:
```
$ git remote -v
origin https://github.com/YOUR_USERNAME/gnss-sdr.git (fetch)
origin https://github.com/YOUR_USERNAME/gnss-sdr.git (push)
upstream https://github.com/gnss-sdr/gnss-sdr.git (fetch)
upstream https://github.com/gnss-sdr/gnss-sdr.git (push)
```
### Start working on your contribution
Checkout the `next` branch of the git repository in order to get
synchronized with the latest development code:
```
$ git checkout next
$ git pull upstream next
```
When start working in a new improvement, please **always** branch off
from `next`. Open a new branch and start working on it:
```
$ git checkout -b my_feature
```
Now you can do changes, add files, do commits (please take a look at
[how to write good commit
messages](https://chris.beams.io/posts/git-commit/)!) and push them to
your repository:
```
$ git push origin my_feature
```
If there have been new pushes to the `next` branch of the `upstream`
repository since the last time you pulled from it, you might want to put
your commits on top of them (this is mandatory for pull requests):
```
$ git pull --rebase upstream next
```
### How to submit a pull request
When the contribution is ready, you can [submit a pull
request](https://github.com/gnss-sdr/gnss-sdr/compare/). Head to your
GitHub repository, switch to your `my_feature` branch, and click the
_**Pull Request**_ button, which will do all the work for you. Code
comparison must be always to the `next` branch.
Once a pull request is sent, the Developer Team can review the set of
changes, discuss potential modifications, and even push follow-up
commits if necessary.
Some things that will increase the chance that your pull request is
accepted:
* Avoid platform-dependent code. If your code require external
dependencies, they must be available as packages in [Debian OldStable](https://wiki.debian.org/DebianOldStable).
* Write tests.
* Follow our [coding style guide](http://gnss-sdr.org/coding-style/).
* Write a descriptive and detailed summary. Please consider that
reviewing pull requests is hard, so include as much information as
possible to make your pull request's intent clear.
For more details about Git usage, please check out [our
tutorial](http://gnss-sdr.org/docs/tutorials/using-git/).
## Contributing to the website
The content of http://gnss-sdr.org lives in a GitHub repository at
https://github.com/gnss-sdr/geniuss-place
You can fork that repository, reproduce the entire website on your
computer using [Jekyll](https://jekyllrb.com/), do changes and submit
pull requests, just as explained above. For more details, please check
out [how to contribute](http://gnss-sdr.org/contribute/).
Last but not the least, you can leave your comments on the website.
------
![GeNiuSS
contributes](http://gnss-sdr.org/assets/images/geniuss-contribute.png)
Thanks for your contribution to GNSS-SDR!

View File

@ -129,9 +129,9 @@ 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-7.800.1.tar.xz
$ tar xvfz armadillo-7.800.1.tar.xz
$ cd armadillo-7.800.1
$ wget http://sourceforge.net/projects/arma/files/armadillo-7.800.2.tar.xz
$ tar xvfz armadillo-7.800.2.tar.xz
$ cd armadillo-7.800.2
$ cmake .
$ make
$ sudo make install

258
docs/changelog Normal file
View File

@ -0,0 +1,258 @@
## [0.0.9](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.9)
DOI: https://doi.org/10.5281/zenodo.291371
This release has several improvements, addition of new features and bug fixes in many dimensions:
### Improvements in Accuracy:
- Major rewriting in the generation of pseudoranges.
- Fixed bug in Galileo E5a/I codes.
- Fixed bug in Galileo E1 correlator spacing.
- Fixed bug that was causing errors in receivers above the troposphere.
- Fixed 16-bit complex resampler.
- Improved time tracking algorithm.
- Added Bancroft's algorithm implementation for PVT initialization.
### Improvements in Availability:
- Improved numerical stability of the PVT solution. The infamous bug that was causing apparently random error peaks has finally been fixed.
### Improvements in Efficiency:
- VOLK_GNSSSDR: Added NEON,AVX and unaligned protokernels for volk_gnsssdr_32f_index_max_32 kernel.
- VOLK_GNSSSDR: Added volk_gnsssdr-config-info to the list of generated executables.
### Improvements in Flexibility:
- Added maximum number of dwells in the Tong algorithm.
### Improvements in Interoperability:
- Added six new Galileo satellites: FM7, FM10, FM11, FM12, FM13, FM14.
- The Hybrid_Observables and Hybrid_PVT implementations can now handle more types of GNSS signals.
- The RINEX printer can now print L2C and E5a observables and navigation files, including multiband configurations.
- Added RTCM 3.2 output to more receiver configurations.
### Improvements in Maintainability:
- The VOLK_GNSSSDR library can now be built with Python 3. Switched dependencies for VOLK_GNSSDR: from (old, python2.7-only) python-cheetah templates to Python3 friendly python-mako and python-six. So, Python-cheetah dependency has been dropped, and python-mako and python-six have been added.
- If suitable versions of gflags, glog, armadillo or googletest are not found in the system, they will be downloaded and built at compile time (versions 2.2.0, 0.3.4, 7.600.2 and 1.8.0, respectively).
- Fixed more than 30 defects detected by Coverity Scan.
- Added CMake Python finder and module checker.
- Deleted files related to CPack.
- Fixes, updates and improvements in the documentation.
- Improvements in CMake scripts: General code cleaning and addition of comments. Improved user information in case of failure. Improved detection of dependencies in more processor architectures (e.g. aarch64).
### Improvements in Marketability:
- Reduced time from a commit to deployment (see virtualization mechanisms in Portability).
### Improvements in Portability:
- Now GNSS-SDR can be run in virtual environments through snap packages (see https://github.com/carlesfernandez/snapcraft-sandbox) and docker images (see https://github.com/carlesfernandez/docker-gnsssdr).
- Now GNSS-SDR is adapted to cross-compiling environments for embedded devices (see https://github.com/carlesfernandez/oe-gnss-sdr-manifest).
- BLAS and LAPACK libraries are not longer mandatory on ARM devices.
### Improvements in Scalability:
- Fixed bug in acquisition with rata rates higher than 16 Msps in 4ms code periods.
### Improvements in Testability:
- Major QA source code refactoring: they has been split into src/tests/unit-tests and src/tests/system-tests folders. They are optionally built with the ENABLE_UNIT_TESTING=ON (unit testing QA code), ENABLE_UNIT_TESTING_EXTRA=ON (unit tests that require extra files downloaded at configure time), ENABLE_SYSTEM_TESTING=ON (system tests, such as measurement of Time-To-First-Fix) and ENABLE_SYSTEM_TESTING_EXTRA=ON (extra system test requiring external tools, automatically downloaded and built at building time) configuration flags. The EXTRA options also download and build a custom software-defined signal generator and version 2.9 of GPSTk, if not already found on the system. Download and local link of version 2.9 can be forced by ENABLE_OWN_GPSTK=ON building configuration flag. Only ENABLE_UNIT_TESTING is set to ON by default.
- Unit tests added: CPU_multicorrelator_test and GPU_multicorrelator_test measure computer performance in multicorrelator setups.
- Unit tests added: GpsL1CADllPllTracking and GpsL1CATelemetryDecoderTest.
- System test added: ttff_gps_l1 performs a set of cold / assisted runs of the software receiver and computes statistics about the obtained Time To First Fix.
- System test added: obs_gps_l1_system_test uses an external software-defined signal generator to produce raw digital GNSS signal from a RINEX navigation file and a position (static or dynamic), processes it with GNSS-SDR, and then compares the RINEX observation file produced by the software receiver to that produced by the signal generator.
- Software Development Kit provided for embedded devices (see http://gnss-sdr.org/docs/tutorials/cross-compiling/).
### Improvements in Usability:
- Now the block factory automatically detects Channel input data type, so it is no longer required to specify Channel.input_type in the configuration. An error raises if Acquisition and Tracking Blocks are not configured with the same input data type.
- Block names changed from L2_M to L2C.
- Documentation available at http://gnss-sdr.org/docs/
- Improved tools for compilation, execution and testing in embedded devices.
See the definitions of concepts and metrics at http://gnss-sdr.org/design-forces/
## [0.0.8](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.8)
DOI: https://doi.org/10.5281/zenodo.57022
This is a maintenance and bug fix release with no relevant new features with respect to v0.0.7. The main changes are:
- Fixed a bug that broke building when using latest VOLK release
- Updated PYBOMBS instructions
- Added Tests for FFT length
- Added Tests for CUDA-based tracking
- Added Tests for SIMD-based tracking
- Improved CUDA-based correlation.
- Updated documentation
- Fixed building in mips and powerpc architectures.
- gr-gn3s and gr-dbfcttc moved to its own repository.
- Improved package reproducibility
- VOLK_GNSSSDR: Fixed a bug in AVX2 puppet
- VOLK_GNSSSDR: can now be built using the C98 standard
- VOLK_GNSSSDR: Fixed a bug that broke building when linking to Boost in some configurations.
- VOLK_GNSSSDR: Added an option to trigger profiling at building time.
- VOLK_GNSSSDR: Fix the CMake-based check for posix_memalign.
## [0.0.7](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.7)
DOI: https://doi.org/10.5281/zenodo.51521
This release has several improvements, addition of new features and bug fixes:
- Improvements in receiver design: Internal block communication has been redesigned to accommodate the addition of new signals, and now upstream and downstream communication within blocks is implemented through the GNU Radio blocks asynchronous message passing system, leading to a more scalable, more robust and cleaner design.
- Improvements in receiver design: Correlators have been rewritten to take full advantage of VOLK and VOLK_GNSSSDR, and they are of general use for any tracking block. Their API now admit an arbitrary number of correlators, spaced in an arbitrary manner, in 16ic and 32fc versions.
- Improvements in receiver design: Block adapters are now all managed by smart pointers, ensuring better memory management.
- Improvements in processing speed: The VOLK_GNSSSDR library has been rewritten, following current VOLK standards and adding a number of new kernels. This approach addresses both efficiency and portability. Now the library provides the key kernels for GNSS signal processing in 16ic and 32fc versions, including SSE2, SSE3, SSE4.1, AVX, AV2 and NEON implementations. Please execute volk_gnsssdr_profile and volk_profile to use the fastest implementation for your host machine.
- New source block: Two_Bit_Packed_File_Signal_Source. This block takes 2 bit samples that have been packed into bytes or shorts as input and generates a byte for each sample.
- Fixes in SUPL assistance (supl.nokia.com removed).
- Improvements in acquisition: Added a non CFAR PCPS acquisition algorithm based on the estimation of the post correlation noise floor. If enabled as an option in the acquisition configuration, it allows setting more stable thresholds in the presence of non-gaussian front-end noise (which is the usual behavior of front-ends.)
- Fixes in acquisition: Fixed mismatch between the config files and the acquisition code in the specification of the IF. Fixed a bug in the length of the FFT of local codes.
- Improvements in tracking sensitivity: Added configuration option to customize the extension of the GPS L1 CA correlation length after bit synchronization (options are: [1,2,4,5,10,20] ms). Only available in the GPS_L1_CA_DLL_PLL_C_Aid_Tracking implementation.
- New tracking block introduced: GPS_L1_CA_DLL_PLL_C_Aid_Tracking is a GPS L1 C/A carrier PLL and code DLL with optional carrier-aid feedback. It is available in both 32 bits gr_complex input samples and in 16 bits short int complex samples. The gr_complex version has also the capability to extend the coherent correlation period from 1ms to 20ms using telemetry symbol synchronization.
- Increased resolution in CN0 estimator internal variables.
- Fixed a bug in computation of GPS L1 C/A carrier phase observable.
- Fixed a bug in the internal state machine that was blocking the receiver after a few hours of usage. Now the receiver can work continually (tested for more than one week, no known limit).
- New tracking block introduced: GPS_L1_CA_DLL_PLL_Tracking_GPU is a GPS L1 C/A carrier PLL and code DLL that uses the CUDA-compatible GPU to compute carrier wipe off and correlation operations, alleviating the CPU load.
- Obsolete/buggy blocks removed: GPS_L1_CA_DLL_FLL_PLL_Tracking, GPS_L1_CA_DLL_PLL_Optim_Tracking.
- Added a RTCM printer and TCP server in PVT blocks (still experimental). The receiver is now able to stream data in real time, serving RTCM 3.2 messages to multiple clients. For instance, it can act as a Ntrip Source feeding a Ntrip Server, or to be used as data input in RTKLIB, obtaining Precise Point Positioning fixes in real-time. The TCP port, Station ID, and rate of MT1019/MT1045 and MSM can be configured. GPS_L1_CA_PVT serves MT1019 (GPS Ephemeris) and MSM7 (MT1077, full GPS pseudoranges, phase ranges, phase range rates and CNR - high resolution) messages, while GALILEO_E1_PVT serves MT1045 (Galileo ephemeris) and MSM7 (MT1097, full Galileo pseudoranges, phase ranges, phase range rates and CNR - high resolution).
- Added a GeoJSON printer. Basic (least-squares) position fixes can be now also stored in this format, in addition to KML.
- Obsolete block removed: output filter.
- QA code migrated to the new asynchronous message passing system.
- Improvements in documentation: update of README.md file, addition of documentation for the VOLK_GNSSSDR library, updated links to new ICDs.
- Improvements in documentation: Satellite identification updated to current constellation status.
- Updated and cleaner console output. Now Galileo satellites have the E identifier in their PRN number.
- Several improvements in CMake scripts allow to build GNSS-SDR in Linux Debian (Jessie, Stretch and Sid), Ubuntu (from 12.04 to 16.04), including amd64, i386, armhf and arm64 architectures, and possibly in other GNU/Linux distributions, as well as in Mac OS X 10.9 to 10.11. It also works well with CMake 3.5 (some problems solved with VOLK_GNSSSDR as a sub-project).
- The software can link either against OpenSSL or against GnuTLS with openssl extensions, whatever it is available. This allows buildings in distributions such as Fedora or ArchLinux, while being compatible with binary distribution through Debian packages.
- Fixed a number of defects detected by Coverity Scan.
- Some fixes required by Debian licensing and packaging system.
- Added a CGRAN (http://www.cgran.org/) manifest
- Lots of code cleaning and fixes of typos and small bugs.
## [0.0.6](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.6)
This release has several improvements and bug fixes:
- Added initial support to multi-band, multi-source configurations (multiple signal sources and signal conditioners).
- Updated configuration files to new notation. Old and new configuration notations still compatible.
- Added skeleton for mixed (multi-frequency and multi-system) observables block.
- Faster local carrier update (25% of improvement).
- Added initial support to GPS L2C real time tracking and decoding of CNAV message with NSL STEREO v2, Fraunhofers Flexiband, and USRPx front-ends (the latter requiring external clock).
- Added initial support to select the frontend clock reference source in UHD signal source (i.e. internal or external clock reference).
- Added 2 bits complex file source for GNSS-SDR GSoC 2015 signal sampler designed by Ajith Peter.
- Added a new rtl_tcp signal source, remote access to RTL2832U-based dongles via TCP.
- Always build front-end-cal, a calibration tool for some DVB-T receivers based on the Realtek's RTL2832U chipset.
- Fixed bug in UTC time computation for GPS signals.
- Updated satellite identification for GPS and Galileo.
- Defined cbyte as a new input data type (std::complex<unsigned char>)
- Adding a new data_type_adapter, from interleaved short to std::complex<short>
- Adding a filter for complex short streams.
- Adding a fir_filter for std::complex<signed char> (aka cbyte). It converts the data type to floats, filters, and converts back to cbyte.
- Added a resampler for cbytes and cshorts.
- First working version of a GPS tracking block implementation using CUDA with multi-GPU device support.
- Updating RINEX obs header when leap second is available.
- Updating RINEX nav file when IONO and UTC data are available.
- Include Signal Strength Indicator in RINEX observable files.
- Tests fixed.
- Fixed more than 200 code defects detected by Coverity Scan.
- Updated documentation.
- Updated documentation and CMake scripts for the GN3S v2 driver (Linux-only)
- Armadillo version automatically downloaded and built if it is not present in the system is now 5.400.3.
- Updated old links from googlecode to new links at GitHub for Google Test, gflags, glog and gperftools.
- gfortran is no longer a required package, but it is used if available.
- Added an option to remove logging.
- Enabled cross-compilation for ARM devices.
- Lots of code cleaning.
## [0.0.5](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.5)
This release has several improvements and bug fixes:
- Now GNSS-SDR can be installed on the system with the usual cmake ../ && make && sudo make install.
- Added volk_gnsssdr library, a volk-like library implementing some specific kernels and ensuring portable executables. It comes with a volk_gnsssdr_profile executable, in the fashion of volk_profile. Volk and volk_gnsssdr are compatible and can be mixed together. This is expected to enable faster execution of the software receiver in upcoming versions.
- The former rtlsdr_signal_source has been replaced by a more general osmosdr_signal_source compatible with all those front-ends accessible by the OsmoSDR driver (bladeRF, hackRF, etc.) in addition to RTL-based dongles.
- Added manpages when binaries gnss-sdr, volk_gnsssdr_profile and front-end-cal are installed.
- Now GNSS-SDR can be build on i386, amd64, armhf, armel and arm64 architectures.
- Now GNSS-SDR builds on Ubuntu 14.04 and 14.10, Debian jessie/sid and Mac OS X 10.9 and 10.10.
- Improved detection of dependencies, specially when installed as .deb packages.
- Added a check' target with some minimal tests.
- Added support for interleaved I/Q byte-size sample files.
- Minor bug fixes, updated documentation and code cleaning.
## [0.0.4](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.4)
This release has several improvements and bug fixes:
- Added hybrid processing GPS L1 C/A and Galileo E1B, providing position fixes make use of observables for both constellations.
- Added implementations of the QuickSync algorithm for GPS L1 C/A and Galileo E1 acquisition.
- Added processing blocks for Galileo E5a: Acquisition, Tracking, Telemetry_Decoder (experimental)
- New configuration files allow to configure GPS and Galileo channels in the same receiver.
- Added tropospheric corrections to GPS and Galileo PVT solution.
- Improved precision obtained by changing some variables from float to double.
- New building options: ENABLE_GN3S, ENABLE_RTLSDR and ENABLE_ARRAY and ENABLE_OPENCL.
- Improved documentation on how to enable optional drivers.
- Fixed bug in memory alignment that caused problems with high data rates.
- Added ENABLE_GENERIC_ARCH, an option to build the binary without detecting the SIMD instruction set present in the compiling machine, so it can be executed in other machines without those specific sets.
- Added ENABLE_GPERFTOOLS, which links the executable to tcmalloc and profiler if Gperftools is available on the system.
- Added carrier phase, Doppler shift and signal strength observables to the RINEX files. Static PPP solutions are available for GPS with RTKLIB via RINEX files.
- The executable now produces RINEX files version 3.02 of Galileo Observables, Navigation data, and mixed (GPS/Galileo) observables and nav data. RINEX 3.02 is the default version of RINEX files.
- Armadillo version updated to 4.400.2
- Armadillo now uses OpenBLAS instead of BLAS if the former is available on the system.
- Some raw pointers have been changed to smart pointers.
- Minor bug fixes and code cleaning.
## [0.0.3](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.3)
This release has several improvements and bug fixes, completing the transition from Subversion to Git. The main changes are:
- Created some missing directories lost in the SVN to Git transition.
- New C++11-ized block factory, flow graph and tests, resulting in better memory management and fewer segmentation faults. Several raw pointers converted to smart pointers.
- Reorganization of assistance data input and output.
- Fixed memory leak when talking to SUPL servers.
- Improved retrieval of assistance data.
- Fixing an error in a constant value related to Galileo.
- Inform users if the temporal folder is not /tmp.
- Fixes and additions to the documentation.
- README in markdown language so it looks better in Git repositories.
- Fixed a bug that prevented the update of all shared map structures (ephemeris, iono parameters, etc…).
- The configuration script now throws error if GCC is older than 4.7 or Boost is older than 1.45
- Improved detection / downloading & building if missing of Gflags and Glog.
- Improved detection / downloading & building if missing of Armadillo and related dependencies.
- Fixes many warnings that appeared when using CMake 3.0.
- Improved detection of GTEST_DIR variable.
- Include header files in libraries so IDEs such as Xcode can display them.
Enjoy it!

View File

@ -76,6 +76,14 @@ if(MSVC)
add_compile_options(/wo4838)
endif(MSVC)
# allow 'large' files in 32 bit builds
if(UNIX)
add_definitions( -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-D_LARGE_FILES
)
endif(UNIX)
########################################################################
# Dependencies setup
########################################################################

View File

@ -1,26 +1,56 @@
# Welcome to VOLK_GNSSSDR, the Vector-Optimized Library of Kernels for GNSS-SDR
VOLK_GNSSSDR is a sub-project of GNSS-SDR. This library provides a set of extra kernels that can be used stand-alone or in combination with VOLK's. Please see http://libvolk.org for documentation, source code, and contact information about the original VOLK library.
VOLK_GNSSSDR is a sub-project of GNSS-SDR. This library provides a set
of extra kernels that can be used stand-alone or in combination with
VOLK's. Please see http://libvolk.org for documentation, source code,
and contact information about the original VOLK library.
The boilerplate of this code was initially generated with ```volk_modtool```, an application provided by VOLK that creates the skeleton than can then be filled with custom kernels. Some modifications were added to accomodate the specificities of Global Navigation Satellite Systems (GNSS) signal processing. Those changes are clearly indicated in the source code, and do not break compatibility.
The boilerplate of this code was initially generated with
```volk_modtool```, an application provided by VOLK that creates the
skeleton than can then be filled with custom kernels. Some modifications
were added to accomodate the specificities of Global Navigation
Satellite Systems (GNSS) signal processing. Those changes are clearly
indicated in the source code, and do not break compatibility.
This library contains kernels of hand-written SIMD code for different mathematical operations, mainly with 8-bit and 16-bit real and complex data types, offering a platform/architecture agnostic version that will run in all machines, plus other versions for different SIMD instruction sets. Then, the application ```volk_gnsssdr_profile``` runs some iterations of all versions that your machine can execute and annotates which is the fastest, which will then be selected at runtime when executing GNSS-SDR. In this way, we can address at the same time portability (by creating executables that will run in nearly all processor architectures) and efficiency (by providing custom implementations specially designed to take advantage of the specific processor that is running the code).
This library contains kernels of hand-written SIMD code for different
mathematical operations, mainly with 8-bit and 16-bit real and complex
data types, offering a platform/architecture agnostic version that will
run in all machines, plus other versions for different SIMD instruction
sets. Then, the application ```volk_gnsssdr_profile``` runs some
iterations of all versions that your machine can execute and annotates
which is the fastest, which will then be selected at runtime when
executing GNSS-SDR. In this way, we can address at the same time
[portability](http://gnss-sdr.org/design-forces/portability/) (by
creating executables that will run in nearly all processor
architectures) and
[efficiency](http://gnss-sdr.org/design-forces/efficiency/) (by
providing custom implementations specially designed to take advantage of
the specific processor that is running the code).
These kernels have some specific features (e.g. saturation arithmetics) that are aimed to GNSS signal processing, but could make them not suitable for its general use in other applications. Check out the documentation generated by Doxygen and the *generic* (that is, plain C) implementation to see what each kernel is actually doing.
These kernels have some specific features (e.g. saturation arithmetics)
that are aimed to GNSS signal processing, but could make them not
suitable for its general use in other applications. Check out the
documentation generated by Doxygen and the *generic* (that is, plain C)
implementation to see what each kernel is actually doing.
## How to use VOLK_GNSSSDR:
This library is automatically built and installed along with GNSS-SDR if it is not found by CMake on your system at configure time.
This library is automatically built and installed along with GNSS-SDR if
it is not found by CMake on your system at configure time.
However, you can install and use VOLK_GNSSSDR kernels as you use VOLK's, independently from GNSS-SDR.
However, you can install and use VOLK_GNSSSDR kernels as you use VOLK's,
independently from GNSS-SDR.
First, make sure that the required dependencies are installed in you machine:
First, make sure that the required dependencies are installed in your
machine:
~~~~~~
$ sudo apt-get install git cmake python-mako python-six libboost-dev libbbost-filesystem
$ sudo apt-get install cmake python-mako python-six libboost-dev \
libboost-filesystem-dev libboost-system-dev libboost-program-options-dev
~~~~~~
In order to build and install the library, go to the base folder of the source code and do:
In order to build and install the library, go to the base folder of the
source code and do:
~~~~~~
$ mkdir build
@ -32,15 +62,20 @@ $ sudo make install
That's it!
Before its first use, please execute ```volk_gnsssdr_profile``` to let your system know which is the fastest available implementation. This only has to be done once:
Before its first use, please execute ```volk_gnsssdr_profile``` to let
your system know which is the fastest available implementation. This
only has to be done once:
~~~~~~
$ volk_gnsssdr_profile
~~~~~~
From now on, GNSS-SDR (and any other program of your own that makes use of VOLK_GNSSSDR) will benefit from the acceleration provided by SIMD instructions available in your processor.
From now on, GNSS-SDR (and any other program of your own that makes use
of VOLK_GNSSSDR) will benefit from the acceleration provided by SIMD
instructions available in your processor.
The execution of ```volk_gnsssdr_profile``` can be set automatically after building, leaving your system ready to use:
The execution of ```volk_gnsssdr_profile``` can be set automatically
after building, leaving your system ready to use:
~~~~~~
$ cmake -DENABLE_PROFILING=ON ../
@ -49,22 +84,35 @@ $ sudo make install
~~~~~~
This figure shows the role of some VOLK_GNSSSDR kernels in the context of a GNSS baseband processor:
This figure shows the role of some VOLK_GNSSSDR kernels in the context
of a GNSS baseband processor:
![Example of VOLK_GNSSSDR usage.](./docs/images/VOLK_GNSSSDR_Usage_Example.png)
![Example of VOLK_GNSSSDR
usage.](./docs/images/VOLK_GNSSSDR_Usage_Example.png)
If you use VOLK_GNSSSDR in your research and/or software, please cite the following paper:
If you use VOLK_GNSSSDR in your research and/or software, please cite
the following paper:
* C. Fern&aacute;ndez-Prades, J. Arribas, P. Closas, [*Accelerating GNSS Software Receivers*](https://zenodo.org/record/266493), in Proc. of the ION GNSS+ 2016 Conference, pp. 44-61, Portland, Oregon, Sept. 12-16, 2016.
* C. Fernández-Prades, J. Arribas, P. Closas, [*Accelerating
GNSS Software Receivers*](https://zenodo.org/record/266493), in Proc. of
the ION GNSS+ 2016 Conference, pp. 44-61, Portland, Oregon, Sept. 12-16, 2016.
Citations are useful for the continued development and maintenance of the library.
Citations are useful for the continued development and maintenance of
the library.
___
VOLK_GNSSSDR was originally created by Andres Cecilia Luque in the framework of the [Summer Of Code In Space (SOCIS 2014)](http://sophia.estec.esa.int/socis2014/?q=about "SOCIS 2014 webpage") program organized by the European Space Agency, and then evolved and maintained by Carles Fern&aacute;ndez-Prades and Javier Arribas. This software is released under the GNU General Public License version 3, see the file COPYING.
VOLK_GNSSSDR was originally created by Andres Cecilia Luque in the
framework of the [Summer Of Code In Space (SOCIS
2014)](http://sophia.estec.esa.int/socis2014/?q=about "SOCIS 2014
webpage") program organized by the European Space Agency, and then
evolved and maintained by Carles Fernández-Prades and Javier
Arribas. This software is released under the GNU General Public License
version 3, see the file COPYING.
This project is managed by [Centre Tecnologic de Telecomunicacions de Catalunya](http://www.cttc.es "CTTC webpage").
This project is managed by [Centre Tecnologic de Telecomunicacions de
Catalunya](http://www.cttc.es "CTTC webpage").

View File

@ -101,8 +101,8 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_a_sse2(lv_16sc_t* out, con
realcacc = _mm_setzero_si128();
imagcacc = _mm_setzero_si128();
mask_imag = _mm_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
for(number = 0; number < sse_iters; number++)
{
@ -179,8 +179,8 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_u_sse2(lv_16sc_t* out, con
realcacc = _mm_setzero_si128();
imagcacc = _mm_setzero_si128();
mask_imag = _mm_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
for(number = 0; number < sse_iters; number++)
{
@ -258,8 +258,8 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_u_axv2(lv_16sc_t* out, con
realcacc = _mm256_setzero_si256();
imagcacc = _mm256_setzero_si256();
mask_imag = _mm256_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm256_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm256_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm256_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
for(number = 0; number < avx_iters; number++)
{
@ -335,8 +335,8 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_a_axv2(lv_16sc_t* out, con
realcacc = _mm256_setzero_si256();
imagcacc = _mm256_setzero_si256();
mask_imag = _mm256_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm256_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm256_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm256_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
for(number = 0; number < avx_iters; number++)
{

View File

@ -138,8 +138,8 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_a_sse2(lv_16sc_t* resul
__m128i a, b, c, c_sr, mask_imag, mask_real, real, imag;
mask_imag = _mm_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
for(index = 0; index < sse_iters; index++)
{
@ -232,8 +232,8 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_u_sse2(lv_16sc_t* resul
__m128i a, b, c, c_sr, mask_imag, mask_real, real, imag;
mask_imag = _mm_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
for(index = 0; index < sse_iters; index++)
{
@ -326,8 +326,8 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_a_avx2(lv_16sc_t* resul
__m256i a, b, c, c_sr, mask_imag, mask_real, real, imag;
mask_imag = _mm256_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm256_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm256_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm256_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
for(index = 0; index < sse_iters; index++)
{
@ -420,8 +420,8 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_u_avx2(lv_16sc_t* resul
__m256i a, b, c, c_sr, mask_imag, mask_real, real, imag;
mask_imag = _mm256_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm256_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm256_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm256_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
for(index = 0; index < sse_iters; index++)
{

View File

@ -85,8 +85,8 @@ static inline void volk_gnsssdr_16ic_x2_multiply_16ic_a_sse2(lv_16sc_t* out, con
unsigned int number;
__m128i a, b, c, c_sr, mask_imag, mask_real, real, imag, imag1, imag2, b_sl, a_sl, result;
mask_imag = _mm_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
const lv_16sc_t* _in_a = in_a;
const lv_16sc_t* _in_b = in_b;
@ -139,8 +139,8 @@ static inline void volk_gnsssdr_16ic_x2_multiply_16ic_u_sse2(lv_16sc_t* out, con
unsigned int number;
__m128i a, b, c, c_sr, mask_imag, mask_real, real, imag, imag1,imag2, b_sl, a_sl, result;
mask_imag = _mm_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
const lv_16sc_t* _in_a = in_a;
const lv_16sc_t* _in_b = in_b;
@ -198,8 +198,8 @@ static inline void volk_gnsssdr_16ic_x2_multiply_16ic_u_avx2(lv_16sc_t* out, con
__m256i a, b, c, c_sr, real, imag, imag1, imag2, b_sl, a_sl, result;
const __m256i mask_imag = _mm256_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
const __m256i mask_real = _mm256_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
const __m256i mask_imag = _mm256_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
const __m256i mask_real = _mm256_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
for(;number < avx2_points; number++)
{
@ -252,8 +252,8 @@ static inline void volk_gnsssdr_16ic_x2_multiply_16ic_a_avx2(lv_16sc_t* out, con
__m256i a, b, c, c_sr, real, imag, imag1, imag2, b_sl, a_sl, result;
const __m256i mask_imag = _mm256_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
const __m256i mask_real = _mm256_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
const __m256i mask_imag = _mm256_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
const __m256i mask_real = _mm256_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
for(;number < avx2_points; number++)
{

View File

@ -205,8 +205,8 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_a_sse3(lv_16sc_
__m128i a, b, c, c_sr, mask_imag, mask_real, real, imag, imag1, imag2, b_sl, a_sl;
mask_imag = _mm_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
// phase rotation registers
__m128 pa, pb, two_phase_acc_reg, two_phase_inc_reg;
@ -383,8 +383,8 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_a_sse3_reload(l
__m128i a, b, c, c_sr, mask_imag, mask_real, real, imag, imag1, imag2, b_sl, a_sl;
mask_imag = _mm_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
// phase rotation registers
__m128 pa, pb, two_phase_acc_reg, two_phase_inc_reg;
@ -629,8 +629,8 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_u_sse3(lv_16sc_
__m128i a, b, c, c_sr, mask_imag, mask_real, real, imag, imag1, imag2, b_sl, a_sl;
mask_imag = _mm_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
mask_real = _mm_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
mask_imag = _mm_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
mask_real = _mm_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
// phase rotation registers
__m128 pa, pb, two_phase_acc_reg, two_phase_inc_reg;
@ -794,8 +794,8 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_a_avx2(lv_16sc_
imagcacc[n_vec] = _mm256_setzero_si256();
}
const __m256i mask_imag = _mm256_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
const __m256i mask_real = _mm256_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
const __m256i mask_imag = _mm256_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
const __m256i mask_real = _mm256_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
__m128 a, b, two_phase_acc_reg, two_phase_inc_reg;
__m128i c1, c2, result1, result2;
@ -1002,8 +1002,8 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_a_avx2_reload(l
imagcacc[n_vec] = _mm256_setzero_si256();
}
const __m256i mask_imag = _mm256_set_epi8(255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0);
const __m256i mask_real = _mm256_set_epi8(0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255);
const __m256i mask_imag = _mm256_set_epi8(0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0);
const __m256i mask_real = _mm256_set_epi8(0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF, 0, 0, 0xFF, 0xFF);
__m128 a, b, two_phase_acc_reg, two_phase_inc_reg;
__m128i c1, c2, result1, result2;

View File

@ -71,7 +71,7 @@ static inline void volk_gnsssdr_8ic_conjugate_8ic_u_avx(lv_8sc_t* cVector, const
__m256 tmp;
__m128i tmp128lo, tmp128hi;
__m256 conjugator1 = _mm256_castsi256_ps(_mm256_setr_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255));
__m256 conjugator1 = _mm256_castsi256_ps(_mm256_setr_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF));
__m128i conjugator2 = _mm_setr_epi8(0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1);
for (i = 0; i < sse_iters; ++i)
@ -140,7 +140,7 @@ static inline void volk_gnsssdr_8ic_conjugate_8ic_u_sse3(lv_8sc_t* cVector, cons
const lv_8sc_t* a = aVector;
__m128i tmp;
__m128i conjugator1 = _mm_setr_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
__m128i conjugator1 = _mm_setr_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
__m128i conjugator2 = _mm_setr_epi8(0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1);
for (i = 0; i < sse_iters; ++i)
@ -190,7 +190,7 @@ static inline void volk_gnsssdr_8ic_conjugate_8ic_a_avx(lv_8sc_t* cVector, const
__m256 tmp;
__m128i tmp128lo, tmp128hi;
__m256 conjugator1 = _mm256_castsi256_ps(_mm256_setr_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255));
__m256 conjugator1 = _mm256_castsi256_ps(_mm256_setr_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF));
__m128i conjugator2 = _mm_setr_epi8(0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1);
for (i = 0; i < sse_iters; ++i)
@ -257,7 +257,7 @@ static inline void volk_gnsssdr_8ic_conjugate_8ic_a_sse3(lv_8sc_t* cVector, cons
const lv_8sc_t* a = aVector;
__m128i tmp;
__m128i conjugator1 = _mm_setr_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
__m128i conjugator1 = _mm_setr_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
__m128i conjugator2 = _mm_setr_epi8(0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1);
for (i = 0; i < sse_iters; ++i)

View File

@ -73,7 +73,7 @@ static inline void volk_gnsssdr_8ic_s8ic_multiply_8ic_u_sse3(lv_8sc_t* cVector,
lv_8sc_t* c = cVector;
const lv_8sc_t* a = aVector;
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
y = _mm_set1_epi16(*(short*)&scalar);
imagy = _mm_srli_si128(y, 1);
@ -166,7 +166,7 @@ static inline void volk_gnsssdr_8ic_s8ic_multiply_8ic_a_sse3(lv_8sc_t* cVector,
lv_8sc_t* c = cVector;
const lv_8sc_t* a = aVector;
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
y = _mm_set1_epi16(*(short*)&scalar);
imagy = _mm_srli_si128(y, 1);

View File

@ -127,7 +127,7 @@ static inline void volk_gnsssdr_8ic_x2_dot_prod_8ic_u_sse2(lv_8sc_t* result, con
{
__m128i x, y, mult1, realx, imagx, realy, imagy, realx_mult_realy, imagx_mult_imagy, realx_mult_imagy, imagx_mult_realy, realc, imagc, totalc, realcacc, imagcacc;
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
realcacc = _mm_setzero_si128();
imagcacc = _mm_setzero_si128();
@ -204,7 +204,7 @@ static inline void volk_gnsssdr_8ic_x2_dot_prod_8ic_u_sse4_1(lv_8sc_t* result, c
{
__m128i x, y, mult1, realx, imagx, realy, imagy, realx_mult_realy, imagx_mult_imagy, realx_mult_imagy, imagx_mult_realy, realc, imagc, totalc, realcacc, imagcacc;
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
realcacc = _mm_setzero_si128();
imagcacc = _mm_setzero_si128();
@ -279,7 +279,7 @@ static inline void volk_gnsssdr_8ic_x2_dot_prod_8ic_a_sse2(lv_8sc_t* result, con
{
__m128i x, y, mult1, realx, imagx, realy, imagy, realx_mult_realy, imagx_mult_imagy, realx_mult_imagy, imagx_mult_realy, realc, imagc, totalc, realcacc, imagcacc;
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
realcacc = _mm_setzero_si128();
imagcacc = _mm_setzero_si128();
@ -355,7 +355,7 @@ static inline void volk_gnsssdr_8ic_x2_dot_prod_8ic_a_sse4_1(lv_8sc_t* result, c
{
__m128i x, y, mult1, realx, imagx, realy, imagy, realx_mult_realy, imagx_mult_imagy, realx_mult_imagy, imagx_mult_realy, realc, imagc, totalc, realcacc, imagcacc;
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
realcacc = _mm_setzero_si128();
imagcacc = _mm_setzero_si128();

View File

@ -73,7 +73,7 @@ static inline void volk_gnsssdr_8ic_x2_multiply_8ic_u_sse2(lv_8sc_t* cVector, co
const lv_8sc_t* a = aVector;
const lv_8sc_t* b = bVector;
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
for(number = 0; number < sse_iters; number++)
{
@ -131,7 +131,7 @@ static inline void volk_gnsssdr_8ic_x2_multiply_8ic_u_sse4_1(lv_8sc_t* cVector,
const lv_8sc_t* b = bVector;
_mm_setzero_si128();
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
for(number = 0; number < sse_iters; number++)
{
@ -202,7 +202,7 @@ static inline void volk_gnsssdr_8ic_x2_multiply_8ic_a_sse2(lv_8sc_t* cVector, co
const lv_8sc_t* a = aVector;
const lv_8sc_t* b = bVector;
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
for(number = 0; number < sse_iters; number++)
{
@ -260,7 +260,7 @@ static inline void volk_gnsssdr_8ic_x2_multiply_8ic_a_sse4_1(lv_8sc_t* cVector,
const lv_8sc_t* b = bVector;
_mm_setzero_si128();
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
for(number = 0; number < sse_iters; number++)
{

View File

@ -78,7 +78,7 @@ static inline void volk_gnsssdr_8u_x2_multiply_8u_u_sse3(unsigned char* cChar, c
x = _mm_lddqu_si128((__m128i*)a);
y = _mm_lddqu_si128((__m128i*)b);
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
x1 = _mm_srli_si128(x, 1);
x1 = _mm_and_si128(x1, mult1);
x2 = _mm_and_si128(x, mult1);
@ -144,7 +144,7 @@ static inline void volk_gnsssdr_8u_x2_multiply_8u_a_sse3(unsigned char* cChar, c
x = _mm_load_si128((__m128i*)a);
y = _mm_load_si128((__m128i*)b);
mult1 = _mm_set_epi8(0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255);
mult1 = _mm_set_epi8(0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF);
x1 = _mm_srli_si128(x, 1);
x1 = _mm_and_si128(x1, mult1);
x2 = _mm_and_si128(x, mult1);

View File

@ -16,6 +16,9 @@
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
#
file(GLOB SIGNAL_SOURCE_ADAPTER_HEADERS "*.h")
list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
# Optional drivers
if(ENABLE_GN3S)
@ -72,26 +75,29 @@ if(ENABLE_OSMOSDR)
################################################################################
# OsmoSDR - http://sdr.osmocom.org/trac/
################################################################################
find_package(GrOsmoSDR REQUIRED)
if(NOT GROSMOSDR_FOUND)
message(FATAL_ERROR "gr-osmosdr required to build gnss-sdr with the optional OSMOSDR driver")
if(ENABLE_PACKAGING)
list(REMOVE_ITEM SIGNAL_SOURCE_ADAPTER_HEADERS ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters/osmosdr_signal_source.h)
endif(ENABLE_PACKAGING)
else(NOT GROSMOSDR_FOUND)
# set OSMO include dirs
set(OSMO_DRIVER_INCLUDE_DIRS
${OPT_DRIVER_INCLUDE_DIRS}
${GROSMOSDR_INCLUDE_DIR}/osmosdr
)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} osmosdr_signal_source.cc)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GROSMOSDR_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${OSMO_DRIVER_INCLUDE_DIRS})
endif(NOT GROSMOSDR_FOUND)
# set OSMO include dirs
set(OSMO_DRIVER_INCLUDE_DIRS
${OPT_DRIVER_INCLUDE_DIRS}
${GROSMOSDR_INCLUDE_DIR}/osmosdr
)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} osmosdr_signal_source.cc)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GROSMOSDR_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${OSMO_DRIVER_INCLUDE_DIRS})
endif(ENABLE_OSMOSDR)
if(ENABLE_UHD)
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} uhd_signal_source.cc)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${UHD_LIBRARIES} ${GNURADIO_UHD_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${UHD_INCLUDE_DIRS})
endif(ENABLE_UHD)
else(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
list(REMOVE_ITEM SIGNAL_SOURCE_ADAPTER_HEADERS ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters/uhd_signal_source.h)
endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
set(SIGNAL_SOURCE_ADAPTER_SOURCES file_signal_source.cc
@ -129,8 +135,6 @@ endif(ARCH_64BITS)
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
file(GLOB SIGNAL_SOURCE_ADAPTER_HEADERS "*.h")
list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
add_library(signal_source_adapters ${SIGNAL_SOURCE_ADAPTER_SOURCES} ${SIGNAL_SOURCE_ADAPTER_HEADERS})
source_group(Headers FILES ${SIGNAL_SOURCE_ADAPTER_HEADERS})
target_link_libraries(signal_source_adapters signal_source_gr_blocks
@ -140,4 +144,3 @@ target_link_libraries(signal_source_adapters signal_source_gr_blocks
${OPT_LIBRARIES}
gnss_sp_libs
)

View File

@ -80,7 +80,7 @@ include_directories(
${OPT_RECEIVER_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
if(Boost_VERSION LESS 105000)
add_definitions(-DOLD_BOOST=1)
endif(Boost_VERSION LESS 105000)
@ -102,12 +102,14 @@ if(ENABLE_FLEXIBAND)
endif(ENABLE_FLEXIBAND)
if(ENABLE_OSMOSDR)
add_definitions(-DOSMOSDR_DRIVER=1)
if(GROSMOSDR_FOUND)
add_definitions(-DOSMOSDR_DRIVER=1)
endif(GROSMOSDR_FOUND)
endif(ENABLE_OSMOSDR)
if(ENABLE_UHD)
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
add_definitions(-DUHD_DRIVER=1)
endif(ENABLE_UHD)
endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
#Enable OpenCL if found in the system
if(OPENCL_FOUND)

View File

@ -28,10 +28,10 @@ if(ENABLE_GPERFTOOLS)
endif(GPERFTOOLS_FOUND)
endif(ENABLE_GPERFTOOLS)
if(ENABLE_UHD)
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
set(GNSS_SDR_OPTIONAL_LIBS ${GNSS_SDR_OPTIONAL_LIBS} ${UHD_LIBRARIES} ${GNURADIO_UHD_LIBRARIES})
set(GNSS_SDR_OPTIONAL_HEADERS ${GNSS_SDR_OPTIONAL_HEADERS} ${UHD_INCLUDE_DIRS})
endif(ENABLE_UHD)
endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
if(OPENSSL_FOUND)
add_definitions( -DUSE_OPENSSL_FALLBACK=1 )
@ -127,16 +127,22 @@ find_program(GZIP
)
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")
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/gnss-sdr.1.gz")
install(FILES ${CMAKE_BINARY_DIR}/gnss-sdr.1.gz DESTINATION share/man/man1)
if(NOT VOLK_GNSSSDR_FOUND)
install(FILES ${CMAKE_BINARY_DIR}/gnss-sdr.1.gz DESTINATION share/man/man1)
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/docs/changelog
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/changelog.gz")
install(FILES ${CMAKE_BINARY_DIR}/changelog.gz DESTINATION share/doc/gnss-sdr)
if(NOT VOLK_GNSSSDR_FOUND)
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Packaging/volk_gnsssdr_profile-manpage
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/volk_gnsssdr_profile.1.gz")
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Packaging/volk_gnsssdr-config-info-manpage
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/volk_gnsssdr-config-info.1.gz")
install(FILES ${CMAKE_BINARY_DIR}/volk_gnsssdr_profile.1.gz DESTINATION share/man/man1)
install(FILES ${CMAKE_BINARY_DIR}/volk_gnsssdr-config-info.1.gz DESTINATION share/man/man1)
endif(NOT VOLK_GNSSSDR_FOUND)
endif(NOT VOLK_GNSSSDR_FOUND)
endif(NOT GZIP_NOTFOUND)

View File

@ -392,6 +392,7 @@ if(ENABLE_SYSTEM_TESTING)
gnss_rx
gnss_system_parameters
)
if(ENABLE_INSTALL_TESTS)
if(EXISTS ${CMAKE_SOURCE_DIR}/install/ttff)
file(REMOVE ${CMAKE_SOURCE_DIR}/install/ttff)
@ -404,6 +405,39 @@ if(ENABLE_SYSTEM_TESTING)
endif(ENABLE_INSTALL_TESTS)
if(ENABLE_SYSTEM_TESTING_EXTRA)
add_executable(position_test
${CMAKE_CURRENT_SOURCE_DIR}/system-tests/position_test.cc )
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(position_test gtest-${gtest_RELEASE})
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
)
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)
if(GPSTK_FOUND OR OWN_GPSTK)
add_executable(obs_gps_l1_system_test ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/obs_gps_l1_system_test.cc)
if(NOT ${GTEST_DIR_LOCAL})
@ -418,6 +452,7 @@ if(ENABLE_SYSTEM_TESTING)
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)
@ -430,6 +465,7 @@ if(ENABLE_SYSTEM_TESTING)
endif(ENABLE_INSTALL_TESTS)
endif(GPSTK_FOUND OR OWN_GPSTK)
endif(ENABLE_SYSTEM_TESTING_EXTRA)
endif(ENABLE_SYSTEM_TESTING)
@ -439,115 +475,98 @@ endif(ENABLE_SYSTEM_TESTING)
set(CMAKE_CTEST_COMMAND ctest -V)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
add_executable(control_thread_test
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_message_factory_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_thread_test.cc
)
if(NOT ${ENABLE_PACKAGING})
add_executable(control_thread_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_message_factory_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_thread_test.cc
)
target_link_libraries(control_thread_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
gnss_sp_libs
gnss_system_parameters
gnss_rx
${VOLK_GNSSSDR_LIBRARIES}
)
add_test(control_thread_test control_thread_test)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(control_thread_test gtest-${gtest_RELEASE})
else(NOT ${GTEST_DIR_LOCAL})
add_dependencies(control_thread_test gtest)
endif(NOT ${GTEST_DIR_LOCAL})
set_property(TEST control_thread_test PROPERTY TIMEOUT 30)
set_property(TARGET control_thread_test PROPERTY EXCLUDE_FROM_ALL TRUE)
endif(NOT ${ENABLE_PACKAGING})
target_link_libraries(control_thread_test ${Boost_LIBRARIES}
#########################################################
add_executable(flowgraph_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/gnss_flowgraph_test.cc )
set_property(TARGET flowgraph_test PROPERTY EXCLUDE_FROM_ALL TRUE)
target_link_libraries(flowgraph_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
gnss_sp_libs
gnss_system_parameters
gnss_rx
${VOLK_GNSSSDR_LIBRARIES}
)
add_test(control_thread_test control_thread_test)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(control_thread_test gtest-${gtest_RELEASE})
else(NOT ${GTEST_DIR_LOCAL})
add_dependencies(control_thread_test gtest)
endif(NOT ${GTEST_DIR_LOCAL})
set_property(TEST control_thread_test PROPERTY TIMEOUT 30)
add_executable(flowgraph_test
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/gnss_flowgraph_test.cc
)
if(NOT ${ENABLE_PACKAGING})
gnss_system_parameters
${VOLK_GNSSSDR_LIBRARIES} )
add_test(flowgraph_test flowgraph_test)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(flowgraph_test gtest-${gtest_RELEASE})
else(NOT ${GTEST_DIR_LOCAL})
add_dependencies(flowgraph_test gtest)
endif(NOT ${GTEST_DIR_LOCAL})
set_property(TEST flowgraph_test PROPERTY TIMEOUT 30)
set_property(TARGET flowgraph_test PROPERTY EXCLUDE_FROM_ALL TRUE)
endif(NOT ${ENABLE_PACKAGING})
target_link_libraries(flowgraph_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
gnss_sp_libs
gnss_rx
gnss_system_parameters
${VOLK_GNSSSDR_LIBRARIES}
)
add_test(flowgraph_test flowgraph_test)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(flowgraph_test gtest-${gtest_RELEASE})
else(NOT ${GTEST_DIR_LOCAL})
add_dependencies(flowgraph_test gtest)
endif(NOT ${GTEST_DIR_LOCAL})
set_property(TEST flowgraph_test PROPERTY TIMEOUT 30)
add_executable(gnss_block_test
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/sources/file_signal_source_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/filter/fir_filter_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/adapter/pass_through_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/gnss_block_factory_test.cc
)
if(NOT ${ENABLE_PACKAGING})
#########################################################
add_executable(gnss_block_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/sources/file_signal_source_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/filter/fir_filter_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/adapter/pass_through_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/gnss_block_factory_test.cc
)
set_property(TARGET gnss_block_test PROPERTY EXCLUDE_FROM_ALL TRUE)
target_link_libraries(gnss_block_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GNURADIO_ANALOG_LIBRARIES}
gnss_sp_libs
gnss_rx
gnss_system_parameters
${VOLK_GNSSSDR_LIBRARIES}
)
add_test(gnss_block_test gnss_block_test)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(gnss_block_test gtest-${gtest_RELEASE})
else(NOT ${GTEST_DIR_LOCAL})
add_dependencies(gnss_block_test gtest)
endif(NOT ${GTEST_DIR_LOCAL})
endif(NOT ${ENABLE_PACKAGING})
target_link_libraries(gnss_block_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GNURADIO_ANALOG_LIBRARIES}
gnss_sp_libs
gnss_rx
gnss_system_parameters
# signal_generator_blocks
${VOLK_GNSSSDR_LIBRARIES}
)
add_test(gnss_block_test gnss_block_test)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(gnss_block_test gtest-${gtest_RELEASE})
else(NOT ${GTEST_DIR_LOCAL})
add_dependencies(gnss_block_test gtest)
endif(NOT ${GTEST_DIR_LOCAL})
add_executable(gnuradio_block_test
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc
)
if(NOT ${ENABLE_PACKAGING})
set_property(TARGET gnuradio_block_test PROPERTY EXCLUDE_FROM_ALL TRUE)
endif(NOT ${ENABLE_PACKAGING})
add_executable(gnuradio_block_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc
)
target_link_libraries(gnuradio_block_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GNURADIO_ANALOG_LIBRARIES}
gnss_sp_libs
gnss_rx
gnss_system_parameters
# signal_generator_blocks
${VOLK_GNSSSDR_LIBRARIES}
)
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GNURADIO_ANALOG_LIBRARIES}
gnss_sp_libs
gnss_rx
gnss_system_parameters
${VOLK_GNSSSDR_LIBRARIES}
)
add_test(gnuradio_block_test gnuradio_block_test)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(gnuradio_block_test gtest-${gtest_RELEASE})
@ -576,16 +595,10 @@ endif(NOT ${GTEST_DIR_LOCAL})
# )
# add_test(acq_test acq_test)
add_executable(trk_test
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc
)
if(NOT ${ENABLE_PACKAGING})
set_property(TARGET trk_test PROPERTY EXCLUDE_FROM_ALL TRUE)
endif(NOT ${ENABLE_PACKAGING})
add_executable(trk_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc
)
target_link_libraries(trk_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
@ -599,7 +612,7 @@ target_link_libraries(trk_test ${Boost_LIBRARIES}
gnss_system_parameters
signal_generator_blocks
${VOLK_GNSSSDR_LIBRARIES}
)
)
add_test(trk_test trk_test)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(trk_test gtest-${gtest_RELEASE})
@ -607,5 +620,10 @@ else(NOT ${GTEST_DIR_LOCAL})
add_dependencies(trk_test gtest)
endif(NOT ${GTEST_DIR_LOCAL})
add_dependencies(check control_thread_test flowgraph_test gnss_block_test
gnuradio_block_test trk_test)
if(${ENABLE_PACKAGING})
add_dependencies(check gnuradio_block_test trk_test)
else(${ENABLE_PACKAGING})
add_dependencies(check control_thread_test flowgraph_test gnss_block_test
gnuradio_block_test trk_test)
endif(${ENABLE_PACKAGING})

View File

@ -33,10 +33,12 @@
#include <exception>
#include <iostream>
#include <cstring>
#include <chrono>
#include <numeric>
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <thread>
#include <unistd.h>
#include <gflags/gflags.h>
#include <glog/logging.h>
@ -57,6 +59,7 @@
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
class Obs_Gps_L1_System_Test: public ::testing::Test
{
public:
@ -71,7 +74,7 @@ public:
std::string filename_rinex_obs = FLAGS_filename_rinex_obs;
std::string filename_raw_data = FLAGS_filename_raw_data;
std::string generated_rinex_obs;
int configure_generator();
int generate_signal();
int configure_receiver();
@ -82,7 +85,6 @@ public:
double compute_stdev(const std::vector<double> & vec);
std::shared_ptr<InMemoryConfiguration> config;
std::string generated_rinex_obs;
};
@ -341,6 +343,7 @@ int Obs_Gps_L1_System_Test::run_receiver()
std::cout << "STD exception: " << ex.what();
}
// Get the name of the RINEX obs file generated by the receiver
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
FILE *fp;
std::string argum2 = std::string("/bin/ls *O | grep GSDR | tail -1");
char buffer[1035];
@ -350,15 +353,12 @@ int Obs_Gps_L1_System_Test::run_receiver()
std::cout << "Failed to run command: " << argum2 << std::endl;
return -1;
}
char * without_trailing = (char*)"0";
while (fgets(buffer, sizeof(buffer), fp) != NULL)
{
std::string aux = std::string(buffer);
without_trailing = strtok(&aux[0], "\n");
Obs_Gps_L1_System_Test::generated_rinex_obs = aux.erase(aux.length() - 1, 1);
}
generated_rinex_obs = std::string(without_trailing);
pclose(fp);
return 0;
}
@ -436,7 +436,7 @@ void Obs_Gps_L1_System_Test::check_results()
try
{
std::string arg2_gen = std::string("./") + generated_rinex_obs;
std::string arg2_gen = std::string("./") + Obs_Gps_L1_System_Test::generated_rinex_obs;
gpstk::Rinex3ObsStream r_meas(arg2_gen);
r_meas.exceptions(std::ios::failbit);
gpstk::Rinex3ObsData r_meas_data;
@ -685,9 +685,9 @@ TEST_F(Obs_Gps_L1_System_Test, Observables_system_test)
// Run the receiver
EXPECT_EQ( run_receiver(), 0) << "Problem executing the software-defined signal generator";
std::cout << "Validating RINEX obs file obtained by GNSS-SDR: " << generated_rinex_obs << " ..." << std::endl;
is_gen_rinex_obs_valid = check_valid_rinex_obs( "./" + generated_rinex_obs);
EXPECT_EQ(true, is_gen_rinex_obs_valid) << "The RINEX observation file " << generated_rinex_obs << ", generated by GNSS-SDR, is not well formed.";
std::cout << "Validating RINEX obs file obtained by GNSS-SDR: " << Obs_Gps_L1_System_Test::generated_rinex_obs << " ..." << std::endl;
is_gen_rinex_obs_valid = check_valid_rinex_obs( "./" + Obs_Gps_L1_System_Test::generated_rinex_obs);
EXPECT_EQ(true, is_gen_rinex_obs_valid) << "The RINEX observation file " << Obs_Gps_L1_System_Test::generated_rinex_obs << ", generated by GNSS-SDR, is not well formed.";
std::cout << "The file is valid." << std::endl;
// Check results

View File

@ -0,0 +1,555 @@
/*!
* \file position_test.cc
* \brief This class implements a test for the validation of computed position.
* \author Carles Fernandez-Prades, 2016. cfernandez(at)cttc.es
*
*
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
*
* GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver
*
* This file is part of GNSS-SDR.
*
* GNSS-SDR is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GNSS-SDR is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
#include <cmath>
#include <numeric>
#include <thread>
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <gtest/gtest.h>
#include "concurrent_map.h"
#include "concurrent_queue.h"
#include "control_thread.h"
#include "in_memory_configuration.h"
#include "signal_generator_flags.h"
// For GPS NAVIGATION (L1)
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
class Position_Gps_L1_System_Test: public ::testing::Test
{
public:
std::string generator_binary;
std::string p1;
std::string p2;
std::string p3;
std::string p4;
std::string p5;
const double baseband_sampling_freq = 2.6e6;
std::string filename_rinex_obs = FLAGS_filename_rinex_obs;
std::string filename_raw_data = FLAGS_filename_raw_data;
int configure_generator();
int generate_signal();
int configure_receiver();
int run_receiver();
void check_results();
double compute_stdev_precision(const std::vector<double> & vec);
double compute_stdev_accuracy(const std::vector<double> & vec, double ref);
void geodetic2Enu(const double latitude, const double longitude, const double altitude,
double* east, double* north, double* up);
std::shared_ptr<InMemoryConfiguration> config;
std::string generated_kml_file;
private:
void geodetic2Ecef(const double latitude, const double longitude, const double altitude,
double* x, double* y, double* z);
};
void Position_Gps_L1_System_Test::geodetic2Ecef(const double latitude, const double longitude, const double altitude,
double* x, double* y, double* z)
{
const double a = 6378137.0; // WGS84
const double b = 6356752.314245; // WGS84
double aux_x, aux_y, aux_z;
// Convert to ECEF (See https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates )
double N = std::pow(a, 2.0) / sqrt( std::pow(a, 2.0) * std::pow(cos(latitude), 2.0) + std::pow(b, 2.0) * std::pow(sin(latitude), 2.0));
aux_x = (N + altitude) * cos(latitude) * cos(longitude);
aux_y = (N + altitude) * cos(latitude) * sin(longitude);
aux_z = ((std::pow(b, 2.0) / std::pow(a, 2.0)) * N + altitude) * sin(latitude);
*x = aux_x;
*y = aux_y;
*z = aux_z;
}
void Position_Gps_L1_System_Test::geodetic2Enu(const double latitude, const double longitude, const double altitude,
double* east, double* north, double* up)
{
// Reference : https://github.com/ethz-asl/geodetic_utils/blob/master/include/geodetic_utils/geodetic_conv.hpp
double x, y, z;
const double d2r = 3.1415926535898 / 180.0;
geodetic2Ecef(latitude * d2r, longitude * d2r, altitude, &x, &y, &z);
double aux_north, aux_east, aux_down;
std::istringstream iss2(FLAGS_static_position);
std::string str_aux;
std::getline(iss2, str_aux, ',');
double ref_long = std::stod(str_aux);
std::getline(iss2, str_aux, ',');
double ref_lat = std::stod(str_aux);
std::getline(iss2, str_aux, '\n');
double ref_h = std::stod(str_aux);
double ref_x, ref_y, ref_z;
geodetic2Ecef(ref_lat * d2r, ref_long * d2r, ref_h, &ref_x, &ref_y, &ref_z);
double aux_x = x - ref_x;
double aux_y = y - ref_y;
double aux_z = z - ref_z;
// ECEF to NED matrix
double phiP = atan2(ref_z, sqrt(std::pow(ref_x, 2.0) + std::pow(ref_y, 2.0)));
const double sLat = sin(phiP);
const double sLon = sin(ref_long * d2r);
const double cLat = cos(phiP);
const double cLon = cos(ref_long * d2r);
aux_north = -aux_x * sLat * cLon - aux_y * sLon + aux_z * cLat * cLon;
aux_east = -aux_x * sLat * sLon + aux_y * cLon + aux_z * cLat * sLon;
aux_down = aux_x * cLat + aux_z * sLat;
*east = aux_east;
*north = aux_north;
*up = -aux_down;
}
double Position_Gps_L1_System_Test::compute_stdev_precision(const std::vector<double> & vec)
{
double sum__ = std::accumulate(vec.begin(), vec.end(), 0.0);
double mean__ = sum__ / vec.size();
double accum__ = 0.0;
std::for_each (std::begin(vec), std::end(vec), [&](const double d) {
accum__ += (d - mean__) * (d - mean__);
});
double stdev__ = std::sqrt(accum__ / (vec.size() - 1));
return stdev__;
}
double Position_Gps_L1_System_Test::compute_stdev_accuracy(const std::vector<double> & vec, double ref)
{
double mean__ = ref;
double accum__ = 0.0;
std::for_each (std::begin(vec), std::end(vec), [&](const double d) {
accum__ += (d - mean__) * (d - mean__);
});
double stdev__ = std::sqrt(accum__ / (vec.size() - 1));
return stdev__;
}
int Position_Gps_L1_System_Test::configure_generator()
{
// Configure signal generator
generator_binary = FLAGS_generator_binary;
p1 = std::string("-rinex_nav_file=") + FLAGS_rinex_nav_file;
if(FLAGS_dynamic_position.empty())
{
p2 = std::string("-static_position=") + FLAGS_static_position + std::string(",") + std::to_string(std::min(FLAGS_duration * 10, 3000));
if(FLAGS_duration > 300) std::cout << "WARNING: Duration has been set to its maximum value of 300 s" << std::endl;
}
else
{
p2 = std::string("-obs_pos_file=") + std::string(FLAGS_dynamic_position);
}
p3 = std::string("-rinex_obs_file=") + FLAGS_filename_rinex_obs; // RINEX 2.10 observation file output
p4 = std::string("-sig_out_file=") + FLAGS_filename_raw_data; // Baseband signal output file. Will be stored in int8_t IQ multiplexed samples
p5 = std::string("-sampling_freq=") + std::to_string(baseband_sampling_freq); //Baseband sampling frequency [MSps]
return 0;
}
int Position_Gps_L1_System_Test::generate_signal()
{
pid_t wait_result;
int child_status;
char *const parmList[] = { &generator_binary[0], &generator_binary[0], &p1[0], &p2[0], &p3[0], &p4[0], &p5[0], NULL };
int pid;
if ((pid = fork()) == -1)
perror("fork error");
else if (pid == 0)
{
execv(&generator_binary[0], parmList);
std::cout << "Return not expected. Must be an execv error." << std::endl;
std::terminate();
}
wait_result = waitpid(pid, &child_status, 0);
if (wait_result == -1) perror("waitpid error");
return 0;
}
int Position_Gps_L1_System_Test::configure_receiver()
{
config = std::make_shared<InMemoryConfiguration>();
const int sampling_rate_internal = baseband_sampling_freq;
const int number_of_taps = 11;
const int number_of_bands = 2;
const float band1_begin = 0.0;
const float band1_end = 0.48;
const float band2_begin = 0.52;
const float band2_end = 1.0;
const float ampl1_begin = 1.0;
const float ampl1_end = 1.0;
const float ampl2_begin = 0.0;
const float ampl2_end = 0.0;
const float band1_error = 1.0;
const float band2_error = 1.0;
const int grid_density = 16;
const int decimation_factor = 1;
const float zero = 0.0;
const int number_of_channels = 8;
const int in_acquisition = 1;
const float threshold = 0.01;
const float doppler_max = 8000.0;
const float doppler_step = 500.0;
const int max_dwells = 1;
const int tong_init_val = 2;
const int tong_max_val = 10;
const int tong_max_dwells = 30;
const int coherent_integration_time_ms = 1;
const float pll_bw_hz = 30.0;
const float dll_bw_hz = 4.0;
const float early_late_space_chips = 0.5;
const float pll_bw_narrow_hz = 20.0;
const float dll_bw_narrow_hz = 2.0;
const int extend_correlation_ms = 1;
const int display_rate_ms = 500;
const int output_rate_ms = 1000;
const int averaging_depth = 1;
config->set_property("GNSS-SDR.internal_fs_hz", std::to_string(sampling_rate_internal));
// Set the assistance system parameters
config->set_property("GNSS-SDR.SUPL_read_gps_assistance_xml", "false");
config->set_property("GNSS-SDR.SUPL_gps_enabled", "false");
config->set_property("GNSS-SDR.SUPL_gps_ephemeris_server", "supl.google.com");
config->set_property("GNSS-SDR.SUPL_gps_ephemeris_port", std::to_string(7275));
config->set_property("GNSS-SDR.SUPL_gps_acquisition_server", "supl.google.com");
config->set_property("GNSS-SDR.SUPL_gps_acquisition_port", std::to_string(7275));
config->set_property("GNSS-SDR.SUPL_MCC", std::to_string(244));
config->set_property("GNSS-SDR.SUPL_MNS", std::to_string(5));
config->set_property("GNSS-SDR.SUPL_LAC", "0x59e2");
config->set_property("GNSS-SDR.SUPL_CI", "0x31b0");
// Set the Signal Source
config->set_property("SignalSource.implementation", "File_Signal_Source");
config->set_property("SignalSource.filename", "./" + filename_raw_data);
config->set_property("SignalSource.sampling_frequency", std::to_string(sampling_rate_internal));
config->set_property("SignalSource.item_type", "ibyte");
config->set_property("SignalSource.samples", std::to_string(zero));
// Set the Signal Conditioner
config->set_property("SignalConditioner.implementation", "Signal_Conditioner");
config->set_property("DataTypeAdapter.implementation", "Ibyte_To_Complex");
config->set_property("InputFilter.implementation", "Fir_Filter");
config->set_property("InputFilter.dump", "false");
config->set_property("InputFilter.input_item_type", "gr_complex");
config->set_property("InputFilter.output_item_type", "gr_complex");
config->set_property("InputFilter.taps_item_type", "float");
config->set_property("InputFilter.number_of_taps", std::to_string(number_of_taps));
config->set_property("InputFilter.number_of_bands", std::to_string(number_of_bands));
config->set_property("InputFilter.band1_begin", std::to_string(band1_begin));
config->set_property("InputFilter.band1_end", std::to_string(band1_end));
config->set_property("InputFilter.band2_begin", std::to_string(band2_begin));
config->set_property("InputFilter.band2_end", std::to_string(band2_end));
config->set_property("InputFilter.ampl1_begin", std::to_string(ampl1_begin));
config->set_property("InputFilter.ampl1_end", std::to_string(ampl1_end));
config->set_property("InputFilter.ampl2_begin", std::to_string(ampl2_begin));
config->set_property("InputFilter.ampl2_end", std::to_string(ampl2_end));
config->set_property("InputFilter.band1_error", std::to_string(band1_error));
config->set_property("InputFilter.band2_error", std::to_string(band2_error));
config->set_property("InputFilter.filter_type", "bandpass");
config->set_property("InputFilter.grid_density", std::to_string(grid_density));
config->set_property("InputFilter.sampling_frequency", std::to_string(sampling_rate_internal));
config->set_property("InputFilter.IF", std::to_string(zero));
config->set_property("Resampler.implementation", "Pass_Through");
config->set_property("Resampler.dump", "false");
config->set_property("Resampler.item_type", "gr_complex");
config->set_property("Resampler.sample_freq_in", std::to_string(sampling_rate_internal));
config->set_property("Resampler.sample_freq_out", std::to_string(sampling_rate_internal));
// Set the number of Channels
config->set_property("Channels_1C.count", std::to_string(number_of_channels));
config->set_property("Channels.in_acquisition", std::to_string(in_acquisition));
config->set_property("Channel.signal", "1C");
// Set Acquisition
config->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Tong_Acquisition");
config->set_property("Acquisition_1C.item_type", "gr_complex");
config->set_property("Acquisition_1C.if", std::to_string(zero));
config->set_property("Acquisition_1C.coherent_integration_time_ms", std::to_string(coherent_integration_time_ms));
config->set_property("Acquisition_1C.threshold", std::to_string(threshold));
config->set_property("Acquisition_1C.doppler_max", std::to_string(doppler_max));
config->set_property("Acquisition_1C.doppler_step", std::to_string(doppler_step));
config->set_property("Acquisition_1C.bit_transition_flag", "false");
config->set_property("Acquisition_1C.max_dwells", std::to_string(max_dwells));
config->set_property("Acquisition_1C.tong_init_val", std::to_string(tong_init_val));
config->set_property("Acquisition_1C.tong_max_val", std::to_string(tong_max_val));
config->set_property("Acquisition_1C.tong_max_dwells", std::to_string(tong_max_dwells));
// Set Tracking
config->set_property("Tracking_1C.implementation", "GPS_L1_CA_DLL_PLL_Tracking");
//config->set_property("Tracking_1C.implementation", "GPS_L1_CA_DLL_PLL_C_Aid_Tracking");
config->set_property("Tracking_1C.item_type", "gr_complex");
config->set_property("Tracking_1C.if", std::to_string(zero));
config->set_property("Tracking_1C.dump", "false");
config->set_property("Tracking_1C.dump_filename", "./tracking_ch_");
config->set_property("Tracking_1C.pll_bw_hz", std::to_string(pll_bw_hz));
config->set_property("Tracking_1C.dll_bw_hz", std::to_string(dll_bw_hz));
config->set_property("Tracking_1C.early_late_space_chips", std::to_string(early_late_space_chips));
config->set_property("Tracking_1C.pll_bw_narrow_hz", std::to_string(pll_bw_narrow_hz));
config->set_property("Tracking_1C.dll_bw_narrow_hz", std::to_string(dll_bw_narrow_hz));
config->set_property("Tracking_1C.extend_correlation_ms", std::to_string(extend_correlation_ms));
// Set Telemetry
config->set_property("TelemetryDecoder_1C.implementation", "GPS_L1_CA_Telemetry_Decoder");
config->set_property("TelemetryDecoder_1C.dump", "false");
config->set_property("TelemetryDecoder_1C.decimation_factor", std::to_string(decimation_factor));
// Set Observables
config->set_property("Observables.implementation", "Hybrid_Observables");
config->set_property("Observables.dump", "false");
config->set_property("Observables.dump_filename", "./observables.dat");
config->set_property("Observables.averaging_depth", std::to_string(100));
// Set PVT
config->set_property("PVT.implementation", "Hybrid_PVT");
config->set_property("PVT.averaging_depth", std::to_string(averaging_depth));
config->set_property("PVT.flag_averaging", "true");
config->set_property("PVT.output_rate_ms", std::to_string(output_rate_ms));
config->set_property("PVT.display_rate_ms", std::to_string(display_rate_ms));
config->set_property("PVT.dump_filename", "./PVT");
config->set_property("PVT.nmea_dump_filename", "./gnss_sdr_pvt.nmea");
config->set_property("PVT.flag_nmea_tty_port", "false");
config->set_property("PVT.nmea_dump_devname", "/dev/pts/4");
config->set_property("PVT.flag_rtcm_server", "false");
config->set_property("PVT.flag_rtcm_tty_port", "false");
config->set_property("PVT.rtcm_dump_devname", "/dev/pts/1");
config->set_property("PVT.dump", "false");
config->set_property("PVT.rinex_version", std::to_string(2));
return 0;
}
int Position_Gps_L1_System_Test::run_receiver()
{
std::shared_ptr<ControlThread> control_thread;
control_thread = std::make_shared<ControlThread>(config);
// start receiver
try
{
control_thread->run();
}
catch( boost::exception & e )
{
std::cout << "Boost exception: " << boost::diagnostic_information(e);
}
catch(std::exception const& ex)
{
std::cout << "STD exception: " << ex.what();
}
// Get the name of the KML file generated by the receiver
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
FILE *fp;
std::string argum2 = std::string("/bin/ls *kml | tail -1");
char buffer[1035];
fp = popen(&argum2[0], "r");
if (fp == NULL)
{
std::cout << "Failed to run command: " << argum2 << std::endl;
return -1;
}
while (fgets(buffer, sizeof(buffer), fp) != NULL)
{
std::string aux = std::string(buffer);
Position_Gps_L1_System_Test::generated_kml_file = aux.erase(aux.length() - 1, 1);
}
pclose(fp);
EXPECT_EQ(Position_Gps_L1_System_Test::generated_kml_file.empty(), false);
return 0;
}
void Position_Gps_L1_System_Test::check_results()
{
std::fstream myfile(Position_Gps_L1_System_Test::generated_kml_file, std::ios_base::in);
std::string line;
std::vector<double> pos_e;
std::vector<double> pos_n;
std::vector<double> pos_u;
// Skip header
std::getline(myfile, line);
bool is_header = true;
while(is_header)
{
std::getline(myfile, line);
std::size_t found = line.find("<coordinates>");
if (found != std::string::npos) is_header = false;
}
bool is_data = true;
//read data
while(is_data)
{
std::getline(myfile, line);
std::size_t found = line.find("</coordinates>");
if (found != std::string::npos) is_data = false;
else
{
std::string str2;
std::istringstream iss(line);
double value;
double lat, longitude, h;
for (int i = 0; i < 3; i++)
{
std::getline(iss, str2, ',');
value = std::stod(str2);
if(i == 0) lat = value;
if(i == 1) longitude = value;
if(i == 2) h = value;
}
double north, east, up;
geodetic2Enu(lat, longitude, h, &east, &north, &up);
//std::cout << "E = " << east << ", N = " << north << " U = " << up << std::endl;
pos_e.push_back(east);
pos_n.push_back(north);
pos_u.push_back(up);
}
}
myfile.close();
double sigma_E_2_precision = std::pow(compute_stdev_precision(pos_e), 2.0);
double sigma_N_2_precision = std::pow(compute_stdev_precision(pos_n), 2.0);
double sigma_U_2_precision = std::pow(compute_stdev_precision(pos_u), 2.0);
double sigma_E_2_accuracy = std::pow(compute_stdev_accuracy(pos_e, 0.0), 2.0);
double sigma_N_2_accuracy = std::pow(compute_stdev_accuracy(pos_n, 0.0), 2.0);
double sigma_U_2_accuracy = std::pow(compute_stdev_accuracy(pos_u, 0.0), 2.0);
std::cout << "---- ACCURACY ----" << std::endl;
std::cout << "2DRMS = " << 2 * sqrt(sigma_E_2_accuracy + sigma_N_2_accuracy) << " [m]" << std::endl;
std::cout << "DRMS = " << sqrt(sigma_E_2_accuracy + sigma_N_2_accuracy) << " [m]" << std::endl;
std::cout << "CEP = " << 0.62 * compute_stdev_accuracy(pos_n, 0.0) + 0.56 * compute_stdev_accuracy(pos_e, 0.0) << " [m]" << std::endl;
std::cout << "99% SAS = " << 1.122 * (sigma_E_2_accuracy + sigma_N_2_accuracy + sigma_U_2_accuracy) << " [m]" << std::endl;
std::cout << "90% SAS = " << 0.833 * (sigma_E_2_accuracy + sigma_N_2_accuracy + sigma_U_2_accuracy) << " [m]" << std::endl;
std::cout << "MRSE = " << sqrt(sigma_E_2_accuracy + sigma_N_2_accuracy + sigma_U_2_accuracy) << " [m]" << std::endl;
std::cout << "SEP = " << 0.51 * (sigma_E_2_accuracy + sigma_N_2_accuracy + sigma_U_2_accuracy) << " [m]" << std::endl;
std::cout << std::endl;
std::cout << "---- PRECISION ----" << std::endl;
std::cout << "2DRMS = " << 2 * sqrt(sigma_E_2_precision + sigma_N_2_precision) << " [m]" << std::endl;
std::cout << "DRMS = " << sqrt(sigma_E_2_precision + sigma_N_2_precision) << " [m]" << std::endl;
std::cout << "CEP = " << 0.62 * compute_stdev_precision(pos_n) + 0.56 * compute_stdev_precision(pos_e) << " [m]" << std::endl;
std::cout << "99% SAS = " << 1.122 * (sigma_E_2_precision + sigma_N_2_precision + sigma_U_2_precision) << " [m]" << std::endl;
std::cout << "90% SAS = " << 0.833 * (sigma_E_2_precision + sigma_N_2_precision + sigma_U_2_precision) << " [m]" << std::endl;
std::cout << "MRSE = " << sqrt(sigma_E_2_precision + sigma_N_2_precision + sigma_U_2_precision) << " [m]" << std::endl;
std::cout << "SEP = " << 0.51 * (sigma_E_2_precision + sigma_N_2_precision + sigma_U_2_precision) << " [m]" << std::endl;
// Sanity Check
double precision_SEP = 0.51 * (sigma_E_2_precision + sigma_N_2_precision + sigma_U_2_precision);
ASSERT_LT(precision_SEP, 20.0);
}
TEST_F(Position_Gps_L1_System_Test, Position_system_test)
{
// Configure the signal generator
configure_generator();
// Generate signal raw signal samples and observations RINEX file
if(!FLAGS_disable_generator)
{
generate_signal();
}
// Configure receiver
configure_receiver();
// Run the receiver
EXPECT_EQ( run_receiver(), 0) << "Problem executing the software-defined signal generator";
// Check results
check_results();
}
int main(int argc, char **argv)
{
std::cout << "Running Position precision test..." << std::endl;
int res = 0;
try
{
testing::InitGoogleTest(&argc, argv);
}
catch(...) {} // catch the "testing::internal::<unnamed>::ClassUniqueToAlwaysTrue" from gtest
google::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]);
// Run the Tests
try
{
res = RUN_ALL_TESTS();
}
catch(...)
{
LOG(WARNING) << "Unexpected catch";
}
google::ShutDownCommandLineFlags();
return res;
}