mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-29 02:14:51 +00:00
Merge branch 'next' into smart_acq_resampler
This commit is contained in:
commit
5b79f8ac50
@ -47,13 +47,20 @@ DerivePointerAlignment: true
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
IncludeBlocks: Merge
|
||||
IncludeCategories:
|
||||
- Regex: '^<.*\.h>'
|
||||
- Regex: '^.*.h"'
|
||||
Priority: 1
|
||||
- Regex: '^<.*'
|
||||
- Regex: '^.*(boost|gflags|glog|gtest|gnsssdr|gnuradio|pmt|uhd|volk)/'
|
||||
Priority: 2
|
||||
- Regex: '^.*(armadillo|matio)'
|
||||
Priority: 2
|
||||
- Regex: '.*'
|
||||
Priority: 3
|
||||
- Regex: '^<.*\.h>'
|
||||
Priority: 4
|
||||
- Regex: '^<.*'
|
||||
Priority: 5
|
||||
IndentCaseLabels: false
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
@ -73,7 +80,7 @@ PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 200
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: false
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
|
3
.clang-tidy
Normal file
3
.clang-tidy
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,llvm-header-guard,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-using,performance-faster-string-find,performance-move-const-arg,readability-named-parameter,readability-string-compare'
|
||||
HeaderFilterRegex: '.*'
|
@ -1131,7 +1131,13 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS
|
||||
endif()
|
||||
message(FATAL_ERROR "libtool is required to build matio from source")
|
||||
endif()
|
||||
if(EXISTS "/usr/bin/aclocal" OR EXISTS "/usr/bin/aclocal-1.16" OR EXISTS "/usr/bin/aclocal-1.15" OR EXISTS "/usr/bin/aclocal-1.14" OR EXISTS "/usr/bin/aclocal-1.13" OR EXISTS "/usr/bin/aclocal-1.11" OR EXISTS "/usr/bin/aclocal-1.10")
|
||||
if(EXISTS "/usr/bin/aclocal" OR
|
||||
EXISTS "/usr/bin/aclocal-1.16" OR
|
||||
EXISTS "/usr/bin/aclocal-1.15" OR
|
||||
EXISTS "/usr/bin/aclocal-1.14" OR
|
||||
EXISTS "/usr/bin/aclocal-1.13" OR
|
||||
EXISTS "/usr/bin/aclocal-1.11" OR
|
||||
EXISTS "/usr/bin/aclocal-1.10")
|
||||
message(STATUS "Automake found.")
|
||||
else()
|
||||
message(" aclocal has not been found.")
|
||||
@ -1612,6 +1618,26 @@ if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU
|
||||
endif()
|
||||
|
||||
|
||||
########################################################################
|
||||
# clang-tidy https://clang.llvm.org/extra/clang-tidy/index.html
|
||||
########################################################################
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS "3.6"))
|
||||
find_program(
|
||||
CLANG_TIDY_EXE
|
||||
NAMES "clang-tidy"
|
||||
DOC "Path to clang-tidy executable"
|
||||
)
|
||||
if(NOT CLANG_TIDY_EXE)
|
||||
message(STATUS "clang-tidy not found.")
|
||||
else()
|
||||
message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
|
||||
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-checks=*")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
########################################################################
|
||||
# Create uninstall target
|
||||
|
@ -71,6 +71,7 @@ Next release will have several improvements in different dimensions, addition of
|
||||
- Improvement in C++ usage: The override special identifier is now used when overriding a virtual function. This helps the compiler to check for type changes in the base class, making the detection of errors easier.
|
||||
- Improvement in C++ usage: A number of unused includes have been removed. Order of includes set to: local (in-source) headers, then library headers, then system headers. This helps to detect missing includes.
|
||||
- Improvement in C++ usage: Enhanced const correctness. Misuses of those variables are detected by the compiler.
|
||||
- Improved code with clang-tidy and generation of a compile_commands.json file containing the exact compiler calls for all translation units of the project in machine-readable form if clang-tidy is detected.
|
||||
- Applied some style rules to CMake scripts.
|
||||
- Minimal versions of dependencies identified and detected.
|
||||
|
||||
|
@ -30,11 +30,11 @@
|
||||
|
||||
|
||||
#include "rtklib_pvt.h"
|
||||
#include "pvt_conf.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/archive/xml_oarchive.hpp>
|
||||
#include "pvt_conf.h"
|
||||
#include <boost/archive/xml_iarchive.hpp>
|
||||
#include <boost/archive/xml_oarchive.hpp>
|
||||
#include <boost/serialization/map.hpp>
|
||||
#include <glog/logging.h>
|
||||
#if OLD_BOOST
|
||||
|
@ -94,7 +94,7 @@ public:
|
||||
|
||||
private:
|
||||
rtklib_pvt_cc_sptr pvt_;
|
||||
rtk_t rtk;
|
||||
rtk_t rtk{};
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
|
@ -34,8 +34,8 @@
|
||||
#include "galileo_almanac_helper.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
#include "pvt_conf.h"
|
||||
#include <boost/archive/xml_oarchive.hpp>
|
||||
#include <boost/archive/xml_iarchive.hpp>
|
||||
#include <boost/archive/xml_oarchive.hpp>
|
||||
#include <boost/exception/all.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/serialization/map.hpp>
|
||||
@ -43,9 +43,9 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <algorithm>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <exception>
|
||||
#if OLD_BOOST
|
||||
#include <boost/math/common_factor_rt.hpp>
|
||||
namespace bc = boost::math;
|
||||
@ -514,7 +514,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
|
||||
if ((sysv_msqid = msgget(sysv_msg_key, msgflg)) == -1)
|
||||
{
|
||||
std::cout << "GNSS-SDR can not create message queues!" << std::endl;
|
||||
throw new std::exception();
|
||||
throw std::exception();
|
||||
}
|
||||
start = std::chrono::system_clock::now();
|
||||
}
|
||||
|
@ -31,26 +31,26 @@
|
||||
#ifndef GNSS_SDR_RTKLIB_PVT_CC_H
|
||||
#define GNSS_SDR_RTKLIB_PVT_CC_H
|
||||
|
||||
#include "gps_ephemeris.h"
|
||||
#include "nmea_printer.h"
|
||||
#include "kml_printer.h"
|
||||
#include "gpx_printer.h"
|
||||
#include "geojson_printer.h"
|
||||
#include "gps_ephemeris.h"
|
||||
#include "gpx_printer.h"
|
||||
#include "kml_printer.h"
|
||||
#include "nmea_printer.h"
|
||||
#include "pvt_conf.h"
|
||||
#include "rinex_printer.h"
|
||||
#include "rtcm_printer.h"
|
||||
#include "pvt_conf.h"
|
||||
#include "rtklib_solver.h"
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <gnuradio/sync_block.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <utility>
|
||||
#include <string>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
#include <sys/types.h>
|
||||
#include <utility>
|
||||
|
||||
|
||||
class rtklib_pvt_cc;
|
||||
|
@ -30,12 +30,12 @@
|
||||
*/
|
||||
|
||||
#include "hybrid_ls_pvt.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <utility>
|
||||
#include <glog/logging.h>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
@ -32,12 +32,12 @@
|
||||
#ifndef GNSS_SDR_HYBRID_LS_PVT_H_
|
||||
#define GNSS_SDR_HYBRID_LS_PVT_H_
|
||||
|
||||
#include "ls_pvt.h"
|
||||
#include "galileo_navigation_message.h"
|
||||
#include "gps_navigation_message.h"
|
||||
#include "gps_cnav_navigation_message.h"
|
||||
#include "galileo_almanac.h"
|
||||
#include "galileo_navigation_message.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_cnav_navigation_message.h"
|
||||
#include "gps_navigation_message.h"
|
||||
#include "ls_pvt.h"
|
||||
#include "rtklib_rtkcmn.h"
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
@ -33,8 +33,8 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
class Pvt_Conf
|
||||
{
|
||||
|
@ -33,9 +33,9 @@
|
||||
#define GNSS_SDR_PVT_SOLUTION_H_
|
||||
|
||||
|
||||
#include <armadillo>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <deque>
|
||||
#include <armadillo>
|
||||
|
||||
const unsigned int PVT_MAX_CHANNELS = 90;
|
||||
const unsigned int PVT_MAX_PRN = 127; // 126 is SBAS
|
||||
|
@ -29,21 +29,21 @@
|
||||
*/
|
||||
|
||||
#include "rinex_printer.h"
|
||||
#include <boost/date_time/time_zone_base.hpp>
|
||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||
#include <boost/date_time/local_time/local_time.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/date_time/time_zone_base.hpp>
|
||||
#include <boost/filesystem/operations.hpp> // for create_directories, exists
|
||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||
#include <glog/logging.h>
|
||||
#include <unistd.h> // for getlogin_r()
|
||||
#include <algorithm> // for min and max
|
||||
#include <cmath> // for floor
|
||||
#include <cstdlib> // for getenv()
|
||||
#include <iterator>
|
||||
#include <ostream>
|
||||
#include <set>
|
||||
#include <unistd.h> // for getlogin_r()
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
@ -51,21 +51,21 @@
|
||||
#ifndef GNSS_SDR_RINEX_PRINTER_H_
|
||||
#define GNSS_SDR_RINEX_PRINTER_H_
|
||||
|
||||
#include "gps_navigation_message.h"
|
||||
#include "gps_cnav_navigation_message.h"
|
||||
#include "galileo_navigation_message.h"
|
||||
#include "glonass_gnav_navigation_message.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "galileo_navigation_message.h"
|
||||
#include "glonass_gnav_navigation_message.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_cnav_navigation_message.h"
|
||||
#include "gps_navigation_message.h"
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <sstream> // for stringstream
|
||||
#include <iomanip> // for setprecision
|
||||
#include <map>
|
||||
#include <sstream> // for stringstream
|
||||
#include <string>
|
||||
|
||||
class Sbas_Raw_Msg;
|
||||
|
||||
|
@ -37,10 +37,11 @@
|
||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||
#include <glog/logging.h>
|
||||
#include <cstdint>
|
||||
#include <fcntl.h> // for O_RDWR
|
||||
#include <iomanip>
|
||||
#include <utility>
|
||||
#include <fcntl.h> // for O_RDWR
|
||||
#include <termios.h> // for tcgetattr
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@ -187,7 +188,7 @@ Rtcm_Printer::~Rtcm_Printer()
|
||||
}
|
||||
if (rtcm_file_descriptor.is_open())
|
||||
{
|
||||
long pos;
|
||||
int64_t pos;
|
||||
pos = rtcm_file_descriptor.tellp();
|
||||
rtcm_file_descriptor.close();
|
||||
if (pos == 0)
|
||||
@ -345,13 +346,13 @@ int Rtcm_Printer::init_serial(const std::string& serial_device)
|
||||
*/
|
||||
int32_t fd = 0;
|
||||
struct termios options;
|
||||
long BAUD;
|
||||
long DATABITS;
|
||||
long STOPBITS;
|
||||
long PARITYON;
|
||||
long PARITY;
|
||||
int64_t BAUD;
|
||||
int64_t DATABITS;
|
||||
int64_t STOPBITS;
|
||||
int64_t PARITYON;
|
||||
int64_t PARITY;
|
||||
|
||||
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY);
|
||||
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY | O_CLOEXEC);
|
||||
if (fd == -1) return fd; // failed to open TTY port
|
||||
|
||||
if (fcntl(fd, F_SETFL, 0) == -1) LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O
|
||||
|
@ -148,7 +148,7 @@ private:
|
||||
std::string rtcm_devname;
|
||||
uint16_t port;
|
||||
uint16_t station_id;
|
||||
int32_t rtcm_dev_descriptor; // RTCM serial device descriptor (i.e. COM port)
|
||||
int32_t rtcm_dev_descriptor; // RTCM serial device descriptor (i.e. COM port)
|
||||
int32_t init_serial(const std::string& serial_device); //serial port control
|
||||
void close_serial();
|
||||
std::shared_ptr<Rtcm> rtcm;
|
||||
|
@ -52,14 +52,13 @@
|
||||
* -----------------------------------------------------------------------*/
|
||||
|
||||
#include "rtklib_solver.h"
|
||||
#include "rtklib_conversions.h"
|
||||
#include "rtklib_solution.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include <matio.h>
|
||||
#include "rtklib_conversions.h"
|
||||
#include "rtklib_solution.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
#include <matio.h>
|
||||
#include <utility>
|
||||
|
||||
|
||||
@ -75,10 +74,10 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag
|
||||
count_valid_position = 0;
|
||||
this->set_averaging_flag(false);
|
||||
rtk_ = rtk;
|
||||
for (double & i : dop_) i = 0.0;
|
||||
for (double &i : dop_) i = 0.0;
|
||||
pvt_sol = {{0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, '0', '0', '0', 0, 0, 0};
|
||||
ssat_t ssat0 = {0, 0, {0.0}, {0.0}, {0.0}, {'0'}, {'0'}, {'0'}, {'0'}, {'0'}, {}, {}, {}, {}, 0.0, 0.0, 0.0, 0.0, {{{0, 0}}, {{0, 0}}}, {{}, {}}};
|
||||
for (auto & i : pvt_ssat)
|
||||
for (auto &i : pvt_ssat)
|
||||
{
|
||||
i = ssat0;
|
||||
}
|
||||
@ -777,7 +776,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
nav_data.n = valid_obs;
|
||||
nav_data.ng = glo_valid_obs;
|
||||
|
||||
for (auto & i : nav_data.lam)
|
||||
for (auto &i : nav_data.lam)
|
||||
{
|
||||
i[0] = SPEED_OF_LIGHT / FREQ1; // L1/E1
|
||||
i[1] = SPEED_OF_LIGHT / FREQ2; // L2
|
||||
@ -811,7 +810,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
std::vector<double> azel;
|
||||
azel.reserve(used_sats * 2);
|
||||
unsigned int index_aux = 0;
|
||||
for (auto & i : rtk_.ssat)
|
||||
for (auto &i : rtk_.ssat)
|
||||
{
|
||||
if (i.vs == 1)
|
||||
{
|
||||
|
@ -55,14 +55,14 @@
|
||||
#define GNSS_SDR_RTKLIB_SOLVER_H_
|
||||
|
||||
|
||||
#include "rtklib_rtkpos.h"
|
||||
#include "galileo_navigation_message.h"
|
||||
#include "gps_navigation_message.h"
|
||||
#include "gps_cnav_navigation_message.h"
|
||||
#include "glonass_gnav_navigation_message.h"
|
||||
#include "galileo_almanac.h"
|
||||
#include "galileo_navigation_message.h"
|
||||
#include "glonass_gnav_navigation_message.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_cnav_navigation_message.h"
|
||||
#include "gps_navigation_message.h"
|
||||
#include "pvt_solution.h"
|
||||
#include "rtklib_rtkpos.h"
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
@ -30,12 +30,12 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e1_pcps_8ms_ambiguous_acquisition.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
|
@ -32,9 +32,9 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_PCPS_8MS_AMBIGUOUS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_8MS_AMBIGUOUS_ACQUISITION_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "galileo_pcps_8ms_acquisition_cc.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <string>
|
||||
|
||||
|
@ -30,11 +30,11 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e1_pcps_ambiguous_acquisition.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "acq_conf.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@ -379,15 +379,13 @@ gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_left_block()
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
else if (item_type_ == "cbyte")
|
||||
if (item_type_ == "cbyte")
|
||||
{
|
||||
return cbyte_to_float_x2_;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -34,9 +34,9 @@
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "acq_conf.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <string>
|
||||
|
@ -30,9 +30,9 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e1_pcps_ambiguous_acquisition_fpga.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
|
@ -33,11 +33,11 @@
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <string>
|
||||
|
||||
|
@ -30,12 +30,12 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e1_pcps_cccwsr_ambiguous_acquisition.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
|
@ -32,8 +32,8 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_PCPS_CCCWSR_AMBIGUOUS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_CCCWSR_AMBIGUOUS_ACQUISITION_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_cccwsr_acquisition_cc.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <string>
|
||||
|
@ -30,12 +30,12 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e1_pcps_quicksync_ambiguous_acquisition.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
|
@ -32,8 +32,8 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_PCPS_QUICKSYNC_AMBIGUOUS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_QUICKSYNC_AMBIGUOUS_ACQUISITION_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_quicksync_acquisition_cc.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <string>
|
||||
|
@ -30,12 +30,12 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e1_pcps_tong_ambiguous_acquisition.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
|
@ -32,8 +32,8 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_PCPS_TONG_AMBIGUOUS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_TONG_AMBIGUOUS_ACQUISITION_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_tong_acquisition_cc.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <string>
|
||||
|
@ -36,12 +36,12 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e5a_noncoherent_iq_acquisition_caf.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
|
@ -38,9 +38,9 @@
|
||||
#ifndef GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_H_
|
||||
#define GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "galileo_e5a_noncoherent_iq_acquisition_caf_cc.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
@ -29,11 +29,11 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e5a_pcps_acquisition.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "acq_conf.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
|
@ -29,9 +29,9 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e5a_pcps_acquisition_fpga.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
@ -32,11 +32,11 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l1_ca_pcps_acquisition.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "acq_conf.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@ -323,15 +323,13 @@ gr::basic_block_sptr GlonassL1CaPcpsAcquisition::get_left_block()
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
else if (item_type_ == "cbyte")
|
||||
if (item_type_ == "cbyte")
|
||||
{
|
||||
return cbyte_to_float_x2_;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,9 +35,9 @@
|
||||
#define GNSS_SDR_GLONASS_L1_CA_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <string>
|
||||
|
||||
|
@ -31,11 +31,11 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l2_ca_pcps_acquisition.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "acq_conf.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@ -322,15 +322,13 @@ gr::basic_block_sptr GlonassL2CaPcpsAcquisition::get_left_block()
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
else if (item_type_ == "cbyte")
|
||||
if (item_type_ == "cbyte")
|
||||
{
|
||||
return cbyte_to_float_x2_;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -34,9 +34,9 @@
|
||||
#define GNSS_SDR_GLONASS_L2_CA_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <string>
|
||||
|
||||
|
@ -34,11 +34,11 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_pcps_acquisition.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@ -344,15 +344,13 @@ gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_left_block()
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
else if (item_type_ == "cbyte")
|
||||
if (item_type_ == "cbyte")
|
||||
{
|
||||
return cbyte_to_float_x2_;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,9 +38,9 @@
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "acq_conf.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <string>
|
||||
|
@ -33,11 +33,11 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_pcps_acquisition_fine_doppler.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "acq_conf.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
@ -34,8 +34,8 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FINE_DOPPLER_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FINE_DOPPLER_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fine_doppler_cc.h"
|
||||
#include <string>
|
||||
|
||||
|
@ -34,13 +34,13 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_pcps_acquisition_fpga.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_l1_ca_pcps_acquisition_fpga.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <new>
|
||||
|
||||
|
||||
|
@ -33,11 +33,11 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_pcps_assisted_acquisition.h"
|
||||
#include <glog/logging.h>
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
@ -34,8 +34,8 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_ASSISTED_ACQUISITION_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_ASSISTED_ACQUISITION_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_assisted_acquisition_cc.h"
|
||||
#include <string>
|
||||
|
||||
|
@ -30,12 +30,12 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_pcps_opencl_acquisition.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
@ -32,8 +32,8 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_OPENCL_ACQUISITION_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_OPENCL_ACQUISITION_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_opencl_acquisition_cc.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <string>
|
||||
|
@ -31,12 +31,12 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_pcps_quicksync_acquisition.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
@ -33,10 +33,10 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_QUICKSYNC_ACQUISITION_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_QUICKSYNC_ACQUISITION_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "pcps_quicksync_acquisition_cc.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_quicksync_acquisition_cc.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <string>
|
||||
|
||||
|
@ -30,12 +30,12 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_pcps_tong_acquisition.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
@ -32,10 +32,10 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_TONG_ACQUISITION_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_TONG_ACQUISITION_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "pcps_tong_acquisition_cc.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_tong_acquisition_cc.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <string>
|
||||
|
||||
|
@ -32,11 +32,11 @@
|
||||
*/
|
||||
|
||||
#include "gps_l2_m_pcps_acquisition.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@ -358,15 +358,13 @@ gr::basic_block_sptr GpsL2MPcpsAcquisition::get_left_block()
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
else if (item_type_ == "cbyte")
|
||||
if (item_type_ == "cbyte")
|
||||
{
|
||||
return cbyte_to_float_x2_;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,9 +35,9 @@
|
||||
#define GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <string>
|
||||
|
@ -32,10 +32,10 @@
|
||||
*/
|
||||
|
||||
#include "gps_l2_m_pcps_acquisition_fpga.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
@ -35,11 +35,11 @@
|
||||
#define GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <string>
|
||||
|
||||
|
@ -32,11 +32,11 @@
|
||||
*/
|
||||
|
||||
#include "gps_l5i_pcps_acquisition.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include "GPS_L5.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "acq_conf.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@ -350,15 +350,13 @@ gr::basic_block_sptr GpsL5iPcpsAcquisition::get_left_block()
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
else if (item_type_ == "cbyte")
|
||||
if (item_type_ == "cbyte")
|
||||
{
|
||||
return cbyte_to_float_x2_;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,9 +35,9 @@
|
||||
#define GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <string>
|
||||
|
@ -32,10 +32,10 @@
|
||||
*/
|
||||
|
||||
#include "gps_l5i_pcps_acquisition_fpga.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include "GPS_L5.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
@ -35,11 +35,11 @@
|
||||
#define GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <string>
|
||||
|
||||
|
@ -38,12 +38,12 @@
|
||||
#ifndef GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H_
|
||||
#define GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include "gnss_synchro.h"
|
||||
|
||||
class galileo_e5a_noncoherentIQ_acquisition_caf_cc;
|
||||
|
||||
|
@ -30,20 +30,23 @@
|
||||
*/
|
||||
|
||||
#include "galileo_pcps_8ms_acquisition_cc.h"
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include "control_message_factory.h"
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump, std::string dump_filename)
|
||||
{
|
||||
return galileo_pcps_8ms_acquisition_cc_sptr(
|
||||
@ -52,9 +55,12 @@ galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
|
||||
}
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
|
||||
@ -101,11 +107,12 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
d_channel = 0;
|
||||
}
|
||||
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc::~galileo_pcps_8ms_acquisition_cc()
|
||||
{
|
||||
if (d_num_doppler_bins > 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_num_doppler_bins; i++)
|
||||
for (uint32_t i = 0; i < d_num_doppler_bins; i++)
|
||||
{
|
||||
volk_gnsssdr_free(d_grid_doppler_wipeoffs[i]);
|
||||
}
|
||||
@ -125,6 +132,7 @@ galileo_pcps_8ms_acquisition_cc::~galileo_pcps_8ms_acquisition_cc()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void galileo_pcps_8ms_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
{
|
||||
// code A: two replicas of a primary code
|
||||
@ -146,6 +154,7 @@ void galileo_pcps_8ms_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
volk_32fc_conjugate_32fc(d_fft_code_B, d_fft_if->get_outbuf(), d_fft_size);
|
||||
}
|
||||
|
||||
|
||||
void galileo_pcps_8ms_acquisition_cc::init()
|
||||
{
|
||||
d_gnss_synchro->Flag_valid_acquisition = false;
|
||||
@ -161,8 +170,8 @@ void galileo_pcps_8ms_acquisition_cc::init()
|
||||
const double GALILEO_TWO_PI = 6.283185307179600;
|
||||
// Count the number of bins
|
||||
d_num_doppler_bins = 0;
|
||||
for (int doppler = static_cast<int>(-d_doppler_max);
|
||||
doppler <= static_cast<int>(d_doppler_max);
|
||||
for (auto doppler = static_cast<int32_t>(-d_doppler_max);
|
||||
doppler <= static_cast<int32_t>(d_doppler_max);
|
||||
doppler += d_doppler_step)
|
||||
{
|
||||
d_num_doppler_bins++;
|
||||
@ -170,10 +179,10 @@ void galileo_pcps_8ms_acquisition_cc::init()
|
||||
|
||||
// Create the carrier Doppler wipeoff signals
|
||||
d_grid_doppler_wipeoffs = new gr_complex *[d_num_doppler_bins];
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = static_cast<float>(GALILEO_TWO_PI) * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
@ -182,7 +191,7 @@ void galileo_pcps_8ms_acquisition_cc::init()
|
||||
}
|
||||
|
||||
|
||||
void galileo_pcps_8ms_acquisition_cc::set_state(int state)
|
||||
void galileo_pcps_8ms_acquisition_cc::set_state(int32_t state)
|
||||
{
|
||||
d_state = state;
|
||||
if (d_state == 1)
|
||||
@ -210,7 +219,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
{
|
||||
int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
int32_t acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
|
||||
switch (d_state)
|
||||
{
|
||||
@ -240,7 +249,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
case 1:
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
int32_t doppler;
|
||||
uint32_t indext = 0;
|
||||
uint32_t indext_A = 0;
|
||||
uint32_t indext_B = 0;
|
||||
@ -268,10 +277,10 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
d_input_power /= static_cast<float>(d_fft_size);
|
||||
|
||||
// 2- Doppler frequency search loop
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
// doppler search steps
|
||||
doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
|
||||
volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in,
|
||||
d_grid_doppler_wipeoffs[doppler_index], d_fft_size);
|
||||
|
@ -32,22 +32,26 @@
|
||||
#ifndef GNSS_SDR_PCPS_8MS_ACQUISITION_CC_H_
|
||||
#define GNSS_SDR_PCPS_8MS_ACQUISITION_CC_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include "gnss_synchro.h"
|
||||
|
||||
class galileo_pcps_8ms_acquisition_cc;
|
||||
|
||||
typedef boost::shared_ptr<galileo_pcps_8ms_acquisition_cc> galileo_pcps_8ms_acquisition_cc_sptr;
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc_sptr
|
||||
galileo_pcps_8ms_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
galileo_pcps_8ms_make_acquisition_cc(uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition for
|
||||
@ -57,41 +61,52 @@ class galileo_pcps_8ms_acquisition_cc : public gr::block
|
||||
{
|
||||
private:
|
||||
friend galileo_pcps_8ms_acquisition_cc_sptr
|
||||
galileo_pcps_8ms_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
galileo_pcps_8ms_make_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
void calculate_magnitudes(
|
||||
gr_complex* fft_begin,
|
||||
int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
|
||||
long d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
int64_t d_fs_in;
|
||||
int32_t d_samples_per_ms;
|
||||
int32_t d_samples_per_code;
|
||||
uint32_t d_doppler_resolution;
|
||||
float d_threshold;
|
||||
std::string d_satellite_str;
|
||||
unsigned int d_doppler_max;
|
||||
unsigned int d_doppler_step;
|
||||
unsigned int d_sampled_ms;
|
||||
unsigned int d_max_dwells;
|
||||
unsigned int d_well_count;
|
||||
unsigned int d_fft_size;
|
||||
uint32_t d_doppler_max;
|
||||
uint32_t d_doppler_step;
|
||||
uint32_t d_sampled_ms;
|
||||
uint32_t d_max_dwells;
|
||||
uint32_t d_well_count;
|
||||
uint32_t d_fft_size;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
uint32_t d_num_doppler_bins;
|
||||
gr_complex* d_fft_code_A;
|
||||
gr_complex* d_fft_code_B;
|
||||
gr::fft::fft_complex* d_fft_if;
|
||||
gr::fft::fft_complex* d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
float d_mag;
|
||||
float* d_magnitude;
|
||||
@ -99,9 +114,9 @@ private:
|
||||
float d_test_statistics;
|
||||
std::ofstream d_dump_file;
|
||||
bool d_active;
|
||||
int d_state;
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
unsigned int d_channel;
|
||||
uint32_t d_channel;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@ -123,7 +138,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
inline uint32_t mag() const
|
||||
{
|
||||
return d_mag;
|
||||
}
|
||||
@ -154,13 +169,13 @@ public:
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
void set_state(int state);
|
||||
void set_state(int32_t state);
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
@ -179,7 +194,7 @@ public:
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
inline void set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
}
|
||||
@ -188,7 +203,7 @@ public:
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_step(unsigned int doppler_step)
|
||||
inline void set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
}
|
||||
|
@ -280,10 +280,7 @@ bool pcps_acquisition::is_fdma()
|
||||
LOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << d_old_freq << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << std::endl;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -52,8 +52,8 @@
|
||||
#ifndef GNSS_SDR_PCPS_ACQUISITION_H_
|
||||
#define GNSS_SDR_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acq_conf.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <armadillo>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
|
@ -31,18 +31,18 @@
|
||||
*/
|
||||
|
||||
#include "pcps_acquisition_fine_doppler_cc.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm> // std::rotate, std::fill_n
|
||||
#include <sstream>
|
||||
#include <matio.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
@ -49,12 +49,12 @@
|
||||
#ifndef GNSS_SDR_PCPS_ACQUISITION_FINE_DOPPLER_CC_H_
|
||||
#define GNSS_SDR_PCPS_ACQUISITION_FINE_DOPPLER_CC_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acq_conf.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <armadillo>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
|
@ -39,9 +39,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
|
||||
|
||||
#define AQ_DOWNSAMPLING_DELAY 40 // delay due to the downsampling filter in the acquisition
|
||||
|
@ -31,24 +31,24 @@
|
||||
*/
|
||||
|
||||
#include "pcps_assisted_acquisition_cc.h"
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "concurrent_map.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gps_acq_assist.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include "concurrent_map.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gps_acq_assist.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
extern concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min,
|
||||
long fs_in, int samples_per_ms, bool dump,
|
||||
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
|
||||
int64_t fs_in, int32_t samples_per_ms, bool dump,
|
||||
std::string dump_filename)
|
||||
{
|
||||
return pcps_assisted_acquisition_cc_sptr(
|
||||
@ -58,8 +58,8 @@ pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
||||
|
||||
|
||||
pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min,
|
||||
long fs_in, int samples_per_ms, bool dump,
|
||||
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
|
||||
int64_t fs_in, int32_t samples_per_ms, bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_assisted_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(0, 0, sizeof(gr_complex)))
|
||||
@ -109,7 +109,7 @@ pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||
}
|
||||
|
||||
|
||||
void pcps_assisted_acquisition_cc::set_doppler_step(unsigned int doppler_step)
|
||||
void pcps_assisted_acquisition_cc::set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
}
|
||||
@ -117,7 +117,7 @@ void pcps_assisted_acquisition_cc::set_doppler_step(unsigned int doppler_step)
|
||||
|
||||
void pcps_assisted_acquisition_cc::free_grid_memory()
|
||||
{
|
||||
for (int i = 0; i < d_num_doppler_points; i++)
|
||||
for (int32_t i = 0; i < d_num_doppler_points; i++)
|
||||
{
|
||||
delete[] d_grid_data[i];
|
||||
delete[] d_grid_doppler_wipeoffs[i];
|
||||
@ -206,9 +206,9 @@ void pcps_assisted_acquisition_cc::get_assistance()
|
||||
void pcps_assisted_acquisition_cc::reset_grid()
|
||||
{
|
||||
d_well_count = 0;
|
||||
for (int i = 0; i < d_num_doppler_points; i++)
|
||||
for (int32_t i = 0; i < d_num_doppler_points; i++)
|
||||
{
|
||||
for (unsigned int j = 0; j < d_fft_size; j++)
|
||||
for (uint32_t j = 0; j < d_fft_size; j++)
|
||||
{
|
||||
d_grid_data[i][j] = 0.0;
|
||||
}
|
||||
@ -227,16 +227,16 @@ void pcps_assisted_acquisition_cc::redefine_grid()
|
||||
d_num_doppler_points = floor(std::abs(d_doppler_max - d_doppler_min) / d_doppler_step);
|
||||
|
||||
d_grid_data = new float *[d_num_doppler_points];
|
||||
for (int i = 0; i < d_num_doppler_points; i++)
|
||||
for (int32_t i = 0; i < d_num_doppler_points; i++)
|
||||
{
|
||||
d_grid_data[i] = new float[d_fft_size];
|
||||
}
|
||||
|
||||
// create the carrier Doppler wipeoff signals
|
||||
int doppler_hz;
|
||||
int32_t doppler_hz;
|
||||
float phase_step_rad;
|
||||
d_grid_doppler_wipeoffs = new gr_complex *[d_num_doppler_points];
|
||||
for (int doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
for (int32_t doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
{
|
||||
doppler_hz = d_doppler_min + d_doppler_step * doppler_index;
|
||||
// doppler search steps
|
||||
@ -254,11 +254,11 @@ double pcps_assisted_acquisition_cc::search_maximum()
|
||||
{
|
||||
float magt = 0.0;
|
||||
float fft_normalization_factor;
|
||||
int index_doppler = 0;
|
||||
int32_t index_doppler = 0;
|
||||
uint32_t tmp_intex_t = 0;
|
||||
uint32_t index_time = 0;
|
||||
|
||||
for (int i = 0; i < d_num_doppler_points; i++)
|
||||
for (int32_t i = 0; i < d_num_doppler_points; i++)
|
||||
{
|
||||
volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_grid_data[i], d_fft_size);
|
||||
if (d_grid_data[i][tmp_intex_t] > magt)
|
||||
@ -316,7 +316,7 @@ float pcps_assisted_acquisition_cc::estimate_input_power(gr_vector_const_void_st
|
||||
}
|
||||
|
||||
|
||||
int pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_void_star &input_items)
|
||||
int32_t pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_void_star &input_items)
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
@ -331,7 +331,7 @@ int pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_vo
|
||||
// 2- Doppler frequency search loop
|
||||
auto *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
for (int doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
for (int32_t doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
{
|
||||
// doppler search steps
|
||||
// Perform the carrier wipe-off
|
||||
@ -394,7 +394,7 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items,
|
||||
d_state = 2;
|
||||
break;
|
||||
case 2: // S2. ComputeGrid
|
||||
int consumed_samples;
|
||||
int32_t consumed_samples;
|
||||
consumed_samples = compute_and_accumulate_grid(input_items);
|
||||
d_well_count++;
|
||||
if (d_well_count >= d_max_dwells)
|
||||
|
@ -48,12 +48,12 @@
|
||||
#ifndef GNSS_SDR_PCPS_ASSISTED_ACQUISITION_CC_H_
|
||||
#define GNSS_SDR_PCPS_ASSISTED_ACQUISITION_CC_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include "gnss_synchro.h"
|
||||
|
||||
class pcps_assisted_acquisition_cc;
|
||||
|
||||
@ -61,8 +61,13 @@ typedef boost::shared_ptr<pcps_assisted_acquisition_cc>
|
||||
pcps_assisted_acquisition_cc_sptr;
|
||||
|
||||
pcps_assisted_acquisition_cc_sptr
|
||||
pcps_make_assisted_acquisition_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long fs_in, int samples_per_ms,
|
||||
pcps_make_assisted_acquisition_cc(
|
||||
int32_t max_dwells,
|
||||
uint32_t sampled_ms,
|
||||
int32_t doppler_max,
|
||||
int32_t doppler_min,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
/*!
|
||||
@ -75,20 +80,20 @@ class pcps_assisted_acquisition_cc : public gr::block
|
||||
{
|
||||
private:
|
||||
friend pcps_assisted_acquisition_cc_sptr
|
||||
pcps_make_assisted_acquisition_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long fs_in,
|
||||
int samples_per_ms, bool dump,
|
||||
pcps_make_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms,
|
||||
int32_t doppler_max, int32_t doppler_min, int64_t fs_in,
|
||||
int32_t samples_per_ms, bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
pcps_assisted_acquisition_cc(int max_dwells, unsigned int sampled_ms,
|
||||
int doppler_max, int doppler_min, long fs_in,
|
||||
int samples_per_ms, bool dump,
|
||||
pcps_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms,
|
||||
int32_t doppler_max, int32_t doppler_min, int64_t fs_in,
|
||||
int32_t samples_per_ms, bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
|
||||
int compute_and_accumulate_grid(gr_vector_const_void_star& input_items);
|
||||
int32_t compute_and_accumulate_grid(gr_vector_const_void_star& input_items);
|
||||
float estimate_input_power(gr_vector_const_void_star& input_items);
|
||||
double search_maximum();
|
||||
void get_assistance();
|
||||
@ -96,22 +101,22 @@ private:
|
||||
void redefine_grid();
|
||||
void free_grid_memory();
|
||||
|
||||
long d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_max_dwells;
|
||||
unsigned int d_doppler_resolution;
|
||||
int d_gnuradio_forecast_samples;
|
||||
int64_t d_fs_in;
|
||||
int32_t d_samples_per_ms;
|
||||
int32_t d_max_dwells;
|
||||
uint32_t d_doppler_resolution;
|
||||
int32_t d_gnuradio_forecast_samples;
|
||||
float d_threshold;
|
||||
std::string d_satellite_str;
|
||||
int d_doppler_max;
|
||||
int d_doppler_min;
|
||||
int d_config_doppler_max;
|
||||
int d_config_doppler_min;
|
||||
int32_t d_doppler_max;
|
||||
int32_t d_doppler_min;
|
||||
int32_t d_config_doppler_max;
|
||||
int32_t d_config_doppler_min;
|
||||
|
||||
int d_num_doppler_points;
|
||||
int d_doppler_step;
|
||||
unsigned int d_sampled_ms;
|
||||
unsigned int d_fft_size;
|
||||
int32_t d_num_doppler_points;
|
||||
int32_t d_doppler_step;
|
||||
uint32_t d_sampled_ms;
|
||||
uint32_t d_fft_size;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex* d_carrier;
|
||||
gr_complex* d_fft_codes;
|
||||
@ -122,17 +127,17 @@ private:
|
||||
gr::fft::fft_complex* d_fft_if;
|
||||
gr::fft::fft_complex* d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
float d_input_power;
|
||||
float d_test_statistics;
|
||||
std::ofstream d_dump_file;
|
||||
int d_state;
|
||||
int32_t d_state;
|
||||
bool d_active;
|
||||
bool d_disable_assist;
|
||||
int d_well_count;
|
||||
int32_t d_well_count;
|
||||
bool d_dump;
|
||||
unsigned int d_channel;
|
||||
uint32_t d_channel;
|
||||
|
||||
std::string d_dump_filename;
|
||||
|
||||
@ -155,7 +160,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
inline uint32_t mag() const
|
||||
{
|
||||
return d_test_statistics;
|
||||
}
|
||||
@ -185,7 +190,7 @@ public:
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
@ -204,7 +209,7 @@ public:
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
inline void set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
}
|
||||
@ -213,7 +218,7 @@ public:
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step);
|
||||
void set_doppler_step(uint32_t doppler_step);
|
||||
|
||||
/*!
|
||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
||||
|
@ -35,22 +35,24 @@
|
||||
*/
|
||||
|
||||
#include "pcps_cccwsr_acquisition_cc.h"
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include "GPS_L1_CA.h" // GPS_TWO_PI
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include "control_message_factory.h"
|
||||
#include "GPS_L1_CA.h" //GPS_TWO_PI
|
||||
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump, std::string dump_filename)
|
||||
{
|
||||
return pcps_cccwsr_acquisition_cc_sptr(
|
||||
@ -58,10 +60,14 @@ pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
|
||||
samples_per_ms, samples_per_code, dump, std::move(dump_filename)));
|
||||
}
|
||||
|
||||
|
||||
pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_cccwsr_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
|
||||
@ -116,7 +122,7 @@ pcps_cccwsr_acquisition_cc::~pcps_cccwsr_acquisition_cc()
|
||||
{
|
||||
if (d_num_doppler_bins > 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_num_doppler_bins; i++)
|
||||
for (uint32_t i = 0; i < d_num_doppler_bins; i++)
|
||||
{
|
||||
volk_gnsssdr_free(d_grid_doppler_wipeoffs[i]);
|
||||
}
|
||||
@ -175,8 +181,8 @@ void pcps_cccwsr_acquisition_cc::init()
|
||||
|
||||
// Count the number of bins
|
||||
d_num_doppler_bins = 0;
|
||||
for (int doppler = static_cast<int>(-d_doppler_max);
|
||||
doppler <= static_cast<int>(d_doppler_max);
|
||||
for (auto doppler = static_cast<int32_t>(-d_doppler_max);
|
||||
doppler <= static_cast<int32_t>(d_doppler_max);
|
||||
doppler += d_doppler_step)
|
||||
{
|
||||
d_num_doppler_bins++;
|
||||
@ -184,11 +190,11 @@ void pcps_cccwsr_acquisition_cc::init()
|
||||
|
||||
// Create the carrier Doppler wipeoff signals
|
||||
d_grid_doppler_wipeoffs = new gr_complex *[d_num_doppler_bins];
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
@ -197,7 +203,7 @@ void pcps_cccwsr_acquisition_cc::init()
|
||||
}
|
||||
|
||||
|
||||
void pcps_cccwsr_acquisition_cc::set_state(int state)
|
||||
void pcps_cccwsr_acquisition_cc::set_state(int32_t state)
|
||||
{
|
||||
d_state = state;
|
||||
if (d_state == 1)
|
||||
@ -225,7 +231,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
{
|
||||
int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
int32_t acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
|
||||
switch (d_state)
|
||||
{
|
||||
@ -254,7 +260,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
case 1:
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
int32_t doppler;
|
||||
|
||||
uint32_t indext = 0;
|
||||
uint32_t indext_plus = 0;
|
||||
@ -281,11 +287,11 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
d_input_power /= static_cast<float>(d_fft_size);
|
||||
|
||||
// 2- Doppler frequency search loop
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
// doppler search steps
|
||||
|
||||
doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
|
||||
volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in,
|
||||
d_grid_doppler_wipeoffs[doppler_index], d_fft_size);
|
||||
@ -320,7 +326,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
// d_data_correlation.
|
||||
memcpy(d_pilot_correlation, d_ifft->get_outbuf(), sizeof(gr_complex) * d_fft_size);
|
||||
|
||||
for (unsigned int i = 0; i < d_fft_size; i++)
|
||||
for (uint32_t i = 0; i < d_fft_size; i++)
|
||||
{
|
||||
d_correlation_plus[i] = std::complex<float>(
|
||||
d_data_correlation[i].real() - d_pilot_correlation[i].imag(),
|
||||
|
@ -37,12 +37,12 @@
|
||||
#ifndef GNSS_SDR_PCPS_CCCWSR_ACQUISITION_CC_H_
|
||||
#define GNSS_SDR_PCPS_CCCWSR_ACQUISITION_CC_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include "gnss_synchro.h"
|
||||
|
||||
|
||||
class pcps_cccwsr_acquisition_cc;
|
||||
@ -50,10 +50,15 @@ class pcps_cccwsr_acquisition_cc;
|
||||
typedef boost::shared_ptr<pcps_cccwsr_acquisition_cc> pcps_cccwsr_acquisition_cc_sptr;
|
||||
|
||||
pcps_cccwsr_acquisition_cc_sptr
|
||||
pcps_cccwsr_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
pcps_cccwsr_make_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition with
|
||||
@ -63,40 +68,40 @@ class pcps_cccwsr_acquisition_cc : public gr::block
|
||||
{
|
||||
private:
|
||||
friend pcps_cccwsr_acquisition_cc_sptr
|
||||
pcps_cccwsr_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
pcps_cccwsr_make_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
pcps_cccwsr_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
pcps_cccwsr_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
|
||||
long d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
int64_t d_fs_in;
|
||||
int32_t d_samples_per_ms;
|
||||
int32_t d_samples_per_code;
|
||||
uint32_t d_doppler_resolution;
|
||||
float d_threshold;
|
||||
std::string d_satellite_str;
|
||||
unsigned int d_doppler_max;
|
||||
unsigned int d_doppler_step;
|
||||
unsigned int d_sampled_ms;
|
||||
unsigned int d_max_dwells;
|
||||
unsigned int d_well_count;
|
||||
unsigned int d_fft_size;
|
||||
uint32_t d_doppler_max;
|
||||
uint32_t d_doppler_step;
|
||||
uint32_t d_sampled_ms;
|
||||
uint32_t d_max_dwells;
|
||||
uint32_t d_well_count;
|
||||
uint32_t d_fft_size;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
uint32_t d_num_doppler_bins;
|
||||
gr_complex* d_fft_code_data;
|
||||
gr_complex* d_fft_code_pilot;
|
||||
gr::fft::fft_complex* d_fft_if;
|
||||
gr::fft::fft_complex* d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
float d_mag;
|
||||
float* d_magnitude;
|
||||
@ -108,9 +113,9 @@ private:
|
||||
float d_test_statistics;
|
||||
std::ofstream d_dump_file;
|
||||
bool d_active;
|
||||
int d_state;
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
unsigned int d_channel;
|
||||
uint32_t d_channel;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@ -132,7 +137,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
inline uint32_t mag() const
|
||||
{
|
||||
return d_mag;
|
||||
}
|
||||
@ -164,13 +169,13 @@ public:
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
void set_state(int state);
|
||||
void set_state(int32_t state);
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
@ -189,7 +194,7 @@ public:
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
inline void set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
}
|
||||
@ -198,7 +203,7 @@ public:
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_step(unsigned int doppler_step)
|
||||
inline void set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
}
|
||||
|
@ -49,10 +49,10 @@
|
||||
*/
|
||||
|
||||
#include "pcps_opencl_acquisition_cc.h"
|
||||
#include "GPS_L1_CA.h" //GPS_TWO_PI
|
||||
#include "control_message_factory.h"
|
||||
#include "opencl/fft_base_kernels.h"
|
||||
#include "opencl/fft_internal.h"
|
||||
#include "GPS_L1_CA.h" //GPS_TWO_PI
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
|
@ -54,8 +54,8 @@
|
||||
#include "gnss_synchro.h"
|
||||
#include "opencl/fft_internal.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -29,10 +29,10 @@
|
||||
*/
|
||||
|
||||
#include "pcps_quicksync_acquisition_cc.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
@ -43,10 +43,13 @@
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t folding_factor,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename)
|
||||
@ -63,10 +66,10 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
|
||||
|
||||
pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
uint32_t folding_factor,
|
||||
uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_quicksync_acquisition_cc",
|
||||
@ -97,7 +100,7 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
d_magnitude = static_cast<float*>(volk_gnsssdr_malloc(d_samples_per_code * d_folding_factor * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
d_magnitude_folded = static_cast<float*>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
d_possible_delay = new unsigned int[d_folding_factor];
|
||||
d_possible_delay = new uint32_t[d_folding_factor];
|
||||
d_corr_output_f = new float[d_folding_factor];
|
||||
|
||||
/*Create the d_code signal , which would store the values of the code in its
|
||||
@ -138,7 +141,7 @@ pcps_quicksync_acquisition_cc::~pcps_quicksync_acquisition_cc()
|
||||
//DLOG(INFO) << "START DESTROYER";
|
||||
if (d_num_doppler_bins > 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_num_doppler_bins; i++)
|
||||
for (uint32_t i = 0; i < d_num_doppler_bins; i++)
|
||||
{
|
||||
volk_gnsssdr_free(d_grid_doppler_wipeoffs[i]);
|
||||
}
|
||||
@ -176,7 +179,7 @@ void pcps_quicksync_acquisition_cc::set_local_code(std::complex<float>* code)
|
||||
/*perform folding of the code by the factorial factor parameter. Notice that
|
||||
folding of the code in the time stage would result in a downsampled spectrum
|
||||
in the frequency domain after applying the fftw operation*/
|
||||
for (unsigned int i = 0; i < d_folding_factor; i++)
|
||||
for (uint32_t i = 0; i < d_folding_factor; i++)
|
||||
{
|
||||
std::transform((code + i * d_fft_size), (code + ((i + 1) * d_fft_size)),
|
||||
d_fft_if->get_inbuf(), d_fft_if->get_inbuf(),
|
||||
@ -209,8 +212,8 @@ void pcps_quicksync_acquisition_cc::init()
|
||||
|
||||
// Count the number of bins
|
||||
d_num_doppler_bins = 0;
|
||||
for (int doppler = static_cast<int>(-d_doppler_max);
|
||||
doppler <= static_cast<int>(d_doppler_max);
|
||||
for (auto doppler = static_cast<int32_t>(-d_doppler_max);
|
||||
doppler <= static_cast<int32_t>(d_doppler_max);
|
||||
doppler += d_doppler_step)
|
||||
{
|
||||
d_num_doppler_bins++;
|
||||
@ -218,10 +221,10 @@ void pcps_quicksync_acquisition_cc::init()
|
||||
|
||||
// Create the carrier Doppler wipeoff signals
|
||||
d_grid_doppler_wipeoffs = new gr_complex*[d_num_doppler_bins];
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * d_folding_factor * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
@ -231,7 +234,7 @@ void pcps_quicksync_acquisition_cc::init()
|
||||
}
|
||||
|
||||
|
||||
void pcps_quicksync_acquisition_cc::set_state(int state)
|
||||
void pcps_quicksync_acquisition_cc::set_state(int32_t state)
|
||||
{
|
||||
d_state = state;
|
||||
if (d_state == 1)
|
||||
@ -270,7 +273,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
* 6. Declare positive or negative acquisition using a message queue
|
||||
*/
|
||||
//DLOG(INFO) << "START GENERAL WORK";
|
||||
int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
int32_t acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
//std::cout<<"general_work in quicksync gnuradio block"<<std::endl;
|
||||
switch (d_state)
|
||||
{
|
||||
@ -302,7 +305,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
{
|
||||
/* initialize acquisition implementing the QuickSync algorithm*/
|
||||
//DLOG(INFO) << "START CASE 1";
|
||||
int doppler;
|
||||
int32_t doppler;
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
const auto* in = reinterpret_cast<const gr_complex*>(input_items[0]); //Get the input samples pointer
|
||||
@ -349,7 +352,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
volk_32f_accumulator_s32f(&d_input_power, d_magnitude, d_samples_per_code * d_folding_factor);
|
||||
d_input_power /= static_cast<float>(d_samples_per_code * d_folding_factor);
|
||||
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
/*Ensure that the signal is going to start with all samples
|
||||
at zero. This is done to avoid over acumulation when performing
|
||||
@ -360,7 +363,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
/*Doppler search steps and then multiplication of the incoming
|
||||
signal with the doppler wipeoffs to eliminate frequency offset
|
||||
*/
|
||||
doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
|
||||
/*Perform multiplication of the incoming signal with the
|
||||
complex exponential vector. This removes the frequency doppler
|
||||
@ -372,7 +375,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
/*Perform folding of the carrier wiped-off incoming signal. Since
|
||||
superlinear method is being used the folding factor in the
|
||||
incoming raw data signal is of d_folding_factor^2*/
|
||||
for (int i = 0; i < static_cast<int>(d_folding_factor * d_folding_factor); i++)
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor * d_folding_factor); i++)
|
||||
{
|
||||
std::transform((in_temp + i * d_fft_size),
|
||||
(in_temp + ((i + 1) * d_fft_size)),
|
||||
@ -423,17 +426,17 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
restarted between consecutive dwells in multidwell operation.*/
|
||||
if (d_test_statistics < (d_mag / d_input_power) || !d_bit_transition_flag)
|
||||
{
|
||||
unsigned int detected_delay_samples_folded = 0;
|
||||
uint32_t detected_delay_samples_folded = 0;
|
||||
detected_delay_samples_folded = (indext % d_samples_per_code);
|
||||
gr_complex complex_acumulator[100];
|
||||
//gr_complex complex_acumulator[d_folding_factor];
|
||||
|
||||
for (int i = 0; i < static_cast<int>(d_folding_factor); i++)
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++)
|
||||
{
|
||||
d_possible_delay[i] = detected_delay_samples_folded + (i)*d_fft_size;
|
||||
}
|
||||
|
||||
for (int i = 0; i < static_cast<int>(d_folding_factor); i++)
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++)
|
||||
{
|
||||
/*Copy a signal of 1 code length into suggested buffer.
|
||||
The copied signal must have doppler effect corrected*/
|
||||
@ -447,7 +450,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
of a shift*/
|
||||
volk_32fc_x2_multiply_32fc(corr_output, in_1code, d_code, d_samples_per_code);
|
||||
|
||||
for (int j = 0; j < d_samples_per_code; j++)
|
||||
for (int32_t j = 0; j < d_samples_per_code; j++)
|
||||
{
|
||||
complex_acumulator[i] += (corr_output[j]);
|
||||
}
|
||||
@ -532,7 +535,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
DLOG(INFO) << "test statistics threshold " << d_threshold;
|
||||
DLOG(INFO) << "folding factor " << d_folding_factor;
|
||||
DLOG(INFO) << "possible delay correlation output";
|
||||
for (int i = 0; i < static_cast<int>(d_folding_factor); i++) DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++) DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
DLOG(INFO) << "code phase " << d_gnss_synchro->Acq_delay_samples;
|
||||
DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz;
|
||||
DLOG(INFO) << "magnitude folded " << d_mag;
|
||||
@ -561,7 +564,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
DLOG(INFO) << "test statistics threshold " << d_threshold;
|
||||
DLOG(INFO) << "folding factor " << d_folding_factor;
|
||||
DLOG(INFO) << "possible delay corr output";
|
||||
for (int i = 0; i < static_cast<int>(d_folding_factor); i++) DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++) DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
DLOG(INFO) << "code phase " << d_gnss_synchro->Acq_delay_samples;
|
||||
DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz;
|
||||
DLOG(INFO) << "magnitude folded " << d_mag;
|
||||
|
@ -53,13 +53,13 @@
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
class pcps_quicksync_acquisition_cc;
|
||||
|
||||
@ -67,10 +67,14 @@ typedef boost::shared_ptr<pcps_quicksync_acquisition_cc>
|
||||
pcps_quicksync_acquisition_cc_sptr;
|
||||
|
||||
pcps_quicksync_acquisition_cc_sptr
|
||||
pcps_quicksync_make_acquisition_cc(unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
pcps_quicksync_make_acquisition_cc(
|
||||
uint32_t folding_factor,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
@ -86,56 +90,56 @@ class pcps_quicksync_acquisition_cc : public gr::block
|
||||
{
|
||||
private:
|
||||
friend pcps_quicksync_acquisition_cc_sptr
|
||||
pcps_quicksync_make_acquisition_cc(unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
pcps_quicksync_make_acquisition_cc(uint32_t folding_factor,
|
||||
uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
pcps_quicksync_acquisition_cc(unsigned int folding_factor,
|
||||
unsigned int sampled_ms, unsigned int max_dwells,
|
||||
unsigned int doppler_max, long fs_in,
|
||||
int samples_per_ms, int samples_per_code,
|
||||
pcps_quicksync_acquisition_cc(uint32_t folding_factor,
|
||||
uint32_t sampled_ms, uint32_t max_dwells,
|
||||
uint32_t doppler_max, int64_t fs_in,
|
||||
int32_t samples_per_ms, int32_t samples_per_code,
|
||||
bool bit_transition_flag,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
|
||||
gr_complex* d_code;
|
||||
unsigned int d_folding_factor; // also referred in the paper as 'p'
|
||||
uint32_t d_folding_factor; // also referred in the paper as 'p'
|
||||
float* d_corr_acumulator;
|
||||
unsigned int* d_possible_delay;
|
||||
uint32_t* d_possible_delay;
|
||||
float* d_corr_output_f;
|
||||
float* d_magnitude_folded;
|
||||
gr_complex* d_signal_folded;
|
||||
gr_complex* d_code_folded;
|
||||
float d_noise_floor_power;
|
||||
|
||||
long d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
int64_t d_fs_in;
|
||||
int32_t d_samples_per_ms;
|
||||
int32_t d_samples_per_code;
|
||||
uint32_t d_doppler_resolution;
|
||||
float d_threshold;
|
||||
std::string d_satellite_str;
|
||||
unsigned int d_doppler_max;
|
||||
unsigned int d_doppler_step;
|
||||
unsigned int d_sampled_ms;
|
||||
unsigned int d_max_dwells;
|
||||
unsigned int d_well_count;
|
||||
unsigned int d_fft_size;
|
||||
uint32_t d_doppler_max;
|
||||
uint32_t d_doppler_step;
|
||||
uint32_t d_sampled_ms;
|
||||
uint32_t d_max_dwells;
|
||||
uint32_t d_well_count;
|
||||
uint32_t d_fft_size;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
uint32_t d_num_doppler_bins;
|
||||
gr_complex* d_fft_codes;
|
||||
gr::fft::fft_complex* d_fft_if;
|
||||
gr::fft::fft_complex* d_fft_if2;
|
||||
gr::fft::fft_complex* d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
float d_mag;
|
||||
float* d_magnitude;
|
||||
@ -144,9 +148,9 @@ private:
|
||||
bool d_bit_transition_flag;
|
||||
std::ofstream d_dump_file;
|
||||
bool d_active;
|
||||
int d_state;
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
unsigned int d_channel;
|
||||
uint32_t d_channel;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@ -168,7 +172,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
inline uint32_t mag() const
|
||||
{
|
||||
return d_mag;
|
||||
}
|
||||
@ -199,13 +203,13 @@ public:
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
void set_state(int state);
|
||||
void set_state(int32_t state);
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
@ -224,7 +228,7 @@ public:
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
inline void set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
}
|
||||
@ -233,7 +237,7 @@ public:
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_step(unsigned int doppler_step)
|
||||
inline void set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
}
|
||||
|
@ -49,8 +49,8 @@
|
||||
*/
|
||||
|
||||
#include "pcps_tong_acquisition_cc.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "GPS_L1_CA.h" // for GPS_TWO_PI
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
@ -61,10 +61,14 @@
|
||||
using google::LogMessage;
|
||||
|
||||
pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
uint32_t tong_init_val,
|
||||
uint32_t tong_max_val,
|
||||
uint32_t tong_max_dwells,
|
||||
bool dump, std::string dump_filename)
|
||||
{
|
||||
return pcps_tong_acquisition_cc_sptr(
|
||||
@ -73,10 +77,14 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
||||
}
|
||||
|
||||
pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
||||
unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
uint32_t sampled_ms,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
uint32_t tong_init_val,
|
||||
uint32_t tong_max_val,
|
||||
uint32_t tong_max_dwells,
|
||||
bool dump,
|
||||
std::string dump_filename) : gr::block("pcps_tong_acquisition_cc",
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
|
||||
@ -130,7 +138,7 @@ pcps_tong_acquisition_cc::~pcps_tong_acquisition_cc()
|
||||
{
|
||||
if (d_num_doppler_bins > 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_num_doppler_bins; i++)
|
||||
for (uint32_t i = 0; i < d_num_doppler_bins; i++)
|
||||
{
|
||||
volk_gnsssdr_free(d_grid_doppler_wipeoffs[i]);
|
||||
volk_gnsssdr_free(d_grid_data[i]);
|
||||
@ -176,8 +184,8 @@ void pcps_tong_acquisition_cc::init()
|
||||
|
||||
// Count the number of bins
|
||||
d_num_doppler_bins = 0;
|
||||
for (int doppler = static_cast<int>(-d_doppler_max);
|
||||
doppler <= static_cast<int>(d_doppler_max);
|
||||
for (auto doppler = static_cast<int32_t>(-d_doppler_max);
|
||||
doppler <= static_cast<int32_t>(d_doppler_max);
|
||||
doppler += d_doppler_step)
|
||||
{
|
||||
d_num_doppler_bins++;
|
||||
@ -186,11 +194,11 @@ void pcps_tong_acquisition_cc::init()
|
||||
// Create the carrier Doppler wipeoff signals and allocate data grid.
|
||||
d_grid_doppler_wipeoffs = new gr_complex *[d_num_doppler_bins];
|
||||
d_grid_data = new float *[d_num_doppler_bins];
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
d_grid_doppler_wipeoffs[doppler_index] = static_cast<gr_complex *>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = GPS_TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float _phase[1];
|
||||
_phase[0] = 0;
|
||||
@ -198,14 +206,14 @@ void pcps_tong_acquisition_cc::init()
|
||||
|
||||
d_grid_data[doppler_index] = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
for (unsigned int i = 0; i < d_fft_size; i++)
|
||||
for (uint32_t i = 0; i < d_fft_size; i++)
|
||||
{
|
||||
d_grid_data[doppler_index][i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void pcps_tong_acquisition_cc::set_state(int state)
|
||||
void pcps_tong_acquisition_cc::set_state(int32_t state)
|
||||
{
|
||||
d_state = state;
|
||||
if (d_state == 1)
|
||||
@ -220,9 +228,9 @@ void pcps_tong_acquisition_cc::set_state(int state)
|
||||
d_input_power = 0.0;
|
||||
d_test_statistics = 0.0;
|
||||
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_fft_size; i++)
|
||||
for (uint32_t i = 0; i < d_fft_size; i++)
|
||||
{
|
||||
d_grid_data[doppler_index][i] = 0;
|
||||
}
|
||||
@ -241,7 +249,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
{
|
||||
int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
int32_t acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
|
||||
switch (d_state)
|
||||
{
|
||||
@ -260,9 +268,9 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
d_input_power = 0.0;
|
||||
d_test_statistics = 0.0;
|
||||
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
for (unsigned int i = 0; i < d_fft_size; i++)
|
||||
for (uint32_t i = 0; i < d_fft_size; i++)
|
||||
{
|
||||
d_grid_data[doppler_index][i] = 0;
|
||||
}
|
||||
@ -280,7 +288,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
case 1:
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
int32_t doppler;
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
@ -304,11 +312,11 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
d_input_power /= static_cast<float>(d_fft_size);
|
||||
|
||||
// 2- Doppler frequency search loop
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
// doppler search steps
|
||||
|
||||
doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
|
||||
volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in,
|
||||
d_grid_doppler_wipeoffs[doppler_index], d_fft_size);
|
||||
|
@ -53,8 +53,8 @@
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
@ -64,11 +64,17 @@ class pcps_tong_acquisition_cc;
|
||||
typedef boost::shared_ptr<pcps_tong_acquisition_cc> pcps_tong_acquisition_cc_sptr;
|
||||
|
||||
pcps_tong_acquisition_cc_sptr
|
||||
pcps_tong_make_acquisition_cc(unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
bool dump, std::string dump_filename);
|
||||
pcps_tong_make_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
uint32_t doppler_max,
|
||||
int64_t fs_in,
|
||||
int32_t samples_per_ms,
|
||||
int32_t samples_per_code,
|
||||
uint32_t tong_init_val,
|
||||
uint32_t tong_max_val,
|
||||
uint32_t tong_max_dwells,
|
||||
bool dump,
|
||||
std::string dump_filename);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition with
|
||||
@ -78,45 +84,45 @@ class pcps_tong_acquisition_cc : public gr::block
|
||||
{
|
||||
private:
|
||||
friend pcps_tong_acquisition_cc_sptr
|
||||
pcps_tong_make_acquisition_cc(unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
pcps_tong_make_acquisition_cc(uint32_t sampled_ms, uint32_t doppler_max,
|
||||
int64_t fs_in, int32_t samples_per_ms,
|
||||
int32_t samples_per_code, uint32_t tong_init_val,
|
||||
uint32_t tong_max_val, uint32_t tong_max_dwells,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
pcps_tong_acquisition_cc(unsigned int sampled_ms, unsigned int doppler_max,
|
||||
long fs_in, int samples_per_ms,
|
||||
int samples_per_code, unsigned int tong_init_val,
|
||||
unsigned int tong_max_val, unsigned int tong_max_dwells,
|
||||
pcps_tong_acquisition_cc(uint32_t sampled_ms, uint32_t doppler_max,
|
||||
int64_t fs_in, int32_t samples_per_ms,
|
||||
int32_t samples_per_code, uint32_t tong_init_val,
|
||||
uint32_t tong_max_val, uint32_t tong_max_dwells,
|
||||
bool dump, std::string dump_filename);
|
||||
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift,
|
||||
int doppler_offset);
|
||||
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
|
||||
int32_t doppler_offset);
|
||||
|
||||
long d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_samples_per_code;
|
||||
unsigned int d_doppler_resolution;
|
||||
int64_t d_fs_in;
|
||||
int32_t d_samples_per_ms;
|
||||
int32_t d_samples_per_code;
|
||||
uint32_t d_doppler_resolution;
|
||||
float d_threshold;
|
||||
std::string d_satellite_str;
|
||||
unsigned int d_doppler_max;
|
||||
unsigned int d_doppler_step;
|
||||
unsigned int d_sampled_ms;
|
||||
unsigned int d_dwell_count;
|
||||
unsigned int d_tong_count;
|
||||
unsigned int d_tong_init_val;
|
||||
unsigned int d_tong_max_val;
|
||||
unsigned int d_tong_max_dwells;
|
||||
unsigned int d_fft_size;
|
||||
uint32_t d_doppler_max;
|
||||
uint32_t d_doppler_step;
|
||||
uint32_t d_sampled_ms;
|
||||
uint32_t d_dwell_count;
|
||||
uint32_t d_tong_count;
|
||||
uint32_t d_tong_init_val;
|
||||
uint32_t d_tong_max_val;
|
||||
uint32_t d_tong_max_dwells;
|
||||
uint32_t d_fft_size;
|
||||
uint64_t d_sample_counter;
|
||||
gr_complex** d_grid_doppler_wipeoffs;
|
||||
unsigned int d_num_doppler_bins;
|
||||
uint32_t d_num_doppler_bins;
|
||||
gr_complex* d_fft_codes;
|
||||
float** d_grid_data;
|
||||
gr::fft::fft_complex* d_fft_if;
|
||||
gr::fft::fft_complex* d_ifft;
|
||||
Gnss_Synchro* d_gnss_synchro;
|
||||
unsigned int d_code_phase;
|
||||
uint32_t d_code_phase;
|
||||
float d_doppler_freq;
|
||||
float d_mag;
|
||||
float* d_magnitude;
|
||||
@ -124,9 +130,9 @@ private:
|
||||
float d_test_statistics;
|
||||
std::ofstream d_dump_file;
|
||||
bool d_active;
|
||||
int d_state;
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
unsigned int d_channel;
|
||||
uint32_t d_channel;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@ -148,7 +154,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns the maximum peak of grid search.
|
||||
*/
|
||||
inline unsigned int mag() const
|
||||
inline uint32_t mag() const
|
||||
{
|
||||
return d_mag;
|
||||
}
|
||||
@ -179,13 +185,13 @@ public:
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
void set_state(int state);
|
||||
void set_state(int32_t state);
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(unsigned int channel)
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
@ -204,7 +210,7 @@ public:
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(unsigned int doppler_max)
|
||||
inline void set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
d_doppler_max = doppler_max;
|
||||
}
|
||||
@ -213,7 +219,7 @@ public:
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_step(unsigned int doppler_step)
|
||||
inline void set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
}
|
||||
|
@ -37,8 +37,8 @@
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <glog/logging.h>
|
||||
#include <fcntl.h> // libraries used by the GIPO
|
||||
#include <iostream>
|
||||
#include <fcntl.h> // libraries used by the GIPO
|
||||
#include <sys/mman.h> // libraries used by the GIPO
|
||||
|
||||
|
||||
|
@ -35,15 +35,15 @@
|
||||
#ifndef GNSS_SDR_CHANNEL_H_
|
||||
#define GNSS_SDR_CHANNEL_H_
|
||||
|
||||
#include "channel_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "channel_interface.h"
|
||||
#include "channel_msg_receiver_cc.h"
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
class AcquisitionInterface;
|
||||
|
@ -33,8 +33,8 @@
|
||||
#define GNSS_SDR_CHANNEL_FSM_H
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "tracking_interface.h"
|
||||
#include "telemetry_decoder_interface.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
@ -30,9 +30,9 @@
|
||||
|
||||
|
||||
#include "channel_msg_receiver_cc.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <glog/logging.h>
|
||||
#include <cstdint>
|
||||
|
||||
using google::LogMessage;
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
#include "array_signal_conditioner.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
||||
|
@ -33,9 +33,9 @@
|
||||
#define GNSS_SDR_ARRAY_SIGNAL_CONDITIONER_H_
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <string>
|
||||
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
#include "signal_conditioner.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "byte_to_short.h"
|
||||
#include "configuration_interface.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ ByteToShort::ByteToShort(ConfigurationInterface* configuration, std::string role
|
||||
dump_ = config_->property(role_ + ".dump", false);
|
||||
dump_filename_ = config_->property(role_ + ".dump_filename", default_dump_filename);
|
||||
|
||||
size_t item_size = sizeof(short);
|
||||
size_t item_size = sizeof(int16_t);
|
||||
|
||||
gr_char_to_short_ = gr::blocks::char_to_short::make();
|
||||
|
||||
|
@ -34,8 +34,8 @@
|
||||
#include "conjugate_cc.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/blocks/interleaved_char_to_complex.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/interleaved_char_to_complex.h>
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
@ -32,8 +32,8 @@
|
||||
#define GNSS_SDR_IBYTE_TO_CSHORT_H_
|
||||
|
||||
#include "conjugate_sc.h"
|
||||
#include "interleaved_byte_to_complex_short.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "interleaved_byte_to_complex_short.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <string>
|
||||
|
||||
|
@ -33,8 +33,8 @@
|
||||
|
||||
#include "conjugate_cc.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/blocks/interleaved_short_to_complex.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/interleaved_short_to_complex.h>
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
@ -31,10 +31,10 @@
|
||||
|
||||
#include "fir_filter.h"
|
||||
#include "configuration_interface.h"
|
||||
#include <utility>
|
||||
#include <gnuradio/filter/pm_remez.h>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/filter/pm_remez.h>
|
||||
#include <volk/volk.h>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@ -287,15 +287,15 @@ gr::basic_block_sptr FirFilter::get_left_block()
|
||||
{
|
||||
return cshort_to_float_x2_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "gr_complex"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "gr_complex"))
|
||||
{
|
||||
return cbyte_to_float_x2_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "cbyte"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "cbyte"))
|
||||
{
|
||||
return cbyte_to_float_x2_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "gr_complex"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "gr_complex"))
|
||||
{
|
||||
return cshort_to_float_x2_;
|
||||
}
|
||||
@ -317,15 +317,15 @@ gr::basic_block_sptr FirFilter::get_right_block()
|
||||
{
|
||||
return short_x2_to_cshort_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "gr_complex"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "gr_complex"))
|
||||
{
|
||||
return float_to_complex_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "cbyte"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "cbyte"))
|
||||
{
|
||||
return char_x2_cbyte_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "gr_complex"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "gr_complex"))
|
||||
{
|
||||
return float_to_complex_;
|
||||
}
|
||||
|
@ -33,16 +33,16 @@
|
||||
#ifndef GNSS_SDR_FIR_FILTER_H_
|
||||
#define GNSS_SDR_FIR_FILTER_H_
|
||||
|
||||
#include "gnss_block_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "byte_x2_to_complex_byte.h"
|
||||
#include "short_x2_to_cshort.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "cshort_to_float_x2.h"
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include "gnss_block_interface.h"
|
||||
#include "short_x2_to_cshort.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/float_to_char.h>
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/float_to_short.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/filter/fir_filter_blk.h>
|
||||
#else
|
||||
|
@ -31,12 +31,12 @@
|
||||
|
||||
#include "freq_xlating_fir_filter.h"
|
||||
#include "configuration_interface.h"
|
||||
#include <utility>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/filter/pm_remez.h>
|
||||
#include <gnuradio/filter/firdes.h>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/filter/firdes.h>
|
||||
#include <gnuradio/filter/pm_remez.h>
|
||||
#include <volk/volk.h>
|
||||
#include <utility>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@ -327,15 +327,15 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_left_block()
|
||||
{
|
||||
return freq_xlating_fir_filter_fcf_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "gr_complex"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "gr_complex"))
|
||||
{
|
||||
return freq_xlating_fir_filter_scf_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "cshort"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "cshort"))
|
||||
{
|
||||
return freq_xlating_fir_filter_scf_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "gr_complex"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "gr_complex"))
|
||||
{
|
||||
return gr_char_to_short_;
|
||||
}
|
||||
@ -361,15 +361,15 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_right_block()
|
||||
{
|
||||
return freq_xlating_fir_filter_fcf_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "gr_complex"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "gr_complex"))
|
||||
{
|
||||
return freq_xlating_fir_filter_scf_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "cshort"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "cshort"))
|
||||
{
|
||||
return short_x2_to_cshort_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "gr_complex"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "gr_complex"))
|
||||
{
|
||||
return freq_xlating_fir_filter_scf_;
|
||||
}
|
||||
|
@ -33,9 +33,9 @@
|
||||
#ifndef GNSS_SDR_FREQ_XLATING_FIR_FILTER_H_
|
||||
#define GNSS_SDR_FREQ_XLATING_FIR_FILTER_H_
|
||||
|
||||
#include "complex_float_to_complex_byte.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "short_x2_to_cshort.h"
|
||||
#include "complex_float_to_complex_byte.h"
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/filter/freq_xlating_fir_filter.h>
|
||||
#else
|
||||
@ -43,9 +43,9 @@
|
||||
#include <gnuradio/filter/freq_xlating_fir_filter_fcf.h>
|
||||
#include <gnuradio/filter/freq_xlating_fir_filter_scf.h>
|
||||
#endif
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/complex_to_float.h>
|
||||
#include <gnuradio/blocks/char_to_short.h>
|
||||
#include <gnuradio/blocks/complex_to_float.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/float_to_short.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -33,8 +33,8 @@
|
||||
#ifndef GNSS_SDR_NOTCH_FILTER_H_
|
||||
#define GNSS_SDR_NOTCH_FILTER_H_
|
||||
|
||||
#include "notch_cc.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "notch_cc.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -33,9 +33,9 @@
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/filter/firdes.h>
|
||||
#include <cmath>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@ -160,11 +160,8 @@ gr::basic_block_sptr PulseBlankingFilter::get_left_block()
|
||||
}
|
||||
return pulse_blanking_cc_;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(ERROR) << " Unknown input filter input/output item type conversion";
|
||||
return nullptr;
|
||||
}
|
||||
LOG(ERROR) << " Unknown input filter input/output item type conversion";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ beamformer::beamformer()
|
||||
{
|
||||
//initialize weight vector
|
||||
|
||||
if (posix_memalign((void **)&weight_vector, 16, GNSS_SDR_BEAMFORMER_CHANNELS * sizeof(gr_complex)) == 0)
|
||||
if (posix_memalign(reinterpret_cast<void **>(&weight_vector), 16, GNSS_SDR_BEAMFORMER_CHANNELS * sizeof(gr_complex)) == 0)
|
||||
{
|
||||
};
|
||||
|
||||
|
@ -33,8 +33,8 @@
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@ -86,7 +86,7 @@ Notch::~Notch()
|
||||
|
||||
void Notch::forecast(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items_required)
|
||||
{
|
||||
for (int & aux : ninput_items_required)
|
||||
for (int &aux : ninput_items_required)
|
||||
{
|
||||
aux = length_;
|
||||
}
|
||||
|
@ -33,8 +33,8 @@
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@ -89,7 +89,7 @@ NotchLite::~NotchLite()
|
||||
|
||||
void NotchLite::forecast(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items_required)
|
||||
{
|
||||
for (int & aux : ninput_items_required)
|
||||
for (int &aux : ninput_items_required)
|
||||
{
|
||||
aux = length_;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ pulse_blanking_cc::~pulse_blanking_cc()
|
||||
|
||||
void pulse_blanking_cc::forecast(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items_required)
|
||||
{
|
||||
for (int & aux : ninput_items_required)
|
||||
for (int &aux : ninput_items_required)
|
||||
{
|
||||
aux = length_;
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ void galileo_e1_code_gen_complex_sampled(std::complex<float>* _dest, char _Signa
|
||||
std::string _galileo_signal = _Signal;
|
||||
const int32_t _codeFreqBasis = Galileo_E1_CODE_CHIP_RATE_HZ; // Hz
|
||||
auto _samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) /
|
||||
(static_cast<double>(_codeFreqBasis) / static_cast<double>(Galileo_E1_B_CODE_LENGTH_CHIPS)));
|
||||
(static_cast<double>(_codeFreqBasis) / static_cast<double>(Galileo_E1_B_CODE_LENGTH_CHIPS)));
|
||||
|
||||
if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag)
|
||||
{
|
||||
|
@ -119,7 +119,7 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
|
||||
if (_fs != _codeFreqBasis)
|
||||
{
|
||||
std::complex<float>* _resampled_signal;
|
||||
if (posix_memalign((void**)&_resampled_signal, 16, _samplesPerCode * sizeof(gr_complex)) == 0)
|
||||
if (posix_memalign(reinterpret_cast<void**>(&_resampled_signal), 16, _samplesPerCode * sizeof(gr_complex)) == 0)
|
||||
{
|
||||
};
|
||||
resampler(_code, _resampled_signal, _codeFreqBasis, _fs, _codeLength, _samplesPerCode); // resamples code to fs
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user