1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 04:30:33 +00:00

Fix building of obsdiff tool, add README file

This commit is contained in:
Carles Fernandez 2020-02-18 19:39:53 +01:00
parent b66d8066c3
commit d9525f5334
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
5 changed files with 1229 additions and 1 deletions

View File

@ -8,8 +8,8 @@
#
add_subdirectory(front-end-cal)
add_subdirectory(rinex_tools)
if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
add_subdirectory(rinex-tools)
add_subdirectory(rinex2assist)
endif()

View File

@ -0,0 +1,52 @@
# Copyright (C) 2012-2020 (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.
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
find_package(GPSTK QUIET)
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
include(GNUInstallDirs)
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
set(GPSTK_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include)
endif()
set(obsdiff_HEADERS obsdiff_flags.h)
source_group(Headers FILES ${obsdiff_HEADERS})
add_executable(obsdiff ${CMAKE_CURRENT_SOURCE_DIR}/obsdiff.cc ${obsdiff_HEADERS})
set_property(TARGET obsdiff PROPERTY CXX_STANDARD 14) # Required by GPSTk
target_include_directories(obsdiff PUBLIC ${CMAKE_SOURCE_DIR}/src/tests/common-files)
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
add_dependencies(obsdiff gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
endif()
target_link_libraries(obsdiff
PUBLIC
Armadillo::armadillo
Threads::Threads
Gflags::gflags
Matio::matio
core_system_parameters
${GPSTK_LIBRARY}
)
target_include_directories(obsdiff
PUBLIC
${GPSTK_INCLUDE_DIR}/gpstk
${GPSTK_INCLUDE_DIR}
)
add_custom_command(TARGET obsdiff POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:obsdiff>
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:obsdiff>
)
install(TARGETS obsdiff
RUNTIME DESTINATION bin
COMPONENT "obsdiff"
)

View File

@ -0,0 +1,45 @@
obsdiff
-------
[comment]: # (
SPDX-License-Identifier: GPL-3.0-or-later
)
[comment]: # (
SPDX-FileCopyrightText: Javier Arribas, 2020. <jarribas@cttc.es>
)
This program computes Single-difference and Double-difference from RINEX observation files.
## Building
This program is built along with GNSS-SDR if the options `ENABLE_UNIT_TESTING_EXTRA` or `ENABLE_SYSTEM_TESTING_EXTRA` are set to `ON` when calling CMake:
```
$ cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON ..
$ make obsdiff
$ sudo make install
```
The last step is optional. Without it, you still will get the executable at `../install/obsdiff`.
## Usage
```
$ obsdiff --ref_rinex_obs=reference.20o --test_rinex_obs=rover.20o
```
Available command-line flags:
| **flag** | **Default value** | **Description** |
|:------------------------:|:-----------------:|:-----------------|
| `skip_obs_transitory_s` | `30.0` | Skip the initial observable outputs to avoid transitory results [s]. |
| `skip_obs_ends_s` | `5.0` | Skip the lasts observable outputs to avoid transitory results [s]. |
| `single_diffs` | `false` | [`true`, `false`]: If `true`, the program also computes the single difference errors for [Carrier Phase](https://gnss-sdr.org/docs/sp-blocks/observables/#carrier-phase-measurement) and [Doppler](https://gnss-sdr.org/docs/sp-blocks/observables/#doppler-shift-measurement) measurements (requires LO synchronization between receivers). |
| `compare_with_5X` | `false` | [`true`, `false`]: If `true`, compares the E5a Doppler and Carrier Phases with the E5 full Bw in RINEX (expect discrepancy due to the center frequencies difference). |
| `dupli_sat` | `false` | [`true`, `false`]: If `true`, enables special observable test mode where the scenario contains duplicated satellite orbits. |
| `dupli_sat_prns` | `1,2,3,4` | List of duplicated satellites PRN pairs (_i.e._, `1,2,3,4` indicates that the PRNs 1,2 share the same orbit. The same applies for PRNs 3,4). |
| `ref_rinex_obs` | `reference.obs` | Filename of reference RINEX observation file. |
| `test_rinex_obs` | `test.obs` | Filename of tested RINEX observation file. |
| `show_plots` | `true` | [`true`, `false`]: If `true`, and if [gnuplot](http://www.gnuplot.info/) is found on the system, displays results plots on screen. Please set it to `false` for non-interactive testing. |

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
/*!
* \file obsdiff_flags.h
* \brief Helper file for unit testing
* \author Javier Arribas, 2020. jarribas(at)cttc.es
*
*
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (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.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_OBSDIFF_FLAGS_H
#define GNSS_SDR_OBSDIFF_FLAGS_H
#include <gflags/gflags.h>
#include <limits>
DEFINE_double(skip_obs_transitory_s, 30.0, "Skip the initial observable outputs to avoid transitory results [s]");
DEFINE_double(skip_obs_ends_s, 5.0, "Skip the lasts observable outputs to avoid transitory results [s]");
DEFINE_bool(single_diffs, false, "Compute also the single difference errors for Accumulated Carrier Phase and Carrier Doppler (requires LO synchronization between receivers)");
DEFINE_bool(compare_with_5X, false, "Compare the E5a Doppler and Carrier Phases with the E5 full bw in RINEX (expect discrepancy due to the center frequencies difference)");
DEFINE_bool(dupli_sat, false, "Enable special observable test mode where the scenario contains duplicated satellite orbits");
DEFINE_string(dupli_sat_prns, "1,2,3,4", "List of duplicated satellites PRN pairs (i.e. 1,2,3,4 indicates that the PRNs 1,2 share the same orbit. The same applies for PRNs 3,4)");
DEFINE_string(ref_rinex_obs, "reference.obs", "Filename of reference RINEX observation file");
DEFINE_string(test_rinex_obs, "test.obs", "Filename of test RINEX observation file");
#endif