diff --git a/CMakeLists.txt b/CMakeLists.txt
index 314bbab62..7b4a2cb33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,7 +45,7 @@ endif(NOT CMAKE_PREFIX_PATH)
########################################################################
# Support of optional RF front-ends
option(ENABLE_UHD "Enable the use of UHD (driver for all USRP devices)" ON)
-option(ENABLE_OSMOSDR "Enable the use of OsmoSDR and other front-ends (RTL-based dongles, HackRF, bladeRF, etc.) as signal source (experimental)" OFF)
+option(ENABLE_OSMOSDR "Enable the use of OsmoSDR and other front-ends (RTL-based dongles, HackRF, bladeRF, etc.) as signal source" OFF)
option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNURadio driver" OFF)
option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF)
option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF)
@@ -341,10 +341,10 @@ set(GNSSSDR_MATIO_MIN_VERSION "1.5.3")
################################################################################
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.1")
set(GNSSSDR_GLOG_LOCAL_VERSION "0.3.5")
-set(GNSSSDR_ARMADILLO_LOCAL_VERSION "unstable")
+set(GNSSSDR_ARMADILLO_LOCAL_VERSION "9.200.x")
set(GNSSSDR_GTEST_LOCAL_VERSION "1.8.1")
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
-set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10")
+set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10.6")
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.12")
@@ -622,7 +622,9 @@ if(NOT VOLK_GNSSSDR_FOUND)
if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
set(STRIP_VOLK_GNSSSDR_PROFILE "-DENABLE_STRIP=ON -DCMAKE_VERBOSE_MAKEFILE=ON")
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
- set(READ_ENVIRO ${CMAKE_COMMAND} -E environment)
+ if(NOT DEFINED ENV{PROTECT_PASSWORDS})
+ set(READ_ENVIRO ${CMAKE_COMMAND} -E environment)
+ endif(NOT DEFINED ENV{PROTECT_PASSWORDS})
endif(ENABLE_PACKAGING)
set(VOLK_GNSSSDR_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}")
diff --git a/README.md b/README.md
index 32195a8d0..f2fe4a607 100644
--- a/README.md
+++ b/README.md
@@ -186,9 +186,9 @@ $ sudo apt-get install libblas-dev liblapack-dev # For Debian/Ubuntu/Linux
$ sudo yum install lapack-devel blas-devel # For Fedora/CentOS/RHEL
$ sudo zypper install lapack-devel blas-devel # For OpenSUSE
$ sudo pacman -S blas lapack # For Arch Linux
-$ wget https://sourceforge.net/projects/arma/files/armadillo-8.500.1.tar.xz
-$ tar xvfz armadillo-8.500.1.tar.xz
-$ cd armadillo-8.500.1
+$ wget https://sourceforge.net/projects/arma/files/armadillo-9.100.5.tar.xz
+$ tar xvfz armadillo-9.100.5.tar.xz
+$ cd armadillo-9.100.5
$ cmake .
$ make
$ sudo make install
diff --git a/cmake/Modules/FindGPSTK.cmake b/cmake/Modules/FindGPSTK.cmake
index 515878d5a..137a34b5b 100644
--- a/cmake/Modules/FindGPSTK.cmake
+++ b/cmake/Modules/FindGPSTK.cmake
@@ -24,10 +24,10 @@
# also defined, but not for general use are
# GPSTK_LIBRARY, where to find the GPSTK library.
-FIND_PATH(GPSTK_INCLUDE_DIR Rinex3ObsBase.hpp
- HINTS /usr/include/gpstk
- /usr/local/include/gpstk
- /opt/local/include/gpstk )
+FIND_PATH(GPSTK_INCLUDE_DIR gpstk/Rinex3ObsBase.hpp
+ HINTS /usr/include
+ /usr/local/include
+ /opt/local/include )
SET(GPSTK_NAMES ${GPSTK_NAMES} gpstk libgpstk)
FIND_LIBRARY(GPSTK_LIBRARY NAMES ${GPSTK_NAMES}
diff --git a/cmake/Modules/FindGnssSimulator.cmake b/cmake/Modules/FindGnssSimulator.cmake
new file mode 100644
index 000000000..56bccc709
--- /dev/null
+++ b/cmake/Modules/FindGnssSimulator.cmake
@@ -0,0 +1,28 @@
+# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
+#
+# This file is part of GNSS-SDR.
+#
+# GNSS-SDR is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNSS-SDR is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNSS-SDR. If not, see .
+
+
+find_program(SW_GENERATOR_BIN gnss_sim
+ PATHS /usr/bin
+ /usr/local/bin
+ /opt/local/bin
+ ${CMAKE_INSTALL_PREFIX}/bin
+ PATH_SUFFIXES bin )
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNSS-SIMULATOR DEFAULT_MSG SW_GENERATOR_BIN)
+MARK_AS_ADVANCED(SW_GENERATOR_BIN)
\ No newline at end of file
diff --git a/src/algorithms/PVT/adapters/CMakeLists.txt b/src/algorithms/PVT/adapters/CMakeLists.txt
index 0eb2becca..cc63d7032 100644
--- a/src/algorithms/PVT/adapters/CMakeLists.txt
+++ b/src/algorithms/PVT/adapters/CMakeLists.txt
@@ -25,6 +25,10 @@ set(PVT_ADAPTER_SOURCES
rtklib_pvt.cc
)
+set(PVT_ADAPTER_HEADERS
+ rtklib_pvt.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -41,8 +45,6 @@ include_directories(
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
-file(GLOB PVT_ADAPTER_HEADERS "*.h")
-list(SORT PVT_ADAPTER_HEADERS)
add_library(pvt_adapters ${PVT_ADAPTER_SOURCES} ${PVT_ADAPTER_HEADERS})
source_group(Headers FILES ${PVT_ADAPTER_HEADERS})
target_link_libraries(pvt_adapters pvt_gr_blocks ${ARMADILLO_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES})
diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc
index dc8cf894a..509d07886 100644
--- a/src/algorithms/PVT/adapters/rtklib_pvt.cc
+++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc
@@ -506,12 +506,12 @@ bool RtklibPvt::save_assistance_to_XML()
if (eph_map.empty() == false)
{
+ std::ofstream ofs;
try
{
- std::ofstream ofs(eph_xml_filename_.c_str(), std::ofstream::trunc | std::ofstream::out);
+ ofs.open(eph_xml_filename_.c_str(), std::ofstream::trunc | std::ofstream::out);
boost::archive::xml_oarchive xml(ofs);
xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", eph_map);
- ofs.close();
LOG(INFO) << "Saved GPS L1 Ephemeris map data";
}
catch (const std::exception& e)
@@ -519,13 +519,13 @@ bool RtklibPvt::save_assistance_to_XML()
LOG(WARNING) << e.what();
return false;
}
- return true; // return variable (true == succeeded)
}
else
{
LOG(WARNING) << "Failed to save Ephemeris, map is empty";
return false;
}
+ return true; // return variable (true == succeeded)
}
diff --git a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt
index 03bf64caf..72ce3f436 100644
--- a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt
+++ b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt
@@ -25,6 +25,10 @@ set(PVT_GR_BLOCKS_SOURCES
rtklib_pvt_cc.cc
)
+set(PVT_GR_BLOCKS_HEADERS
+ rtklib_pvt_cc.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -39,8 +43,6 @@ include_directories(
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
-file(GLOB PVT_GR_BLOCKS_HEADERS "*.h")
-list(SORT PVT_GR_BLOCKS_HEADERS)
add_library(pvt_gr_blocks ${PVT_GR_BLOCKS_SOURCES} ${PVT_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${PVT_GR_BLOCKS_HEADERS})
target_link_libraries(pvt_gr_blocks pvt_lib ${ARMADILLO_LIBRARIES})
diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc
index 9a5335c8a..13498ee71 100644
--- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc
+++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc
@@ -50,6 +50,10 @@ namespace bc = boost::math;
namespace bc = boost::integer;
#endif
+//includes used by the observables serializarion (export observables for rtklib unit test)
+#include
+#include
+#include
using google::LogMessage;
@@ -392,16 +396,15 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
msgctl(sysv_msqid, IPC_RMID, NULL);
// save GPS L2CM ephemeris to XML file
- std::string file_name = "eph_GPS_CNAV.xml";
-
+ std::string file_name = "gps_cnav_ephemeris.xml";
if (d_ls_pvt->gps_cnav_ephemeris_map.empty() == false)
{
+ std::ofstream ofs;
try
{
- std::ofstream ofs(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
+ ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
boost::archive::xml_oarchive xml(ofs);
- xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", d_ls_pvt->gps_cnav_ephemeris_map);
- ofs.close();
+ xml << boost::serialization::make_nvp("GNSS-SDR_cnav_ephemeris_map", d_ls_pvt->gps_cnav_ephemeris_map);
LOG(INFO) << "Saved GPS L2CM or L5 Ephemeris map data";
}
catch (std::exception& e)
@@ -411,20 +414,19 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
}
else
{
- LOG(WARNING) << "Failed to save GPS L2CM or L5 Ephemeris, map is empty";
+ LOG(INFO) << "Failed to save GPS L2CM or L5 Ephemeris, map is empty";
}
// save GPS L1 CA ephemeris to XML file
- file_name = "eph_GPS_L1CA.xml";
-
+ file_name = "gps_ephemeris.xml";
if (d_ls_pvt->gps_ephemeris_map.empty() == false)
{
+ std::ofstream ofs;
try
{
- std::ofstream ofs(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
+ ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
boost::archive::xml_oarchive xml(ofs);
xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", d_ls_pvt->gps_ephemeris_map);
- ofs.close();
LOG(INFO) << "Saved GPS L1 CA Ephemeris map data";
}
catch (const std::exception& e)
@@ -434,20 +436,19 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
}
else
{
- LOG(WARNING) << "Failed to save GPS L1 CA Ephemeris, map is empty";
+ LOG(INFO) << "Failed to save GPS L1 CA Ephemeris, map is empty";
}
// save Galileo E1 ephemeris to XML file
- file_name = "eph_Galileo_E1.xml";
-
+ file_name = "gal_ephemeris.xml";
if (d_ls_pvt->galileo_ephemeris_map.empty() == false)
{
+ std::ofstream ofs;
try
{
- std::ofstream ofs(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
+ ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
boost::archive::xml_oarchive xml(ofs);
- xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", d_ls_pvt->galileo_ephemeris_map);
- ofs.close();
+ xml << boost::serialization::make_nvp("GNSS-SDR_gal_ephemeris_map", d_ls_pvt->galileo_ephemeris_map);
LOG(INFO) << "Saved Galileo E1 Ephemeris map data";
}
catch (const std::exception& e)
@@ -457,20 +458,19 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
}
else
{
- LOG(WARNING) << "Failed to save Galileo E1 Ephemeris, map is empty";
+ LOG(INFO) << "Failed to save Galileo E1 Ephemeris, map is empty";
}
// save GLONASS GNAV ephemeris to XML file
file_name = "eph_GLONASS_GNAV.xml";
-
if (d_ls_pvt->glonass_gnav_ephemeris_map.empty() == false)
{
+ std::ofstream ofs;
try
{
- std::ofstream ofs(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
+ ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
boost::archive::xml_oarchive xml(ofs);
- xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", d_ls_pvt->glonass_gnav_ephemeris_map);
- ofs.close();
+ xml << boost::serialization::make_nvp("GNSS-SDR_gnav_ephemeris_map", d_ls_pvt->glonass_gnav_ephemeris_map);
LOG(INFO) << "Saved GLONASS GNAV Ephemeris map data";
}
catch (std::exception& e)
@@ -480,7 +480,73 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
}
else
{
- LOG(WARNING) << "Failed to save GLONASS GNAV Ephemeris, map is empty";
+ LOG(INFO) << "Failed to save GLONASS GNAV Ephemeris, map is empty";
+ }
+
+ // Save GPS UTC model parameters
+ file_name = "gps_utc_model.xml";
+ if (d_ls_pvt->gps_utc_model.valid)
+ {
+ std::ofstream ofs;
+ try
+ {
+ ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
+ boost::archive::xml_oarchive xml(ofs);
+ xml << boost::serialization::make_nvp("GNSS-SDR_utc_model", d_ls_pvt->gps_utc_model);
+ LOG(INFO) << "Saved GPS UTC model parameters";
+ }
+ catch (std::exception& e)
+ {
+ LOG(WARNING) << e.what();
+ }
+ }
+ else
+ {
+ LOG(INFO) << "Failed to save GPS UTC model parameters, not valid data";
+ }
+
+ // Save Galileo UTC model parameters
+ file_name = "gal_utc_model.xml";
+ if (d_ls_pvt->galileo_utc_model.A0_6 != 0.0)
+ {
+ std::ofstream ofs;
+ try
+ {
+ ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
+ boost::archive::xml_oarchive xml(ofs);
+ xml << boost::serialization::make_nvp("GNSS-SDR_gal_utc_model", d_ls_pvt->galileo_utc_model);
+ LOG(INFO) << "Saved Galileo UTC model parameters";
+ }
+ catch (std::exception& e)
+ {
+ LOG(WARNING) << e.what();
+ }
+ }
+ else
+ {
+ LOG(INFO) << "Failed to save Galileo UTC model parameters, not valid data";
+ }
+
+ // Save GPS CNAV UTC model parameters
+ file_name = "gps_cnav_utc_model.xml";
+ if (d_ls_pvt->gps_cnav_utc_model.valid)
+ {
+ std::ofstream ofs;
+ try
+ {
+ ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
+ boost::archive::xml_oarchive xml(ofs);
+ xml << boost::serialization::make_nvp("GNSS-SDR_cnav_utc_model", d_ls_pvt->gps_cnav_utc_model);
+ LOG(INFO) << "Saved GPS CNAV UTC model parameters";
+ }
+ catch (std::exception& e)
+ {
+ LOG(WARNING) << e.what();
+ }
+ }
+ else
+ {
+ LOG(INFO) << "Failed to save GPS CNAV UTC model parameters, not valid data";
}
}
@@ -507,6 +573,54 @@ bool rtklib_pvt_cc::send_sys_v_ttff_msg(ttff_msgbuf ttff)
}
+bool rtklib_pvt_cc::save_gnss_synchro_map_xml(const std::string file_name)
+{
+ if (gnss_observables_map.empty() == false)
+ {
+ std::ofstream ofs;
+ try
+ {
+ ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
+ boost::archive::xml_oarchive xml(ofs);
+ xml << boost::serialization::make_nvp("GNSS-SDR_gnss_synchro_map", gnss_observables_map);
+ LOG(INFO) << "Saved gnss_sychro map data";
+ }
+ catch (std::exception& e)
+ {
+ LOG(WARNING) << e.what();
+ return false;
+ }
+ return true;
+ }
+ else
+ {
+ LOG(WARNING) << "Failed to save gnss_synchro, map is empty";
+ return false;
+ }
+}
+
+
+bool rtklib_pvt_cc::load_gnss_synchro_map_xml(const std::string file_name)
+{
+ // load from xml (boost serialize)
+ std::ifstream ifs;
+ try
+ {
+ ifs.open(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
+ boost::archive::xml_iarchive xml(ifs);
+ gnss_observables_map.clear();
+ xml >> boost::serialization::make_nvp("GNSS-SDR_gnss_synchro_map", gnss_observables_map);
+ //std::cout << "Loaded gnss_synchro map data with " << gnss_synchro_map.size() << " pseudoranges" << std::endl;
+ }
+ catch (std::exception& e)
+ {
+ std::cout << e.what() << "File: " << file_name;
+ return false;
+ }
+ return true;
+}
+
+
int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_items,
gr_vector_void_star& output_items __attribute__((unused)))
{
@@ -526,7 +640,6 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
gnss_observables_map.clear();
const Gnss_Synchro** in = reinterpret_cast(&input_items[0]); // Get the input buffer pointer
-
// ############ 1. READ PSEUDORANGES ####
for (uint32_t i = 0; i < d_nchannels; i++)
{
@@ -610,8 +723,15 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
// it->second.Pseudorange_m = it->second.Pseudorange_m - d_ls_pvt->get_time_offset_s() * GPS_C_m_s;
// }
+
if (d_ls_pvt->get_PVT(gnss_observables_map, false))
{
+ //Optional debug code: export observables snapshot for rtklib unit testing
+ //std::cout << "step 1: save gnss_synchro map" << std::endl;
+ //save_gnss_synchro_map_xml("./gnss_synchro_map.xml");
+ //getchar(); //stop the execution
+ //end debug
+
if (current_RX_time_ms % d_display_rate_ms == 0)
{
flag_display_pvt = true;
@@ -2060,7 +2180,6 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
{
std::streamsize ss = std::cout.precision(); // save current precision
std::cout.setf(std::ios::fixed, std::ios::floatfield);
-
auto facet = new boost::posix_time::time_facet("%Y-%b-%d %H:%M:%S.%f %z");
std::cout.imbue(std::locale(std::cout.getloc(), facet));
diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h
index 36d09fab4..3dfb87858 100644
--- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h
+++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h
@@ -152,6 +152,10 @@ private:
bool send_sys_v_ttff_msg(ttff_msgbuf ttff);
std::chrono::time_point start, end;
+ bool save_gnss_synchro_map_xml(const std::string file_name); //debug helper function
+
+ bool load_gnss_synchro_map_xml(const std::string file_name); //debug helper function
+
public:
rtklib_pvt_cc(uint32_t nchannels,
bool dump, std::string dump_filename,
diff --git a/src/algorithms/PVT/libs/CMakeLists.txt b/src/algorithms/PVT/libs/CMakeLists.txt
index 82d733a19..caf02a4ce 100644
--- a/src/algorithms/PVT/libs/CMakeLists.txt
+++ b/src/algorithms/PVT/libs/CMakeLists.txt
@@ -31,6 +31,20 @@ set(PVT_LIB_SOURCES
rtklib_solver.cc
)
+set(PVT_LIB_HEADERS
+ pvt_solution.h
+ ls_pvt.h
+ hybrid_ls_pvt.h
+ kml_printer.h
+ gpx_printer.h
+ rinex_printer.h
+ nmea_printer.h
+ rtcm_printer.h
+ geojson_printer.h
+ rtklib_solver.h
+)
+
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -45,8 +59,9 @@ include_directories(
${GLOG_INCLUDE_DIRS}
)
-file(GLOB PVT_LIB_HEADERS "*.h")
list(SORT PVT_LIB_HEADERS)
+list(SORT PVT_LIB_SOURCES)
+
add_library(pvt_lib ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS})
source_group(Headers FILES ${PVT_LIB_HEADERS})
add_dependencies(pvt_lib rtklib_lib armadillo-${armadillo_RELEASE} glog-${glog_RELEASE})
@@ -60,5 +75,4 @@ target_link_libraries(
${ARMADILLO_LIBRARIES}
${BLAS}
${LAPACK}
- )
-
+)
diff --git a/src/algorithms/PVT/libs/rtklib_solver.h b/src/algorithms/PVT/libs/rtklib_solver.h
index aa5557606..df9dd9ab5 100644
--- a/src/algorithms/PVT/libs/rtklib_solver.h
+++ b/src/algorithms/PVT/libs/rtklib_solver.h
@@ -76,12 +76,13 @@ private:
rtk_t rtk_;
std::string d_dump_filename;
std::ofstream d_dump_file;
- sol_t pvt_sol;
+
bool d_flag_dump_enabled;
int d_nchannels; // Number of available channels for positioning
double dop_[4];
public:
+ sol_t pvt_sol;
rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, rtk_t& rtk);
~rtklib_solver();
diff --git a/src/algorithms/acquisition/adapters/CMakeLists.txt b/src/algorithms/acquisition/adapters/CMakeLists.txt
index 8386759b0..b44f7d6f2 100644
--- a/src/algorithms/acquisition/adapters/CMakeLists.txt
+++ b/src/algorithms/acquisition/adapters/CMakeLists.txt
@@ -36,12 +36,43 @@ set(ACQ_ADAPTER_SOURCES
glonass_l2_ca_pcps_acquisition.cc
)
+set(ACQ_ADAPTER_HEADERS
+ gps_l1_ca_pcps_acquisition.h
+ gps_l1_ca_pcps_assisted_acquisition.h
+ gps_l1_ca_pcps_acquisition_fine_doppler.h
+ gps_l1_ca_pcps_tong_acquisition.h
+ gps_l1_ca_pcps_quicksync_acquisition.h
+ gps_l2_m_pcps_acquisition.h
+ gps_l5i_pcps_acquisition.h
+ galileo_e1_pcps_ambiguous_acquisition.h
+ galileo_e1_pcps_cccwsr_ambiguous_acquisition.h
+ galileo_e1_pcps_quicksync_ambiguous_acquisition.h
+ galileo_e1_pcps_tong_ambiguous_acquisition.h
+ galileo_e1_pcps_8ms_ambiguous_acquisition.h
+ galileo_e5a_noncoherent_iq_acquisition_caf.h
+ galileo_e5a_pcps_acquisition.h
+ glonass_l1_ca_pcps_acquisition.h
+ glonass_l2_ca_pcps_acquisition.h
+)
+
+
if(ENABLE_FPGA)
- set(ACQ_ADAPTER_SOURCES ${ACQ_ADAPTER_SOURCES} gps_l1_ca_pcps_acquisition_fpga.cc gps_l2_m_pcps_acquisition_fpga.cc galileo_e1_pcps_ambiguous_acquisition_fpga.cc galileo_e5a_pcps_acquisition_fpga.cc gps_l5i_pcps_acquisition_fpga.cc)
+ set(ACQ_ADAPTER_SOURCES ${ACQ_ADAPTER_SOURCES} gps_l1_ca_pcps_acquisition_fpga.cc
+ gps_l2_m_pcps_acquisition_fpga.cc
+ galileo_e1_pcps_ambiguous_acquisition_fpga.cc
+ galileo_e5a_pcps_acquisition_fpga.cc
+ gps_l5i_pcps_acquisition_fpga.cc)
+
+ set(ACQ_ADAPTER_HEADERS ${ACQ_ADAPTER_HEADERS} gps_l1_ca_pcps_acquisition_fpga.h
+ gps_l2_m_pcps_acquisition_fpga.h
+ galileo_e1_pcps_ambiguous_acquisition_fpga.h
+ galileo_e5a_pcps_acquisition_fpga.h
+ gps_l5i_pcps_acquisition_fpga.h)
endif(ENABLE_FPGA)
if(OPENCL_FOUND)
set(ACQ_ADAPTER_SOURCES ${ACQ_ADAPTER_SOURCES} gps_l1_ca_pcps_opencl_acquisition.cc)
+ set(ACQ_ADAPTER_HEADERS ${ACQ_ADAPTER_HEADERS} gps_l1_ca_pcps_opencl_acquisition.h)
endif(OPENCL_FOUND)
include_directories(
@@ -61,8 +92,8 @@ include_directories(
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
-file(GLOB ACQ_ADAPTER_HEADERS "*.h")
list(SORT ACQ_ADAPTER_HEADERS)
+list(SORT ACQ_ADAPTER_SOURCES)
add_library(acq_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS})
source_group(Headers FILES ${ACQ_ADAPTER_HEADERS})
target_link_libraries(acq_adapters acquisition_lib gnss_sp_libs gnss_sdr_flags acq_gr_blocks ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES})
diff --git a/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt b/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt
index 4577c3d3b..327b1a927 100644
--- a/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt
+++ b/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt
@@ -26,14 +26,27 @@ set(ACQ_GR_BLOCKS_SOURCES
pcps_quicksync_acquisition_cc.cc
galileo_pcps_8ms_acquisition_cc.cc
galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc
+)
+
+set(ACQ_GR_BLOCKS_HEADERS
+ pcps_acquisition.h
+ pcps_assisted_acquisition_cc.h
+ pcps_acquisition_fine_doppler_cc.h
+ pcps_tong_acquisition_cc.h
+ pcps_cccwsr_acquisition_cc.h
+ pcps_quicksync_acquisition_cc.h
+ galileo_pcps_8ms_acquisition_cc.h
+ galileo_e5a_noncoherent_iq_acquisition_caf_cc.h
)
if(ENABLE_FPGA)
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_acquisition_fpga.cc)
+ set(ACQ_GR_BLOCKS_HEADERS ${ACQ_GR_BLOCKS_HEADERS} pcps_acquisition_fpga.h)
endif(ENABLE_FPGA)
if(OPENCL_FOUND)
set(ACQ_GR_BLOCKS_SOURCES ${ACQ_GR_BLOCKS_SOURCES} pcps_opencl_acquisition_cc.cc)
+ set(ACQ_GR_BLOCKS_HEADERS ${ACQ_GR_BLOCKS_HEADERS} pcps_opencl_acquisition_cc.h)
endif(OPENCL_FOUND)
include_directories(
@@ -61,8 +74,8 @@ if(OPENCL_FOUND)
endif(OS_IS_MACOSX)
endif(OPENCL_FOUND)
-file(GLOB ACQ_GR_BLOCKS_HEADERS "*.h")
list(SORT ACQ_GR_BLOCKS_HEADERS)
+list(SORT ACQ_GR_BLOCKS_SOURCES)
add_library(acq_gr_blocks ${ACQ_GR_BLOCKS_SOURCES} ${ACQ_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${ACQ_GR_BLOCKS_HEADERS})
diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc
index b1b6d699a..034cbbd10 100644
--- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc
+++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc
@@ -271,8 +271,8 @@ void pcps_acquisition::init()
d_num_doppler_bins = static_cast(std::ceil(static_cast(static_cast(acq_parameters.doppler_max) - static_cast(-acq_parameters.doppler_max)) / static_cast(d_doppler_step)));
// Create the carrier Doppler wipeoff signals
- d_grid_doppler_wipeoffs = new gr_complex*[d_num_doppler_bins];
- if (acq_parameters.make_2_steps)
+ if (d_grid_doppler_wipeoffs == nullptr) d_grid_doppler_wipeoffs = new gr_complex*[d_num_doppler_bins];
+ if (acq_parameters.make_2_steps && (d_grid_doppler_wipeoffs_step_two == nullptr))
{
d_grid_doppler_wipeoffs_step_two = new gr_complex*[d_num_doppler_bins_step2];
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins_step2; doppler_index++)
@@ -281,11 +281,18 @@ void pcps_acquisition::init()
}
}
- d_magnitude_grid = new float*[d_num_doppler_bins];
+ if (d_magnitude_grid == nullptr)
+ {
+ d_magnitude_grid = new float*[d_num_doppler_bins];
+ for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
+ {
+ d_grid_doppler_wipeoffs[doppler_index] = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
+ d_magnitude_grid[doppler_index] = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
+ }
+ }
+
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
{
- d_grid_doppler_wipeoffs[doppler_index] = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
- d_magnitude_grid[doppler_index] = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
for (uint32_t k = 0; k < d_fft_size; k++)
{
d_magnitude_grid[doppler_index][k] = 0.0;
diff --git a/src/algorithms/acquisition/libs/CMakeLists.txt b/src/algorithms/acquisition/libs/CMakeLists.txt
index 05a116e0f..c8720e226 100644
--- a/src/algorithms/acquisition/libs/CMakeLists.txt
+++ b/src/algorithms/acquisition/libs/CMakeLists.txt
@@ -18,6 +18,7 @@
if(ENABLE_FPGA)
set(ACQUISITION_LIB_SOURCES fpga_acquisition.cc )
+ set(ACQUISITION_LIB_HEADERS fpga_acquisition.h )
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -29,15 +30,14 @@ if(ENABLE_FPGA)
${GFlags_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
-
- file(GLOB ACQUISITION_LIB_HEADERS "*.h")
endif(ENABLE_FPGA)
set(ACQUISITION_LIB_HEADERS ${ACQUISITION_LIB_HEADERS} acq_conf.h)
-list(SORT ACQUISITION_LIB_HEADERS)
-
set(ACQUISITION_LIB_SOURCES ${ACQUISITION_LIB_SOURCES} acq_conf.cc)
+list(SORT ACQUISITION_LIB_HEADERS)
+list(SORT ACQUISITION_LIB_SOURCES)
+
add_library(acquisition_lib ${ACQUISITION_LIB_SOURCES} ${ACQUISITION_LIB_HEADERS})
source_group(Headers FILES ${ACQUISITION_LIB_HEADERS})
target_link_libraries(acquisition_lib ${VOLK_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES})
diff --git a/src/algorithms/channel/adapters/CMakeLists.txt b/src/algorithms/channel/adapters/CMakeLists.txt
index a6d5245cd..d3b754e97 100644
--- a/src/algorithms/channel/adapters/CMakeLists.txt
+++ b/src/algorithms/channel/adapters/CMakeLists.txt
@@ -17,6 +17,7 @@
#
set(CHANNEL_ADAPTER_SOURCES channel.cc)
+set(CHANNEL_ADAPTER_HEADERS channel.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
@@ -31,8 +32,6 @@ include_directories(
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
-file(GLOB CHANNEL_ADAPTER_HEADERS "*.h")
-list(SORT CHANNEL_ADAPTER_HEADERS)
add_library(channel_adapters ${CHANNEL_ADAPTER_SOURCES} ${CHANNEL_ADAPTER_HEADERS})
source_group(Headers FILES ${CHANNEL_ADAPTER_HEADERS})
target_link_libraries(channel_adapters channel_fsm ${GNURADIO_RUNTIME_LIBRARIES} ${Boost_LIBRARIES} gnss_sdr_flags)
diff --git a/src/algorithms/channel/libs/CMakeLists.txt b/src/algorithms/channel/libs/CMakeLists.txt
index ffbc21a42..308e97833 100644
--- a/src/algorithms/channel/libs/CMakeLists.txt
+++ b/src/algorithms/channel/libs/CMakeLists.txt
@@ -20,6 +20,11 @@ set(CHANNEL_FSM_SOURCES
channel_fsm.cc
channel_msg_receiver_cc.cc
)
+
+set(CHANNEL_FSM_HEADERS
+ channel_fsm.h
+ channel_msg_receiver_cc.h
+ )
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
@@ -33,8 +38,9 @@ include_directories(
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
-file(GLOB CHANNEL_FSM_HEADERS "*.h")
list(SORT CHANNEL_FSM_HEADERS)
+list(SORT CHANNEL_FSM_SOURCES)
+
add_library(channel_fsm ${CHANNEL_FSM_SOURCES} ${CHANNEL_FSM_HEADERS})
source_group(Headers FILES ${CHANNEL_FSM_HEADERS})
add_dependencies(channel_fsm glog-${glog_RELEASE})
diff --git a/src/algorithms/conditioner/adapters/CMakeLists.txt b/src/algorithms/conditioner/adapters/CMakeLists.txt
index cb83608aa..fea88dd0a 100644
--- a/src/algorithms/conditioner/adapters/CMakeLists.txt
+++ b/src/algorithms/conditioner/adapters/CMakeLists.txt
@@ -22,6 +22,11 @@ set(COND_ADAPTER_SOURCES
array_signal_conditioner.cc
)
+set(COND_ADAPTER_HEADERS
+ signal_conditioner.h
+ array_signal_conditioner.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -34,8 +39,9 @@ include_directories(
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
-file(GLOB COND_ADAPTER_HEADERS "*.h")
list(SORT COND_ADAPTER_HEADERS)
+list(SORT COND_ADAPTER_SOURCES)
+
add_library(conditioner_adapters ${COND_ADAPTER_SOURCES} ${COND_ADAPTER_HEADERS})
source_group(Headers FILES ${COND_ADAPTER_HEADERS})
add_dependencies(conditioner_adapters glog-${glog_RELEASE})
\ No newline at end of file
diff --git a/src/algorithms/data_type_adapter/adapters/CMakeLists.txt b/src/algorithms/data_type_adapter/adapters/CMakeLists.txt
index 836e2bfd8..26eb01b83 100644
--- a/src/algorithms/data_type_adapter/adapters/CMakeLists.txt
+++ b/src/algorithms/data_type_adapter/adapters/CMakeLists.txt
@@ -24,7 +24,16 @@ set(DATATYPE_ADAPTER_SOURCES
ibyte_to_cshort.cc
ishort_to_cshort.cc
ishort_to_complex.cc
- )
+)
+
+set(DATATYPE_ADAPTER_HEADERS
+ byte_to_short.h
+ ibyte_to_cbyte.h
+ ibyte_to_complex.h
+ ibyte_to_cshort.h
+ ishort_to_cshort.h
+ ishort_to_complex.h
+)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
@@ -38,10 +47,10 @@ include_directories(
${VOLK_INCLUDE_DIRS}
)
-file(GLOB DATATYPE_ADAPTER_HEADERS "*.h")
list(SORT DATATYPE_ADAPTER_HEADERS)
+list(SORT DATATYPE_ADAPTER_SOURCES)
+
add_library(datatype_adapters ${DATATYPE_ADAPTER_SOURCES} ${DATATYPE_ADAPTER_HEADERS})
source_group(Headers FILES ${DATATYPE_ADAPTER_HEADERS})
add_dependencies(datatype_adapters glog-${glog_RELEASE})
target_link_libraries(datatype_adapters data_type_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES})
-
diff --git a/src/algorithms/data_type_adapter/gnuradio_blocks/CMakeLists.txt b/src/algorithms/data_type_adapter/gnuradio_blocks/CMakeLists.txt
index 872dabfcf..1bb51014b 100644
--- a/src/algorithms/data_type_adapter/gnuradio_blocks/CMakeLists.txt
+++ b/src/algorithms/data_type_adapter/gnuradio_blocks/CMakeLists.txt
@@ -23,14 +23,21 @@ set(DATA_TYPE_GR_BLOCKS_SOURCES
interleaved_byte_to_complex_short.cc
)
+set(DATA_TYPE_GR_BLOCKS_HEADERS
+ interleaved_byte_to_complex_byte.h
+ interleaved_short_to_complex_short.h
+ interleaved_byte_to_complex_short.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
-file(GLOB DATA_TYPE_GR_BLOCKS_HEADERS "*.h")
list(SORT DATA_TYPE_GR_BLOCKS_HEADERS)
+list(SORT DATA_TYPE_GR_BLOCKS_SOURCES)
+
add_library(data_type_gr_blocks ${DATA_TYPE_GR_BLOCKS_SOURCES} ${DATA_TYPE_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${DATA_TYPE_GR_BLOCKS_HEADERS})
-target_link_libraries(data_type_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES})
\ No newline at end of file
+target_link_libraries(data_type_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES})
diff --git a/src/algorithms/input_filter/adapters/CMakeLists.txt b/src/algorithms/input_filter/adapters/CMakeLists.txt
index 765789e51..a2520bf39 100644
--- a/src/algorithms/input_filter/adapters/CMakeLists.txt
+++ b/src/algorithms/input_filter/adapters/CMakeLists.txt
@@ -17,7 +17,7 @@
#
set(INPUT_FILTER_ADAPTER_SOURCES
- fir_filter.cc
+ fir_filter.cc
freq_xlating_fir_filter.cc
beamformer_filter.cc
pulse_blanking_filter.cc
@@ -25,6 +25,15 @@ set(INPUT_FILTER_ADAPTER_SOURCES
notch_filter_lite.cc
)
+set(INPUT_FILTER_ADAPTER_HEADERS
+ fir_filter.h
+ freq_xlating_fir_filter.h
+ beamformer_filter.h
+ pulse_blanking_filter.h
+ notch_filter.h
+ notch_filter_lite.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -41,8 +50,9 @@ if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4" )
add_definitions( -DGR_GREATER_38=1 )
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4" )
-file(GLOB INPUT_FILTER_ADAPTER_HEADERS "*.h")
list(SORT INPUT_FILTER_ADAPTER_HEADERS)
+list(SORT INPUT_FILTER_ADAPTER_SOURCES)
+
add_library(input_filter_adapters ${INPUT_FILTER_ADAPTER_SOURCES} ${INPUT_FILTER_ADAPTER_HEADERS})
source_group(Headers FILES ${INPUT_FILTER_ADAPTER_HEADERS})
add_dependencies(input_filter_adapters glog-${glog_RELEASE} gnss_sp_libs)
diff --git a/src/algorithms/input_filter/gnuradio_blocks/CMakeLists.txt b/src/algorithms/input_filter/gnuradio_blocks/CMakeLists.txt
index 698c828dd..75f903868 100644
--- a/src/algorithms/input_filter/gnuradio_blocks/CMakeLists.txt
+++ b/src/algorithms/input_filter/gnuradio_blocks/CMakeLists.txt
@@ -24,6 +24,13 @@ set(INPUT_FILTER_GR_BLOCKS_SOURCES
notch_lite_cc.cc
)
+set(INPUT_FILTER_GR_BLOCKS_HEADERS
+ beamformer.h
+ pulse_blanking_cc.h
+ notch_cc.h
+ notch_lite_cc.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
@@ -33,8 +40,9 @@ include_directories(
${GFlags_INCLUDE_DIRS}
)
-file(GLOB INPUT_FILTER_GR_BLOCKS_HEADERS "*.h")
list(SORT INPUT_FILTER_GR_BLOCKS_HEADERS)
+list(SORT INPUT_FILTER_GR_BLOCKS_SOURCES)
+
add_library(input_filter_gr_blocks ${INPUT_FILTER_GR_BLOCKS_SOURCES} ${INPUT_FILTER_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${INPUT_FILTER_GR_BLOCKS_HEADERS})
diff --git a/src/algorithms/libs/CMakeLists.txt b/src/algorithms/libs/CMakeLists.txt
index 306a755cf..ab7af677e 100644
--- a/src/algorithms/libs/CMakeLists.txt
+++ b/src/algorithms/libs/CMakeLists.txt
@@ -18,14 +18,12 @@
add_subdirectory(rtklib)
-if(ENABLE_FPGA)
- set(GNSS_SPLIBS_SOURCES
+set(GNSS_SPLIBS_SOURCES
gps_l2c_signal.cc
gps_l5_signal.cc
galileo_e1_signal_processing.cc
gnss_sdr_valve.cc
gnss_sdr_sample_counter.cc
- gnss_sdr_time_counter.cc
gnss_signal_processing.cc
gps_sdr_signal_processing.cc
glonass_l1_signal_processing.cc
@@ -40,30 +38,43 @@ if(ENABLE_FPGA)
conjugate_cc.cc
conjugate_sc.cc
conjugate_ic.cc
+)
+
+set(GNSS_SPLIBS_HEADERS
+ gps_l2c_signal.h
+ gps_l5_signal.h
+ galileo_e1_signal_processing.h
+ gnss_sdr_valve.h
+ gnss_sdr_sample_counter.h
+ gnss_signal_processing.h
+ gps_sdr_signal_processing.h
+ glonass_l1_signal_processing.h
+ glonass_l2_signal_processing.h
+ pass_through.h
+ galileo_e5_signal_processing.h
+ complex_byte_to_float_x2.h
+ byte_x2_to_complex_byte.h
+ cshort_to_float_x2.h
+ short_x2_to_cshort.h
+ complex_float_to_complex_byte.h
+ conjugate_cc.h
+ conjugate_sc.h
+ conjugate_ic.h
+ gnss_circular_deque.h
+)
+
+
+if(ENABLE_FPGA)
+ set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES}
+ gnss_sdr_time_counter.cc
gnss_sdr_fpga_sample_counter.cc
)
-else(ENABLE_FPGA)
- set(GNSS_SPLIBS_SOURCES
- gps_l2c_signal.cc
- gps_l5_signal.cc
- galileo_e1_signal_processing.cc
- gnss_sdr_valve.cc
- gnss_sdr_sample_counter.cc
- gnss_signal_processing.cc
- gps_sdr_signal_processing.cc
- glonass_l1_signal_processing.cc
- glonass_l2_signal_processing.cc
- pass_through.cc
- galileo_e5_signal_processing.cc
- complex_byte_to_float_x2.cc
- byte_x2_to_complex_byte.cc
- cshort_to_float_x2.cc
- short_x2_to_cshort.cc
- complex_float_to_complex_byte.cc
- conjugate_cc.cc
- conjugate_sc.cc
- conjugate_ic.cc
- )
+
+ set(GNSS_SPLIBS_HEADERS ${GNSS_SPLIBS_HEADERS}
+ gnss_sdr_time_counter.h
+ gnss_sdr_fpga_sample_counter.h
+ )
+
endif(ENABLE_FPGA)
if(OPENCL_FOUND)
@@ -71,7 +82,13 @@ if(OPENCL_FOUND)
opencl/fft_execute.cc # Needs OpenCL
opencl/fft_setup.cc # Needs OpenCL
opencl/fft_kernelstring.cc # Needs OpenCL
- )
+ )
+
+ set(GNSS_SPLIBS_HEADERS ${GNSS_SPLIBS_HEADERS}
+ opencl/fft_execute.h # Needs OpenCL
+ opencl/fft_setup.h # Needs OpenCL
+ opencl/fft_kernelstring.h # Needs OpenCL
+ )
endif(OPENCL_FOUND)
include_directories(
@@ -99,9 +116,9 @@ endif(OPENCL_FOUND)
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
-file(GLOB GNSS_SPLIBS_HEADERS "*.h")
-list(REMOVE_ITEM GNSS_SPLIBS_HEADERS gnss_sdr_flags.h)
list(SORT GNSS_SPLIBS_HEADERS)
+list(SORT GNSS_SPLIBS_SOURCES)
+
add_library(gnss_sp_libs ${GNSS_SPLIBS_SOURCES} ${GNSS_SPLIBS_HEADERS})
source_group(Headers FILES ${GNSS_SPLIBS_HEADERS})
diff --git a/src/algorithms/libs/rtklib/CMakeLists.txt b/src/algorithms/libs/rtklib/CMakeLists.txt
index 6cb2441a9..ff81a9fb8 100644
--- a/src/algorithms/libs/rtklib/CMakeLists.txt
+++ b/src/algorithms/libs/rtklib/CMakeLists.txt
@@ -38,6 +38,27 @@ set(RTKLIB_LIB_SOURCES
rtklib_rtcm3.cc
)
+set(RTKLIB_LIB_HEADERS
+ rtklib_rtkcmn.h
+ rtklib_ephemeris.h
+ rtklib_preceph.h
+ rtklib_sbas.h
+ rtklib_ionex.h
+ rtklib_pntpos.h
+ rtklib_ppp.h
+ rtklib_tides.h
+ rtklib_lambda.h
+ rtklib_rtkpos.h
+ rtklib_conversions.h
+ rtklib_stream.h
+ rtklib_rtksvr.h
+ rtklib_solution.h
+ rtklib_rtcm.h
+ rtklib_rtcm2.h
+ rtklib_rtcm3.h
+ rtklib.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -48,8 +69,10 @@ include_directories(
${GLOG_INCLUDE_DIRS}
)
-file(GLOB RTKLIB_LIB_HEADERS "*.h")
+
list(SORT RTKLIB_LIB_HEADERS)
+list(SORT RTKLIB_LIB_SOURCES)
+
add_library(rtklib_lib ${RTKLIB_LIB_SOURCES} ${RTKLIB_LIB_HEADERS})
source_group(Headers FILES ${RTKLIB_LIB_HEADERS})
add_dependencies(rtklib_lib glog-${glog_RELEASE})
diff --git a/src/algorithms/libs/rtklib/rtklib_pntpos.cc b/src/algorithms/libs/rtklib/rtklib_pntpos.cc
index d4a10fe65..6473b98a0 100644
--- a/src/algorithms/libs/rtklib/rtklib_pntpos.cc
+++ b/src/algorithms/libs/rtklib/rtklib_pntpos.cc
@@ -246,7 +246,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
else if (obs->code[i] != CODE_NONE and obs->code[j] == CODE_NONE)
{
P1 += P1_C1; /* C1->P1 */
- PC = P1 + P1_P2;
+ PC = P1 - P1_P2;
}
else if (obs->code[i] == CODE_NONE and obs->code[j] != CODE_NONE)
{
@@ -739,6 +739,7 @@ int resdop(const obsd_t *obs, int n, const double *rs, const double *dts,
{
double lam, rate, pos[3], E[9], a[3], e[3], vs[3], cosel;
int i, j, nv = 0;
+ int band = 0;
trace(3, "resdop : n=%d\n", n);
@@ -747,9 +748,12 @@ int resdop(const obsd_t *obs, int n, const double *rs, const double *dts,
for (i = 0; i < n && i < MAXOBS; i++)
{
- lam = nav->lam[obs[i].sat - 1][0];
+ if (obs[i].code[0] != CODE_NONE) band = 0;
+ if (obs[i].code[1] != CODE_NONE) band = 1;
+ if (obs[i].code[2] != CODE_NONE) band = 2;
+ lam = nav->lam[obs[i].sat - 1][band];
- if (obs[i].D[0] == 0.0 || lam == 0.0 || !vsat[i] || norm_rtk(rs + 3 + i * 6, 3) <= 0.0)
+ if (obs[i].D[band] == 0.0 || lam == 0.0 || !vsat[i] || norm_rtk(rs + 3 + i * 6, 3) <= 0.0)
{
continue;
}
@@ -767,7 +771,7 @@ int resdop(const obsd_t *obs, int n, const double *rs, const double *dts,
rate = dot(vs, e, 3) + DEFAULT_OMEGA_EARTH_DOT / SPEED_OF_LIGHT * (rs[4 + i * 6] * rr[0] + rs[1 + i * 6] * x[0] - rs[3 + i * 6] * rr[1] - rs[i * 6] * x[1]);
/* doppler residual */
- v[nv] = -lam * obs[i].D[0] - (rate + x[3] - SPEED_OF_LIGHT * dts[1 + i * 2]);
+ v[nv] = -lam * obs[i].D[band] - (rate + x[3] - SPEED_OF_LIGHT * dts[1 + i * 2]);
/* design matrix */
for (j = 0; j < 4; j++) H[j + nv * 4] = j < 3 ? -e[j] : 1.0;
diff --git a/src/algorithms/libs/rtklib/rtklib_ppp.cc b/src/algorithms/libs/rtklib/rtklib_ppp.cc
index b60d627c9..7ac193643 100644
--- a/src/algorithms/libs/rtklib/rtklib_ppp.cc
+++ b/src/algorithms/libs/rtklib/rtklib_ppp.cc
@@ -673,277 +673,6 @@ void pppoutsolstat(rtk_t *rtk, int level, FILE *fp)
}
-/* solar/lunar tides (ref [2] 7) ---------------------------------------------*/
-void tide_pl(const double *eu, const double *rp, double GMp,
- const double *pos, double *dr)
-{
- const double H3 = 0.292, L3 = 0.015;
- double r, ep[3], latp, lonp, p, K2, K3, a, H2, L2, dp, du, cosp, sinl, cosl;
- int i;
-
- trace(4, "tide_pl : pos=%.3f %.3f\n", pos[0] * R2D, pos[1] * R2D);
-
- if ((r = norm_rtk(rp, 3)) <= 0.0) return;
-
- for (i = 0; i < 3; i++) ep[i] = rp[i] / r;
-
- K2 = GMp / GME * std::pow(RE_WGS84, 2.0) * std::pow(RE_WGS84, 2.0) / (r * r * r);
- K3 = K2 * RE_WGS84 / r;
- latp = asin(ep[2]);
- lonp = atan2(ep[1], ep[0]);
- cosp = cos(latp);
- sinl = sin(pos[0]);
- cosl = cos(pos[0]);
-
- /* step1 in phase (degree 2) */
- p = (3.0 * sinl * sinl - 1.0) / 2.0;
- H2 = 0.6078 - 0.0006 * p;
- L2 = 0.0847 + 0.0002 * p;
- a = dot(ep, eu, 3);
- dp = K2 * 3.0 * L2 * a;
- du = K2 * (H2 * (1.5 * a * a - 0.5) - 3.0 * L2 * a * a);
-
- /* step1 in phase (degree 3) */
- dp += K3 * L3 * (7.5 * a * a - 1.5);
- du += K3 * (H3 * (2.5 * a * a * a - 1.5 * a) - L3 * (7.5 * a * a - 1.5) * a);
-
- /* step1 out-of-phase (only radial) */
- du += 3.0 / 4.0 * 0.0025 * K2 * sin(2.0 * latp) * sin(2.0 * pos[0]) * sin(pos[1] - lonp);
- du += 3.0 / 4.0 * 0.0022 * K2 * cosp * cosp * cosl * cosl * sin(2.0 * (pos[1] - lonp));
-
- dr[0] = dp * ep[0] + du * eu[0];
- dr[1] = dp * ep[1] + du * eu[1];
- dr[2] = dp * ep[2] + du * eu[2];
-
- trace(5, "tide_pl : dr=%.3f %.3f %.3f\n", dr[0], dr[1], dr[2]);
-}
-
-
-/* displacement by solid earth tide (ref [2] 7) ------------------------------*/
-void tide_solid(const double *rsun, const double *rmoon,
- const double *pos, const double *E, double gmst, int opt,
- double *dr)
-{
- double dr1[3], dr2[3], eu[3], du, dn, sinl, sin2l;
-
- trace(3, "tide_solid: pos=%.3f %.3f opt=%d\n", pos[0] * R2D, pos[1] * R2D, opt);
-
- /* step1: time domain */
- eu[0] = E[2];
- eu[1] = E[5];
- eu[2] = E[8];
- tide_pl(eu, rsun, GMS, pos, dr1);
- tide_pl(eu, rmoon, GMM, pos, dr2);
-
- /* step2: frequency domain, only K1 radial */
- sin2l = sin(2.0 * pos[0]);
- du = -0.012 * sin2l * sin(gmst + pos[1]);
-
- dr[0] = dr1[0] + dr2[0] + du * E[2];
- dr[1] = dr1[1] + dr2[1] + du * E[5];
- dr[2] = dr1[2] + dr2[2] + du * E[8];
-
- /* eliminate permanent deformation */
- if (opt & 8)
- {
- sinl = sin(pos[0]);
- du = 0.1196 * (1.5 * sinl * sinl - 0.5);
- dn = 0.0247 * sin2l;
- dr[0] += du * E[2] + dn * E[1];
- dr[1] += du * E[5] + dn * E[4];
- dr[2] += du * E[8] + dn * E[7];
- }
- trace(5, "tide_solid: dr=%.3f %.3f %.3f\n", dr[0], dr[1], dr[2]);
-}
-
-
-/* displacement by ocean tide loading (ref [2] 7) ----------------------------*/
-void tide_oload(gtime_t tut, const double *odisp, double *denu)
-{
- const double args[][5] = {
- {1.40519E-4, 2.0, -2.0, 0.0, 0.00}, /* M2 */
- {1.45444E-4, 0.0, 0.0, 0.0, 0.00}, /* S2 */
- {1.37880E-4, 2.0, -3.0, 1.0, 0.00}, /* N2 */
- {1.45842E-4, 2.0, 0.0, 0.0, 0.00}, /* K2 */
- {0.72921E-4, 1.0, 0.0, 0.0, 0.25}, /* K1 */
- {0.67598E-4, 1.0, -2.0, 0.0, -0.25}, /* O1 */
- {0.72523E-4, -1.0, 0.0, 0.0, -0.25}, /* P1 */
- {0.64959E-4, 1.0, -3.0, 1.0, -0.25}, /* Q1 */
- {0.53234E-5, 0.0, 2.0, 0.0, 0.00}, /* Mf */
- {0.26392E-5, 0.0, 1.0, -1.0, 0.00}, /* Mm */
- {0.03982E-5, 2.0, 0.0, 0.0, 0.00} /* Ssa */
- };
- const double ep1975[] = {1975, 1, 1, 0, 0, 0};
- double ep[6], fday, days, t, t2, t3, a[5], ang, dp[3] = {0};
- int i, j;
-
- trace(3, "tide_oload:\n");
-
- /* angular argument: see subroutine arg.f for reference [1] */
- time2epoch(tut, ep);
- fday = ep[3] * 3600.0 + ep[4] * 60.0 + ep[5];
- ep[3] = ep[4] = ep[5] = 0.0;
- days = timediff(epoch2time(ep), epoch2time(ep1975)) / 86400.0;
- t = (27392.500528 + 1.000000035 * days) / 36525.0;
- t2 = t * t;
- t3 = t2 * t;
-
- a[0] = fday;
- a[1] = (279.69668 + 36000.768930485 * t + 3.03E-4 * t2) * D2R; /* H0 */
- a[2] = (270.434358 + 481267.88314137 * t - 0.001133 * t2 + 1.9E-6 * t3) * D2R; /* S0 */
- a[3] = (334.329653 + 4069.0340329577 * t - 0.010325 * t2 - 1.2E-5 * t3) * D2R; /* P0 */
- a[4] = 2.0 * PI;
-
- /* displacements by 11 constituents */
- for (i = 0; i < 11; i++)
- {
- ang = 0.0;
- for (j = 0; j < 5; j++) ang += a[j] * args[i][j];
- for (j = 0; j < 3; j++) dp[j] += odisp[j + i * 6] * cos(ang - odisp[j + 3 + i * 6] * D2R);
- }
- denu[0] = -dp[1];
- denu[1] = -dp[2];
- denu[2] = dp[0];
-
- trace(5, "tide_oload: denu=%.3f %.3f %.3f\n", denu[0], denu[1], denu[2]);
-}
-
-
-/* iers mean pole (ref [7] eq.7.25) ------------------------------------------*/
-void iers_mean_pole(gtime_t tut, double *xp_bar, double *yp_bar)
-{
- const double ep2000[] = {2000, 1, 1, 0, 0, 0};
- double y, y2, y3;
-
- y = timediff(tut, epoch2time(ep2000)) / 86400.0 / 365.25;
-
- if (y < 3653.0 / 365.25)
- { /* until 2010.0 */
- y2 = y * y;
- y3 = y2 * y;
- *xp_bar = 55.974 + 1.8243 * y + 0.18413 * y2 + 0.007024 * y3; /* (mas) */
- *yp_bar = 346.346 + 1.7896 * y - 0.10729 * y2 - 0.000908 * y3;
- }
- else
- { /* after 2010.0 */
- *xp_bar = 23.513 + 7.6141 * y; /* (mas) */
- *yp_bar = 358.891 - 0.6287 * y;
- }
-}
-
-
-/* displacement by pole tide (ref [7] eq.7.26) --------------------------------*/
-void tide_pole(gtime_t tut, const double *pos, const double *erpv,
- double *denu)
-{
- double xp_bar, yp_bar, m1, m2, cosl, sinl;
-
- trace(3, "tide_pole: pos=%.3f %.3f\n", pos[0] * R2D, pos[1] * R2D);
-
- /* iers mean pole (mas) */
- iers_mean_pole(tut, &xp_bar, &yp_bar);
-
- /* ref [7] eq.7.24 */
- m1 = erpv[0] / AS2R - xp_bar * 1E-3; /* (as) */
- m2 = -erpv[1] / AS2R + yp_bar * 1E-3;
-
- /* sin(2*theta) = sin(2*phi), cos(2*theta)=-cos(2*phi) */
- cosl = cos(pos[1]);
- sinl = sin(pos[1]);
- denu[0] = 9E-3 * sin(pos[0]) * (m1 * sinl - m2 * cosl); /* de= Slambda (m) */
- denu[1] = -9E-3 * cos(2.0 * pos[0]) * (m1 * cosl + m2 * sinl); /* dn=-Stheta (m) */
- denu[2] = -33E-3 * sin(2.0 * pos[0]) * (m1 * cosl + m2 * sinl); /* du= Sr (m) */
-
- trace(5, "tide_pole : denu=%.3f %.3f %.3f\n", denu[0], denu[1], denu[2]);
-}
-
-
-/* tidal displacement ----------------------------------------------------------
- * displacements by earth tides
- * args : gtime_t tutc I time in utc
- * double *rr I site position (ecef) (m)
- * int opt I options (or of the followings)
- * 1: solid earth tide
- * 2: ocean tide loading
- * 4: pole tide
- * 8: elimate permanent deformation
- * double *erp I earth rotation parameters (NULL: not used)
- * double *odisp I ocean loading parameters (NULL: not used)
- * odisp[0+i*6]: consituent i amplitude radial(m)
- * odisp[1+i*6]: consituent i amplitude west (m)
- * odisp[2+i*6]: consituent i amplitude south (m)
- * odisp[3+i*6]: consituent i phase radial (deg)
- * odisp[4+i*6]: consituent i phase west (deg)
- * odisp[5+i*6]: consituent i phase south (deg)
- * (i=0:M2,1:S2,2:N2,3:K2,4:K1,5:O1,6:P1,7:Q1,
- * 8:Mf,9:Mm,10:Ssa)
- * double *dr O displacement by earth tides (ecef) (m)
- * return : none
- * notes : see ref [1], [2] chap 7
- * see ref [4] 5.2.1, 5.2.2, 5.2.3
- * ver.2.4.0 does not use ocean loading and pole tide corrections
- *-----------------------------------------------------------------------------*/
-void tidedisp(gtime_t tutc, const double *rr, int opt, const erp_t *erp,
- const double *odisp, double *dr)
-{
- gtime_t tut;
- double pos[2], E[9], drt[3], denu[3], rs[3], rm[3], gmst, erpv[5] = {0};
- int i;
-#ifdef IERS_MODEL
- double ep[6], fhr;
- int year, mon, day;
-#endif
-
- trace(3, "tidedisp: tutc=%s\n", time_str(tutc, 0));
-
- if (erp) geterp(erp, tutc, erpv);
-
- tut = timeadd(tutc, erpv[2]);
-
- dr[0] = dr[1] = dr[2] = 0.0;
-
- if (norm_rtk(rr, 3) <= 0.0) return;
-
- pos[0] = asin(rr[2] / norm_rtk(rr, 3));
- pos[1] = atan2(rr[1], rr[0]);
- xyz2enu(pos, E);
-
- if (opt & 1)
- { /* solid earth tides */
-
- /* sun and moon position in ecef */
- sunmoonpos(tutc, erpv, rs, rm, &gmst);
-
-#ifdef IERS_MODEL
- time2epoch(tutc, ep);
- year = (int)ep[0];
- mon = (int)ep[1];
- day = (int)ep[2];
- fhr = ep[3] + ep[4] / 60.0 + ep[5] / 3600.0;
-
- /* call DEHANTTIDEINEL */
- dehanttideinel_((double *)rr, &year, &mon, &day, &fhr, rs, rm, drt);
-#else
- tide_solid(rs, rm, pos, E, gmst, opt, drt);
-#endif
- for (i = 0; i < 3; i++) dr[i] += drt[i];
- }
- if ((opt & 2) && odisp)
- { /* ocean tide loading */
- tide_oload(tut, odisp, denu);
- matmul("TN", 3, 1, 3, 1.0, E, denu, 0.0, drt);
- for (i = 0; i < 3; i++) dr[i] += drt[i];
- }
- if ((opt & 4) && erp)
- { /* pole tide */
- tide_pole(tut, pos, erpv, denu);
- matmul("TN", 3, 1, 3, 1.0, E, denu, 0.0, drt);
- for (i = 0; i < 3; i++) dr[i] += drt[i];
- }
- trace(5, "tidedisp: dr=%.3f %.3f %.3f\n", dr[0], dr[1], dr[2]);
-}
-
-
/* exclude meas of eclipsing satellite (block IIA) ---------------------------*/
void testeclipse(const obsd_t *obs, int n, const nav_t *nav, double *rs)
{
diff --git a/src/algorithms/libs/rtklib/rtklib_ppp.h b/src/algorithms/libs/rtklib/rtklib_ppp.h
index 8d90c3b3e..cd8449e1a 100644
--- a/src/algorithms/libs/rtklib/rtklib_ppp.h
+++ b/src/algorithms/libs/rtklib/rtklib_ppp.h
@@ -129,21 +129,6 @@ int pppamb(rtk_t *rtk, const obsd_t *obs, int n, const nav_t *nav, const double
/* functions originally included in RTKLIB/src/ppp.c v2.4.2 */
void pppoutsolstat(rtk_t *rtk, int level, FILE *fp);
-void tide_pl(const double *eu, const double *rp, double GMp, const double *pos, double *dr);
-
-void tide_solid(const double *rsun, const double *rmoon,
- const double *pos, const double *E, double gmst, int opt,
- double *dr);
-
-void tide_oload(gtime_t tut, const double *odisp, double *denu);
-
-void iers_mean_pole(gtime_t tut, double *xp_bar, double *yp_bar);
-
-void tide_pole(gtime_t tut, const double *pos, const double *erpv, double *denu);
-
-void tidedisp(gtime_t tutc, const double *rr, int opt, const erp_t *erp,
- const double *odisp, double *dr);
-
void testeclipse(const obsd_t *obs, int n, const nav_t *nav, double *rs);
double varerr(int sat, int sys, double el, int type, const prcopt_t *opt);
diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h
new file mode 100644
index 000000000..e20d229e3
--- /dev/null
+++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h
@@ -0,0 +1,122 @@
+/*!
+ * \file volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h
+ * \brief VOLK_GNSSSDR kernel: multiplies N complex (32-bit float per component) vectors
+ * by a common vector, phase rotated and accumulates the results in N float complex outputs.
+ * \authors
+ * - Antonio Ramos 2018. antonio.ramosdet(at)gmail.com
+ *
+ *
+ * VOLK_GNSSSDR kernel that multiplies N 32 bits complex vectors by a common vector, which is
+ * phase-rotated by phase offset and phase increment, and accumulates the results
+ * in N 32 bits float complex outputs.
+ * It is optimized to perform the N tap correlation process in GNSS receivers.
+ *
+ * -------------------------------------------------------------------------
+ *
+ * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
+ *
+ * GNSS-SDR is a software defined Global Navigation
+ * Satellite Systems receiver
+ *
+ * This file is part of GNSS-SDR.
+ *
+ * GNSS-SDR is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GNSS-SDR is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNSS-SDR. If not, see .
+ *
+ * -------------------------------------------------------------------------
+ */
+
+/*!
+ * \page volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn
+ *
+ * \b Overview
+ *
+ * Rotates and multiplies the reference complex vector with an arbitrary number of other real vectors,
+ * accumulates the results and stores them in the output vector.
+ * The rotation is done at a fixed rate per sample, from an initial \p phase offset.
+ * This function can be used for Doppler wipe-off and multiple correlator.
+ *
+ * Dispatcher Prototype
+ * \code
+ * void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn(lv_32fc_t* result, const lv_32fc_t* in_common, const lv_32fc_t phase_inc, const lv_32fc_t phase_inc_rate, lv_32fc_t* phase, const float** in_a, int num_a_vectors, unsigned int num_points);
+ * \endcode
+ *
+ * \b Inputs
+ * \li in_common: Pointer to one of the vectors to be rotated, multiplied and accumulated (reference vector).
+ * \li phase_inc: Phase increment = lv_cmake(cos(phase_step_rad), sin(phase_step_rad))
+ * \li phase_inc_rate: Phase increment rate = lv_cmake(cos(phase_step_rate_rad), sin(phase_step_rate_rad))
+ * \li phase: Initial phase = lv_cmake(cos(initial_phase_rad), sin(initial_phase_rad))
+ * \li in_a: Pointer to an array of pointers to multiple vectors to be multiplied and accumulated.
+ * \li num_a_vectors: Number of vectors to be multiplied by the reference vector and accumulated.
+ * \li num_points: Number of complex values to be multiplied together, accumulated and stored into \p result.
+ *
+ * \b Outputs
+ * \li phase: Final phase.
+ * \li result: Vector of \p num_a_vectors components with the multiple vectors of \p in_a rotated, multiplied by \p in_common and accumulated.
+ *
+ */
+
+#ifndef INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_H
+#define INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_H
+
+
+#include
+#include
+#include
+#include
+#include
+
+#ifdef LV_HAVE_GENERIC
+
+static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic(lv_32fc_t* result, const lv_32fc_t* in_common, const lv_32fc_t phase_inc, const lv_32fc_t phase_inc_rate, lv_32fc_t* phase, const float** in_a, int num_a_vectors, unsigned int num_points)
+{
+ lv_32fc_t tmp32_1;
+#ifdef __cplusplus
+ lv_32fc_t half_phase_inc_rate = std::sqrt(phase_inc_rate);
+#else
+ lv_32fc_t half_phase_inc_rate = csqrtf(phase_inc_rate);
+#endif
+ lv_32fc_t constant_rotation = phase_inc * half_phase_inc_rate;
+ lv_32fc_t delta_phase_rate = lv_cmake(1.0f, 0.0f);
+ int n_vec;
+ unsigned int n;
+ for (n_vec = 0; n_vec < num_a_vectors; n_vec++)
+ {
+ result[n_vec] = lv_cmake(0.0f, 0.0f);
+ }
+ for (n = 0; n < num_points; n++)
+ {
+ tmp32_1 = *in_common++ * (*phase);
+ // Regenerate phase
+ if (n % 256 == 0)
+ {
+#ifdef __cplusplus
+ (*phase) /= std::abs((*phase));
+ delta_phase_rate /= std::abs(delta_phase_rate);
+#else
+ (*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
+ delta_phase_rate /= hypotf(lv_creal(delta_phase_rate), lv_cimag(delta_phase_rate));
+#endif
+ }
+ (*phase) *= (constant_rotation * delta_phase_rate);
+ delta_phase_rate *= phase_inc_rate;
+ for (n_vec = 0; n_vec < num_a_vectors; n_vec++)
+ {
+ result[n_vec] += (tmp32_1 * in_a[n_vec][n]);
+ }
+ }
+}
+
+#endif /*LV_HAVE_GENERIC*/
+
+#endif /* INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_H */
diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc.h
new file mode 100644
index 000000000..b2bc1b740
--- /dev/null
+++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc.h
@@ -0,0 +1,163 @@
+/*!
+ * \file volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc.h
+ * \brief Volk puppet for the multiple 16-bit complex dot product kernel.
+ * \authors
+ * - Carles Fernandez Prades 2016 cfernandez at cttc dot cat
+ *
+ *
+ * Volk puppet for integrating the resampler into volk's test system
+ *
+ * -------------------------------------------------------------------------
+ *
+ * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
+ *
+ * GNSS-SDR is a software defined Global Navigation
+ * Satellite Systems receiver
+ *
+ * This file is part of GNSS-SDR.
+ *
+ * GNSS-SDR is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GNSS-SDR is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNSS-SDR. If not, see .
+ *
+ * -------------------------------------------------------------------------
+ */
+
+#ifndef INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc_H
+#define INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc_H
+
+#include "volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h"
+#include
+#include
+#include
+
+#ifdef LV_HAVE_GENERIC
+
+static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc_generic(lv_32fc_t* result, const lv_32fc_t* local_code, const float* in, unsigned int num_points)
+{
+ // phases must be normalized. Phase rotator expects a complex exponential input!
+ float rem_carrier_phase_in_rad = 0.25;
+ float phase_step_rad = 0.1;
+ lv_32fc_t phase[1];
+ phase[0] = lv_cmake(cos(rem_carrier_phase_in_rad), sin(rem_carrier_phase_in_rad));
+ lv_32fc_t phase_inc[1];
+ phase_inc[0] = lv_cmake(cos(phase_step_rad), sin(phase_step_rad));
+ lv_32fc_t phase_inc_rate[1];
+ phase_inc_rate[0] = lv_cmake(cos(phase_step_rad * 0.001), sin(phase_step_rad * 0.001));
+ int n;
+ int num_a_vectors = 3;
+ float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
+ for (n = 0; n < num_a_vectors; n++)
+ {
+ in_a[n] = (float*)volk_gnsssdr_malloc(sizeof(float) * num_points, volk_gnsssdr_get_alignment());
+ memcpy((float*)in_a[n], (float*)in, sizeof(float) * num_points);
+ }
+ volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic(result, local_code, phase_inc[0], phase_inc_rate[0], phase, (const float**)in_a, num_a_vectors, num_points);
+
+ for (n = 0; n < num_a_vectors; n++)
+ {
+ volk_gnsssdr_free(in_a[n]);
+ }
+ volk_gnsssdr_free(in_a);
+}
+#endif // Generic
+
+//
+//#ifdef LV_HAVE_GENERIC
+//static inline void volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc_generic_reload(lv_32fc_t* result, const lv_32fc_t* local_code, const float* in, unsigned int num_points)
+//{
+// // phases must be normalized. Phase rotator expects a complex exponential input!
+// float rem_carrier_phase_in_rad = 0.25;
+// float phase_step_rad = 0.1;
+// lv_32fc_t phase[1];
+// phase[0] = lv_cmake(cos(rem_carrier_phase_in_rad), sin(rem_carrier_phase_in_rad));
+// lv_32fc_t phase_inc[1];
+// phase_inc[0] = lv_cmake(cos(phase_step_rad), sin(phase_step_rad));
+// int n;
+// int num_a_vectors = 3;
+// float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
+// for (n = 0; n < num_a_vectors; n++)
+// {
+// in_a[n] = (float*)volk_gnsssdr_malloc(sizeof(float) * num_points, volk_gnsssdr_get_alignment());
+// memcpy((float*)in_a[n], (float*)in, sizeof(float) * num_points);
+// }
+// volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_generic_reload(result, local_code, phase_inc[0], phase, (const float**)in_a, num_a_vectors, num_points);
+//
+// for (n = 0; n < num_a_vectors; n++)
+// {
+// volk_gnsssdr_free(in_a[n]);
+// }
+// volk_gnsssdr_free(in_a);
+//}
+//
+//#endif // Generic
+//
+//#ifdef LV_HAVE_AVX
+//static inline void volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc_u_avx(lv_32fc_t* result, const lv_32fc_t* local_code, const float* in, unsigned int num_points)
+//{
+// // phases must be normalized. Phase rotator expects a complex exponential input!
+// float rem_carrier_phase_in_rad = 0.25;
+// float phase_step_rad = 0.1;
+// lv_32fc_t phase[1];
+// phase[0] = lv_cmake(cos(rem_carrier_phase_in_rad), sin(rem_carrier_phase_in_rad));
+// lv_32fc_t phase_inc[1];
+// phase_inc[0] = lv_cmake(cos(phase_step_rad), sin(phase_step_rad));
+// int n;
+// int num_a_vectors = 3;
+// float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
+// for (n = 0; n < num_a_vectors; n++)
+// {
+// in_a[n] = (float*)volk_gnsssdr_malloc(sizeof(float) * num_points, volk_gnsssdr_get_alignment());
+// memcpy((float*)in_a[n], (float*)in, sizeof(float) * num_points);
+// }
+// volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_u_avx(result, local_code, phase_inc[0], phase, (const float**)in_a, num_a_vectors, num_points);
+//
+// for (n = 0; n < num_a_vectors; n++)
+// {
+// volk_gnsssdr_free(in_a[n]);
+// }
+// volk_gnsssdr_free(in_a);
+//}
+//
+//#endif // AVX
+//
+//
+//#ifdef LV_HAVE_AVX
+//static inline void volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc_a_avx(lv_32fc_t* result, const lv_32fc_t* local_code, const float* in, unsigned int num_points)
+//{
+// // phases must be normalized. Phase rotator expects a complex exponential input!
+// float rem_carrier_phase_in_rad = 0.25;
+// float phase_step_rad = 0.1;
+// lv_32fc_t phase[1];
+// phase[0] = lv_cmake(cos(rem_carrier_phase_in_rad), sin(rem_carrier_phase_in_rad));
+// lv_32fc_t phase_inc[1];
+// phase_inc[0] = lv_cmake(cos(phase_step_rad), sin(phase_step_rad));
+// int n;
+// int num_a_vectors = 3;
+// float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
+// for (n = 0; n < num_a_vectors; n++)
+// {
+// in_a[n] = (float*)volk_gnsssdr_malloc(sizeof(float) * num_points, volk_gnsssdr_get_alignment());
+// memcpy((float*)in_a[n], (float*)in, sizeof(float) * num_points);
+// }
+// volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_a_avx(result, local_code, phase_inc[0], phase, (const float**)in_a, num_a_vectors, num_points);
+//
+// for (n = 0; n < num_a_vectors; n++)
+// {
+// volk_gnsssdr_free(in_a[n]);
+// }
+// volk_gnsssdr_free(in_a);
+//}
+//
+//#endif // AVX
+
+#endif // INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc_H
diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/kernel_tests.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/kernel_tests.h
index 389e03b14..51a96b171 100644
--- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/kernel_tests.h
+++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/kernel_tests.h
@@ -99,6 +99,7 @@ std::vector init_test_list(volk_gnsssdr_test_params_t
QA(VOLK_INIT_PUPP(volk_gnsssdr_16ic_16i_rotator_dotprodxnpuppet_16ic, volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn, test_params_int16))
QA(VOLK_INIT_PUPP(volk_gnsssdr_32fc_x2_rotator_dotprodxnpuppet_32fc, volk_gnsssdr_32fc_x2_rotator_dot_prod_32fc_xn, test_params_int1))
QA(VOLK_INIT_PUPP(volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc, volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn, test_params_int1));
+ QA(VOLK_INIT_PUPP(volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc, volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn, test_params_int1));
return test_cases;
}
diff --git a/src/algorithms/observables/adapters/CMakeLists.txt b/src/algorithms/observables/adapters/CMakeLists.txt
index d3cff285a..d3c5b6933 100644
--- a/src/algorithms/observables/adapters/CMakeLists.txt
+++ b/src/algorithms/observables/adapters/CMakeLists.txt
@@ -20,6 +20,10 @@ set(OBS_ADAPTER_SOURCES
hybrid_observables.cc
)
+set(OBS_ADAPTER_HEADERS
+ hybrid_observables.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -33,8 +37,6 @@ include_directories(
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
-file(GLOB OBS_ADAPTER_HEADERS "*.h")
-list(SORT OBS_ADAPTER_HEADERS)
add_library(obs_adapters ${OBS_ADAPTER_SOURCES} ${OBS_ADAPTER_HEADERS})
source_group(Headers FILES ${OBS_ADAPTER_HEADERS})
target_link_libraries(obs_adapters obs_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES})
diff --git a/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt b/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt
index 276908208..d42409de6 100644
--- a/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt
+++ b/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt
@@ -20,6 +20,10 @@ set(OBS_GR_BLOCKS_SOURCES
hybrid_observables_cc.cc
)
+set(OBS_GR_BLOCKS_HEADERS
+ hybrid_observables_cc.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -34,8 +38,6 @@ include_directories(
${MATIO_INCLUDE_DIRS}
)
-file(GLOB OBS_GR_BLOCKS_HEADERS "*.h")
-list(SORT OBS_GR_BLOCKS_HEADERS)
add_library(obs_gr_blocks ${OBS_GR_BLOCKS_SOURCES} ${OBS_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${OBS_GR_BLOCKS_HEADERS})
if(MATIO_FOUND)
diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc
index cb5468af0..81d385cf5 100644
--- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc
+++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc
@@ -484,7 +484,7 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
if (T_rx_clock_step_samples == 0)
{
T_rx_clock_step_samples = std::round(static_cast(in[d_nchannels_in - 1][0].fs) * 1e-3); // 1 ms
- std::cout << "Observables clock step samples set to " << T_rx_clock_step_samples << std::endl;
+ LOG(INFO) << "Observables clock step samples set to " << T_rx_clock_step_samples;
usleep(1000000);
}
diff --git a/src/algorithms/resampler/adapters/CMakeLists.txt b/src/algorithms/resampler/adapters/CMakeLists.txt
index 7c3dc92a5..41f5dd8d1 100644
--- a/src/algorithms/resampler/adapters/CMakeLists.txt
+++ b/src/algorithms/resampler/adapters/CMakeLists.txt
@@ -21,6 +21,12 @@ set(RESAMPLER_ADAPTER_SOURCES
mmse_resampler_conditioner.cc
)
+
+set(RESAMPLER_ADAPTER_HEADERS
+ direct_resampler_conditioner.h
+ mmse_resampler_conditioner.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/interfaces
@@ -36,9 +42,9 @@ if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4" )
add_definitions( -DGR_GREATER_38=1 )
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4" )
-
-file(GLOB RESAMPLER_ADAPTER_HEADERS "*.h")
list(SORT RESAMPLER_ADAPTER_HEADERS)
+list(SORT RESAMPLER_ADAPTER_SOURCES)
+
add_library(resampler_adapters ${RESAMPLER_ADAPTER_SOURCES} ${RESAMPLER_ADAPTER_HEADERS})
source_group(Headers FILES ${RESAMPLER_ADAPTER_HEADERS})
target_link_libraries(resampler_adapters resampler_gr_blocks)
diff --git a/src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt b/src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt
index 70db5015e..81c9e3deb 100644
--- a/src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt
+++ b/src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt
@@ -23,6 +23,12 @@ set(RESAMPLER_GR_BLOCKS_SOURCES
direct_resampler_conditioner_cb.cc
)
+set(RESAMPLER_GR_BLOCKS_HEADERS
+ direct_resampler_conditioner_cc.h
+ direct_resampler_conditioner_cs.h
+ direct_resampler_conditioner_cb.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${GLOG_INCLUDE_DIRS}
@@ -31,8 +37,9 @@ include_directories(
${VOLK_INCLUDE_DIRS}
)
-file(GLOB RESAMPLER_GR_BLOCKS_HEADERS "*.h")
list(SORT RESAMPLER_GR_BLOCKS_HEADERS)
+list(SORT RESAMPLER_GR_BLOCKS_SOURCES)
+
add_library(resampler_gr_blocks ${RESAMPLER_GR_BLOCKS_SOURCES} ${RESAMPLER_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${RESAMPLER_GR_BLOCKS_HEADERS})
add_dependencies(resampler_gr_blocks glog-${glog_RELEASE})
\ No newline at end of file
diff --git a/src/algorithms/signal_generator/adapters/CMakeLists.txt b/src/algorithms/signal_generator/adapters/CMakeLists.txt
index 3d141ddb3..6562a410c 100644
--- a/src/algorithms/signal_generator/adapters/CMakeLists.txt
+++ b/src/algorithms/signal_generator/adapters/CMakeLists.txt
@@ -17,6 +17,7 @@
#
set(SIGNAL_GENERATOR_ADAPTER_SOURCES signal_generator.cc)
+set(SIGNAL_GENERATOR_ADAPTER_HEADERS signal_generator.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
@@ -30,8 +31,6 @@ include_directories(
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
-file(GLOB SIGNAL_GENERATOR_ADAPTER_HEADERS "*.h")
-list(SORT SIGNAL_GENERATOR_ADAPTER_HEADERS)
add_library(signal_generator_adapters ${SIGNAL_GENERATOR_ADAPTER_SOURCES} ${SIGNAL_GENERATOR_ADAPTER_HEADERS})
source_group(Headers FILES ${SIGNAL_GENERATOR_ADAPTER_HEADERS})
target_link_libraries(signal_generator_adapters gnss_sp_libs
diff --git a/src/algorithms/signal_generator/gnuradio_blocks/CMakeLists.txt b/src/algorithms/signal_generator/gnuradio_blocks/CMakeLists.txt
index 55e2e9bd6..b8df4e29f 100644
--- a/src/algorithms/signal_generator/gnuradio_blocks/CMakeLists.txt
+++ b/src/algorithms/signal_generator/gnuradio_blocks/CMakeLists.txt
@@ -17,6 +17,7 @@
#
set(SIGNAL_GENERATOR_BLOCK_SOURCES signal_generator_c.cc)
+set(SIGNAL_GENERATOR_BLOCK_HEADERS signal_generator_c.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
@@ -30,8 +31,6 @@ include_directories(
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
-file(GLOB SIGNAL_GENERATOR_BLOCK_HEADERS "*.h")
-list(SORT SIGNAL_GENERATOR_BLOCK_HEADERS)
add_library(signal_generator_blocks ${SIGNAL_GENERATOR_BLOCK_SOURCES} ${SIGNAL_GENERATOR_BLOCK_HEADERS})
source_group(Headers FILES ${SIGNAL_GENERATOR_BLOCK_HEADERS})
target_link_libraries(signal_generator_blocks gnss_system_parameters gnss_sp_libs
@@ -44,4 +43,4 @@ if(VOLK_GNSSSDR_FOUND)
# add_dependencies(signal_generator_blocks glog-${glog_RELEASE})
else(VOLK_GNSSSDR_FOUND)
add_dependencies(signal_generator_blocks volk_gnsssdr_module)
-endif()
\ No newline at end of file
+endif(VOLK_GNSSSDR_FOUND)
diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt
index 4ee93a535..7d37b139f 100644
--- a/src/algorithms/signal_source/adapters/CMakeLists.txt
+++ b/src/algorithms/signal_source/adapters/CMakeLists.txt
@@ -16,8 +16,6 @@
# along with GNSS-SDR. If not, see .
#
-file(GLOB SIGNAL_SOURCE_ADAPTER_HEADERS "*.h")
-list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
# Optional drivers
@@ -30,6 +28,7 @@ if(ENABLE_RAW_UDP)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} custom_udp_signal_source.cc)
+ set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} custom_udp_signal_source.h)
endif(ENABLE_RAW_UDP)
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
@@ -67,6 +66,7 @@ if(ENABLE_PLUTOSDR)
##############################################
if(IIO_FOUND)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc)
+ set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} plutosdr_signal_source.h)
endif(IIO_FOUND)
endif(ENABLE_PLUTOSDR)
@@ -77,6 +77,7 @@ if(ENABLE_FMCOMMS2)
###############################################
if(IIO_FOUND)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc)
+ set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} fmcomms2_signal_source.h)
endif(IIO_FOUND)
endif(ENABLE_FMCOMMS2)
@@ -86,6 +87,7 @@ if(ENABLE_AD9361)
###############################################
if(LIBIIO_FOUND)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} ad9361_fpga_signal_source.cc)
+ set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} ad9361_fpga_signal_source.h)
endif(LIBIIO_FOUND)
endif(ENABLE_AD9361)
@@ -103,6 +105,7 @@ if(ENABLE_GN3S)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_GN3S_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_GN3S_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gn3s_signal_source.cc)
+ set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gn3s_signal_source.h)
endif(ENABLE_GN3S)
@@ -123,6 +126,7 @@ if(ENABLE_FLEXIBAND)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${TELEORBIT_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${FLEXIBAND_DRIVER_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} flexiband_signal_source.cc)
+ set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} flexiband_signal_source.h)
endif(ENABLE_FLEXIBAND)
@@ -138,6 +142,7 @@ if(ENABLE_ARRAY)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_DBFCTTC_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_DBFCTTC_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} raw_array_signal_source.cc)
+ set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} raw_array_signal_source.h)
endif(ENABLE_ARRAY)
@@ -154,8 +159,9 @@ if(ENABLE_OSMOSDR)
set(OSMO_DRIVER_INCLUDE_DIRS
${OPT_DRIVER_INCLUDE_DIRS}
${GROSMOSDR_INCLUDE_DIR}/osmosdr
- )
+ )
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} osmosdr_signal_source.cc)
+ set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} osmosdr_signal_source.h)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GROSMOSDR_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${OSMO_DRIVER_INCLUDE_DIRS})
endif(NOT GROSMOSDR_FOUND)
@@ -163,10 +169,9 @@ endif(ENABLE_OSMOSDR)
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} uhd_signal_source.cc)
+ set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} uhd_signal_source.h)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${UHD_LIBRARIES} ${GNURADIO_UHD_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${UHD_INCLUDE_DIRS})
-else(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
- list(REMOVE_ITEM SIGNAL_SOURCE_ADAPTER_HEADERS ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters/uhd_signal_source.h)
endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
@@ -180,10 +185,24 @@ set(SIGNAL_SOURCE_ADAPTER_SOURCES file_signal_source.cc
${OPT_DRIVER_SOURCES}
)
+set(SIGNAL_SOURCE_ADAPTER_HEADERS file_signal_source.h
+ gen_signal_source.h
+ nsr_file_signal_source.h
+ spir_file_signal_source.h
+ spir_gss6450_file_signal_source.h
+ rtl_tcp_signal_source.h
+ labsat_signal_source.h
+ ${OPT_DRIVER_HEADERS}
+)
+
+
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
set(SIGNAL_SOURCE_ADAPTER_SOURCES ${SIGNAL_SOURCE_ADAPTER_SOURCES}
two_bit_cpx_file_signal_source.cc
two_bit_packed_file_signal_source.cc )
+ set(SIGNAL_SOURCE_ADAPTER_HEADERS ${SIGNAL_SOURCE_ADAPTER_HEADERS}
+ two_bit_cpx_file_signal_source.h
+ two_bit_packed_file_signal_source.h )
endif(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
include_directories(
@@ -207,6 +226,9 @@ endif(ARCH_64BITS)
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
+list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
+list(SORT SIGNAL_SOURCE_ADAPTER_SOURCES)
+
add_library(signal_source_adapters ${SIGNAL_SOURCE_ADAPTER_SOURCES} ${SIGNAL_SOURCE_ADAPTER_HEADERS})
source_group(Headers FILES ${SIGNAL_SOURCE_ADAPTER_HEADERS})
target_link_libraries(signal_source_adapters signal_source_gr_blocks
diff --git a/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt b/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt
index 4108bed58..5c16fac07 100644
--- a/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt
+++ b/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt
@@ -26,8 +26,10 @@ if(ENABLE_RAW_UDP)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gr_complex_ip_packet_source.cc)
+ set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gr_complex_ip_packet_source.h)
endif(ENABLE_RAW_UDP)
+
set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES
unpack_byte_2bit_samples.cc
unpack_byte_2bit_cpx_samples.cc
@@ -40,6 +42,19 @@ set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES
${OPT_DRIVER_SOURCES}
)
+set(SIGNAL_SOURCE_GR_BLOCKS_HEADERS
+ unpack_byte_2bit_samples.h
+ unpack_byte_2bit_cpx_samples.h
+ unpack_byte_4bit_samples.h
+ unpack_intspir_1bit_samples.h
+ rtl_tcp_signal_source_c.h
+ unpack_2bit_samples.h
+ unpack_spir_gss6450_samples.h
+ labsat23_source.h
+ ${OPT_DRIVER_HEADERS}
+)
+
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/libs
@@ -50,8 +65,9 @@ include_directories(
${OPT_DRIVER_INCLUDE_DIRS}
)
-file(GLOB SIGNAL_SOURCE_GR_BLOCKS_HEADERS "*.h")
list(SORT SIGNAL_SOURCE_GR_BLOCKS_HEADERS)
+list(SORT SIGNAL_SOURCE_GR_BLOCKS_SOURCES)
+
add_library(signal_source_gr_blocks ${SIGNAL_SOURCE_GR_BLOCKS_SOURCES} ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS})
target_link_libraries(signal_source_gr_blocks
diff --git a/src/algorithms/signal_source/libs/CMakeLists.txt b/src/algorithms/signal_source/libs/CMakeLists.txt
index 8ace0c109..a7e5c8495 100644
--- a/src/algorithms/signal_source/libs/CMakeLists.txt
+++ b/src/algorithms/signal_source/libs/CMakeLists.txt
@@ -63,21 +63,23 @@ include_directories(
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${OPT_DRIVER_INCLUDE_DIRS}
- )
+)
set(SIGNAL_SOURCE_LIB_SOURCES
rtl_tcp_commands.cc
rtl_tcp_dongle_info.cc
${OPT_SIGNAL_SOURCE_LIB_SOURCES}
- )
+)
set(SIGNAL_SOURCE_LIB_HEADERS
rtl_tcp_commands.h
rtl_tcp_dongle_info.h
${OPT_SIGNAL_SOURCE_LIB_HEADERS}
- )
+)
list(SORT SIGNAL_SOURCE_LIB_HEADERS)
+list(SORT SIGNAL_SOURCE_LIB_SOURCES)
+
add_library(signal_source_lib ${SIGNAL_SOURCE_LIB_SOURCES} ${SIGNAL_SOURCE_LIB_HEADERS})
source_group(Headers FILES ${SIGNAL_SOURCE_LIB_HEADERS})
target_link_libraries(signal_source_lib ${OPT_LIBRARIES})
diff --git a/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt b/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt
index 6722ce03b..db68a7cce 100644
--- a/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt
+++ b/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt
@@ -28,6 +28,17 @@ set(TELEMETRY_DECODER_ADAPTER_SOURCES
glonass_l2_ca_telemetry_decoder.cc
)
+set(TELEMETRY_DECODER_ADAPTER_HEADERS
+ gps_l1_ca_telemetry_decoder.h
+ gps_l2c_telemetry_decoder.h
+ gps_l5_telemetry_decoder.h
+ galileo_e1b_telemetry_decoder.h
+ sbas_l1_telemetry_decoder.h
+ galileo_e5a_telemetry_decoder.h
+ glonass_l1_ca_telemetry_decoder.h
+ glonass_l2_ca_telemetry_decoder.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -42,8 +53,9 @@ include_directories(
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
-file(GLOB TELEMETRY_DECODER_ADAPTER_HEADERS "*.h")
list(SORT TELEMETRY_DECODER_ADAPTER_HEADERS)
+list(SORT TELEMETRY_DECODER_ADAPTER_SOURCES)
+
add_library(telemetry_decoder_adapters ${TELEMETRY_DECODER_ADAPTER_SOURCES} ${TELEMETRY_DECODER_ADAPTER_HEADERS})
source_group(Headers FILES ${TELEMETRY_DECODER_ADAPTER_HEADERS})
target_link_libraries(telemetry_decoder_adapters telemetry_decoder_gr_blocks gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES})
diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt b/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt
index 5a49bf03a..e0a102148 100644
--- a/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt
+++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt
@@ -26,6 +26,16 @@ set(TELEMETRY_DECODER_GR_BLOCKS_SOURCES
galileo_telemetry_decoder_cc.cc
)
+set(TELEMETRY_DECODER_GR_BLOCKS_HEADERS
+ gps_l1_ca_telemetry_decoder_cc.h
+ gps_l2c_telemetry_decoder_cc.h
+ gps_l5_telemetry_decoder_cc.h
+ sbas_l1_telemetry_decoder_cc.h
+ glonass_l1_ca_telemetry_decoder_cc.h
+ glonass_l2_ca_telemetry_decoder_cc.h
+ galileo_telemetry_decoder_cc.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -39,8 +49,9 @@ include_directories(
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
-file(GLOB TELEMETRY_DECODER_GR_BLOCKS_HEADERS "*.h")
list(SORT TELEMETRY_DECODER_GR_BLOCKS_HEADERS)
+list(SORT TELEMETRY_DECODER_GR_BLOCKS_SOURCES)
+
add_library(telemetry_decoder_gr_blocks ${TELEMETRY_DECODER_GR_BLOCKS_SOURCES} ${TELEMETRY_DECODER_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${TELEMETRY_DECODER_GR_BLOCKS_HEADERS})
target_link_libraries(telemetry_decoder_gr_blocks telemetry_decoder_libswiftcnav telemetry_decoder_lib gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES})
diff --git a/src/algorithms/telemetry_decoder/libs/CMakeLists.txt b/src/algorithms/telemetry_decoder/libs/CMakeLists.txt
index b8a2fcd2f..5c663c93a 100644
--- a/src/algorithms/telemetry_decoder/libs/CMakeLists.txt
+++ b/src/algorithms/telemetry_decoder/libs/CMakeLists.txt
@@ -22,6 +22,11 @@ set(TELEMETRY_DECODER_LIB_SOURCES
viterbi_decoder.cc
)
+set(TELEMETRY_DECODER_LIB_HEADERS
+ viterbi_decoder.h
+ convolutional.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
@@ -33,9 +38,9 @@ include_directories(
${GFlags_INCLUDE_DIRS}
)
-file(GLOB TELEMETRY_DECODER_LIB_HEADERS "*.h")
-
list(SORT TELEMETRY_DECODER_LIB_HEADERS)
+list(SORT TELEMETRY_DECODER_LIB_SOURCES)
+
add_library(telemetry_decoder_lib ${TELEMETRY_DECODER_LIB_SOURCES} ${TELEMETRY_DECODER_LIB_HEADERS})
source_group(Headers FILES ${TELEMETRY_DECODER_LIB_HEADERS})
target_link_libraries(telemetry_decoder_lib gnss_system_parameters)
diff --git a/src/algorithms/telemetry_decoder/libs/libswiftcnav/CMakeLists.txt b/src/algorithms/telemetry_decoder/libs/libswiftcnav/CMakeLists.txt
index a9f7a1622..8dba92115 100644
--- a/src/algorithms/telemetry_decoder/libs/libswiftcnav/CMakeLists.txt
+++ b/src/algorithms/telemetry_decoder/libs/libswiftcnav/CMakeLists.txt
@@ -23,13 +23,21 @@ set(TELEMETRY_DECODER_LIBSWIFTCNAV_SOURCES
viterbi27.c
)
+set(TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS
+ cnav_msg.h
+ bits.h
+ edc.h
+ swift_common.h
+ fec.h
+)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)
-file(GLOB TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS "*.h")
list(SORT TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS)
+list(SORT TELEMETRY_DECODER_LIBSWIFTCNAV_SOURCES)
add_library(telemetry_decoder_libswiftcnav STATIC ${TELEMETRY_DECODER_LIBSWIFTCNAV_SOURCES} ${TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS})
source_group(Headers FILES ${TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS})
-set_target_properties(telemetry_decoder_libswiftcnav PROPERTIES LINKER_LANGUAGE C)
\ No newline at end of file
+set_target_properties(telemetry_decoder_libswiftcnav PROPERTIES LINKER_LANGUAGE C)
diff --git a/src/algorithms/tracking/adapters/CMakeLists.txt b/src/algorithms/tracking/adapters/CMakeLists.txt
index ae1754aa2..e8d12d844 100644
--- a/src/algorithms/tracking/adapters/CMakeLists.txt
+++ b/src/algorithms/tracking/adapters/CMakeLists.txt
@@ -17,12 +17,25 @@
#
if(ENABLE_CUDA)
- set(OPT_TRACKING_ADAPTERS ${OPT_TRACKING_ADAPTERS} gps_l1_ca_dll_pll_tracking_gpu.cc)
+ set(OPT_TRACKING_ADAPTERS_SOURCES ${OPT_TRACKING_ADAPTERS_SOURCES} gps_l1_ca_dll_pll_tracking_gpu.cc)
+ set(OPT_TRACKING_ADAPTERS_HEADERS ${OPT_TRACKING_ADAPTERS_HEADERS} gps_l1_ca_dll_pll_tracking_gpu.h)
set(OPT_TRACKING_INCLUDE_DIRS ${OPT_TRACKING_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS})
endif(ENABLE_CUDA)
if(ENABLE_FPGA)
- SET(OPT_TRACKING_ADAPTERS ${OPT_TRACKING_ADAPTERS} gps_l1_ca_dll_pll_tracking_fpga.cc gps_l2_m_dll_pll_tracking_fpga.cc galileo_e1_dll_pll_veml_tracking_fpga.cc galileo_e5a_dll_pll_tracking_fpga.cc gps_l5_dll_pll_tracking_fpga.cc)
+ set(OPT_TRACKING_ADAPTERS_SOURCES ${OPT_TRACKING_ADAPTERS_SOURCES}
+ gps_l1_ca_dll_pll_tracking_fpga.cc
+ gps_l2_m_dll_pll_tracking_fpga.cc
+ galileo_e1_dll_pll_veml_tracking_fpga.cc
+ galileo_e5a_dll_pll_tracking_fpga.cc
+ gps_l5_dll_pll_tracking_fpga.cc)
+
+ set(OPT_TRACKING_ADAPTERS_HEADERS ${OPT_TRACKING_ADAPTERS_HEADERS}
+ gps_l1_ca_dll_pll_tracking_fpga.h
+ gps_l2_m_dll_pll_tracking_fpga.h
+ galileo_e1_dll_pll_veml_tracking_fpga.h
+ galileo_e5a_dll_pll_tracking_fpga.h
+ gps_l5_dll_pll_tracking_fpga.h)
endif(ENABLE_FPGA)
set(TRACKING_ADAPTER_SOURCES
@@ -39,7 +52,24 @@ set(TRACKING_ADAPTER_SOURCES
gps_l5_dll_pll_tracking.cc
glonass_l2_ca_dll_pll_tracking.cc
glonass_l2_ca_dll_pll_c_aid_tracking.cc
- ${OPT_TRACKING_ADAPTERS}
+ ${OPT_TRACKING_ADAPTERS_SOURCES}
+)
+
+set(TRACKING_ADAPTER_HEADERS
+ galileo_e1_dll_pll_veml_tracking.h
+ galileo_e1_tcp_connector_tracking.h
+ gps_l1_ca_dll_pll_tracking.h
+ gps_l1_ca_dll_pll_c_aid_tracking.h
+ gps_l1_ca_tcp_connector_tracking.h
+ galileo_e5a_dll_pll_tracking.h
+ gps_l2_m_dll_pll_tracking.h
+ glonass_l1_ca_dll_pll_tracking.h
+ glonass_l1_ca_dll_pll_c_aid_tracking.h
+ gps_l1_ca_kf_tracking.h
+ gps_l5_dll_pll_tracking.h
+ glonass_l2_ca_dll_pll_tracking.h
+ glonass_l2_ca_dll_pll_c_aid_tracking.h
+ ${OPT_TRACKING_ADAPTERS_HEADERS}
)
include_directories(
@@ -58,8 +88,9 @@ include_directories(
${OPT_TRACKING_INCLUDE_DIRS}
)
-file(GLOB TRACKING_ADAPTER_HEADERS "*.h")
list(SORT TRACKING_ADAPTER_HEADERS)
+list(SORT TRACKING_ADAPTER_SOURCES)
+
add_library(tracking_adapters ${TRACKING_ADAPTER_SOURCES} ${TRACKING_ADAPTER_HEADERS})
source_group(Headers FILES ${TRACKING_ADAPTER_HEADERS})
target_link_libraries(tracking_adapters tracking_gr_blocks gnss_sp_libs gnss_sdr_flags)
diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc
index 48e821674..8a57fd975 100644
--- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc
+++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc
@@ -59,6 +59,16 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
trk_param.fs_in = fs_in;
bool dump = configuration->property(role + ".dump", false);
trk_param.dump = dump;
+ trk_param.high_dyn = configuration->property(role + ".high_dyn", false);
+ if (configuration->property(role + ".smoother_length", 10) < 1)
+ {
+ trk_param.smoother_length = 1;
+ std::cout << TEXT_RED << "WARNING: Gal. E1. smoother_length must be bigger than 0. It has been set to 1" << TEXT_RESET << std::endl;
+ }
+ else
+ {
+ trk_param.smoother_length = configuration->property(role + ".smoother_length", 10);
+ }
float pll_bw_hz = configuration->property(role + ".pll_bw_hz", 5.0);
if (FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz);
trk_param.pll_bw_hz = pll_bw_hz;
diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc
index fe6f4a7d6..00b37d7c1 100644
--- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc
+++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc
@@ -59,6 +59,16 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
trk_param.fs_in = fs_in;
bool dump = configuration->property(role + ".dump", false);
trk_param.dump = dump;
+ trk_param.high_dyn = configuration->property(role + ".high_dyn", false);
+ if (configuration->property(role + ".smoother_length", 10) < 1)
+ {
+ trk_param.smoother_length = 1;
+ std::cout << TEXT_RED << "WARNING: Gal. E5a. smoother_length must be bigger than 0. It has been set to 1" << TEXT_RESET << std::endl;
+ }
+ else
+ {
+ trk_param.smoother_length = configuration->property(role + ".smoother_length", 10);
+ }
float pll_bw_hz = configuration->property(role + ".pll_bw_hz", 20.0);
if (FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz);
trk_param.pll_bw_hz = pll_bw_hz;
diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc
index ffa6e1000..b9a8b2c6e 100644
--- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc
+++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc
@@ -57,6 +57,16 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
int fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
trk_param.fs_in = fs_in;
+ trk_param.high_dyn = configuration->property(role + ".high_dyn", false);
+ if (configuration->property(role + ".smoother_length", 10) < 1)
+ {
+ trk_param.smoother_length = 1;
+ std::cout << TEXT_RED << "WARNING: GPS L1 C/A. smoother_length must be bigger than 0. It has been set to 1" << TEXT_RESET << std::endl;
+ }
+ else
+ {
+ trk_param.smoother_length = configuration->property(role + ".smoother_length", 10);
+ }
bool dump = configuration->property(role + ".dump", false);
trk_param.dump = dump;
float pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
diff --git a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc
index 11e2572c3..1775a7a89 100644
--- a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc
+++ b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc
@@ -59,6 +59,16 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
trk_param.fs_in = fs_in;
bool dump = configuration->property(role + ".dump", false);
trk_param.dump = dump;
+ trk_param.high_dyn = configuration->property(role + ".high_dyn", false);
+ if (configuration->property(role + ".smoother_length", 10) < 1)
+ {
+ trk_param.smoother_length = 1;
+ std::cout << TEXT_RED << "WARNING: GPS L5. smoother_length must be bigger than 0. It has been set to 1" << TEXT_RESET << std::endl;
+ }
+ else
+ {
+ trk_param.smoother_length = configuration->property(role + ".smoother_length", 10);
+ }
float pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0);
if (FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast(FLAGS_pll_bw_hz);
trk_param.pll_bw_hz = pll_bw_hz;
diff --git a/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt
index b1a67d6bb..d31676a64 100644
--- a/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt
+++ b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt
@@ -17,13 +17,15 @@
#
if(ENABLE_CUDA)
- set(OPT_TRACKING_BLOCKS ${OPT_TRACKING_BLOCKS} gps_l1_ca_dll_pll_tracking_gpu_cc.cc)
+ set(OPT_TRACKING_BLOCKS_SOURCES ${OPT_TRACKING_BLOCKS_SOURCES} gps_l1_ca_dll_pll_tracking_gpu_cc.cc)
+ set(OPT_TRACKING_BLOCKS_HEADERS ${OPT_TRACKING_BLOCKS_HEADERS} gps_l1_ca_dll_pll_tracking_gpu_cc.h)
set(OPT_TRACKING_INCLUDES ${OPT_TRACKING_INCLUDES} ${CUDA_INCLUDE_DIRS})
set(OPT_TRACKING_LIBRARIES ${OPT_TRACKING_LIBRARIES} ${CUDA_LIBRARIES})
endif(ENABLE_CUDA)
if(ENABLE_FPGA)
- set(OPT_TRACKING_BLOCKS ${OPT_TRACKING_BLOCKS} dll_pll_veml_tracking_fpga.cc)
+ set(OPT_TRACKING_BLOCKS_SOURCES ${OPT_TRACKING_BLOCKS_SOURCES} dll_pll_veml_tracking_fpga.cc)
+ set(OPT_TRACKING_BLOCKS_HEADERS ${OPT_TRACKING_BLOCKS_HEADERS} dll_pll_veml_tracking_fpga.h)
endif(ENABLE_FPGA)
set(TRACKING_GR_BLOCKS_SOURCES
@@ -39,7 +41,23 @@ set(TRACKING_GR_BLOCKS_SOURCES
glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc
glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc
dll_pll_veml_tracking.cc
- ${OPT_TRACKING_BLOCKS}
+ ${OPT_TRACKING_BLOCKS_SOURCES}
+)
+
+set(TRACKING_GR_BLOCKS_HEADERS
+ galileo_e1_tcp_connector_tracking_cc.h
+ gps_l1_ca_tcp_connector_tracking_cc.h
+ gps_l1_ca_dll_pll_c_aid_tracking_cc.h
+ gps_l1_ca_dll_pll_c_aid_tracking_sc.h
+ glonass_l1_ca_dll_pll_tracking_cc.h
+ glonass_l1_ca_dll_pll_c_aid_tracking_cc.h
+ glonass_l1_ca_dll_pll_c_aid_tracking_sc.h
+ gps_l1_ca_kf_tracking_cc.h
+ glonass_l2_ca_dll_pll_tracking_cc.h
+ glonass_l2_ca_dll_pll_c_aid_tracking_cc.h
+ glonass_l2_ca_dll_pll_c_aid_tracking_sc.h
+ dll_pll_veml_tracking.h
+ ${OPT_TRACKING_BLOCKS_HEADERS}
)
include_directories(
@@ -63,8 +81,9 @@ if(ENABLE_GENERIC_ARCH)
add_definitions( -DGENERIC_ARCH=1 )
endif(ENABLE_GENERIC_ARCH)
-file(GLOB TRACKING_GR_BLOCKS_HEADERS "*.h")
list(SORT TRACKING_GR_BLOCKS_HEADERS)
+list(SORT TRACKING_GR_BLOCKS_SOURCES)
+
add_library(tracking_gr_blocks ${TRACKING_GR_BLOCKS_SOURCES} ${TRACKING_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${TRACKING_GR_BLOCKS_HEADERS})
diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc
index 374cb910f..95cf911f4 100755
--- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc
+++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc
@@ -58,6 +58,7 @@
#include
#include
#include
+#include
using google::LogMessage;
@@ -355,6 +356,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
{
// Extra correlator for the data component
correlator_data_cpu.init(2 * trk_parameters.vector_length, 1);
+ correlator_data_cpu.set_high_dynamics_resampler(trk_parameters.high_dyn);
d_data_code = static_cast(volk_gnsssdr_malloc(2 * d_code_length_chips * sizeof(float), volk_gnsssdr_get_alignment()));
}
else
@@ -363,7 +365,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
}
// --- Initializations ---
- multicorrelator_cpu.set_high_dynamics_resampler(trk_parameters.use_high_dynamics_resampler);
+ multicorrelator_cpu.set_high_dynamics_resampler(trk_parameters.high_dyn);
// Initial code frequency basis of NCO
d_code_freq_chips = d_code_chip_rate;
// Residual code phase (in chips)
@@ -397,12 +399,22 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
d_code_phase_step_chips = 0.0;
d_code_phase_rate_step_chips = 0.0;
d_carrier_phase_step_rad = 0.0;
+ d_carrier_phase_rate_step_rad = 0.0;
d_rem_code_phase_chips = 0.0;
- d_K_blk_samples = 0.0;
d_code_phase_samples = 0.0;
d_last_prompt = gr_complex(0.0, 0.0);
d_state = 0; // initial state: standby
clear_tracking_vars();
+ if (trk_parameters.smoother_length > 0)
+ {
+ d_carr_ph_history.resize(trk_parameters.smoother_length * 2);
+ d_code_ph_history.resize(trk_parameters.smoother_length * 2);
+ }
+ else
+ {
+ d_carr_ph_history.resize(1);
+ d_code_ph_history.resize(1);
+ }
}
@@ -424,6 +436,7 @@ void dll_pll_veml_tracking::start_tracking()
// new chip and PRN sequence periods based on acq Doppler
d_code_freq_chips = radial_velocity * d_code_chip_rate;
d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in;
+ d_code_phase_rate_step_chips = 0.0;
double T_chip_mod_seconds = 1.0 / d_code_freq_chips;
double T_prn_mod_seconds = T_chip_mod_seconds * static_cast(d_code_length_chips);
double T_prn_mod_samples = T_prn_mod_seconds * trk_parameters.fs_in;
@@ -446,7 +459,9 @@ void dll_pll_veml_tracking::start_tracking()
d_carrier_doppler_hz = d_acq_carrier_doppler_hz;
d_carrier_phase_step_rad = PI_2 * d_carrier_doppler_hz / trk_parameters.fs_in;
-
+ d_carrier_phase_rate_step_rad = 0.0;
+ d_carr_ph_history.clear();
+ d_code_ph_history.clear();
// DLL/PLL filter initialization
d_carrier_loop_filter.initialize(); // initialize the carrier filter
d_code_loop_filter.initialize(); // initialize the code filter
@@ -706,7 +721,7 @@ void dll_pll_veml_tracking::do_correlation_step(const gr_complex *input_samples)
multicorrelator_cpu.set_input_output_vectors(d_correlator_outs, input_samples);
multicorrelator_cpu.Carrier_wipeoff_multicorrelator_resampler(
d_rem_carr_phase_rad,
- d_carrier_phase_step_rad,
+ d_carrier_phase_step_rad, d_carrier_phase_rate_step_rad,
static_cast(d_rem_code_phase_chips) * static_cast(d_code_samples_per_chip),
static_cast(d_code_phase_step_chips) * static_cast(d_code_samples_per_chip),
static_cast(d_code_phase_rate_step_chips) * static_cast(d_code_samples_per_chip),
@@ -718,7 +733,7 @@ void dll_pll_veml_tracking::do_correlation_step(const gr_complex *input_samples)
correlator_data_cpu.set_input_output_vectors(d_Prompt_Data, input_samples);
correlator_data_cpu.Carrier_wipeoff_multicorrelator_resampler(
d_rem_carr_phase_rad,
- d_carrier_phase_step_rad,
+ d_carrier_phase_step_rad, d_carrier_phase_rate_step_rad,
static_cast(d_rem_code_phase_chips) * static_cast(d_code_samples_per_chip),
static_cast(d_code_phase_step_chips) * static_cast(d_code_samples_per_chip),
static_cast(d_code_phase_rate_step_chips) * static_cast(d_code_samples_per_chip),
@@ -777,6 +792,10 @@ void dll_pll_veml_tracking::clear_tracking_vars()
d_current_symbol = 0;
d_Prompt_buffer_deque.clear();
d_last_prompt = gr_complex(0.0, 0.0);
+ d_carrier_phase_rate_step_rad = 0.0;
+ d_code_phase_rate_step_chips = 0.0;
+ d_carr_ph_history.clear();
+ d_code_ph_history.clear();
}
@@ -796,15 +815,60 @@ void dll_pll_veml_tracking::update_tracking_vars()
//################### PLL COMMANDS #################################################
// carrier phase step (NCO phase increment per sample) [rads/sample]
d_carrier_phase_step_rad = PI_2 * d_carrier_doppler_hz / trk_parameters.fs_in;
+ // carrier phase rate step (NCO phase increment rate per sample) [rads/sample^2]
+ if (trk_parameters.high_dyn)
+ {
+ d_carr_ph_history.push_back(std::pair(d_carrier_phase_step_rad, static_cast(d_current_prn_length_samples)));
+ if (d_carr_ph_history.full())
+ {
+ double tmp_cp1 = 0.0;
+ double tmp_cp2 = 0.0;
+ double tmp_samples = 0.0;
+ for (unsigned int k = 0; k < trk_parameters.smoother_length; k++)
+ {
+ tmp_cp1 += d_carr_ph_history.at(k).first;
+ tmp_cp2 += d_carr_ph_history.at(trk_parameters.smoother_length * 2 - k - 1).first;
+ tmp_samples += d_carr_ph_history.at(trk_parameters.smoother_length * 2 - k - 1).second;
+ }
+ tmp_cp1 /= static_cast(trk_parameters.smoother_length);
+ tmp_cp2 /= static_cast(trk_parameters.smoother_length);
+ d_carrier_phase_rate_step_rad = (tmp_cp2 - tmp_cp1) / tmp_samples;
+ }
+ }
+ //std::cout << d_carrier_phase_rate_step_rad * trk_parameters.fs_in * trk_parameters.fs_in / PI_2 << std::endl;
// remnant carrier phase to prevent overflow in the code NCO
- d_rem_carr_phase_rad += d_carrier_phase_step_rad * static_cast(d_current_prn_length_samples);
+ d_rem_carr_phase_rad += static_cast(d_carrier_phase_step_rad * static_cast(d_current_prn_length_samples) + 0.5 * d_carrier_phase_rate_step_rad * static_cast(d_current_prn_length_samples) * static_cast(d_current_prn_length_samples));
d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, PI_2);
+
+
// carrier phase accumulator
- d_acc_carrier_phase_rad -= d_carrier_phase_step_rad * static_cast(d_current_prn_length_samples);
+ //double a = d_carrier_phase_step_rad * static_cast(d_current_prn_length_samples);
+ //double b = 0.5 * d_carrier_phase_rate_step_rad * static_cast(d_current_prn_length_samples) * static_cast(d_current_prn_length_samples);
+ //std::cout << fmod(b, PI_2) / fmod(a, PI_2) << std::endl;
+ d_acc_carrier_phase_rad -= (d_carrier_phase_step_rad * static_cast(d_current_prn_length_samples) + 0.5 * d_carrier_phase_rate_step_rad * static_cast(d_current_prn_length_samples) * static_cast(d_current_prn_length_samples));
//################### DLL COMMANDS #################################################
// code phase step (Code resampler phase increment per sample) [chips/sample]
d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in;
+ if (trk_parameters.high_dyn)
+ {
+ d_code_ph_history.push_back(std::pair(d_code_phase_step_chips, static_cast(d_current_prn_length_samples)));
+ if (d_code_ph_history.full())
+ {
+ double tmp_cp1 = 0.0;
+ double tmp_cp2 = 0.0;
+ double tmp_samples = 0.0;
+ for (unsigned int k = 0; k < trk_parameters.smoother_length; k++)
+ {
+ tmp_cp1 += d_code_ph_history.at(k).first;
+ tmp_cp2 += d_code_ph_history.at(trk_parameters.smoother_length * 2 - k - 1).first;
+ tmp_samples += d_code_ph_history.at(trk_parameters.smoother_length * 2 - k - 1).second;
+ }
+ tmp_cp1 /= static_cast(trk_parameters.smoother_length);
+ tmp_cp2 /= static_cast(trk_parameters.smoother_length);
+ d_code_phase_rate_step_chips = (tmp_cp2 - tmp_cp1) / tmp_samples;
+ }
+ }
// remnant code phase [chips]
d_rem_code_phase_samples = K_blk_samples - static_cast(d_current_prn_length_samples); // rounding error < 1 sample
d_rem_code_phase_chips = d_code_freq_chips * d_rem_code_phase_samples / trk_parameters.fs_in;
@@ -947,8 +1011,14 @@ void dll_pll_veml_tracking::log_data(bool integrating)
// carrier and code frequency
tmp_float = d_carrier_doppler_hz;
d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float));
+ // carrier phase rate [Hz/s]
+ tmp_float = d_carrier_phase_rate_step_rad * trk_parameters.fs_in * trk_parameters.fs_in / PI_2;
+ d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float));
tmp_float = d_code_freq_chips;
d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float));
+ // code phase rate [chips/s^2]
+ tmp_float = d_code_phase_rate_step_chips * trk_parameters.fs_in * trk_parameters.fs_in;
+ d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float));
// PLL commands
tmp_float = d_carr_error_hz;
d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float));
@@ -986,7 +1056,7 @@ int32_t dll_pll_veml_tracking::save_matfile()
// READ DUMP FILE
std::ifstream::pos_type size;
int32_t number_of_double_vars = 1;
- int32_t number_of_float_vars = 17;
+ int32_t number_of_float_vars = 19;
int32_t epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars +
sizeof(float) * number_of_float_vars + sizeof(uint32_t);
std::ifstream dump_file;
@@ -1022,7 +1092,9 @@ int32_t dll_pll_veml_tracking::save_matfile()
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
float *acc_carrier_phase_rad = new float[num_epoch];
float *carrier_doppler_hz = new float[num_epoch];
+ float *carrier_doppler_rate_hz = new float[num_epoch];
float *code_freq_chips = new float[num_epoch];
+ float *code_freq_rate_chips = new float[num_epoch];
float *carr_error_hz = new float[num_epoch];
float *carr_error_filt_hz = new float[num_epoch];
float *code_error_chips = new float[num_epoch];
@@ -1049,7 +1121,9 @@ int32_t dll_pll_veml_tracking::save_matfile()
dump_file.read(reinterpret_cast(&PRN_start_sample_count[i]), sizeof(uint64_t));
dump_file.read(reinterpret_cast(&acc_carrier_phase_rad[i]), sizeof(float));
dump_file.read(reinterpret_cast(&carrier_doppler_hz[i]), sizeof(float));
+ dump_file.read(reinterpret_cast(&carrier_doppler_rate_hz[i]), sizeof(float));
dump_file.read(reinterpret_cast(&code_freq_chips[i]), sizeof(float));
+ dump_file.read(reinterpret_cast(&code_freq_rate_chips[i]), sizeof(float));
dump_file.read(reinterpret_cast(&carr_error_hz[i]), sizeof(float));
dump_file.read(reinterpret_cast(&carr_error_filt_hz[i]), sizeof(float));
dump_file.read(reinterpret_cast(&code_error_chips[i]), sizeof(float));
@@ -1076,7 +1150,9 @@ int32_t dll_pll_veml_tracking::save_matfile()
delete[] PRN_start_sample_count;
delete[] acc_carrier_phase_rad;
delete[] carrier_doppler_hz;
+ delete[] carrier_doppler_rate_hz;
delete[] code_freq_chips;
+ delete[] code_freq_rate_chips;
delete[] carr_error_hz;
delete[] carr_error_filt_hz;
delete[] code_error_chips;
@@ -1139,10 +1215,18 @@ int32_t dll_pll_veml_tracking::save_matfile()
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
+ matvar = Mat_VarCreate("carrier_doppler_rate_hz", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, carrier_doppler_rate_hz, 0);
+ Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
+ Mat_VarFree(matvar);
+
matvar = Mat_VarCreate("code_freq_chips", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, code_freq_chips, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
+ matvar = Mat_VarCreate("code_freq_rate_chips", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, code_freq_rate_chips, 0);
+ Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
+ Mat_VarFree(matvar);
+
matvar = Mat_VarCreate("carr_error_hz", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, carr_error_hz, 0);
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
Mat_VarFree(matvar);
@@ -1190,7 +1274,9 @@ int32_t dll_pll_veml_tracking::save_matfile()
delete[] PRN_start_sample_count;
delete[] acc_carrier_phase_rad;
delete[] carrier_doppler_hz;
+ delete[] carrier_doppler_rate_hz;
delete[] code_freq_chips;
+ delete[] code_freq_rate_chips;
delete[] carr_error_hz;
delete[] carr_error_filt_hz;
delete[] code_error_chips;
diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h
index 97f0c54cc..226a540c8 100755
--- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h
+++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h
@@ -41,6 +41,7 @@
#include
#include