mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-28 18:04:51 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
2aa98994b4
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -151,7 +151,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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -117,6 +117,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 +394,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];
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
#
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -44,14 +44,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,
|
||||
@ -166,10 +158,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;
|
||||
}
|
||||
}
|
||||
@ -221,6 +213,12 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::set_doppler_step(unsigned int dopple
|
||||
acquisition_fpga_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -44,14 +44,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,
|
||||
@ -169,10 +161,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;
|
||||
}
|
||||
}
|
||||
@ -224,6 +216,12 @@ void GalileoE5aPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_fpga_->set_doppler_step(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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -47,16 +47,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,
|
||||
@ -146,10 +136,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;
|
||||
}
|
||||
}
|
||||
@ -202,6 +192,12 @@ void GpsL1CaPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_fpga_->set_doppler_step(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)
|
||||
{
|
||||
|
@ -38,14 +38,11 @@
|
||||
|
||||
#include "channel_fsm.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 +52,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 +81,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 +149,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 +184,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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -47,17 +47,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,
|
||||
@ -150,10 +139,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;
|
||||
}
|
||||
}
|
||||
@ -207,6 +196,12 @@ void GpsL5iPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_fpga_->set_doppler_step(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)
|
||||
{
|
||||
|
@ -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/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
@ -37,14 +37,10 @@
|
||||
|
||||
#include "channel_fsm.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 +50,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 +79,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 +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.
|
||||
*/
|
||||
@ -154,9 +182,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 +205,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_;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -22,7 +22,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
|
||||
|
@ -11,7 +11,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
|
||||
|
@ -11,7 +11,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
|
||||
|
@ -25,7 +25,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
|
||||
|
@ -25,7 +25,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
|
||||
|
@ -25,7 +25,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