mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
16a75304a9
@ -51,7 +51,7 @@ IncludeBlocks: Merge
|
||||
IncludeCategories:
|
||||
- Regex: '^.*.h"'
|
||||
Priority: 1
|
||||
- Regex: '^.*(boost|gflags|glog|gnsssdr|gpstk|gtest|gnuradio|pmt|uhd|volk)/'
|
||||
- Regex: '^.*(boost|gflags|glog|gnsssdr|gnuradio|gpstk|gsl|gtest|pmt|uhd|volk)/'
|
||||
Priority: 2
|
||||
- Regex: '^.*(armadillo|matio|pugixml)'
|
||||
Priority: 2
|
||||
|
@ -58,7 +58,7 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
|
||||
message(STATUS "Checking for GNU Radio Module: ${EXTVAR}")
|
||||
|
||||
# check for .pc hints
|
||||
pkg_check_modules(PC_GNURADIO_${EXTVAR} ${PCNAME})
|
||||
pkg_check_modules(PC_GNURADIO_${EXTVAR} QUIET ${PCNAME})
|
||||
|
||||
if(NOT PC_GNURADIO_${EXTVAR}_FOUND)
|
||||
set(PC_GNURADIO_${EXTVAR}_LIBRARIES ${LIBFILE})
|
||||
|
@ -30,7 +30,7 @@ endif()
|
||||
|
||||
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(PC_VOLK_GNSSSDR volk_gnsssdr)
|
||||
pkg_check_modules(PC_VOLK_GNSSSDR QUIET volk_gnsssdr)
|
||||
|
||||
find_path(VOLK_GNSSSDR_INCLUDE_DIRS
|
||||
NAMES volk_gnsssdr/volk_gnsssdr.h
|
||||
|
@ -3,17 +3,22 @@
|
||||
### Improvements in Accuracy
|
||||
|
||||
- Local clock correction based on PVT solution (error kept below 1 ms).
|
||||
- Fix a bug in broadcast ionospheric parameters usage.
|
||||
|
||||
|
||||
### Improvements in Availability
|
||||
|
||||
- Fixed bug that caused a random deadlock in the Observables block, preventing the computation of PVT fixes.
|
||||
- Improved mechanism for false lock detection in the Tracking loops.
|
||||
- Fixed bug in Galileo INAV/FNAV message decoding when PLL is locked at 180 degrees, which prevented from correct navigation message decoding in some situations.
|
||||
- Fixed bug that caused a random deadlock in the Observables block, preventing the computation of PVT fixes.
|
||||
- Fixed PVT computation continuity through the TOW rollover.
|
||||
- Improved signal acquisition and tracking mechanisms in high dynamic scenarios.
|
||||
|
||||
|
||||
### Improvements in Efficiency
|
||||
|
||||
- Added mechanism for assisted acquisition of signals on a secondary band when the primary has already been acquired. This allows a great reduction of the computational load in multi-frequency configurations.
|
||||
- Tracking loops now perform bit synchronization, simplifying the decoding process in Telemetry blocks and FPGA-offloading.
|
||||
- Improved preamble detection implementation in the decoding of navigation messages (acceleration by x1.6 on average per channel).
|
||||
- Shortened Acquisition to Tracking transition time.
|
||||
- Applied clang-tidy checks and fixes related to performance: performance-faster-string-find, performance-inefficient-algorithm, performance-move-const-arg, performance-type-promotion-in-math-fn, performance-unnecessary-value-param, readability-string-compare.
|
||||
@ -21,7 +26,7 @@
|
||||
|
||||
### Improvements in Flexibility:
|
||||
|
||||
- Rewritten Control Thread and GNSS Flowgraph for increased control of channels' status and smarter assignation of satellites in multi-band configurations.
|
||||
- Rewritten Control Thread and GNSS flow graph for increased control of channels' status and smarter assignation of satellites in multi-band configurations.
|
||||
- New Tracking parameters allow the configuration of PLL and DLL filters order.
|
||||
- Added parameter to enable FLL during pull-in time.
|
||||
- Configurable pull-in time in the Tracking loops.
|
||||
@ -40,37 +45,44 @@
|
||||
|
||||
### Improvements in Maintainability:
|
||||
|
||||
- The internal communication mechanism based on gr::msg_queue has been replaced by a thread-safe, built-in asynchronous message passing system based on GNU Radio's Polymorphic Types. This change is backwards-compatible and prevents from a failure in case of a possible future deprecation or removal of the gr::msg_queue API.
|
||||
- Deprecated boost::asio::io_service replaced by boost::asio::io_context if Boost > 1.65
|
||||
- CMake turns all policies to ON according to the running version up to version 3.15.
|
||||
- Usage of clang-tidy integrated into CMake scripts. New option -DENABLE_CLANG_TIDY=ON executes clang-tidy along with compilation. Requires clang compiler.
|
||||
- Applied clang-tidy checks and fixes related to readability: readability-container-size-empty, readability-identifier-naming, readability-inconsistent-declaration-parameter-name, readability-named-parameter, readability-non-const-parameter, readability-string-compare.
|
||||
- Improved includes selection following suggestions by include-what-you-use (see https://include-what-you-use.org/), allowing faster compiles, fewer recompiles and making refactoring easier.
|
||||
- Deprecated boost::asio::io_service replaced by boost::asio::io_context if Boost > 1.65
|
||||
- The internal communication mechanism based on gr::msg_queue has been replaced by asynchronous message passing.
|
||||
- Massive reduction of warnings triggered by clang-tidy checks.
|
||||
- Throughout code cleaning and formatting performed with automated tools in order to reduce future commit noise.
|
||||
|
||||
|
||||
### Improvements in Portability:
|
||||
|
||||
- Added interfaces for FPGA off-loading.
|
||||
- Added interfaces for FPGA off-loading in GPS L1 C/A, Galileo E1b/c, GPS L2C, GPS L5 and Galileo E5a receiver chains.
|
||||
- CMake scripts now follow a modern approach (targets and properties) but still work with 2.8.12.
|
||||
- Improvements for macOS users using Homebrew.
|
||||
- The software builds against GNU Radio >= 3.7.3, including 3.8.0. Automatically detected, no user intervention is required.
|
||||
- The volk_gnsssdr library can now be built without requiring Boost if the compiler supports C++17 or higher.
|
||||
- The Boost Filesystem library is not anymore a required dependency in cases where it can be replaced by std::filesystem. Automatically detected, no user intervention is required.
|
||||
- CMake scripts automatically select among C++11, C++14, C++17 or C++20 standards, the most recent as possible, depending on compiler and dependencies versions.
|
||||
- Drawback in portability: Protocol Buffers >= 3.0.0 is a new required dependency.
|
||||
|
||||
|
||||
### Improvements in Reliability
|
||||
|
||||
- Included the Guidelines Support Library. General improvement of memory management, replacement of raw pointers by containers or smart pointers.
|
||||
- Applied clang-tidy checks and fixes related to High Integrity C++: performance-move-const-arg, modernize-use-auto, modernize-use-equals-default, modernize-use-equals-delete, modernize-use-noexcept, modernize-use-nullptr, cert-dcl21-cpp, misc-new-delete-overloads, cert-dcl58-cpp, cert-err52-cpp, cert-err60-cpp.
|
||||
- Fixed a number of defects detected by Coverity Scan (version June 2019).
|
||||
|
||||
|
||||
### Improvements in Usability
|
||||
|
||||
- The receiver now admits FPGA off-loading, allowing for real time operation at high sampling rates and higher number of signals and channels.
|
||||
- The receiver now admits FPGA off-loading, allowing for real time operation in embedded systems at high sampling rates and high number of signals and channels per signal in multiple bands.
|
||||
- Fixed program termination (avoiding hangs and segfaults in some platforms/configurations).
|
||||
- The Labsat_Signal_Source now terminates the receiver's execution when the end of file(s) is reached. It now accepts LabSat 2 filenames and series of LabSat 3 files.
|
||||
- Added configuration parameters to set the annotation rate in KML, GPX, GeoJSON and NMEA outputs, set by default to 1 s.
|
||||
- New parameter PVT.show_local_time_zone displays time in the local time zone. Subject to the proper system configuration of the machine running the software receiver.
|
||||
- CMake now generates a summary of enabled/disabled features. This info is also stored in a file called features.log in the building directory.
|
||||
- Improved information provided to the user in case of failure.
|
||||
- New parameter PVT.show_local_time_zone displays time in the local time zone. Subject to the proper system configuration of the machine running the software receiver. This feature is not available in old compilers.
|
||||
- CMake now generates a summary of required/optional dependency packages found and enabled/disabled features. This info is also stored in a file called features.log in the building directory.
|
||||
- Improved information provided to the user in case of building configuration and runtime failures.
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
# Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2012-2018 (see AUTHORS file for a list of contributors)
|
||||
# Copyright (C) 2012-2019 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2012-2018 (see AUTHORS file for a list of contributors)
|
||||
# Copyright (C) 2012-2019 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -121,7 +121,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
int rtcm_MT1077_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1077_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms);
|
||||
int rtcm_MT1087_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1087_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms);
|
||||
int rtcm_MT1097_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1097_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms);
|
||||
//std::map<int, int> rtcm_msg_rate_ms;
|
||||
|
||||
pvt_output_parameters.rtcm_msg_rate_ms[1019] = rtcm_MT1019_rate_ms;
|
||||
pvt_output_parameters.rtcm_msg_rate_ms[1020] = rtcm_MT1020_rate_ms;
|
||||
pvt_output_parameters.rtcm_msg_rate_ms[1045] = rtcm_MT1045_rate_ms;
|
||||
@ -409,7 +409,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
|
||||
if (positioning_mode == -1)
|
||||
{
|
||||
//warn user and set the default
|
||||
// warn user and set the default
|
||||
std::cout << "WARNING: Bad specification of positioning mode." << std::endl;
|
||||
std::cout << "positioning_mode possible values: Single / Static / Kinematic / PPP_Static / PPP_Kinematic" << std::endl;
|
||||
std::cout << "positioning_mode specified value: " << positioning_mode_str << std::endl;
|
||||
@ -439,14 +439,14 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
int number_of_frequencies = configuration->property(role + ".num_bands", num_bands); /* (1:L1, 2:L1+L2, 3:L1+L2+L5) */
|
||||
if ((number_of_frequencies < 1) || (number_of_frequencies > 3))
|
||||
{
|
||||
//warn user and set the default
|
||||
// warn user and set the default
|
||||
number_of_frequencies = num_bands;
|
||||
}
|
||||
|
||||
double elevation_mask = configuration->property(role + ".elevation_mask", 15.0);
|
||||
if ((elevation_mask < 0.0) || (elevation_mask > 90.0))
|
||||
{
|
||||
//warn user and set the default
|
||||
// warn user and set the default
|
||||
LOG(WARNING) << "Erroneous Elevation Mask. Setting to default value of 15.0 degrees";
|
||||
elevation_mask = 15.0;
|
||||
}
|
||||
@ -454,7 +454,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
int dynamics_model = configuration->property(role + ".dynamics_model", 0); /* dynamics model (0:none, 1:velocity, 2:accel) */
|
||||
if ((dynamics_model < 0) || (dynamics_model > 2))
|
||||
{
|
||||
//warn user and set the default
|
||||
// warn user and set the default
|
||||
LOG(WARNING) << "Erroneous Dynamics Model configuration. Setting to default value of (0:none)";
|
||||
dynamics_model = 0;
|
||||
}
|
||||
@ -488,7 +488,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
}
|
||||
if (iono_model == -1)
|
||||
{
|
||||
//warn user and set the default
|
||||
// warn user and set the default
|
||||
std::cout << "WARNING: Bad specification of ionospheric model." << std::endl;
|
||||
std::cout << "iono_model possible values: OFF / Broadcast / SBAS / Iono-Free-LC / Estimate_STEC / IONEX" << std::endl;
|
||||
std::cout << "iono_model specified value: " << iono_model_str << std::endl;
|
||||
@ -521,7 +521,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
}
|
||||
if (trop_model == -1)
|
||||
{
|
||||
//warn user and set the default
|
||||
// warn user and set the default
|
||||
std::cout << "WARNING: Bad specification of tropospheric model." << std::endl;
|
||||
std::cout << "trop_model possible values: OFF / Saastamoinen / SBAS / Estimate_ZTD / Estimate_ZTD_Grad" << std::endl;
|
||||
std::cout << "trop_model specified value: " << trop_model_str << std::endl;
|
||||
@ -568,7 +568,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
int navigation_system = configuration->property(role + ".navigation_system", nsys); /* (SYS_XXX) see src/algorithms/libs/rtklib/rtklib.h */
|
||||
if ((navigation_system < 1) || (navigation_system > 255)) /* GPS: 1 SBAS: 2 GPS+SBAS: 3 Galileo: 8 Galileo+GPS: 9 GPS+SBAS+Galileo: 11 All: 255 */
|
||||
{
|
||||
//warn user and set the default
|
||||
// warn user and set the default
|
||||
LOG(WARNING) << "Erroneous Navigation System. Setting to default value of (0:none)";
|
||||
navigation_system = nsys;
|
||||
}
|
||||
@ -599,7 +599,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
}
|
||||
if (integer_ambiguity_resolution_gps == -1)
|
||||
{
|
||||
//warn user and set the default
|
||||
// warn user and set the default
|
||||
std::cout << "WARNING: Bad specification of GPS ambiguity resolution method." << std::endl;
|
||||
std::cout << "AR_GPS possible values: OFF / Continuous / Instantaneous / Fix-and-Hold / PPP-AR" << std::endl;
|
||||
std::cout << "AR_GPS specified value: " << integer_ambiguity_resolution_gps_str << std::endl;
|
||||
@ -610,7 +610,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
int integer_ambiguity_resolution_glo = configuration->property(role + ".AR_GLO", 1); /* Integer Ambiguity Resolution mode for GLONASS (0:off,1:on,2:auto cal,3:ext cal) */
|
||||
if ((integer_ambiguity_resolution_glo < 0) || (integer_ambiguity_resolution_glo > 3))
|
||||
{
|
||||
//warn user and set the default
|
||||
// warn user and set the default
|
||||
LOG(WARNING) << "Erroneous Integer Ambiguity Resolution for GLONASS . Setting to default value of (1:on)";
|
||||
integer_ambiguity_resolution_glo = 1;
|
||||
}
|
||||
@ -618,7 +618,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
int integer_ambiguity_resolution_bds = configuration->property(role + ".AR_DBS", 1); /* Integer Ambiguity Resolution mode for BEIDOU (0:off,1:on) */
|
||||
if ((integer_ambiguity_resolution_bds < 0) || (integer_ambiguity_resolution_bds > 1))
|
||||
{
|
||||
//warn user and set the default
|
||||
// warn user and set the default
|
||||
LOG(WARNING) << "Erroneous Integer Ambiguity Resolution for BEIDOU . Setting to default value of (1:on)";
|
||||
integer_ambiguity_resolution_bds = 1;
|
||||
}
|
||||
@ -644,7 +644,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
If the baseline length is very short like 1 m, the iteration may be effective to handle
|
||||
the nonlinearity of measurement equation. */
|
||||
|
||||
/// Statistics
|
||||
// Statistics
|
||||
double bias_0 = configuration->property(role + ".bias_0", 30.0);
|
||||
|
||||
double iono_0 = configuration->property(role + ".iono_0", 0.03);
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -95,6 +95,12 @@ target_include_directories(pvt_libs
|
||||
|
||||
target_compile_definitions(pvt_libs PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Rel)
|
||||
target_compile_definitions(pvt_libs
|
||||
PUBLIC -DARMA_NO_BOUND_CHECKING=1
|
||||
)
|
||||
endif()
|
||||
|
||||
if(Boost_VERSION_STRING VERSION_GREATER 1.65.99)
|
||||
target_compile_definitions(pvt_libs
|
||||
PUBLIC
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -41,7 +41,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <sys/stat.h> // for S_IXUSR | S_IRWXG | S_IRWXO
|
||||
#include <sys/types.h> //for mode_t
|
||||
#include <sys/types.h> // for mode_t
|
||||
|
||||
#if HAS_STD_FILESYSTEM
|
||||
#include <system_error>
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -33,8 +33,8 @@
|
||||
#ifndef GNSS_SDR_KML_PRINTER_H_
|
||||
#define GNSS_SDR_KML_PRINTER_H_
|
||||
|
||||
#include <fstream> // for ofstream
|
||||
#include <memory> // for shared_ptr
|
||||
#include <fstream> // for ofstream
|
||||
#include <memory> // for shared_ptr
|
||||
|
||||
|
||||
class Rtklib_Solver;
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Álvaro Cebrián Juan, 2019. acebrianjuan(at)gmail.com
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -53,7 +53,6 @@ private:
|
||||
boost::asio::ip::udp::socket socket;
|
||||
boost::system::error_code error;
|
||||
std::vector<boost::asio::ip::udp::endpoint> endpoints;
|
||||
Monitor_Pvt monitor_pvt{};
|
||||
Serdes_Monitor_Pvt serdes;
|
||||
bool use_protobuf;
|
||||
};
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -175,9 +175,9 @@ int Nmea_Printer::init_serial(const std::string& serial_device)
|
||||
* Opens the serial device and sets the default baud rate for a NMEA transmission (9600,8,N,1)
|
||||
*/
|
||||
int fd = 0;
|
||||
struct termios options
|
||||
{
|
||||
};
|
||||
// clang-format off
|
||||
struct termios options{};
|
||||
// clang-format on
|
||||
int64_t BAUD;
|
||||
int64_t DATABITS;
|
||||
int64_t STOPBITS;
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -32,6 +32,9 @@
|
||||
#ifndef GNSS_SDR_PVT_SOLUTION_H_
|
||||
#define GNSS_SDR_PVT_SOLUTION_H_
|
||||
|
||||
#if ARMA_NO_BOUND_CHECKING
|
||||
#define ARMA_NO_DEBUG 1
|
||||
#endif
|
||||
|
||||
#include <armadillo>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
@ -151,7 +154,6 @@ private:
|
||||
arma::vec d_rx_pos;
|
||||
boost::posix_time::ptime d_position_UTC_time;
|
||||
int d_valid_observations;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
* \author Carles Fernandez Prades, 2011. cfernandez(at)cttc.es
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -627,7 +627,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono
|
||||
{
|
||||
if (glonass_gnav_almanac.i_satellite_freq_channel)
|
||||
{
|
||||
} //Avoid compiler warning
|
||||
} // Avoid compiler warning
|
||||
std::string line;
|
||||
stringVersion = "3.02";
|
||||
version = 3;
|
||||
@ -772,7 +772,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps
|
||||
{
|
||||
if (glonass_gnav_almanac.i_satellite_freq_channel)
|
||||
{
|
||||
} //Avoid compiler warning
|
||||
} // Avoid compiler warning
|
||||
std::string line;
|
||||
stringVersion = "3.02";
|
||||
version = 3;
|
||||
@ -896,8 +896,8 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& gali
|
||||
{
|
||||
if (glonass_gnav_almanac.i_satellite_freq_channel)
|
||||
{
|
||||
} //Avoid compiler warning
|
||||
//Avoid compiler warning, there is not time system correction between Galileo and GLONASS
|
||||
} // Avoid compiler warning
|
||||
// Avoid compiler warning, there is not time system correction between Galileo and GLONASS
|
||||
if (galileo_utc_model.A_0G_10)
|
||||
{
|
||||
}
|
||||
@ -1379,7 +1379,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& iono, co
|
||||
{
|
||||
line += std::string("N: GNSS NAV DATA");
|
||||
line += std::string(4, ' ');
|
||||
//! \todo Add here other systems...
|
||||
//todo Add here other systems...
|
||||
line += std::string("G: GPS");
|
||||
line += std::string(14, ' ');
|
||||
// ...
|
||||
@ -1744,7 +1744,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Beidou_Dnav_Iono&
|
||||
{
|
||||
line += std::string("N: GNSS NAV DATA");
|
||||
line += std::string(4, ' ');
|
||||
//! \todo Add here other systems...
|
||||
//todo: Add here other systems...
|
||||
line += std::string("F: BDS");
|
||||
line += std::string(14, ' ');
|
||||
// ...
|
||||
@ -2495,7 +2495,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Glonass_Gnav_Utc_
|
||||
{
|
||||
if (glonass_gnav_almanac.i_satellite_freq_channel)
|
||||
{
|
||||
} //Avoid compiler warning
|
||||
} // Avoid compiler warning
|
||||
std::vector<std::string> data;
|
||||
std::string line_aux;
|
||||
|
||||
@ -3191,7 +3191,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_ion
|
||||
{
|
||||
if (glonass_gnav_almanac.i_satellite_freq_channel)
|
||||
{
|
||||
} //Avoid compiler warning
|
||||
} // Avoid compiler warning
|
||||
std::vector<std::string> data;
|
||||
std::string line_aux;
|
||||
|
||||
@ -3306,7 +3306,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gp
|
||||
{
|
||||
if (glonass_gnav_almanac.i_satellite_freq_channel)
|
||||
{
|
||||
} //Avoid compiler warning
|
||||
} // Avoid compiler warning
|
||||
std::vector<std::string> data;
|
||||
std::string line_aux;
|
||||
|
||||
@ -3414,8 +3414,8 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& gal
|
||||
{
|
||||
if (glonass_gnav_almanac.i_satellite_freq_channel)
|
||||
{
|
||||
} //Avoid compiler warning
|
||||
//Avoid compiler warning, there is not time system correction between Galileo and GLONASS
|
||||
} // Avoid compiler warning
|
||||
// Avoid compiler warning, there is not time system correction between Galileo and GLONASS
|
||||
if (galileo_utc_model.A_0G_10)
|
||||
{
|
||||
}
|
||||
@ -4270,7 +4270,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int32_t, Gal
|
||||
// -------- BROADCAST ORBIT - 6
|
||||
line.clear();
|
||||
line += std::string(5, ' ');
|
||||
//line += Rinex_Printer::doub2for(galileo_ephemeris_iter->second.SISA_3, 18, 2);
|
||||
// line += Rinex_Printer::doub2for(galileo_ephemeris_iter->second.SISA_3, 18, 2);
|
||||
line += Rinex_Printer::doub2for(zero, 18, 2); // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID
|
||||
line += std::string(1, ' ');
|
||||
std::string E1B_HS;
|
||||
@ -4745,7 +4745,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephem
|
||||
{
|
||||
if (eph.d_m)
|
||||
{
|
||||
} //Avoid compiler warning
|
||||
} // Avoid compiler warning
|
||||
std::string line;
|
||||
std::map<int32_t, Glonass_Gnav_Ephemeris>::const_iterator glonass_gnav_ephemeris_iter;
|
||||
|
||||
@ -4855,7 +4855,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephem
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -5181,7 +5181,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -5536,7 +5536,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -5845,7 +5845,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris&
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -6138,12 +6138,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph
|
||||
out << line << std::endl;
|
||||
|
||||
// -------- Line MARKER TYPE
|
||||
//line.clear();
|
||||
//line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
|
||||
//line += std::string(40, ' ');
|
||||
//line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
//Rinex_Printer::lengthCheck(line);
|
||||
//out << line << std::endl;
|
||||
// line.clear();
|
||||
// line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
|
||||
// line += std::string(40, ' ');
|
||||
// line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
// Rinex_Printer::lengthCheck(line);
|
||||
// out << line << std::endl;
|
||||
|
||||
// -------- Line OBSERVER / AGENCY
|
||||
line.clear();
|
||||
@ -6168,7 +6168,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -6395,12 +6395,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
|
||||
out << line << std::endl;
|
||||
|
||||
// -------- Line MARKER TYPE
|
||||
//line.clear();
|
||||
//line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
|
||||
//line += std::string(40, ' ');
|
||||
//line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
//Rinex_Printer::lengthCheck(line);
|
||||
//out << line << std::endl;
|
||||
// line.clear();
|
||||
// line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
|
||||
// line += std::string(40, ' ');
|
||||
// line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
// Rinex_Printer::lengthCheck(line);
|
||||
// out << line << std::endl;
|
||||
|
||||
// -------- Line OBSERVER / AGENCY
|
||||
line.clear();
|
||||
@ -6425,7 +6425,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -6646,12 +6646,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph
|
||||
out << line << std::endl;
|
||||
|
||||
// -------- Line MARKER TYPE
|
||||
//line.clear();
|
||||
//line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
|
||||
//line += std::string(40, ' ');
|
||||
//line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
//Rinex_Printer::lengthCheck(line);
|
||||
//out << line << std::endl;
|
||||
// line.clear();
|
||||
// line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property
|
||||
// line += std::string(40, ' ');
|
||||
// line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
// Rinex_Printer::lengthCheck(line);
|
||||
// out << line << std::endl;
|
||||
|
||||
// -------- Line OBSERVER / AGENCY
|
||||
line.clear();
|
||||
@ -6676,7 +6676,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -6927,12 +6927,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
out << line << std::endl;
|
||||
|
||||
// -------- Line MARKER TYPE
|
||||
//line.clear();
|
||||
//line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property
|
||||
//line += std::string(40, ' ');
|
||||
//line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
//Rinex_Printer::lengthCheck(line);
|
||||
//out << line << std::endl;
|
||||
// line.clear();
|
||||
// line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property
|
||||
// line += std::string(40, ' ');
|
||||
// line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
// Rinex_Printer::lengthCheck(line);
|
||||
// out << line << std::endl;
|
||||
|
||||
// -------- Line OBSERVER / AGENCY
|
||||
line.clear();
|
||||
@ -6957,7 +6957,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -7273,12 +7273,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
|
||||
out << line << std::endl;
|
||||
|
||||
// -------- Line MARKER TYPE
|
||||
//line.clear();
|
||||
//line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property
|
||||
//line += std::string(40, ' ');
|
||||
//line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
//Rinex_Printer::lengthCheck(line);
|
||||
//out << line << std::endl;
|
||||
// line.clear();
|
||||
// line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property
|
||||
// line += std::string(40, ' ');
|
||||
// line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
// Rinex_Printer::lengthCheck(line);
|
||||
// out << line << std::endl;
|
||||
|
||||
// -------- Line OBSERVER / AGENCY
|
||||
line.clear();
|
||||
@ -7303,7 +7303,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -7591,12 +7591,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris&
|
||||
out << line << std::endl;
|
||||
|
||||
// -------- Line MARKER TYPE
|
||||
//line.clear();
|
||||
//line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property
|
||||
//line += std::string(40, ' ');
|
||||
//line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
//Rinex_Printer::lengthCheck(line);
|
||||
//out << line << std::endl;
|
||||
// line.clear();
|
||||
// line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property
|
||||
// line += std::string(40, ' ');
|
||||
// line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
// Rinex_Printer::lengthCheck(line);
|
||||
// out << line << std::endl;
|
||||
|
||||
// -------- Line OBSERVER / AGENCY
|
||||
line.clear();
|
||||
@ -7621,7 +7621,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris&
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -7858,12 +7858,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
out << line << std::endl;
|
||||
|
||||
// -------- Line MARKER TYPE
|
||||
//line.clear();
|
||||
//line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property
|
||||
//line += std::string(40, ' ');
|
||||
//line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
//Rinex_Printer::lengthCheck(line);
|
||||
//out << line << std::endl;
|
||||
// line.clear();
|
||||
// line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property
|
||||
// line += std::string(40, ' ');
|
||||
// line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
|
||||
// Rinex_Printer::lengthCheck(line);
|
||||
// out << line << std::endl;
|
||||
|
||||
// -------- Line OBSERVER / AGENCY
|
||||
line.clear();
|
||||
@ -7888,7 +7888,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -8170,7 +8170,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Beidou_Dnav_Epheme
|
||||
line.clear();
|
||||
line += Rinex_Printer::leftJustify("GNSS-SDR", 20); // add flag and property
|
||||
line += Rinex_Printer::leftJustify("Software Receiver", 20); // add flag and property
|
||||
//line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
// line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property
|
||||
if (gnss_sdr_version.length() > 20)
|
||||
{
|
||||
gnss_sdr_version.resize(9, ' ');
|
||||
@ -8599,8 +8599,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
|
||||
|
||||
boost::posix_time::ptime p_glonass_time = Rinex_Printer::compute_UTC_time(eph, obs_time);
|
||||
std::string timestring = boost::posix_time::to_iso_string(p_glonass_time);
|
||||
//double utc_t = nav_msg.utc_time(nav_msg.sv_clock_correction(obs_time));
|
||||
//double gps_t = eph.sv_clock_correction(obs_time);
|
||||
// double utc_t = nav_msg.utc_time(nav_msg.sv_clock_correction(obs_time));
|
||||
// double gps_t = eph.sv_clock_correction(obs_time);
|
||||
|
||||
std::string month(timestring, 4, 2);
|
||||
std::string day(timestring, 6, 2);
|
||||
@ -8647,7 +8647,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
|
||||
line += std::string(2, ' ');
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
int32_t numSatellitesObserved = 0;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
for (observables_iter = observables.cbegin();
|
||||
@ -8669,7 +8669,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
|
||||
line += std::to_string(static_cast<int32_t>(observables_iter->second.PRN));
|
||||
}
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
out << line << std::endl;
|
||||
@ -8685,13 +8685,13 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
|
||||
line += std::string(2, ' ');
|
||||
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
lineObs += std::string(1, ' ');
|
||||
}
|
||||
//else
|
||||
// else
|
||||
// {
|
||||
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
|
||||
// }
|
||||
@ -8705,7 +8705,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
|
||||
{
|
||||
lineObs += std::string(1, ' ');
|
||||
}
|
||||
//else
|
||||
// else
|
||||
// {
|
||||
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
|
||||
// }
|
||||
@ -8716,12 +8716,12 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
|
||||
{
|
||||
lineObs += std::string(1, ' ');
|
||||
}
|
||||
//else
|
||||
// else
|
||||
// {
|
||||
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
|
||||
// }
|
||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int32_t>(ssi), 1);
|
||||
//GLONASS L1 SIGNAL STRENGTH
|
||||
// GLONASS L1 SIGNAL STRENGTH
|
||||
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.CN0_dB_hz, 3), 14);
|
||||
if (lineObs.size() < 80)
|
||||
{
|
||||
@ -8757,7 +8757,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
int32_t numSatellitesObserved = 0;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
for (observables_iter = observables.cbegin();
|
||||
@ -8769,7 +8769,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
|
||||
line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3);
|
||||
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
@ -8787,10 +8787,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
|
||||
lineObs += std::string(1, '0');
|
||||
}
|
||||
lineObs += std::to_string(static_cast<int32_t>(observables_iter->second.PRN));
|
||||
//lineObs += std::string(2, ' ');
|
||||
// lineObs += std::string(2, ' ');
|
||||
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -8830,7 +8830,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
|
||||
|
||||
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int32_t>(ssi), 1);
|
||||
|
||||
//GLONASS L1 SIGNAL STRENGTH
|
||||
// GLONASS L1 SIGNAL STRENGTH
|
||||
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.CN0_dB_hz, 3), 14);
|
||||
|
||||
if (lineObs.size() < 80)
|
||||
@ -8931,8 +8931,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
line += std::string(1, '0');
|
||||
}
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
//Get maps with observations
|
||||
// Number of satellites observed in current epoch
|
||||
// Get maps with observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesG1C;
|
||||
std::map<int32_t, Gnss_Synchro> observablesR1C;
|
||||
std::map<int32_t, Gnss_Synchro> observablesR2C;
|
||||
@ -9065,7 +9065,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
// Pseudorange Measurements
|
||||
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -9136,7 +9136,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
//double leap_seconds = Rinex_Printer::get_leap_second(glonass_gnav_eph, gps_obs_time);
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -9232,8 +9232,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
//Get maps with observations
|
||||
// Number of satellites observed in current epoch
|
||||
// Get maps with observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesG2S;
|
||||
std::map<int32_t, Gnss_Synchro> observablesR1C;
|
||||
std::map<int32_t, Gnss_Synchro> observablesR2C;
|
||||
@ -9325,7 +9325,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
|
||||
// Pseudorange Measurements
|
||||
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -9394,7 +9394,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
|
||||
//double leap_seconds = Rinex_Printer::get_leap_second(glonass_gnav_eph, gps_obs_time);
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -9489,9 +9489,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
|
||||
//Get maps with observations
|
||||
// Get maps with observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesE1B;
|
||||
std::map<int32_t, Gnss_Synchro> observablesR1C;
|
||||
std::map<int32_t, Gnss_Synchro> observablesR2C;
|
||||
@ -9551,7 +9551,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
|
||||
line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3);
|
||||
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
@ -9581,7 +9581,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
|
||||
lineObs += std::to_string(static_cast<int32_t>(observables_iter->second.PRN));
|
||||
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -9647,7 +9647,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -9755,7 +9755,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
line += std::string(2, ' ');
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
int32_t numSatellitesObserved = 0;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
for (observables_iter = observables.cbegin();
|
||||
@ -9777,7 +9777,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
line += std::to_string(static_cast<int32_t>(observables_iter->second.PRN));
|
||||
}
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
out << line << std::endl;
|
||||
@ -9793,7 +9793,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
line += std::string(2, ' ');
|
||||
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -9866,7 +9866,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
int32_t numSatellitesObserved = 0;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
for (observables_iter = observables.cbegin();
|
||||
@ -9878,7 +9878,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3);
|
||||
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
@ -9896,10 +9896,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
lineObs += std::string(1, '0');
|
||||
}
|
||||
lineObs += std::to_string(static_cast<int32_t>(observables_iter->second.PRN));
|
||||
//lineObs += std::string(2, ' ');
|
||||
// lineObs += std::string(2, ' ');
|
||||
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -9993,7 +9993,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
int32_t numSatellitesObserved = 0;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
for (observables_iter = observables.cbegin();
|
||||
@ -10005,7 +10005,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
|
||||
line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3);
|
||||
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
@ -10023,11 +10023,11 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
|
||||
lineObs += std::string(1, '0');
|
||||
}
|
||||
lineObs += std::to_string(static_cast<int32_t>(observables_iter->second.PRN));
|
||||
//lineObs += std::string(2, ' ');
|
||||
// lineObs += std::string(2, ' ');
|
||||
//GPS L2 PSEUDORANGE
|
||||
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -10123,9 +10123,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
|
||||
//Get maps with GPS L1 and L2 observations
|
||||
// Get maps with GPS L1 and L2 observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesL1;
|
||||
std::map<int32_t, Gnss_Synchro> observablesL2;
|
||||
std::map<int32_t, Gnss_Synchro> observablesL5;
|
||||
@ -10229,7 +10229,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
int32_t numSatellitesObserved = available_prns.size();
|
||||
line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3);
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
out << line << std::endl;
|
||||
@ -10252,7 +10252,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -10346,9 +10346,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
|
||||
//Get maps with Galileo observations
|
||||
// Get maps with Galileo observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesE1B;
|
||||
std::map<int32_t, Gnss_Synchro> observablesE5A;
|
||||
std::map<int32_t, Gnss_Synchro> observablesE5B;
|
||||
@ -10475,7 +10475,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
||||
int32_t numSatellitesObserved = available_prns.size();
|
||||
line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3);
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
out << line << std::endl;
|
||||
@ -10498,7 +10498,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -10593,9 +10593,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
|
||||
//Get maps with observations
|
||||
// Get maps with observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesG1C;
|
||||
std::map<int32_t, Gnss_Synchro> observablesE1B;
|
||||
std::map<int32_t, Gnss_Synchro> observablesE5A;
|
||||
@ -10674,7 +10674,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3);
|
||||
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
@ -10704,7 +10704,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
lineObs += std::to_string(static_cast<int32_t>(observables_iter->second.PRN));
|
||||
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -10770,7 +10770,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -10865,9 +10865,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
|
||||
//Get maps with observations
|
||||
// Get maps with observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesG2S;
|
||||
std::map<int32_t, Gnss_Synchro> observablesGL5;
|
||||
std::map<int32_t, Gnss_Synchro> observablesE1B;
|
||||
@ -10979,7 +10979,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
|
||||
line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3);
|
||||
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
@ -11005,7 +11005,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -11067,7 +11067,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -11162,9 +11162,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
|
||||
//Get maps with observations
|
||||
// Get maps with observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesG2S;
|
||||
std::map<int32_t, Gnss_Synchro> observablesGL5;
|
||||
std::map<int32_t, Gnss_Synchro> observablesG1C;
|
||||
@ -11294,7 +11294,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3);
|
||||
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
@ -11320,7 +11320,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -11382,7 +11382,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -11471,9 +11471,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris
|
||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||
line += std::string(1, '0');
|
||||
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
|
||||
//Get maps with BeiDou observations
|
||||
// Get maps with BeiDou observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesB1I;
|
||||
std::map<int32_t, Gnss_Synchro> observablesB3I;
|
||||
|
||||
@ -11544,7 +11544,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris
|
||||
int32_t numSatellitesObserved = available_prns.size();
|
||||
line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3);
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
// line += rightJustify(asString(clockOffset, 12), 15);
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
out << line << std::endl;
|
||||
@ -11567,7 +11567,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
//Loss of lock indicator (LLI)
|
||||
// Loss of lock indicator (LLI)
|
||||
int32_t lli = 0; // Include in the observation!!
|
||||
if (lli == 0)
|
||||
{
|
||||
@ -11771,7 +11771,7 @@ int32_t Rinex_Printer::signalStrength(const double snr)
|
||||
boost::posix_time::ptime Rinex_Printer::compute_UTC_time(const Gps_Navigation_Message& nav_msg)
|
||||
{
|
||||
// if we are processing a file -> wait to leap second to resolve the ambiguity else take the week from the local system time
|
||||
//: idea resolve the ambiguity with the leap second http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm
|
||||
// idea: resolve the ambiguity with the leap second http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm
|
||||
const double utc_t = nav_msg.utc_time(nav_msg.d_TOW);
|
||||
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<int64_t>((utc_t + 604800 * static_cast<double>(nav_msg.i_GPS_week)) * 1000));
|
||||
if (nav_msg.i_GPS_week < 512)
|
||||
|
@ -25,7 +25,7 @@
|
||||
* \author Carles Fernandez Prades, 2011. cfernandez(at)cttc.es
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -142,7 +142,7 @@ public:
|
||||
/*!
|
||||
* \brief Generates the Mixed (GPS L1 C/A/GLONASS L1, L2) Navigation Data header
|
||||
*/
|
||||
void rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Gps_Ephemeris& eph, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
|
||||
void rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Gps_Ephemeris& eph, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
|
||||
|
||||
/*!
|
||||
* \brief Generates the Mixed (GPS L2C C/A/GLONASS L1, L2) Navigation Data header
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -498,7 +498,7 @@ std::string Rtcm::print_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, co
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
|
||||
//Get a map with GPS L1 only observations
|
||||
// Get a map with GPS L1 only observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesL1;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
|
||||
@ -547,7 +547,7 @@ std::string Rtcm::print_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, co
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
|
||||
//Get a map with GPS L1 only observations
|
||||
// Get a map with GPS L1 only observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesL1;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
|
||||
@ -618,7 +618,7 @@ std::string Rtcm::print_MT1003(const Gps_Ephemeris& ephL1, const Gps_CNAV_Epheme
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
|
||||
//Get maps with GPS L1 and L2 observations
|
||||
// Get maps with GPS L1 and L2 observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesL1;
|
||||
std::map<int32_t, Gnss_Synchro> observablesL2;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
@ -727,7 +727,7 @@ std::string Rtcm::print_MT1004(const Gps_Ephemeris& ephL1, const Gps_CNAV_Epheme
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
|
||||
//Get maps with GPS L1 and L2 observations
|
||||
// Get maps with GPS L1 and L2 observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesL1;
|
||||
std::map<int32_t, Gnss_Synchro> observablesL2;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
@ -1177,7 +1177,7 @@ std::string Rtcm::print_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, d
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
|
||||
//Get a map with GLONASS L1 only observations
|
||||
// Get a map with GLONASS L1 only observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesL1;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
|
||||
@ -1226,7 +1226,7 @@ std::string Rtcm::print_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, d
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
|
||||
//Get a map with GPS L1 only observations
|
||||
// Get a map with GPS L1 only observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesL1;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
|
||||
@ -1301,7 +1301,7 @@ std::string Rtcm::print_MT1011(const Glonass_Gnav_Ephemeris& ephL1, const Glonas
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
|
||||
//Get maps with GPS L1 and L2 observations
|
||||
// Get maps with GPS L1 and L2 observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesL1;
|
||||
std::map<int32_t, Gnss_Synchro> observablesL2;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
@ -1412,7 +1412,7 @@ std::string Rtcm::print_MT1012(const Glonass_Gnav_Ephemeris& ephL1, const Glonas
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
|
||||
//Get maps with GLONASS L1 and L2 observations
|
||||
// Get maps with GLONASS L1 and L2 observations
|
||||
std::map<int32_t, Gnss_Synchro> observablesL1;
|
||||
std::map<int32_t, Gnss_Synchro> observablesL2;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
@ -1887,13 +1887,13 @@ int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& gl
|
||||
index += 1;
|
||||
if (glonass_gnav_alm_health)
|
||||
{
|
||||
} //Avoid comiler warning
|
||||
} // Avoid compiler warning
|
||||
|
||||
glonass_gnav_alm_health_ind = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
index += 1;
|
||||
if (glonass_gnav_alm_health_ind)
|
||||
{
|
||||
} //Avoid comiler warning
|
||||
} // Avoid compiler warning
|
||||
|
||||
glonass_gnav_eph.d_P_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 2)));
|
||||
glonass_gnav_eph.d_P_1 = (glonass_gnav_eph.d_P_1 + 1) * 15;
|
||||
@ -2309,7 +2309,7 @@ std::string Rtcm::print_MSM_1(const Gps_Ephemeris& gps_eph,
|
||||
}
|
||||
if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0))
|
||||
{
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; //print two messages?
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; // print two messages?
|
||||
}
|
||||
if (msg_number == 0)
|
||||
{
|
||||
@ -2504,7 +2504,7 @@ std::string Rtcm::print_MSM_2(const Gps_Ephemeris& gps_eph,
|
||||
}
|
||||
if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0))
|
||||
{
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; //print two messages?
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; // print two messages?
|
||||
}
|
||||
if (msg_number == 0)
|
||||
{
|
||||
@ -2617,7 +2617,7 @@ std::string Rtcm::print_MSM_3(const Gps_Ephemeris& gps_eph,
|
||||
}
|
||||
if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0))
|
||||
{
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; //print two messages?
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; // print two messages?
|
||||
}
|
||||
if (msg_number == 0)
|
||||
{
|
||||
@ -2733,7 +2733,7 @@ std::string Rtcm::print_MSM_4(const Gps_Ephemeris& gps_eph,
|
||||
}
|
||||
if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0))
|
||||
{
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; //print two messages?
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; // print two messages?
|
||||
}
|
||||
if (msg_number == 0)
|
||||
{
|
||||
@ -2892,7 +2892,7 @@ std::string Rtcm::print_MSM_5(const Gps_Ephemeris& gps_eph,
|
||||
}
|
||||
if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0))
|
||||
{
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; //print two messages?
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; // print two messages?
|
||||
}
|
||||
if (msg_number == 0)
|
||||
{
|
||||
@ -3060,7 +3060,7 @@ std::string Rtcm::print_MSM_6(const Gps_Ephemeris& gps_eph,
|
||||
}
|
||||
if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0))
|
||||
{
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; //print two messages?
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; // print two messages?
|
||||
}
|
||||
if (msg_number == 0)
|
||||
{
|
||||
@ -3179,7 +3179,7 @@ std::string Rtcm::print_MSM_7(const Gps_Ephemeris& gps_eph,
|
||||
}
|
||||
if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (glo_gnav_eph.i_satellite_PRN != 0) && (gal_eph.i_satellite_PRN != 0))
|
||||
{
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; //print two messages?
|
||||
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; // print two messages?
|
||||
}
|
||||
if (msg_number == 0)
|
||||
{
|
||||
@ -3709,7 +3709,7 @@ int32_t Rtcm::set_DF002(uint32_t message_number)
|
||||
|
||||
int32_t Rtcm::set_DF003(uint32_t ref_station_ID)
|
||||
{
|
||||
//uint32_t station_ID = ref_station_ID;
|
||||
// uint32_t station_ID = ref_station_ID;
|
||||
if (ref_station_ID > 4095)
|
||||
{
|
||||
LOG(WARNING) << "RTCM reference station ID must be between 0 and 4095, but it has been set to " << ref_station_ID;
|
||||
@ -3745,7 +3745,7 @@ int32_t Rtcm::set_DF005(bool sync_flag)
|
||||
|
||||
int32_t Rtcm::set_DF006(const std::map<int32_t, Gnss_Synchro>& observables)
|
||||
{
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
uint16_t nsats = 0;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
for (observables_iter = observables.cbegin();
|
||||
@ -4007,7 +4007,7 @@ int32_t Rtcm::set_DF034(double obs_time)
|
||||
|
||||
int32_t Rtcm::set_DF035(const std::map<int32_t, Gnss_Synchro>& observables)
|
||||
{
|
||||
//Number of satellites observed in current epoch
|
||||
// Number of satellites observed in current epoch
|
||||
uint16_t nsats = 0;
|
||||
std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter;
|
||||
for (observables_iter = observables.begin();
|
||||
@ -4258,7 +4258,7 @@ int32_t Rtcm::set_DF052(const Gps_Ephemeris& gps_eph, double obs_time)
|
||||
std::string hours = now_ptime.substr(9, 2);
|
||||
std::string minutes = now_ptime.substr(11, 2);
|
||||
std::string seconds = now_ptime.substr(13, 8);
|
||||
//boost::gregorian::date d(boost::gregorian::from_undelimited_string(today_ptime));
|
||||
// boost::gregorian::date d(boost::gregorian::from_undelimited_string(today_ptime));
|
||||
uint32_t seconds_of_day = boost::lexical_cast<uint32_t>(hours) * 60 * 60 + boost::lexical_cast<uint32_t>(minutes) * 60 + boost::lexical_cast<uint32_t>(seconds);
|
||||
DF052 = std::bitset<17>(seconds_of_day);
|
||||
return 0;
|
||||
@ -4866,7 +4866,7 @@ int32_t Rtcm::set_DF290(const Galileo_Ephemeris& gal_eph)
|
||||
int32_t Rtcm::set_DF291(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
auto SISA = static_cast<uint16_t>(gal_eph.SISA_3);
|
||||
//SISA = 0; // SIS Accuracy, data content definition not given in Galileo OS SIS ICD, Issue 1.1, Sept 2010
|
||||
// SISA = 0; // SIS Accuracy, data content definition not given in Galileo OS SIS ICD, Issue 1.1, Sept 2010
|
||||
DF291 = std::bitset<8>(SISA);
|
||||
return 0;
|
||||
}
|
||||
@ -5047,7 +5047,7 @@ int32_t Rtcm::set_DF312(const Galileo_Ephemeris& gal_eph)
|
||||
int32_t Rtcm::set_DF313(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
auto bdg_E5b_E1 = static_cast<uint32_t>(std::round(gal_eph.BGD_E1E5b_5));
|
||||
//bdg_E5b_E1 = 0; //reserved
|
||||
// bdg_E5b_E1 = 0; // reserved
|
||||
DF313 = std::bitset<10>(bdg_E5b_E1);
|
||||
return 0;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -384,7 +384,9 @@ int Rtcm_Printer::init_serial(const std::string& serial_device)
|
||||
* Opens the serial device and sets the default baud rate for a RTCM transmission (9600,8,N,1)
|
||||
*/
|
||||
int32_t fd = 0;
|
||||
// clang-format off
|
||||
struct termios options{};
|
||||
// clang-format on
|
||||
int64_t BAUD;
|
||||
int64_t DATABITS;
|
||||
int64_t STOPBITS;
|
||||
@ -404,7 +406,7 @@ int Rtcm_Printer::init_serial(const std::string& serial_device)
|
||||
tcgetattr(fd, &options); // read serial port options
|
||||
|
||||
BAUD = B9600;
|
||||
//BAUD = B38400;
|
||||
// BAUD = B38400;
|
||||
DATABITS = CS8;
|
||||
STOPBITS = 0;
|
||||
PARITYON = 0;
|
||||
@ -412,7 +414,7 @@ int Rtcm_Printer::init_serial(const std::string& serial_device)
|
||||
|
||||
options.c_cflag = BAUD | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD;
|
||||
// enable receiver, set 8 bit data, ignore control lines
|
||||
//options.c_cflag |= (CLOCAL | CREAD | CS8);
|
||||
// options.c_cflag |= (CLOCAL | CREAD | CS8);
|
||||
options.c_iflag = IGNPAR;
|
||||
|
||||
// set the new port options
|
||||
@ -432,7 +434,7 @@ void Rtcm_Printer::close_serial()
|
||||
|
||||
bool Rtcm_Printer::Print_Message(const std::string& message)
|
||||
{
|
||||
//write to file
|
||||
// write to file
|
||||
if (d_rtcm_file_dump)
|
||||
{
|
||||
try
|
||||
@ -446,7 +448,7 @@ bool Rtcm_Printer::Print_Message(const std::string& message)
|
||||
}
|
||||
}
|
||||
|
||||
//write to serial device
|
||||
// write to serial device
|
||||
if (rtcm_dev_descriptor != -1)
|
||||
{
|
||||
if (write(rtcm_dev_descriptor, message.c_str(), message.length()) == -1)
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -22,8 +22,8 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
* Copyright (C) 2007-2013, T. Takasu
|
||||
* Copyright (C) 2017, Javier Arribas
|
||||
* Copyright (C) 2017, Carles Fernandez
|
||||
* Copyright (C) 2017-2019, Javier Arribas
|
||||
* Copyright (C) 2017-2019, Carles Fernandez
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -94,7 +94,6 @@ Rtklib_Solver::Rtklib_Solver(int nchannels, std::string dump_filename, bool flag
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
d_flag_dump_enabled = flag_dump_to_file;
|
||||
d_flag_dump_mat_enabled = flag_dump_to_mat;
|
||||
count_valid_position = 0;
|
||||
this->set_averaging_flag(false);
|
||||
rtk_ = rtk;
|
||||
|
||||
@ -117,6 +116,44 @@ Rtklib_Solver::Rtklib_Solver(int nchannels, std::string dump_filename, bool flag
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Rtklib_Solver::~Rtklib_Solver()
|
||||
{
|
||||
if (d_dump_file.is_open() == true)
|
||||
{
|
||||
auto pos = d_dump_file.tellp();
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor closing the RTKLIB dump file " << ex.what();
|
||||
}
|
||||
if (pos == 0)
|
||||
{
|
||||
errorlib::error_code ec;
|
||||
if (!fs::remove(fs::path(d_dump_filename), ec))
|
||||
{
|
||||
std::cerr << "Problem removing temporary file " << d_dump_filename << '\n';
|
||||
}
|
||||
d_flag_dump_mat_enabled = false;
|
||||
}
|
||||
}
|
||||
if (d_flag_dump_mat_enabled)
|
||||
{
|
||||
try
|
||||
{
|
||||
save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor saving the PVT .mat dump file " << ex.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Rtklib_Solver::save_matfile()
|
||||
{
|
||||
// READ DUMP FILE
|
||||
@ -356,43 +393,6 @@ bool Rtklib_Solver::save_matfile()
|
||||
}
|
||||
|
||||
|
||||
Rtklib_Solver::~Rtklib_Solver()
|
||||
{
|
||||
if (d_dump_file.is_open() == true)
|
||||
{
|
||||
auto pos = d_dump_file.tellp();
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor closing the RTKLIB dump file " << ex.what();
|
||||
}
|
||||
if (pos == 0)
|
||||
{
|
||||
errorlib::error_code ec;
|
||||
if (!fs::remove(fs::path(d_dump_filename), ec))
|
||||
{
|
||||
std::cerr << "Problem removing temporary file " << d_dump_filename << '\n';
|
||||
}
|
||||
d_flag_dump_mat_enabled = false;
|
||||
}
|
||||
}
|
||||
if (d_flag_dump_mat_enabled)
|
||||
{
|
||||
try
|
||||
{
|
||||
save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor saving the PVT .mat dump file " << ex.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
double Rtklib_Solver::get_gdop() const
|
||||
{
|
||||
return dop_[0];
|
||||
@ -718,7 +718,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
obs_data[i + valid_obs] = insert_obs_to_rtklib(obs_data[i + valid_obs],
|
||||
gnss_observables_iter->second,
|
||||
glonass_gnav_ephemeris_iter->second.d_WN,
|
||||
1); //Band 1 (L2)
|
||||
1); // Band 1 (L2)
|
||||
found_L1_obs = true;
|
||||
break;
|
||||
}
|
||||
@ -913,7 +913,13 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
}
|
||||
|
||||
/* update carrier wave length using native function call in RTKlib */
|
||||
uniqnav(&nav_data);
|
||||
for (int i = 0; i < MAXSAT; i++)
|
||||
{
|
||||
for (int j = 0; j < NFREQ; j++)
|
||||
{
|
||||
nav_data.lam[i][j] = satwavelen(i + 1, j, &nav_data);
|
||||
}
|
||||
}
|
||||
|
||||
result = rtkpos(&rtk_, obs_data.data(), valid_obs + glo_valid_obs, &nav_data);
|
||||
|
||||
@ -1000,9 +1006,9 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
<< " in ECEF (X,Y,Z,t[meters]) = " << rx_position_and_time;
|
||||
|
||||
boost::posix_time::ptime p_time;
|
||||
// gtime_t rtklib_utc_time = gpst2utc(pvt_sol.time); //Corrected RX Time (Non integer multiply of 1 ms of granularity)
|
||||
// gtime_t rtklib_utc_time = gpst2utc(pvt_sol.time); // Corrected RX Time (Non integer multiply of 1 ms of granularity)
|
||||
// Uncorrected RX Time (integer multiply of 1 ms and the same observables time reported in RTCM and RINEX)
|
||||
gtime_t rtklib_time = timeadd(pvt_sol.time, rx_position_and_time(3)); //uncorrected rx time
|
||||
gtime_t rtklib_time = timeadd(pvt_sol.time, rx_position_and_time(3)); // uncorrected rx time
|
||||
gtime_t rtklib_utc_time = gpst2utc(rtklib_time);
|
||||
p_time = boost::posix_time::from_time_t(rtklib_utc_time.time);
|
||||
p_time += boost::posix_time::microseconds(static_cast<long>(round(rtklib_utc_time.sec * 1e6))); // NOLINT(google-runtime-int)
|
||||
|
@ -22,8 +22,8 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
* Copyright (C) 2007-2013, T. Takasu
|
||||
* Copyright (C) 2017, Javier Arribas
|
||||
* Copyright (C) 2017, Carles Fernandez
|
||||
* Copyright (C) 2017-2019, Javier Arribas
|
||||
* Copyright (C) 2017-2019, Carles Fernandez
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -126,8 +126,6 @@ public:
|
||||
Beidou_Dnav_Iono beidou_dnav_iono;
|
||||
std::map<int, Beidou_Dnav_Almanac> beidou_dnav_almanac_map;
|
||||
|
||||
int count_valid_position;
|
||||
|
||||
private:
|
||||
rtk_t rtk_{};
|
||||
std::string d_dump_filename;
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2012-2018 (see AUTHORS file for a list of contributors)
|
||||
# Copyright (C) 2012-2019 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
|
@ -98,6 +98,7 @@ target_link_libraries(acquisition_adapters
|
||||
algorithms_libs
|
||||
gnss_sdr_flags
|
||||
acquisition_gr_blocks
|
||||
acquisition_libs
|
||||
channel_libs
|
||||
core_system_parameters
|
||||
Gnuradio::blocks
|
||||
@ -108,7 +109,6 @@ target_link_libraries(acquisition_adapters
|
||||
Glog::glog
|
||||
Gnuradio::fft
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
acquisition_libs
|
||||
)
|
||||
|
||||
target_include_directories(acquisition_adapters
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -199,14 +199,14 @@ void BeidouB1iPcpsAcquisition::init()
|
||||
|
||||
void BeidouB1iPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
beidou_b1i_code_gen_complex_sampled(gsl::span<std::complex<float>>(code, code_length_), gnss_synchro_->PRN, fs_in_, 0);
|
||||
beidou_b1i_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < num_codes_; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_->set_local_code(code_.data());
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -200,14 +200,14 @@ void BeidouB3iPcpsAcquisition::init()
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
beidou_b3i_code_gen_complex_sampled(gsl::span<std::complex<float>>(code, code_length_), gnss_synchro_->PRN, fs_in_, 0);
|
||||
beidou_b3i_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < num_codes_; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_->set_local_code(code_.data());
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -210,19 +210,19 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_local_code()
|
||||
bool cboc = configuration_->property(
|
||||
"Acquisition" + std::to_string(channel_) + ".cboc", false);
|
||||
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
std::array<char, 3> Signal_{};
|
||||
Signal_[0] = gnss_synchro_->Signal[0];
|
||||
Signal_[1] = gnss_synchro_->Signal[1];
|
||||
Signal_[2] = '\0';
|
||||
|
||||
galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>>(code, code_length_), Signal_,
|
||||
galileo_e1_code_gen_complex_sampled(code, Signal_,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < sampled_ms_ / 4; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_cc_->set_local_code(code_.data());
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -212,6 +212,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_doppler_step(unsigned int doppler_st
|
||||
acquisition_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisition::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -245,8 +246,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_local_code()
|
||||
bool cboc = configuration_->property(
|
||||
"Acquisition" + std::to_string(channel_) + ".cboc", false);
|
||||
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
gsl::span<std::complex<float>> code_span(code.get(), code_length_);
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
if (acquire_pilot_ == true)
|
||||
{
|
||||
@ -254,12 +254,12 @@ void GalileoE1PcpsAmbiguousAcquisition::set_local_code()
|
||||
std::array<char, 3> pilot_signal = {{'1', 'C', '\0'}};
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
galileo_e1_code_gen_complex_sampled(code_span, pilot_signal,
|
||||
galileo_e1_code_gen_complex_sampled(code, pilot_signal,
|
||||
cboc, gnss_synchro_->PRN, acq_parameters_.resampled_fs, 0, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
galileo_e1_code_gen_complex_sampled(code_span, pilot_signal,
|
||||
galileo_e1_code_gen_complex_sampled(code, pilot_signal,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
}
|
||||
}
|
||||
@ -271,12 +271,12 @@ void GalileoE1PcpsAmbiguousAcquisition::set_local_code()
|
||||
Signal_[2] = '\0';
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
galileo_e1_code_gen_complex_sampled(code_span, Signal_,
|
||||
galileo_e1_code_gen_complex_sampled(code, Signal_,
|
||||
cboc, gnss_synchro_->PRN, acq_parameters_.resampled_fs, 0, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
galileo_e1_code_gen_complex_sampled(code_span, Signal_,
|
||||
galileo_e1_code_gen_complex_sampled(code, Signal_,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
}
|
||||
}
|
||||
@ -284,7 +284,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_local_code()
|
||||
gsl::span<gr_complex> code__span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < sampled_ms_ / 4; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code__span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code__span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_->set_local_code(code_.data());
|
||||
@ -397,6 +397,7 @@ gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_right_block()
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisition::set_resampler_latency(uint32_t latency_samples)
|
||||
{
|
||||
acquisition_->set_resampler_latency(latency_samples);
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
@ -44,14 +43,6 @@
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
#define QUANT_BITS_LOCAL_CODE 16
|
||||
#define SELECT_LSBits 0x0000FFFF // Select the 10 LSbits out of a 20-bit word
|
||||
#define SELECT_MSBbits 0xFFFF0000 // Select the 10 MSbits out of a 20-bit word
|
||||
#define SELECT_ALL_CODE_BITS 0xFFFFFFFF // Select a 20 bit word
|
||||
#define SHL_CODE_BITS 65536 // shift left by 10 bits
|
||||
|
||||
GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
@ -122,15 +113,15 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
|
||||
if (acquire_pilot_ == true)
|
||||
{
|
||||
//set local signal generator to Galileo E1 pilot component (1C)
|
||||
// set local signal generator to Galileo E1 pilot component (1C)
|
||||
std::array<char, 3> pilot_signal = {{'1', 'C', '\0'}};
|
||||
galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.data(), nsamples_total), pilot_signal,
|
||||
galileo_e1_code_gen_complex_sampled(code, pilot_signal,
|
||||
cboc, PRN, fs_in, 0, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::array<char, 3> data_signal = {{'1', 'B', '\0'}};
|
||||
galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.data(), nsamples_total), data_signal,
|
||||
galileo_e1_code_gen_complex_sampled(code, data_signal,
|
||||
cboc, PRN, fs_in, 0, false);
|
||||
}
|
||||
|
||||
@ -166,10 +157,10 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
// and package codes in a format that is ready to be written to the FPGA
|
||||
for (uint32_t i = 0; i < nsamples_total; i++)
|
||||
{
|
||||
tmp = static_cast<int32_t>(floor(fft_codes_padded[i].real() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max));
|
||||
tmp2 = static_cast<int32_t>(floor(fft_codes_padded[i].imag() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max));
|
||||
local_code = (tmp & SELECT_LSBits) | ((tmp2 * SHL_CODE_BITS) & SELECT_MSBbits); // put together the real part and the imaginary part
|
||||
fft_data = local_code & SELECT_ALL_CODE_BITS;
|
||||
tmp = static_cast<int32_t>(floor(fft_codes_padded[i].real() * (pow(2, quant_bits_local_code - 1) - 1) / max));
|
||||
tmp2 = static_cast<int32_t>(floor(fft_codes_padded[i].imag() * (pow(2, quant_bits_local_code - 1) - 1) / max));
|
||||
local_code = (tmp & select_lsbits) | ((tmp2 * shl_code_bits) & select_msbits); // put together the real part and the imaginary part
|
||||
fft_data = local_code & select_all_code_bits;
|
||||
d_all_fft_codes_[i + (nsamples_total * (PRN - 1))] = fft_data;
|
||||
}
|
||||
}
|
||||
@ -222,6 +213,14 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::set_doppler_step(unsigned int dopple
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
|
@ -24,7 +24,7 @@
|
||||
* 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/>.
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
@ -32,16 +32,15 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H_
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include "acq_conf.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstddef> // for size_t
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Gnss_Synchro;
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
/*!
|
||||
@ -51,13 +50,22 @@ class ConfigurationInterface;
|
||||
class GalileoE1PcpsAmbiguousAcquisitionFpga : public AcquisitionInterface
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Constructor
|
||||
*/
|
||||
GalileoE1PcpsAmbiguousAcquisitionFpga(ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
/*!
|
||||
* \brief Destructor
|
||||
*/
|
||||
~GalileoE1PcpsAmbiguousAcquisitionFpga() = default;
|
||||
|
||||
/*!
|
||||
* \brief Role
|
||||
*/
|
||||
inline std::string role() override
|
||||
{
|
||||
return role_;
|
||||
@ -71,21 +79,38 @@ public:
|
||||
return "Galileo_E1_PCPS_Ambiguous_Acquisition_Fpga";
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns size of lv_16sc_t
|
||||
*/
|
||||
size_t item_size() override
|
||||
{
|
||||
size_t item_size = sizeof(lv_16sc_t);
|
||||
return item_size;
|
||||
return sizeof(int16_t);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Connect
|
||||
*/
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
|
||||
/*!
|
||||
* \brief Disconnect
|
||||
*/
|
||||
void disconnect(gr::top_block_sptr top_block) override;
|
||||
|
||||
/*!
|
||||
* \brief Get left block
|
||||
*/
|
||||
gr::basic_block_sptr get_left_block() override;
|
||||
|
||||
/*!
|
||||
* \brief Get right block
|
||||
*/
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to efficiently exchange synchronization data between acquisition and
|
||||
* tracking blocks
|
||||
* tracking blocks
|
||||
*/
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
@ -122,6 +147,11 @@ public:
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step) override;
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler center for the grid search
|
||||
*/
|
||||
void set_doppler_center(int doppler_center) override;
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
@ -152,9 +182,20 @@ public:
|
||||
*/
|
||||
void stop_acquisition() override;
|
||||
|
||||
/*!
|
||||
* \brief Set resampler latency
|
||||
*/
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
static const uint32_t quant_bits_local_code = 16;
|
||||
static const uint32_t select_lsbits = 0x0000FFFF; // Select the 10 LSbits out of a 20-bit word
|
||||
static const uint32_t select_msbits = 0xFFFF0000; // Select the 10 MSbits out of a 20-bit word
|
||||
static const uint32_t select_all_code_bits = 0xFFFFFFFF; // Select a 20 bit word
|
||||
static const uint32_t shl_code_bits = 65536; // shift left by 10 bits
|
||||
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
bool acquire_pilot_;
|
||||
@ -162,6 +203,7 @@ private:
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
int32_t doppler_center_;
|
||||
std::string dump_filename_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string role_;
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -186,7 +186,6 @@ signed int GalileoE1PcpsCccwsrAmbiguousAcquisition::mag()
|
||||
void GalileoE1PcpsCccwsrAmbiguousAcquisition::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
@ -199,12 +198,12 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_local_code()
|
||||
|
||||
std::array<char, 3> signal = {{'1', 'B', '\0'}};
|
||||
|
||||
galileo_e1_code_gen_complex_sampled(gsl::span<gr_complex>(code_data_.data(), vector_length_), signal,
|
||||
galileo_e1_code_gen_complex_sampled(code_data_, signal,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
|
||||
std::array<char, 3> signal_C = {{'1', 'C', '\0'}};
|
||||
|
||||
galileo_e1_code_gen_complex_sampled(gsl::span<gr_complex>(code_pilot_.data(), vector_length_), signal_C,
|
||||
galileo_e1_code_gen_complex_sampled(code_pilot_, signal_C,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
|
||||
acquisition_cc_->set_local_code(code_data_.data(), code_pilot_.data());
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -244,19 +244,19 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_local_code()
|
||||
bool cboc = configuration_->property(
|
||||
"Acquisition" + std::to_string(channel_) + ".cboc", false);
|
||||
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
std::array<char, 3> Signal_{};
|
||||
Signal_[0] = gnss_synchro_->Signal[0];
|
||||
Signal_[1] = gnss_synchro_->Signal[1];
|
||||
Signal_[2] = '\0';
|
||||
|
||||
galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.get(), code_length_), Signal_,
|
||||
galileo_e1_code_gen_complex_sampled(code, Signal_,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < (sampled_ms_ / (folding_factor_ * 4)); i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_cc_->set_local_code(code_.data());
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -214,18 +214,18 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_local_code()
|
||||
bool cboc = configuration_->property(
|
||||
"Acquisition" + std::to_string(channel_) + ".cboc", false);
|
||||
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
std::array<char, 3> Signal_{};
|
||||
Signal_[0] = gnss_synchro_->Signal[0];
|
||||
Signal_[1] = gnss_synchro_->Signal[1];
|
||||
Signal_[2] = '\0';
|
||||
galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.get(), code_length_), Signal_,
|
||||
galileo_e1_code_gen_complex_sampled(code, Signal_,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < sampled_ms_ / 4; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_cc_->set_local_code(code_.data());
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -12,7 +12,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -209,7 +209,6 @@ signed int GalileoE5aNoncoherentIQAcquisitionCaf::mag()
|
||||
void GalileoE5aNoncoherentIQAcquisitionCaf::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
@ -223,17 +222,17 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code()
|
||||
if (gnss_synchro_->Signal[0] == '5' && gnss_synchro_->Signal[1] == 'X')
|
||||
{
|
||||
std::array<char, 3> a = {{'5', 'I', '\0'}};
|
||||
galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>>(codeI.data(), code_length_), a,
|
||||
galileo_e5_a_code_gen_complex_sampled(codeI, a,
|
||||
gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
std::array<char, 3> b = {{'5', 'Q', '\0'}};
|
||||
galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>>(codeQ.data(), code_length_), b,
|
||||
galileo_e5_a_code_gen_complex_sampled(codeQ, b,
|
||||
gnss_synchro_->PRN, fs_in_, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::array<char, 3> signal_type_ = {{'5', 'X', '\0'}};
|
||||
galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>>(codeI.data(), code_length_), signal_type_,
|
||||
galileo_e5_a_code_gen_complex_sampled(codeI, signal_type_,
|
||||
gnss_synchro_->PRN, fs_in_, 0);
|
||||
}
|
||||
// WARNING: 3ms are coherently integrated. Secondary sequence (1,1,1)
|
||||
@ -277,7 +276,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::reset()
|
||||
|
||||
float GalileoE5aNoncoherentIQAcquisitionCaf::calculate_threshold(float pfa)
|
||||
{
|
||||
//Calculate the threshold
|
||||
// Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
|
||||
{
|
||||
|
@ -12,7 +12,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -5,7 +5,7 @@
|
||||
* \author Antonio Ramos, 2018. antonio.ramos(at)cttc.es
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -85,7 +85,6 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters_.blocking = blocking_;
|
||||
|
||||
|
||||
acq_parameters_.use_automatic_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false);
|
||||
if (acq_parameters_.use_automatic_resampler == true and item_type_ != "gr_complex")
|
||||
{
|
||||
@ -209,6 +208,7 @@ void GalileoE5aPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -216,6 +216,7 @@ void GalileoE5aPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
acquisition_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
@ -237,7 +238,7 @@ void GalileoE5aPcpsAcquisition::init()
|
||||
|
||||
void GalileoE5aPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
std::array<char, 3> signal_{};
|
||||
signal_[0] = '5';
|
||||
signal_[2] = '\0';
|
||||
@ -257,16 +258,16 @@ void GalileoE5aPcpsAcquisition::set_local_code()
|
||||
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
galileo_e5_a_code_gen_complex_sampled(gsl::span<gr_complex>(code.get(), code_length_), signal_, gnss_synchro_->PRN, acq_parameters_.resampled_fs, 0);
|
||||
galileo_e5_a_code_gen_complex_sampled(code, signal_, gnss_synchro_->PRN, acq_parameters_.resampled_fs, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
galileo_e5_a_code_gen_complex_sampled(gsl::span<gr_complex>(code.get(), code_length_), signal_, gnss_synchro_->PRN, fs_in_, 0);
|
||||
galileo_e5_a_code_gen_complex_sampled(code, signal_, gnss_synchro_->PRN, fs_in_, 0);
|
||||
}
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < sampled_ms_; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_->set_local_code(code_.data());
|
||||
@ -349,6 +350,7 @@ gr::basic_block_sptr GalileoE5aPcpsAcquisition::get_right_block()
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisition::set_resampler_latency(uint32_t latency_samples)
|
||||
{
|
||||
acquisition_->set_resampler_latency(latency_samples);
|
||||
|
@ -5,7 +5,7 @@
|
||||
* \author Antonio Ramos, 2018. antonio.ramos(at)cttc.es
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
@ -44,14 +43,6 @@
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
#define QUANT_BITS_LOCAL_CODE 16
|
||||
#define SELECT_LSBits 0x0000FFFF // Select the 10 LSbits out of a 20-bit word
|
||||
#define SELECT_MSBbits 0xFFFF0000 // Select the 10 MSbits out of a 20-bit word
|
||||
#define SELECT_ALL_CODE_BITS 0xFFFFFFFF // Select a 20 bit word
|
||||
#define SHL_CODE_BITS 65536 // shift left by 10 bits
|
||||
|
||||
GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
@ -136,7 +127,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
||||
signal_[1] = 'I';
|
||||
}
|
||||
|
||||
galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.data(), nsamples_total), signal_, PRN, fs_in, 0);
|
||||
galileo_e5_a_code_gen_complex_sampled(code, signal_, PRN, fs_in, 0);
|
||||
|
||||
for (uint32_t s = code_length; s < 2 * code_length; s++)
|
||||
{
|
||||
@ -169,10 +160,10 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
||||
// and package codes in a format that is ready to be written to the FPGA
|
||||
for (uint32_t i = 0; i < nsamples_total; i++)
|
||||
{
|
||||
tmp = static_cast<int32_t>(floor(fft_codes_padded[i].real() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max));
|
||||
tmp2 = static_cast<int32_t>(floor(fft_codes_padded[i].imag() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max));
|
||||
local_code = (tmp & SELECT_LSBits) | ((tmp2 * SHL_CODE_BITS) & SELECT_MSBbits); // put together the real part and the imaginary part
|
||||
fft_data = local_code & SELECT_ALL_CODE_BITS;
|
||||
tmp = static_cast<int32_t>(floor(fft_codes_padded[i].real() * (pow(2, quant_bits_local_code - 1) - 1) / max));
|
||||
tmp2 = static_cast<int32_t>(floor(fft_codes_padded[i].imag() * (pow(2, quant_bits_local_code - 1) - 1) / max));
|
||||
local_code = (tmp & select_lsbits) | ((tmp2 * shl_code_bits) & select_msbits); // put together the real part and the imaginary part
|
||||
fft_data = local_code & select_all_code_bits;
|
||||
d_all_fft_codes_[i + (nsamples_total * (PRN - 1))] = fft_data;
|
||||
}
|
||||
}
|
||||
@ -225,6 +216,14 @@ void GalileoE5aPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
|
@ -24,7 +24,7 @@
|
||||
* 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/>.
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
@ -34,16 +34,12 @@
|
||||
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstddef> // for size_t
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Gnss_Synchro;
|
||||
class ConfigurationInterface;
|
||||
|
||||
|
||||
@ -54,13 +50,22 @@ class ConfigurationInterface;
|
||||
class GalileoE5aPcpsAcquisitionFpga : public AcquisitionInterface
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Constructor
|
||||
*/
|
||||
GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
/*!
|
||||
* \brief Destructor
|
||||
*/
|
||||
~GalileoE5aPcpsAcquisitionFpga() = default;
|
||||
|
||||
/*!
|
||||
* \brief Role
|
||||
*/
|
||||
inline std::string role() override
|
||||
{
|
||||
return role_;
|
||||
@ -74,20 +79,38 @@ public:
|
||||
return "Galileo_E5a_Pcps_Acquisition_Fpga";
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns size of lv_16sc_t
|
||||
*/
|
||||
inline size_t item_size() override
|
||||
{
|
||||
return sizeof(lv_16sc_t);
|
||||
return sizeof(int16_t);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Connect
|
||||
*/
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
|
||||
/*!
|
||||
* \brief Disconnect
|
||||
*/
|
||||
void disconnect(gr::top_block_sptr top_block) override;
|
||||
|
||||
/*!
|
||||
* \brief Get left block
|
||||
*/
|
||||
gr::basic_block_sptr get_left_block() override;
|
||||
|
||||
/*!
|
||||
* \brief Get right block
|
||||
*/
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to efficiently exchange synchronization data between acquisition and
|
||||
* tracking blocks
|
||||
* tracking blocks
|
||||
*/
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
@ -124,6 +147,11 @@ public:
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step) override;
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler center for the grid search
|
||||
*/
|
||||
void set_doppler_center(int doppler_center) override;
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
@ -162,11 +190,19 @@ public:
|
||||
void stop_acquisition() override;
|
||||
|
||||
/*!
|
||||
* \brief Sets the resampler latency to account it in the acquisition code delay estimation
|
||||
* \brief Set resampler latency
|
||||
*/
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
static const uint32_t quant_bits_local_code = 16;
|
||||
static const uint32_t select_lsbits = 0x0000FFFF; // Select the 10 LSbits out of a 20-bit word
|
||||
static const uint32_t select_msbits = 0xFFFF0000; // Select the 10 MSbits out of a 20-bit word
|
||||
static const uint32_t select_all_code_bits = 0xFFFFFFFF; // Select a 20 bit word
|
||||
static const uint32_t shl_code_bits = 65536; // shift left by 10 bits
|
||||
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
std::string item_type_;
|
||||
@ -178,6 +214,7 @@ private:
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
int32_t doppler_center_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -202,14 +202,14 @@ void GlonassL1CaPcpsAcquisition::init()
|
||||
|
||||
void GlonassL1CaPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
glonass_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>>(code, code_length_), /* gnss_synchro_->PRN,*/ fs_in_, 0);
|
||||
glonass_l1_ca_code_gen_complex_sampled(code, fs_in_, 0);
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < sampled_ms_; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_->set_local_code(code_.data());
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -201,14 +201,14 @@ void GlonassL2CaPcpsAcquisition::init()
|
||||
|
||||
void GlonassL2CaPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
glonass_l2_ca_code_gen_complex_sampled(gsl::span<std::complex<float>>(code, code_length_), /* gnss_synchro_->PRN,*/ fs_in_, 0);
|
||||
glonass_l2_ca_code_gen_complex_sampled(code, fs_in_, 0);
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < sampled_ms_; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_->set_local_code(code_.data());
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -41,8 +41,8 @@
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <gsl/gsl>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
@ -201,6 +201,7 @@ void GpsL1CaPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -208,6 +209,7 @@ void GpsL1CaPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
acquisition_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
@ -230,20 +232,20 @@ void GpsL1CaPcpsAcquisition::init()
|
||||
|
||||
void GpsL1CaPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>>(code, code_length_), gnss_synchro_->PRN, acq_parameters_.resampled_fs, 0);
|
||||
gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, acq_parameters_.resampled_fs, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>>(code, code_length_), gnss_synchro_->PRN, fs_in_, 0);
|
||||
gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
}
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < sampled_ms_; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_->set_local_code(code_.data());
|
||||
@ -264,7 +266,7 @@ void GpsL1CaPcpsAcquisition::set_state(int state)
|
||||
|
||||
float GpsL1CaPcpsAcquisition::calculate_threshold(float pfa)
|
||||
{
|
||||
//Calculate the threshold
|
||||
// Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
|
||||
{
|
||||
@ -355,6 +357,7 @@ gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_right_block()
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::set_resampler_latency(uint32_t latency_samples)
|
||||
{
|
||||
acquisition_->set_resampler_latency(latency_samples);
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -9,7 +9,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -151,13 +151,12 @@ signed int GpsL1CaPcpsAcquisitionFineDoppler::mag()
|
||||
void GpsL1CaPcpsAcquisitionFineDoppler::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFineDoppler::set_local_code()
|
||||
{
|
||||
gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>>(code_.data(), vector_length_), gnss_synchro_->PRN, fs_in_, 0);
|
||||
gps_l1_ca_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_, 0);
|
||||
acquisition_cc_->set_local_code(code_.data());
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
@ -47,16 +46,6 @@
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
|
||||
#define NUM_PRNs 32
|
||||
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
#define QUANT_BITS_LOCAL_CODE 16
|
||||
#define SELECT_LSBits 0x0000FFFF // Select the 10 LSbits out of a 20-bit word
|
||||
#define SELECT_MSBbits 0xFFFF0000 // Select the 10 MSbits out of a 20-bit word
|
||||
#define SELECT_ALL_CODE_BITS 0xFFFFFFFF // Select a 20 bit word
|
||||
#define SHL_CODE_BITS 65536 // shift left by 10 bits
|
||||
|
||||
GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
@ -113,7 +102,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
// temporary maxima search
|
||||
for (uint32_t PRN = 1; PRN <= NUM_PRNs; PRN++)
|
||||
{
|
||||
gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.data(), nsamples_total), PRN, fs_in, 0); // generate PRN code
|
||||
gps_l1_ca_code_gen_complex_sampled(code, PRN, fs_in, 0); // generate PRN code
|
||||
|
||||
for (uint32_t s = code_length; s < 2 * code_length; s++)
|
||||
{
|
||||
@ -146,10 +135,10 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
// and package codes in a format that is ready to be written to the FPGA
|
||||
for (uint32_t i = 0; i < nsamples_total; i++)
|
||||
{
|
||||
tmp = static_cast<int32_t>(floor(fft_codes_padded[i].real() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max));
|
||||
tmp2 = static_cast<int32_t>(floor(fft_codes_padded[i].imag() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max));
|
||||
local_code = (tmp & SELECT_LSBits) | ((tmp2 * SHL_CODE_BITS) & SELECT_MSBbits); // put together the real part and the imaginary part
|
||||
fft_data = local_code & SELECT_ALL_CODE_BITS;
|
||||
tmp = static_cast<int32_t>(floor(fft_codes_padded[i].real() * (pow(2, quant_bits_local_code - 1) - 1) / max));
|
||||
tmp2 = static_cast<int32_t>(floor(fft_codes_padded[i].imag() * (pow(2, quant_bits_local_code - 1) - 1) / max));
|
||||
local_code = (tmp & select_lsbits) | ((tmp2 * shl_code_bits) & select_msbits); // put together the real part and the imaginary part
|
||||
fft_data = local_code & select_all_code_bits;
|
||||
d_all_fft_codes_[i + (nsamples_total * (PRN - 1))] = fft_data;
|
||||
}
|
||||
}
|
||||
@ -203,6 +192,14 @@ void GpsL1CaPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
|
@ -37,15 +37,13 @@
|
||||
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstddef> // for size_t
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Gnss_Synchro;
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
/*!
|
||||
@ -55,13 +53,22 @@ class ConfigurationInterface;
|
||||
class GpsL1CaPcpsAcquisitionFpga : public AcquisitionInterface
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Constructor
|
||||
*/
|
||||
GpsL1CaPcpsAcquisitionFpga(ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
/*!
|
||||
* \brief Destructor
|
||||
*/
|
||||
~GpsL1CaPcpsAcquisitionFpga() = default;
|
||||
|
||||
/*!
|
||||
* \brief Role
|
||||
*/
|
||||
inline std::string role() override
|
||||
{
|
||||
return role_;
|
||||
@ -75,15 +82,32 @@ public:
|
||||
return "GPS_L1_CA_PCPS_Acquisition_Fpga";
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns size of lv_16sc_t
|
||||
*/
|
||||
inline size_t item_size() override
|
||||
{
|
||||
size_t item_size = sizeof(lv_16sc_t);
|
||||
return item_size;
|
||||
return sizeof(int16_t);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Connect
|
||||
*/
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
|
||||
/*!
|
||||
* \brief Disconnect
|
||||
*/
|
||||
void disconnect(gr::top_block_sptr top_block) override;
|
||||
|
||||
/*!
|
||||
* \brief Get left block
|
||||
*/
|
||||
gr::basic_block_sptr get_left_block() override;
|
||||
|
||||
/*!
|
||||
* \brief Get right block
|
||||
*/
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
|
||||
/*!
|
||||
@ -126,6 +150,11 @@ public:
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step) override;
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler center for the grid search
|
||||
*/
|
||||
void set_doppler_center(int doppler_center) override;
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
@ -156,15 +185,30 @@ public:
|
||||
*/
|
||||
void stop_acquisition() override;
|
||||
|
||||
/*!
|
||||
* \brief Set Resampler Latency
|
||||
*/
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
static const uint32_t NUM_PRNs = 32;
|
||||
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
static const uint32_t quant_bits_local_code = 16;
|
||||
static const uint32_t select_lsbits = 0x0000FFFF; // Select the 10 LSbits out of a 20-bit word
|
||||
static const uint32_t select_msbits = 0xFFFF0000; // Select the 10 MSbits out of a 20-bit word
|
||||
static const uint32_t select_all_code_bits = 0xFFFFFFFF; // Select a 20 bit word
|
||||
static const uint32_t shl_code_bits = 65536; // shift left by 10 bits
|
||||
|
||||
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
uint32_t channel_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
int32_t doppler_center_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
|
@ -9,7 +9,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -143,15 +143,16 @@ signed int GpsL1CaPcpsAssistedAcquisition::mag()
|
||||
void GpsL1CaPcpsAssistedAcquisition::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAssistedAcquisition::set_local_code()
|
||||
{
|
||||
gps_l1_ca_code_gen_complex_sampled(gsl::span<gr_complex>(code_.get(), vector_length_), gnss_synchro_->PRN, fs_in_, 0);
|
||||
gps_l1_ca_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_, 0);
|
||||
acquisition_cc_->set_local_code(code_.get());
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAssistedAcquisition::reset()
|
||||
{
|
||||
acquisition_cc_->set_active(true);
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -198,7 +198,6 @@ signed int GpsL1CaPcpsOpenClAcquisition::mag()
|
||||
void GpsL1CaPcpsOpenClAcquisition::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
@ -206,14 +205,14 @@ void GpsL1CaPcpsOpenClAcquisition::set_local_code()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>>(code, code_length_), gnss_synchro_->PRN, fs_in_, 0);
|
||||
gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < sampled_ms_; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_cc_->set_local_code(code_.data());
|
||||
@ -232,8 +231,7 @@ void GpsL1CaPcpsOpenClAcquisition::reset()
|
||||
|
||||
float GpsL1CaPcpsOpenClAcquisition::calculate_threshold(float pfa)
|
||||
{
|
||||
//Calculate the threshold
|
||||
|
||||
// Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -68,7 +68,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
/*Calculate the folding factor value based on the calculations*/
|
||||
/* Calculate the folding factor value based on the calculations */
|
||||
auto temp = static_cast<unsigned int>(ceil(sqrt(log2(code_length_))));
|
||||
folding_factor_ = configuration_->property(role + ".folding_factor", temp);
|
||||
|
||||
@ -106,7 +106,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
|
||||
int samples_per_ms = round(code_length_);
|
||||
code_ = std::vector<std::complex<float>>(code_length_);
|
||||
/*Object relevant information for debugging*/
|
||||
/* Object relevant information for debugging */
|
||||
LOG(INFO) << "Implementation: " << this->implementation()
|
||||
<< ", Vector Length: " << vector_length_
|
||||
<< ", Samples per ms: " << samples_per_ms
|
||||
@ -224,7 +224,6 @@ signed int GpsL1CaPcpsQuickSyncAcquisition::mag()
|
||||
void GpsL1CaPcpsQuickSyncAcquisition::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
@ -232,14 +231,14 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_local_code()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>>(code, code_length_), gnss_synchro_->PRN, fs_in_, 0);
|
||||
gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < (sampled_ms_ / folding_factor_); i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_cc_->set_local_code(code_.data());
|
||||
@ -267,7 +266,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_state(int state)
|
||||
|
||||
float GpsL1CaPcpsQuickSyncAcquisition::calculate_threshold(float pfa)
|
||||
{
|
||||
//Calculate the threshold
|
||||
// Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -186,7 +186,6 @@ signed int GpsL1CaPcpsTongAcquisition::mag()
|
||||
void GpsL1CaPcpsTongAcquisition::init()
|
||||
{
|
||||
acquisition_cc_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
@ -194,14 +193,14 @@ void GpsL1CaPcpsTongAcquisition::set_local_code()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>>(code, code_length_), gnss_synchro_->PRN, fs_in_, 0);
|
||||
gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < sampled_ms_; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_cc_->set_local_code(code_.data());
|
||||
@ -229,7 +228,7 @@ void GpsL1CaPcpsTongAcquisition::set_state(int state)
|
||||
|
||||
float GpsL1CaPcpsTongAcquisition::calculate_threshold(float pfa)
|
||||
{
|
||||
//Calculate the threshold
|
||||
// Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -211,6 +211,7 @@ void GpsL2MPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL2MPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -218,6 +219,7 @@ void GpsL2MPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
acquisition_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL2MPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
@ -235,27 +237,26 @@ signed int GpsL2MPcpsAcquisition::mag()
|
||||
void GpsL2MPcpsAcquisition::init()
|
||||
{
|
||||
acquisition_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
void GpsL2MPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
gps_l2c_m_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.get(), code_length_), gnss_synchro_->PRN, acq_parameters_.resampled_fs);
|
||||
gps_l2c_m_code_gen_complex_sampled(code, gnss_synchro_->PRN, acq_parameters_.resampled_fs);
|
||||
}
|
||||
else
|
||||
{
|
||||
gps_l2c_m_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.get(), code_length_), gnss_synchro_->PRN, fs_in_);
|
||||
gps_l2c_m_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_);
|
||||
}
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < num_codes_; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_->set_local_code(code_.data());
|
||||
@ -276,7 +277,7 @@ void GpsL2MPcpsAcquisition::set_state(int state)
|
||||
|
||||
float GpsL2MPcpsAcquisition::calculate_threshold(float pfa)
|
||||
{
|
||||
//Calculate the threshold
|
||||
// Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -46,13 +46,6 @@
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
|
||||
#define NUM_PRNs 32
|
||||
#define QUANT_BITS_LOCAL_CODE 16
|
||||
#define SELECT_LSBits 0x0000FFFF // Select the 10 LSbits out of a 20-bit word
|
||||
#define SELECT_MSBbits 0xFFFF0000 // Select the 10 MSbits out of a 20-bit word
|
||||
#define SELECT_ALL_CODE_BITS 0xFFFFFFFF // Select a 20 bit word
|
||||
#define SHL_CODE_BITS 65536 // shift left by 10 bits
|
||||
|
||||
GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
@ -87,7 +80,6 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
float nbits = ceilf(log2f((float)code_length));
|
||||
unsigned int nsamples_total = pow(2, nbits);
|
||||
unsigned int vector_length = nsamples_total;
|
||||
unsigned int select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga", 0);
|
||||
acq_parameters.select_queue_Fpga = select_queue_Fpga;
|
||||
std::string default_device_name = "/dev/uio0";
|
||||
@ -113,7 +105,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
|
||||
for (unsigned int PRN = 1; PRN <= NUM_PRNs; PRN++)
|
||||
{
|
||||
gps_l2c_m_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.data(), nsamples_total), PRN, fs_in_);
|
||||
gps_l2c_m_code_gen_complex_sampled(code, PRN, fs_in_);
|
||||
// fill in zero padding
|
||||
for (unsigned int s = code_length; s < nsamples_total; s++)
|
||||
{
|
||||
@ -212,7 +204,6 @@ signed int GpsL2MPcpsAcquisitionFpga::mag()
|
||||
void GpsL2MPcpsAcquisitionFpga::init()
|
||||
{
|
||||
acquisition_fpga_->init();
|
||||
//set_local_code();
|
||||
}
|
||||
|
||||
|
||||
|
@ -156,6 +156,13 @@ public:
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
static const uint32_t NUM_PRNs = 32;
|
||||
static const uint32_t QUANT_BITS_LOCAL_CODE = 16;
|
||||
static const uint32_t SELECT_LSBits = 0x0000FFFF; // Select the 10 LSbits out of a 20-bit word
|
||||
static const uint32_t SELECT_MSBbits = 0xFFFF0000; // Select the 10 MSbits out of a 20-bit word
|
||||
static const uint32_t SELECT_ALL_CODE_BITS = 0xFFFFFFFF; // Select a 20 bit word
|
||||
static const uint32_t SHL_CODE_BITS = 65536; // shift left by 10 bits
|
||||
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
std::string item_type_;
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -206,6 +206,7 @@ void GpsL5iPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
@ -213,6 +214,7 @@ void GpsL5iPcpsAcquisition::set_doppler_center(int doppler_center)
|
||||
acquisition_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
@ -235,21 +237,21 @@ void GpsL5iPcpsAcquisition::init()
|
||||
|
||||
void GpsL5iPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> code{new std::complex<float>[code_length_]};
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
gps_l5i_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.get(), code_length_), gnss_synchro_->PRN, acq_parameters_.resampled_fs);
|
||||
gps_l5i_code_gen_complex_sampled(code, gnss_synchro_->PRN, acq_parameters_.resampled_fs);
|
||||
}
|
||||
else
|
||||
{
|
||||
gps_l5i_code_gen_complex_sampled(gsl::span<std::complex<float>>(code.get(), code_length_), gnss_synchro_->PRN, fs_in_);
|
||||
gps_l5i_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_);
|
||||
}
|
||||
|
||||
gsl::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < num_codes_; i++)
|
||||
{
|
||||
std::copy_n(code.get(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
std::copy_n(code.data(), code_length_, code_span.subspan(i * code_length_, code_length_).data());
|
||||
}
|
||||
|
||||
acquisition_->set_local_code(code_.data());
|
||||
@ -270,7 +272,7 @@ void GpsL5iPcpsAcquisition::set_state(int state)
|
||||
|
||||
float GpsL5iPcpsAcquisition::calculate_threshold(float pfa)
|
||||
{
|
||||
//Calculate the threshold
|
||||
// Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += doppler_step_)
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "GPS_L5.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||
@ -47,17 +46,6 @@
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
|
||||
#define NUM_PRNs 32
|
||||
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
#define QUANT_BITS_LOCAL_CODE 16
|
||||
#define SELECT_LSBits 0x0000FFFF // Select the 10 LSbits out of a 20-bit word
|
||||
#define SELECT_MSBbits 0xFFFF0000 // Select the 10 MSbits out of a 20-bit word
|
||||
#define SELECT_ALL_CODE_BITS 0xFFFFFFFF // Select a 20 bit word
|
||||
#define SHL_CODE_BITS 65536 // shift left by 10 bits
|
||||
|
||||
|
||||
GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
@ -118,7 +106,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
|
||||
for (uint32_t PRN = 1; PRN <= NUM_PRNs; PRN++)
|
||||
{
|
||||
gps_l5i_code_gen_complex_sampled(gsl::span<gr_complex>(code.data(), nsamples_total), PRN, fs_in);
|
||||
gps_l5i_code_gen_complex_sampled(code, PRN, fs_in);
|
||||
|
||||
for (uint32_t s = code_length; s < 2 * code_length; s++)
|
||||
{
|
||||
@ -150,10 +138,10 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
// and package codes in a format that is ready to be written to the FPGA
|
||||
for (uint32_t i = 0; i < nsamples_total; i++)
|
||||
{
|
||||
tmp = static_cast<int32_t>(floor(fft_codes_padded[i].real() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max));
|
||||
tmp2 = static_cast<int32_t>(floor(fft_codes_padded[i].imag() * (pow(2, QUANT_BITS_LOCAL_CODE - 1) - 1) / max));
|
||||
local_code = (tmp & SELECT_LSBits) | ((tmp2 * SHL_CODE_BITS) & SELECT_MSBbits); // put together the real part and the imaginary part
|
||||
fft_data = local_code & SELECT_ALL_CODE_BITS;
|
||||
tmp = static_cast<int32_t>(floor(fft_codes_padded[i].real() * (pow(2, quant_bits_local_code - 1) - 1) / max));
|
||||
tmp2 = static_cast<int32_t>(floor(fft_codes_padded[i].imag() * (pow(2, quant_bits_local_code - 1) - 1) / max));
|
||||
local_code = (tmp & select_lsbits) | ((tmp2 * shl_code_bits) & select_msbits); // put together the real part and the imaginary part
|
||||
fft_data = local_code & select_all_code_bits;
|
||||
d_all_fft_codes_[i + (nsamples_total * (PRN - 1))] = fft_data;
|
||||
}
|
||||
}
|
||||
@ -208,6 +196,14 @@ void GpsL5iPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
@ -226,6 +222,7 @@ void GpsL5iPcpsAcquisitionFpga::init()
|
||||
acquisition_fpga_->init();
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisitionFpga::set_local_code()
|
||||
{
|
||||
acquisition_fpga_->set_local_code();
|
||||
|
@ -27,7 +27,7 @@
|
||||
* 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/>.
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
@ -36,15 +36,12 @@
|
||||
#define GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstddef> // for size_t
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Gnss_Synchro;
|
||||
class ConfigurationInterface;
|
||||
|
||||
/*!
|
||||
@ -54,13 +51,22 @@ class ConfigurationInterface;
|
||||
class GpsL5iPcpsAcquisitionFpga : public AcquisitionInterface
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Constructor
|
||||
*/
|
||||
GpsL5iPcpsAcquisitionFpga(ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
/*!
|
||||
* \brief Destructor
|
||||
*/
|
||||
~GpsL5iPcpsAcquisitionFpga() = default;
|
||||
|
||||
/*!
|
||||
* \brief Role
|
||||
*/
|
||||
inline std::string role() override
|
||||
{
|
||||
return role_;
|
||||
@ -74,14 +80,32 @@ public:
|
||||
return "GPS_L5i_PCPS_Acquisition_Fpga";
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns size of lv_16sc_t
|
||||
*/
|
||||
inline size_t item_size() override
|
||||
{
|
||||
return sizeof(lv_16sc_t);
|
||||
return sizeof(int16_t);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Connect
|
||||
*/
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
|
||||
/*!
|
||||
* \brief Disconnect
|
||||
*/
|
||||
void disconnect(gr::top_block_sptr top_block) override;
|
||||
|
||||
/*!
|
||||
* \brief Get left block
|
||||
*/
|
||||
gr::basic_block_sptr get_left_block() override;
|
||||
|
||||
/*!
|
||||
* \brief Get right block
|
||||
*/
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
|
||||
/*!
|
||||
@ -124,6 +148,11 @@ public:
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step) override;
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler center for the grid search
|
||||
*/
|
||||
void set_doppler_center(int doppler_center) override;
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
@ -154,9 +183,22 @@ public:
|
||||
*/
|
||||
void stop_acquisition() override;
|
||||
|
||||
/*!
|
||||
* \brief Set resampler latency
|
||||
*/
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
static const uint32_t NUM_PRNs = 32;
|
||||
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
static const uint32_t quant_bits_local_code = 16;
|
||||
static const uint32_t select_lsbits = 0x0000FFFF; // Select the 10 LSbits out of a 20-bit word
|
||||
static const uint32_t select_msbits = 0xFFFF0000; // Select the 10 MSbits out of a 20-bit word
|
||||
static const uint32_t select_all_code_bits = 0xFFFFFFFF; // Select a 20 bit word
|
||||
static const uint32_t shl_code_bits = 65536; // shift left by 10 bits
|
||||
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
std::string item_type_;
|
||||
@ -164,6 +206,7 @@ private:
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
int32_t doppler_center_;
|
||||
std::string dump_filename_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string role_;
|
||||
|
@ -69,12 +69,13 @@ endif()
|
||||
target_link_libraries(acquisition_gr_blocks
|
||||
PUBLIC
|
||||
algorithms_libs
|
||||
acquisition_libs
|
||||
channel_libs
|
||||
core_system_parameters
|
||||
Armadillo::armadillo
|
||||
Gnuradio::runtime
|
||||
Gnuradio::fft
|
||||
Volk::volk
|
||||
channel_libs
|
||||
acquisition_libs
|
||||
core_system_parameters
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
@ -90,6 +91,12 @@ target_include_directories(acquisition_gr_blocks
|
||||
${CMAKE_SOURCE_DIR}/src/core/receiver
|
||||
)
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Rel)
|
||||
target_compile_definitions(acquisition_gr_blocks
|
||||
PUBLIC -DARMA_NO_BOUND_CHECKING=1
|
||||
)
|
||||
endif()
|
||||
|
||||
if(OPENCL_FOUND)
|
||||
target_link_libraries(acquisition_gr_blocks PUBLIC OpenCL::OpenCL)
|
||||
target_include_directories(acquisition_gr_blocks
|
||||
|
@ -12,7 +12,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -12,7 +12,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -26,7 +26,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -52,6 +52,10 @@
|
||||
#ifndef GNSS_SDR_PCPS_ACQUISITION_H_
|
||||
#define GNSS_SDR_PCPS_ACQUISITION_H_
|
||||
|
||||
#if ARMA_NO_BOUND_CHECKING
|
||||
#define ARMA_NO_DEBUG 1
|
||||
#endif
|
||||
|
||||
#include "acq_conf.h"
|
||||
#include "channel_fsm.h"
|
||||
#include <armadillo>
|
||||
@ -61,6 +65,7 @@
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
#include <gnuradio/thread/thread.h> // for scoped_lock
|
||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
||||
#include <gsl/gsl> // for Guidelines Support Library
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <complex>
|
||||
#include <cstdint>
|
||||
@ -68,12 +73,6 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#if HAS_SPAN
|
||||
#include <span>
|
||||
namespace gsl = std;
|
||||
#else
|
||||
#include <gsl/gsl>
|
||||
#endif
|
||||
|
||||
class Gnss_Synchro;
|
||||
class pcps_acquisition;
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
@ -23,7 +23,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -49,6 +49,10 @@
|
||||
#ifndef GNSS_SDR_PCPS_ACQUISITION_FINE_DOPPLER_CC_H_
|
||||
#define GNSS_SDR_PCPS_ACQUISITION_FINE_DOPPLER_CC_H_
|
||||
|
||||
#if ARMA_NO_BOUND_CHECKING
|
||||
#define ARMA_NO_DEBUG 1
|
||||
#endif
|
||||
|
||||
#include "acq_conf.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
|
@ -40,8 +40,6 @@
|
||||
#include <utility> // for move
|
||||
|
||||
|
||||
#define AQ_DOWNSAMPLING_DELAY 40 // delay due to the downsampling filter in the acquisition
|
||||
|
||||
pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_)
|
||||
{
|
||||
return pcps_acquisition_fpga_sptr(new pcps_acquisition_fpga(std::move(conf_)));
|
||||
@ -60,6 +58,7 @@ pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_)
|
||||
d_num_doppler_bins = 0U;
|
||||
d_threshold = 0.0;
|
||||
d_doppler_step = 0U;
|
||||
d_doppler_center = 0U;
|
||||
d_doppler_index = 0U;
|
||||
d_test_statistics = 0.0;
|
||||
d_channel = 0U;
|
||||
@ -141,7 +140,9 @@ void pcps_acquisition_fpga::send_positive_acquisition()
|
||||
<< ", code phase " << d_gnss_synchro->Acq_delay_samples
|
||||
<< ", doppler " << d_gnss_synchro->Acq_doppler_hz
|
||||
<< ", magnitude " << d_mag
|
||||
<< ", input signal power " << d_input_power;
|
||||
<< ", input signal power " << d_input_power
|
||||
<< ", Assist doppler_center " << d_doppler_center;
|
||||
|
||||
|
||||
//the channel FSM is set, so, notify it directly the positive acquisition to minimize delays
|
||||
d_channel_fsm.lock()->Event_valid_acquisition();
|
||||
@ -211,13 +212,6 @@ void pcps_acquisition_fpga::acquisition_core(uint32_t num_doppler_bins, uint32_t
|
||||
}
|
||||
}
|
||||
|
||||
// debug
|
||||
// if (d_test_statistics > d_threshold)
|
||||
// {
|
||||
// printf("firstpeak = %f, secondpeak = %f, test_statistics = %f reported block exp = %d PRN = %d inext = %d, initial_sample = %ld doppler = %d\n", firstpeak, secondpeak, d_test_statistics, (int)total_block_exp, (int)d_gnss_synchro->PRN, (int)indext, (long int)initial_sample, (int)doppler);
|
||||
// printf("doppler_min = %d doppler_step = %d num_doppler_bins = %d\n", (int)doppler_min, (int)doppler_step, (int)num_doppler_bins);
|
||||
// }
|
||||
|
||||
d_gnss_synchro->Acq_doppler_hz = static_cast<double>(doppler);
|
||||
d_sample_counter = initial_sample;
|
||||
|
||||
@ -263,7 +257,7 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
acquisition_fpga->write_local_code();
|
||||
acquisition_fpga->set_block_exp(d_total_block_exp);
|
||||
|
||||
acquisition_core(d_num_doppler_bins, d_doppler_step, -d_doppler_max);
|
||||
acquisition_core(d_num_doppler_bins, d_doppler_step, -d_doppler_max + d_doppler_center);
|
||||
if (!d_make_2_steps)
|
||||
{
|
||||
acquisition_fpga->close_device();
|
||||
@ -290,7 +284,7 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
|
||||
while (num_second_acq < d_max_num_acqs)
|
||||
{
|
||||
acquisition_core(d_num_doppler_bins_step2, d_doppler_step2, d_doppler_center_step_two - static_cast<float>(floor(d_num_doppler_bins_step2 / 2.0)) * d_doppler_step2);
|
||||
acquisition_core(d_num_doppler_bins_step2, d_doppler_step2, d_doppler_center_step_two - static_cast<float>(floor(d_num_doppler_bins_step2 / 2.0)) * d_doppler_step2 + d_doppler_center);
|
||||
if (d_test_statistics > d_threshold)
|
||||
{
|
||||
d_active = false;
|
||||
|
@ -44,10 +44,10 @@
|
||||
#include "channel_fsm.h"
|
||||
#include "fpga_acquisition.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstdint> // for uint32_t
|
||||
#include <memory> // for shared_ptr
|
||||
#include <string> // for string
|
||||
#include <glog/logging.h>
|
||||
#include <cstdint> // for uint32_t
|
||||
#include <memory> // for shared_ptr
|
||||
#include <string> // for string
|
||||
|
||||
class Gnss_Synchro;
|
||||
|
||||
@ -89,6 +89,9 @@ pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||
class pcps_acquisition_fpga
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Destructor
|
||||
*/
|
||||
~pcps_acquisition_fpga() = default;
|
||||
|
||||
/*!
|
||||
@ -116,7 +119,6 @@ public:
|
||||
|
||||
/*!
|
||||
* \brief Sets local code for PCPS acquisition algorithm.
|
||||
* \param code - Pointer to the PRN code.
|
||||
*/
|
||||
void set_local_code();
|
||||
|
||||
@ -181,6 +183,19 @@ public:
|
||||
acquisition_fpga->set_doppler_step(doppler_step);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler center frequency for the grid search. It will refresh the Doppler grid.
|
||||
* \param doppler_center - Frequency center of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_center(int32_t doppler_center)
|
||||
{
|
||||
if (doppler_center != d_doppler_center)
|
||||
{
|
||||
DLOG(INFO) << " Doppler assistance for Channel: " << d_channel << " => Doppler: " << doppler_center << "[Hz]";
|
||||
d_doppler_center = doppler_center;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief This function triggers a HW reset of the FPGA PL.
|
||||
*/
|
||||
@ -194,6 +209,7 @@ private:
|
||||
uint32_t d_doppler_index;
|
||||
uint32_t d_channel;
|
||||
uint32_t d_doppler_step;
|
||||
int32_t d_doppler_center;
|
||||
uint32_t d_doppler_max;
|
||||
uint32_t d_fft_size;
|
||||
uint32_t d_num_doppler_bins;
|
||||
@ -216,7 +232,7 @@ private:
|
||||
std::weak_ptr<ChannelFsm> d_channel_fsm;
|
||||
void send_negative_acquisition();
|
||||
void send_positive_acquisition();
|
||||
void acquisition_core(uint32_t num_doppler_bins, uint32_t doppler_step, int32_t doppler_max);
|
||||
void acquisition_core(uint32_t num_doppler_bins, uint32_t doppler_step, int32_t doppler_min);
|
||||
float first_vs_second_peak_statistic(uint32_t& indext, int32_t& doppler, uint32_t num_doppler_bins, int32_t doppler_max, int32_t doppler_step);
|
||||
};
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user