1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-15 22:34:58 +00:00

Merge branch 'next' into bds_b1i_bug

This commit is contained in:
Damian Miralles 2019-03-05 19:46:20 -06:00
commit 1f9911669c
265 changed files with 1198 additions and 1352 deletions

View File

@ -32,6 +32,7 @@ add_library(pvt_adapters ${PVT_ADAPTER_SOURCES} ${PVT_ADAPTER_HEADERS})
target_link_libraries(pvt_adapters target_link_libraries(pvt_adapters
PUBLIC PUBLIC
pvt_gr_blocks pvt_gr_blocks
algorithms_libs_rtklib
core_system_parameters core_system_parameters
PRIVATE PRIVATE
gnss_sdr_flags gnss_sdr_flags

View File

@ -30,10 +30,17 @@
#include "rtklib_pvt.h" #include "rtklib_pvt.h"
#include "configuration_interface.h" #include "MATH_CONSTANTS.h" // for D2R
#include "gnss_sdr_flags.h" #include "configuration_interface.h" // for ConfigurationInterface
#include "pvt_conf.h" #include "galileo_almanac.h" // for Galileo_Almanac
#include <glog/logging.h> #include "galileo_ephemeris.h" // for Galileo_Ephemeris
#include "gnss_sdr_flags.h" // for FLAGS_RINEX_version
#include "gps_almanac.h" // for Gps_Almanac
#include "gps_ephemeris.h" // for Gps_Ephemeris
#include "pvt_conf.h" // for Pvt_Conf
#include "rtklib_rtkpos.h" // for rtkfree, rtkinit
#include <glog/logging.h> // for LOG
#include <iostream> // for operator<<
#if OLD_BOOST #if OLD_BOOST
#include <boost/math/common_factor_rt.hpp> #include <boost/math/common_factor_rt.hpp>
namespace bc = boost::math; namespace bc = boost::math;
@ -43,9 +50,6 @@ namespace bc = boost::integer;
#endif #endif
using google::LogMessage;
Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
const std::string& role, const std::string& role,
unsigned int in_streams, unsigned int in_streams,
@ -711,7 +715,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
pvt_output_parameters.udp_port = configuration->property(role + ".monitor_udp_port", 1234); pvt_output_parameters.udp_port = configuration->property(role + ".monitor_udp_port", 1234);
// make PVT object // make PVT object
pvt_ = rtklib_make_pvt_cc(in_streams_, pvt_output_parameters, rtk); pvt_ = rtklib_make_pvt_gs(in_streams_, pvt_output_parameters, rtk);
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")"; DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
if (out_streams_ > 0) if (out_streams_ > 0)
{ {

View File

@ -32,18 +32,21 @@
#ifndef GNSS_SDR_RTKLIB_PVT_H_ #ifndef GNSS_SDR_RTKLIB_PVT_H_
#define GNSS_SDR_RTKLIB_PVT_H_ #define GNSS_SDR_RTKLIB_PVT_H_
#include "galileo_almanac.h" #include "pvt_interface.h" // for PvtInterface
#include "galileo_ephemeris.h" #include "rtklib.h" // for rtk_t
#include "gps_almanac.h" #include "rtklib_pvt_gs.h" // for rtklib_pvt_gs_sptr
#include "gps_ephemeris.h" #include <gnuradio/gr_complex.h> // for gr_complex
#include "pvt_interface.h" #include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include "rtklib.h" #include <cstddef> // for size_t
#include "rtklib_pvt_cc.h" #include <ctime> // for time_t
#include <map> #include <map> // for map
#include <string> #include <string> // for string
class ConfigurationInterface; class ConfigurationInterface;
class Galileo_Almanac;
class Galileo_Ephemeris;
class Gps_Almanac;
class Gps_Ephemeris;
/*! /*!
* \brief This class implements a PvtInterface for the RTKLIB PVT block * \brief This class implements a PvtInterface for the RTKLIB PVT block
@ -99,7 +102,7 @@ public:
time_t* UTC_time) override; time_t* UTC_time) override;
private: private:
rtklib_pvt_cc_sptr pvt_; rtklib_pvt_gs_sptr pvt_;
rtk_t rtk{}; rtk_t rtk{};
std::string role_; std::string role_;
unsigned int in_streams_; unsigned int in_streams_;

View File

@ -17,11 +17,11 @@
# #
set(PVT_GR_BLOCKS_SOURCES set(PVT_GR_BLOCKS_SOURCES
rtklib_pvt_cc.cc rtklib_pvt_gs.cc
) )
set(PVT_GR_BLOCKS_HEADERS set(PVT_GR_BLOCKS_HEADERS
rtklib_pvt_cc.h rtklib_pvt_gs.h
) )
source_group(Headers FILES ${PVT_GR_BLOCKS_HEADERS}) source_group(Headers FILES ${PVT_GR_BLOCKS_HEADERS})
@ -30,12 +30,13 @@ add_library(pvt_gr_blocks ${PVT_GR_BLOCKS_SOURCES} ${PVT_GR_BLOCKS_HEADERS})
target_link_libraries(pvt_gr_blocks target_link_libraries(pvt_gr_blocks
PUBLIC PUBLIC
pvt_libs algorithms_libs_rtklib
core_system_parameters core_system_parameters
Boost::date_time Boost::date_time
Gnuradio::pmt Gnuradio::pmt
Gnuradio::runtime Gnuradio::runtime
PRIVATE PRIVATE
pvt_libs
algorithms_libs algorithms_libs
Gflags::gflags Gflags::gflags
Glog::glog Glog::glog

View File

@ -1,5 +1,5 @@
/*! /*!
* \file rtklib_pvt_cc.cc * \file rtklib_pvt_gs.cc
* \brief Interface of a Position Velocity and Time computation block * \brief Interface of a Position Velocity and Time computation block
* \author Javier Arribas, 2017. jarribas(at)cttc.es * \author Javier Arribas, 2017. jarribas(at)cttc.es
* *
@ -28,24 +28,58 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#include "rtklib_pvt_cc.h" #include "rtklib_pvt_gs.h"
#include "beidou_dnav_almanac.h"
#include "beidou_dnav_ephemeris.h"
#include "beidou_dnav_iono.h"
#include "beidou_dnav_utc_model.h"
#include "display.h" #include "display.h"
#include "galileo_almanac.h"
#include "galileo_almanac_helper.h" #include "galileo_almanac_helper.h"
#include "galileo_ephemeris.h"
#include "galileo_iono.h"
#include "galileo_utc_model.h"
#include "geojson_printer.h"
#include "glonass_gnav_almanac.h"
#include "glonass_gnav_ephemeris.h"
#include "glonass_gnav_utc_model.h"
#include "gnss_sdr_create_directory.h" #include "gnss_sdr_create_directory.h"
#include "gps_almanac.h"
#include "gps_cnav_ephemeris.h"
#include "gps_cnav_iono.h"
#include "gps_cnav_utc_model.h"
#include "gps_ephemeris.h"
#include "gps_iono.h"
#include "gps_utc_model.h"
#include "gpx_printer.h"
#include "kml_printer.h"
#include "monitor_pvt.h"
#include "monitor_pvt_udp_sink.h"
#include "nmea_printer.h"
#include "pvt_conf.h" #include "pvt_conf.h"
#include <boost/archive/xml_iarchive.hpp> #include "rinex_printer.h"
#include <boost/archive/xml_oarchive.hpp> #include "rtcm_printer.h"
#include <boost/exception/all.hpp> #include "rtklib_solver.h"
#include <boost/any.hpp> // for any_cast, any
#include <boost/archive/xml_iarchive.hpp> // for xml_iarchive
#include <boost/archive/xml_oarchive.hpp> // for xml_oarchive
#include <boost/bind/bind.hpp> // for bind_t, bind
#include <boost/exception/diagnostic_information.hpp>
#include <boost/exception/exception.hpp>
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <boost/serialization/map.hpp> #include <boost/serialization/map.hpp>
#include <glog/logging.h> #include <boost/serialization/nvp.hpp> // for nvp, make_nvp
#include <gnuradio/gr_complex.h> #include <boost/system/error_code.hpp> // for error_code
#include <gnuradio/io_signature.h> #include <glog/logging.h> // for LOG
#include <algorithm> #include <gnuradio/io_signature.h> // for io_signature
#include <exception> #include <pmt/pmt_sugar.h> // for mp
#include <fstream> #include <algorithm> // for sort, unique
#include <iostream> #include <exception> // for exception
#include <stdexcept> #include <fstream> // for ofstream
#include <iostream> // for operator<<
#include <stdexcept> // for length_error
#include <sys/ipc.h> // for IPC_CREAT
#include <sys/msg.h> // for msgctl
#if OLD_BOOST #if OLD_BOOST
#include <boost/math/common_factor_rt.hpp> #include <boost/math/common_factor_rt.hpp>
namespace bc = boost::math; namespace bc = boost::math;
@ -54,22 +88,20 @@ namespace bc = boost::math;
namespace bc = boost::integer; namespace bc = boost::integer;
#endif #endif
using google::LogMessage;
rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels,
const Pvt_Conf& conf_, const Pvt_Conf& conf_,
const rtk_t& rtk) const rtk_t& rtk)
{ {
return rtklib_pvt_cc_sptr(new rtklib_pvt_cc(nchannels, return rtklib_pvt_gs_sptr(new rtklib_pvt_gs(nchannels,
conf_, conf_,
rtk)); rtk));
} }
rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels, rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
const Pvt_Conf& conf_, const Pvt_Conf& conf_,
const rtk_t& rtk) : gr::sync_block("rtklib_pvt_cc", const rtk_t& rtk) : gr::sync_block("rtklib_pvt_gs",
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(0, 0, 0)) gr::io_signature::make(0, 0, 0))
{ {
@ -118,7 +150,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
// GPS Ephemeris data message port in // GPS Ephemeris data message port in
this->message_port_register_in(pmt::mp("telemetry")); this->message_port_register_in(pmt::mp("telemetry"));
this->set_msg_handler(pmt::mp("telemetry"), boost::bind(&rtklib_pvt_cc::msg_handler_telemetry, this, _1)); this->set_msg_handler(pmt::mp("telemetry"), boost::bind(&rtklib_pvt_gs::msg_handler_telemetry, this, _1));
// initialize kml_printer // initialize kml_printer
std::string kml_dump_filename; std::string kml_dump_filename;
@ -151,7 +183,6 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
// initialize geojson_printer // initialize geojson_printer
std::string geojson_dump_filename; std::string geojson_dump_filename;
geojson_dump_filename = d_dump_filename; geojson_dump_filename = d_dump_filename;
d_geojson_output_enabled = conf_.geojson_output_enabled; d_geojson_output_enabled = conf_.geojson_output_enabled;
if (d_geojson_output_enabled) if (d_geojson_output_enabled)
{ {
@ -336,7 +367,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
} }
rtklib_pvt_cc::~rtklib_pvt_cc() rtklib_pvt_gs::~rtklib_pvt_gs()
{ {
msgctl(sysv_msqid, IPC_RMID, nullptr); msgctl(sysv_msqid, IPC_RMID, nullptr);
try try
@ -883,7 +914,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
} }
void rtklib_pvt_cc::msg_handler_telemetry(const pmt::pmt_t& msg) void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
{ {
try try
{ {
@ -1097,43 +1128,43 @@ void rtklib_pvt_cc::msg_handler_telemetry(const pmt::pmt_t& msg)
} }
std::map<int, Gps_Ephemeris> rtklib_pvt_cc::get_gps_ephemeris_map() const std::map<int, Gps_Ephemeris> rtklib_pvt_gs::get_gps_ephemeris_map() const
{ {
return d_pvt_solver->gps_ephemeris_map; return d_pvt_solver->gps_ephemeris_map;
} }
std::map<int, Gps_Almanac> rtklib_pvt_cc::get_gps_almanac_map() const std::map<int, Gps_Almanac> rtklib_pvt_gs::get_gps_almanac_map() const
{ {
return d_pvt_solver->gps_almanac_map; return d_pvt_solver->gps_almanac_map;
} }
std::map<int, Galileo_Ephemeris> rtklib_pvt_cc::get_galileo_ephemeris_map() const std::map<int, Galileo_Ephemeris> rtklib_pvt_gs::get_galileo_ephemeris_map() const
{ {
return d_pvt_solver->galileo_ephemeris_map; return d_pvt_solver->galileo_ephemeris_map;
} }
std::map<int, Galileo_Almanac> rtklib_pvt_cc::get_galileo_almanac_map() const std::map<int, Galileo_Almanac> rtklib_pvt_gs::get_galileo_almanac_map() const
{ {
return d_pvt_solver->galileo_almanac_map; return d_pvt_solver->galileo_almanac_map;
} }
std::map<int, Beidou_Dnav_Ephemeris> rtklib_pvt_cc::get_beidou_dnav_ephemeris_map() const std::map<int, Beidou_Dnav_Ephemeris> rtklib_pvt_gs::get_beidou_dnav_ephemeris_map() const
{ {
return d_pvt_solver->beidou_dnav_ephemeris_map; return d_pvt_solver->beidou_dnav_ephemeris_map;
} }
std::map<int, Beidou_Dnav_Almanac> rtklib_pvt_cc::get_beidou_dnav_almanac_map() const std::map<int, Beidou_Dnav_Almanac> rtklib_pvt_gs::get_beidou_dnav_almanac_map() const
{ {
return d_pvt_solver->beidou_dnav_almanac_map; return d_pvt_solver->beidou_dnav_almanac_map;
} }
void rtklib_pvt_cc::clear_ephemeris() void rtklib_pvt_gs::clear_ephemeris()
{ {
d_pvt_solver->gps_ephemeris_map.clear(); d_pvt_solver->gps_ephemeris_map.clear();
d_pvt_solver->gps_almanac_map.clear(); d_pvt_solver->gps_almanac_map.clear();
@ -1144,13 +1175,13 @@ void rtklib_pvt_cc::clear_ephemeris()
} }
bool rtklib_pvt_cc::observables_pairCompare_min(const std::pair<int, Gnss_Synchro>& a, const std::pair<int, Gnss_Synchro>& b) bool rtklib_pvt_gs::observables_pairCompare_min(const std::pair<int, Gnss_Synchro>& a, const std::pair<int, Gnss_Synchro>& b)
{ {
return (a.second.Pseudorange_m) < (b.second.Pseudorange_m); return (a.second.Pseudorange_m) < (b.second.Pseudorange_m);
} }
bool rtklib_pvt_cc::send_sys_v_ttff_msg(ttff_msgbuf ttff) bool rtklib_pvt_gs::send_sys_v_ttff_msg(ttff_msgbuf ttff)
{ {
// Fill Sys V message structures // Fill Sys V message structures
int msgsend_size; int msgsend_size;
@ -1166,7 +1197,7 @@ 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) bool rtklib_pvt_gs::save_gnss_synchro_map_xml(const std::string& file_name)
{ {
if (gnss_observables_map.empty() == false) if (gnss_observables_map.empty() == false)
{ {
@ -1191,7 +1222,7 @@ bool rtklib_pvt_cc::save_gnss_synchro_map_xml(const std::string& file_name)
} }
bool rtklib_pvt_cc::load_gnss_synchro_map_xml(const std::string& file_name) bool rtklib_pvt_gs::load_gnss_synchro_map_xml(const std::string& file_name)
{ {
// load from xml (boost serialize) // load from xml (boost serialize)
std::ifstream ifs; std::ifstream ifs;
@ -1212,7 +1243,7 @@ bool rtklib_pvt_cc::load_gnss_synchro_map_xml(const std::string& file_name)
} }
std::vector<std::string> rtklib_pvt_cc::split_string(const std::string& s, char delim) const std::vector<std::string> rtklib_pvt_gs::split_string(const std::string& s, char delim) const
{ {
std::vector<std::string> v; std::vector<std::string> v;
std::stringstream ss(s); std::stringstream ss(s);
@ -1227,7 +1258,7 @@ std::vector<std::string> rtklib_pvt_cc::split_string(const std::string& s, char
} }
bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg, bool rtklib_pvt_gs::get_latest_PVT(double* longitude_deg,
double* latitude_deg, double* latitude_deg,
double* height_m, double* height_m,
double* ground_speed_kmh, double* ground_speed_kmh,
@ -1250,7 +1281,7 @@ bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
} }
int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_items, int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_items,
gr_vector_void_star& output_items __attribute__((unused))) gr_vector_void_star& output_items __attribute__((unused)))
{ {
for (int32_t epoch = 0; epoch < noutput_items; epoch++) for (int32_t epoch = 0; epoch < noutput_items; epoch++)

View File

@ -1,5 +1,5 @@
/*! /*!
* \file rtklib_pvt_cc.h * \file rtklib_pvt_gs.h
* \brief Interface of a Position Velocity and Time computation block * \brief Interface of a Position Velocity and Time computation block
* \author Javier Arribas, 2017. jarribas(at)cttc.es * \author Javier Arribas, 2017. jarribas(at)cttc.es
* *
@ -28,56 +28,61 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_RTKLIB_PVT_CC_H #ifndef GNSS_SDR_RTKLIB_PVT_GS_H
#define GNSS_SDR_RTKLIB_PVT_CC_H #define GNSS_SDR_RTKLIB_PVT_GS_H
#include "beidou_dnav_almanac.h"
#include "beidou_dnav_ephemeris.h"
#include "galileo_almanac.h"
#include "galileo_ephemeris.h"
#include "geojson_printer.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
#include "gps_almanac.h" #include "rtklib.h"
#include "gps_ephemeris.h"
#include "gpx_printer.h"
#include "kml_printer.h"
#include "monitor_pvt_udp_sink.h"
#include "nmea_printer.h"
#include "pvt_conf.h"
#include "rinex_printer.h"
#include "rtcm_printer.h"
#include "rtklib_solver.h"
#include <boost/date_time/gregorian/gregorian.hpp> #include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <gnuradio/sync_block.h> #include <boost/shared_ptr.hpp> // for boost::shared_ptr
#include <pmt/pmt.h> #include <gnuradio/sync_block.h> // for sync_block
#include <chrono> #include <gnuradio/types.h> // for gr_vector_const_void_star
#include <cstdint> #include <pmt/pmt.h> // for pmt_t
#include <map> #include <chrono> // for system_clock
#include <memory> #include <cstdint> // for int32_t
#include <string> #include <ctime> // for time_t
#include <sys/ipc.h> #include <map> // for map
#include <sys/msg.h> #include <memory> // for shared_ptr, unique_ptr
#include <sys/types.h> #include <string> // for string
#include <utility> #include <sys/types.h> // for key_t
#include <vector> #include <utility> // for pair
#include <vector> // for vector
class Beidou_Dnav_Almanac;
class Beidou_Dnav_Ephemeris;
class Galileo_Almanac;
class Galileo_Ephemeris;
class GeoJSON_Printer;
class Gps_Almanac;
class Gps_Ephemeris;
class Gpx_Printer;
class Kml_Printer;
class Monitor_Pvt_Udp_Sink;
class Nmea_Printer;
class Pvt_Conf;
class Rinex_Printer;
class Rtcm_Printer;
class Rtklib_Solver;
class rtklib_pvt_gs;
class rtklib_pvt_cc; using rtklib_pvt_gs_sptr = boost::shared_ptr<rtklib_pvt_gs>;
using rtklib_pvt_cc_sptr = boost::shared_ptr<rtklib_pvt_cc>; rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels,
const Pvt_Conf& conf_, const Pvt_Conf& conf_,
const rtk_t& rtk); const rtk_t& rtk);
/*! /*!
* \brief This class implements a block that computes the PVT solution using the RTKLIB integrated library * \brief This class implements a block that computes the PVT solution using the RTKLIB integrated library
*/ */
class rtklib_pvt_cc : public gr::sync_block class rtklib_pvt_gs : public gr::sync_block
{ {
private: private:
friend rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels, friend rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
const Pvt_Conf& conf_,
const rtk_t& rtk);
rtklib_pvt_gs(uint32_t nchannels,
const Pvt_Conf& conf_, const Pvt_Conf& conf_,
const rtk_t& rtk); const rtk_t& rtk);
@ -135,7 +140,7 @@ private:
int sysv_msqid; int sysv_msqid;
typedef struct typedef struct
{ {
long mtype; //required by sys v message long mtype; // NOLINT(google-runtime-int) required by SysV queue messaging
double ttff; double ttff;
} ttff_msgbuf; } ttff_msgbuf;
bool send_sys_v_ttff_msg(ttff_msgbuf ttff); bool send_sys_v_ttff_msg(ttff_msgbuf ttff);
@ -158,31 +163,40 @@ private:
std::vector<std::string> split_string(const std::string& s, char delim) const; std::vector<std::string> split_string(const std::string& s, char delim) const;
public: public:
rtklib_pvt_cc(uint32_t nchannels, ~rtklib_pvt_gs(); //!< Default destructor
const Pvt_Conf& conf_,
const rtk_t& rtk);
~rtklib_pvt_cc(); //!< Default destructor
/*! /*!
* \brief Get latest set of GPS ephemeris from PVT block * \brief Get latest set of GPS ephemeris from PVT block
*
*/ */
std::map<int, Gps_Ephemeris> get_gps_ephemeris_map() const; std::map<int, Gps_Ephemeris> get_gps_ephemeris_map() const;
/*!
* \brief Get latest set of GPS almanac from PVT block
*/
std::map<int, Gps_Almanac> get_gps_almanac_map() const; std::map<int, Gps_Almanac> get_gps_almanac_map() const;
/*!
* \brief Get latest set of Galileo ephemeris from PVT block
*/
std::map<int, Galileo_Ephemeris> get_galileo_ephemeris_map() const; std::map<int, Galileo_Ephemeris> get_galileo_ephemeris_map() const;
/*!
* \brief Get latest set of Galileo almanac from PVT block
*/
std::map<int, Galileo_Almanac> get_galileo_almanac_map() const; std::map<int, Galileo_Almanac> get_galileo_almanac_map() const;
/*!
* \brief Get latest set of BeiDou DNAV ephemeris from PVT block
*/
std::map<int, Beidou_Dnav_Ephemeris> get_beidou_dnav_ephemeris_map() const; std::map<int, Beidou_Dnav_Ephemeris> get_beidou_dnav_ephemeris_map() const;
/*!
* \brief Get latest set of BeiDou DNAV almanac from PVT block
*/
std::map<int, Beidou_Dnav_Almanac> get_beidou_dnav_almanac_map() const; std::map<int, Beidou_Dnav_Almanac> get_beidou_dnav_almanac_map() const;
/*! /*!
* \brief Clear all ephemeris information and the almanacs for GPS and Galileo * \brief Clear all ephemeris information and the almanacs for GPS and Galileo
*
*/ */
void clear_ephemeris(); void clear_ephemeris();

View File

@ -26,6 +26,7 @@ set(PVT_LIB_SOURCES
rinex_printer.cc rinex_printer.cc
nmea_printer.cc nmea_printer.cc
rtcm_printer.cc rtcm_printer.cc
rtcm.cc
geojson_printer.cc geojson_printer.cc
rtklib_solver.cc rtklib_solver.cc
pvt_conf.cc pvt_conf.cc
@ -41,6 +42,7 @@ set(PVT_LIB_HEADERS
rinex_printer.h rinex_printer.h
nmea_printer.h nmea_printer.h
rtcm_printer.h rtcm_printer.h
rtcm.h
geojson_printer.h geojson_printer.h
rtklib_solver.h rtklib_solver.h
pvt_conf.h pvt_conf.h
@ -59,10 +61,10 @@ target_link_libraries(pvt_libs
PUBLIC PUBLIC
Armadillo::armadillo Armadillo::armadillo
Boost::date_time Boost::date_time
algorithms_libs
algorithms_libs_rtklib algorithms_libs_rtklib
core_system_parameters core_system_parameters
PRIVATE PRIVATE
algorithms_libs
Boost::filesystem Boost::filesystem
Boost::system Boost::system
Gflags::gflags Gflags::gflags
@ -72,13 +74,20 @@ target_link_libraries(pvt_libs
target_include_directories(pvt_libs target_include_directories(pvt_libs
PUBLIC PUBLIC
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${CMAKE_SOURCE_DIR}/src/core/receiver ${CMAKE_SOURCE_DIR}/src/core/receiver
) )
target_compile_definitions(pvt_libs PRIVATE -DGNSS_SDR_VERSION="${VERSION}") target_compile_definitions(pvt_libs PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
if(OS_IS_MACOSX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang
target_compile_definitions(pvt_libs
PUBLIC
-DBOOST_ASIO_HAS_STD_STRING_VIEW
)
endif()
endif()
if(ENABLE_CLANG_TIDY) if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE) if(CLANG_TIDY_EXE)
set_target_properties(pvt_libs set_target_properties(pvt_libs

View File

@ -39,8 +39,6 @@
#include <exception> #include <exception>
#include <sstream> #include <sstream>
using google::LogMessage;
Gpx_Printer::Gpx_Printer(const std::string& base_path) Gpx_Printer::Gpx_Printer(const std::string& base_path)
{ {

View File

@ -33,7 +33,6 @@
#ifndef GNSS_SDR_GPX_PRINTER_H_ #ifndef GNSS_SDR_GPX_PRINTER_H_
#define GNSS_SDR_GPX_PRINTER_H_ #define GNSS_SDR_GPX_PRINTER_H_
#include "pvt_solution.h"
#include "rtklib_solver.h" #include "rtklib_solver.h"
#include <fstream> #include <fstream>
#include <memory> #include <memory>

View File

@ -38,8 +38,6 @@
#include <utility> #include <utility>
using google::LogMessage;
Hybrid_Ls_Pvt::Hybrid_Ls_Pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file) : Ls_Pvt() Hybrid_Ls_Pvt::Hybrid_Ls_Pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file) : Ls_Pvt()
{ {
// init empty ephemeris for all the available GNSS channels // init empty ephemeris for all the available GNSS channels

View File

@ -39,8 +39,6 @@
#include <exception> #include <exception>
#include <sstream> #include <sstream>
using google::LogMessage;
Kml_Printer::Kml_Printer(const std::string& base_path) Kml_Printer::Kml_Printer(const std::string& base_path)
{ {

View File

@ -33,7 +33,6 @@
#ifndef GNSS_SDR_KML_PRINTER_H_ #ifndef GNSS_SDR_KML_PRINTER_H_
#define GNSS_SDR_KML_PRINTER_H_ #define GNSS_SDR_KML_PRINTER_H_
#include "pvt_solution.h"
#include "rtklib_solver.h" #include "rtklib_solver.h"
#include <fstream> #include <fstream>
#include <memory> #include <memory>

View File

@ -33,13 +33,9 @@
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "geofunctions.h" #include "geofunctions.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <exception>
#include <stdexcept> #include <stdexcept>
using google::LogMessage;
Ls_Pvt::Ls_Pvt() : Pvt_Solution() Ls_Pvt::Ls_Pvt() : Pvt_Solution()
{ {
} }

View File

@ -46,9 +46,6 @@
#include <termios.h> #include <termios.h>
using google::LogMessage;
Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_file, bool flag_nmea_tty_port, std::string nmea_dump_devname, const std::string& base_path) Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_file, bool flag_nmea_tty_port, std::string nmea_dump_devname, const std::string& base_path)
{ {
nmea_base_path = base_path; nmea_base_path = base_path;

View File

@ -31,7 +31,6 @@
#ifndef GNSS_SDR_PVT_CONF_H_ #ifndef GNSS_SDR_PVT_CONF_H_
#define GNSS_SDR_PVT_CONF_H_ #define GNSS_SDR_PVT_CONF_H_
#include <cstddef>
#include <cstdint> #include <cstdint>
#include <map> #include <map>
#include <string> #include <string>

View File

@ -33,10 +33,6 @@
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "geofunctions.h" #include "geofunctions.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <exception>
using google::LogMessage;
Pvt_Solution::Pvt_Solution() Pvt_Solution::Pvt_Solution()
@ -57,6 +53,7 @@ Pvt_Solution::Pvt_Solution()
d_rx_dt_s = 0.0; d_rx_dt_s = 0.0;
} }
arma::vec Pvt_Solution::rotateSatellite(double const traveltime, const arma::vec &X_sat) arma::vec Pvt_Solution::rotateSatellite(double const traveltime, const arma::vec &X_sat)
{ {
/* /*

View File

@ -48,9 +48,6 @@
#include <vector> #include <vector>
using google::LogMessage;
Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path) Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path)
{ {
std::string base_rinex_path = base_path; std::string base_rinex_path = base_path;

View File

@ -40,9 +40,6 @@
#include <cmath> // for std::fmod #include <cmath> // for std::fmod
#include <cstdlib> // for strtol #include <cstdlib> // for strtol
#include <sstream> // for std::stringstream #include <sstream> // for std::stringstream
#include <thread>
using google::LogMessage;
Rtcm::Rtcm(uint16_t port) Rtcm::Rtcm(uint16_t port)
@ -3366,6 +3363,7 @@ std::map<std::string, int> Rtcm::gps_signal_map = [] {
gps_signal_map_["5I"] = 22; gps_signal_map_["5I"] = 22;
gps_signal_map_["5Q"] = 23; gps_signal_map_["5Q"] = 23;
gps_signal_map_["5X"] = 24; gps_signal_map_["5X"] = 24;
gps_signal_map_["L5"] = 24; // Workaround. TODO: check if it was I or Q
return gps_signal_map_; return gps_signal_map_;
}(); }();

View File

@ -43,7 +43,9 @@
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <bitset> #include <bitset>
#include <cstddef> // for size_t
#include <cstdint> #include <cstdint>
#include <cstring> // for memcpy
#include <deque> #include <deque>
#include <map> #include <map>
#include <memory> #include <memory>

View File

@ -45,9 +45,6 @@
#include <utility> #include <utility>
using google::LogMessage;
Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, const std::string& rtcm_dump_devname, bool time_tag_name, const std::string& base_path) Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, const std::string& rtcm_dump_devname, bool time_tag_name, const std::string& base_path)
{ {
boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time();

View File

@ -57,6 +57,7 @@
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "rtklib_conversions.h" #include "rtklib_conversions.h"
#include "rtklib_rtkpos.h"
#include "rtklib_solution.h" #include "rtklib_solution.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <matio.h> #include <matio.h>
@ -64,8 +65,6 @@
#include <utility> #include <utility>
using google::LogMessage;
Rtklib_Solver::Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t &rtk) Rtklib_Solver::Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t &rtk)
{ {
// init empty ephemeris for all the available GNSS channels // init empty ephemeris for all the available GNSS channels
@ -481,11 +480,13 @@ double Rtklib_Solver::get_vdop() const
return dop_[3]; return dop_[3];
} }
Monitor_Pvt Rtklib_Solver::get_monitor_pvt() const Monitor_Pvt Rtklib_Solver::get_monitor_pvt() const
{ {
return monitor_pvt; return monitor_pvt;
} }
bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_map, bool flag_averaging) bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_map, bool flag_averaging)
{ {
std::map<int, Gnss_Synchro>::const_iterator gnss_observables_iter; std::map<int, Gnss_Synchro>::const_iterator gnss_observables_iter;

View File

@ -55,16 +55,28 @@
#define GNSS_SDR_RTKLIB_SOLVER_H_ #define GNSS_SDR_RTKLIB_SOLVER_H_
#include "beidou_dnav_navigation_message.h" #include "beidou_dnav_almanac.h"
#include "beidou_dnav_ephemeris.h"
#include "beidou_dnav_iono.h"
#include "beidou_dnav_utc_model.h"
#include "galileo_almanac.h" #include "galileo_almanac.h"
#include "galileo_navigation_message.h" #include "galileo_ephemeris.h"
#include "glonass_gnav_navigation_message.h" #include "galileo_iono.h"
#include "galileo_utc_model.h"
#include "glonass_gnav_almanac.h"
#include "glonass_gnav_ephemeris.h"
#include "glonass_gnav_utc_model.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
#include "gps_cnav_navigation_message.h" #include "gps_almanac.h"
#include "gps_navigation_message.h" #include "gps_cnav_ephemeris.h"
#include "gps_cnav_iono.h"
#include "gps_cnav_utc_model.h"
#include "gps_ephemeris.h"
#include "gps_iono.h"
#include "gps_utc_model.h"
#include "monitor_pvt.h" #include "monitor_pvt.h"
#include "pvt_solution.h" #include "pvt_solution.h"
#include "rtklib_rtkpos.h" #include "rtklib.h"
#include <array> #include <array>
#include <fstream> #include <fstream>
#include <map> #include <map>
@ -89,12 +101,13 @@ private:
Monitor_Pvt monitor_pvt; Monitor_Pvt monitor_pvt;
public: public:
sol_t pvt_sol;
ssat_t pvt_ssat[MAXSAT];
Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t& rtk); Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t& rtk);
~Rtklib_Solver(); ~Rtklib_Solver();
bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging); bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging);
sol_t pvt_sol;
ssat_t pvt_ssat[MAXSAT];
double get_hdop() const; double get_hdop() const;
double get_vdop() const; double get_vdop() const;
double get_pdop() const; double get_pdop() const;

View File

@ -41,8 +41,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition( BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -37,8 +37,6 @@
#include <boost/math/distributions/exponential.hpp> #include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,

View File

@ -39,9 +39,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -37,9 +37,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -37,8 +37,6 @@
#include <boost/math/distributions/exponential.hpp> #include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition( GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,

View File

@ -37,8 +37,6 @@
#include <boost/math/distributions/exponential.hpp> #include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcquisition( GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,

View File

@ -37,8 +37,6 @@
#include <boost/math/distributions/exponential.hpp> #include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,

View File

@ -43,8 +43,6 @@
#include <boost/math/distributions/exponential.hpp> #include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,

View File

@ -39,9 +39,6 @@
#include <volk_gnsssdr/volk_gnsssdr_complex.h> #include <volk_gnsssdr/volk_gnsssdr_complex.h>
using google::LogMessage;
GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration, GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration,
const std::string& role, const std::string& role,
unsigned int in_streams, unsigned int in_streams,

View File

@ -39,9 +39,6 @@
#include <volk_gnsssdr/volk_gnsssdr_complex.h> #include <volk_gnsssdr/volk_gnsssdr_complex.h>
using google::LogMessage;
GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration, GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration,
const std::string& role, const std::string& role,
unsigned int in_streams, unsigned int in_streams,

View File

@ -41,9 +41,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -40,9 +40,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -43,9 +43,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -40,8 +40,6 @@
#include "gps_sdr_signal_processing.h" #include "gps_sdr_signal_processing.h"
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,

View File

@ -44,8 +44,6 @@
#define NUM_PRNs 32 #define NUM_PRNs 32
using google::LogMessage;
GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,

View File

@ -40,9 +40,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -38,9 +38,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -39,9 +39,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -38,9 +38,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -41,9 +41,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -41,8 +41,6 @@
#define NUM_PRNs 32 #define NUM_PRNs 32
using google::LogMessage;
GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
@ -85,6 +83,10 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
//acq_parameters.samples_per_ms = static_cast<int>(std::round(static_cast<double>(fs_in_) * 0.001)); //acq_parameters.samples_per_ms = static_cast<int>(std::round(static_cast<double>(fs_in_) * 0.001));
acq_parameters.samples_per_code = nsamples_total; acq_parameters.samples_per_code = nsamples_total;
acq_parameters.downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0);
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
acq_parameters.excludelimit = static_cast<uint32_t>(std::round(static_cast<double>(fs_in_) / GPS_L2_M_CODE_RATE_HZ));
// compute all the GPS L1 PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time // compute all the GPS L1 PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time
// a channel is assigned) // a channel is assigned)
auto* fft_if = new gr::fft::fft_complex(vector_length, true); // Direct FFT auto* fft_if = new gr::fft::fft_complex(vector_length, true); // Direct FFT
@ -220,6 +222,7 @@ void GpsL2MPcpsAcquisitionFpga::reset()
acquisition_fpga_->set_active(true); acquisition_fpga_->set_active(true);
} }
void GpsL2MPcpsAcquisitionFpga::set_state(int state) void GpsL2MPcpsAcquisitionFpga::set_state(int state)
{ {
acquisition_fpga_->set_state(state); acquisition_fpga_->set_state(state);

View File

@ -41,9 +41,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, const std::string& role,

View File

@ -42,8 +42,6 @@
#define NUM_PRNs 32 #define NUM_PRNs 32
using google::LogMessage;
GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,

View File

@ -44,7 +44,6 @@
#include <sstream> #include <sstream>
#include <utility> #include <utility>
using google::LogMessage;
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make_acquisition_caf_cc( galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(
unsigned int sampled_ms, unsigned int sampled_ms,

View File

@ -38,7 +38,6 @@
#include <sstream> #include <sstream>
#include <utility> #include <utility>
using google::LogMessage;
galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc( galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
uint32_t sampled_ms, uint32_t sampled_ms,

View File

@ -45,8 +45,6 @@
#include <cstring> #include <cstring>
using google::LogMessage;
pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_) pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_)
{ {
return pcps_acquisition_sptr(new pcps_acquisition(conf_)); return pcps_acquisition_sptr(new pcps_acquisition(conf_));

View File

@ -44,8 +44,6 @@
#include <sstream> #include <sstream>
using google::LogMessage;
pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(const Acq_Conf &conf_) pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(const Acq_Conf &conf_)
{ {
return pcps_acquisition_fine_doppler_cc_sptr( return pcps_acquisition_fine_doppler_cc_sptr(

View File

@ -39,7 +39,6 @@
#define AQ_DOWNSAMPLING_DELAY 40 // delay due to the downsampling filter in the acquisition #define AQ_DOWNSAMPLING_DELAY 40 // delay due to the downsampling filter in the acquisition
using google::LogMessage;
pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_) pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_)
{ {
@ -63,6 +62,7 @@ pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) : gr::block(
d_num_doppler_bins = 0U; d_num_doppler_bins = 0U;
d_threshold = 0.0; d_threshold = 0.0;
d_doppler_step = 0U; d_doppler_step = 0U;
d_doppler_index = 0U;
d_test_statistics = 0.0; d_test_statistics = 0.0;
d_channel = 0U; d_channel = 0U;
d_gnss_synchro = nullptr; d_gnss_synchro = nullptr;

View File

@ -44,7 +44,6 @@
extern Concurrent_Map<Gps_Acq_Assist> global_gps_acq_assist_map; extern Concurrent_Map<Gps_Acq_Assist> global_gps_acq_assist_map;
using google::LogMessage;
pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc( pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min, int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,

View File

@ -44,7 +44,6 @@
#include <sstream> #include <sstream>
#include <utility> #include <utility>
using google::LogMessage;
pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc( pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
uint32_t sampled_ms, uint32_t sampled_ms,

View File

@ -64,8 +64,6 @@
#include <utility> #include <utility>
using google::LogMessage;
pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc( pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc(
uint32_t sampled_ms, uint32_t max_dwells, uint32_t sampled_ms, uint32_t max_dwells,
uint32_t doppler_max, int64_t fs_in, uint32_t doppler_max, int64_t fs_in,

View File

@ -40,8 +40,6 @@
#include <utility> #include <utility>
using google::LogMessage;
pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc( pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
uint32_t folding_factor, uint32_t folding_factor,
uint32_t sampled_ms, uint32_t sampled_ms,

View File

@ -58,7 +58,6 @@
#include <sstream> #include <sstream>
#include <utility> #include <utility>
using google::LogMessage;
pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc( pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
uint32_t sampled_ms, uint32_t sampled_ms,

View File

@ -30,6 +30,7 @@ target_link_libraries(channel_adapters
PUBLIC PUBLIC
Gnuradio::runtime Gnuradio::runtime
channel_libs channel_libs
core_system_parameters
PRIVATE PRIVATE
Gflags::gflags Gflags::gflags
Glog::glog Glog::glog

View File

@ -30,12 +30,16 @@
*/ */
#include "channel.h" #include "channel.h"
#include "acquisition_interface.h"
#include "channel_fsm.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "telemetry_decoder_interface.h"
#include "tracking_interface.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <cstdint> #include <cstring> // for memcpy
#include <utility>
using google::LogMessage;
// Constructor // Constructor
Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::shared_ptr<AcquisitionInterface> acq, Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::shared_ptr<AcquisitionInterface> acq,
@ -158,16 +162,19 @@ gr::basic_block_sptr Channel::get_left_block()
return nullptr; return nullptr;
} }
gr::basic_block_sptr Channel::get_left_block_trk() gr::basic_block_sptr Channel::get_left_block_trk()
{ {
return trk_->get_left_block(); return trk_->get_left_block();
} }
gr::basic_block_sptr Channel::get_left_block_acq() gr::basic_block_sptr Channel::get_left_block_acq()
{ {
return acq_->get_left_block(); return acq_->get_left_block();
} }
gr::basic_block_sptr Channel::get_right_block() gr::basic_block_sptr Channel::get_right_block()
{ {
return nav_->get_right_block(); return nav_->get_right_block();
@ -198,10 +205,10 @@ void Channel::stop_channel()
LOG(WARNING) << "Invalid channel event"; LOG(WARNING) << "Invalid channel event";
return; return;
} }
DLOG(INFO) DLOG(INFO) << "Channel stop_channel()";
<< "Channel stop_channel()";
} }
void Channel::start_acquisition() void Channel::start_acquisition()
{ {
std::lock_guard<std::mutex> lk(mx); std::lock_guard<std::mutex> lk(mx);

View File

@ -35,12 +35,14 @@
#ifndef GNSS_SDR_CHANNEL_H_ #ifndef GNSS_SDR_CHANNEL_H_
#define GNSS_SDR_CHANNEL_H_ #define GNSS_SDR_CHANNEL_H_
#include "channel_fsm.h"
#include "channel_interface.h" #include "channel_interface.h"
#include "channel_msg_receiver_cc.h" #include "channel_msg_receiver_cc.h"
#include "gnss_signal.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
#include <gnuradio/block.h> #include <gnuradio/block.h>
#include <gnuradio/msg_queue.h> #include <gnuradio/msg_queue.h>
#include <cstddef>
#include <cstdint>
#include <memory> #include <memory>
#include <mutex> #include <mutex>
#include <string> #include <string>
@ -49,6 +51,7 @@ class ConfigurationInterface;
class AcquisitionInterface; class AcquisitionInterface;
class TrackingInterface; class TrackingInterface;
class TelemetryDecoderInterface; class TelemetryDecoderInterface;
class ChannelFsm;
/*! /*!
* \brief This class represents a GNSS channel. It wraps an AcquisitionInterface, * \brief This class represents a GNSS channel. It wraps an AcquisitionInterface,

View File

@ -36,8 +36,10 @@ add_library(channel_libs ${CHANNEL_FSM_SOURCES} ${CHANNEL_FSM_HEADERS})
target_link_libraries(channel_libs target_link_libraries(channel_libs
PUBLIC PUBLIC
Gnuradio::runtime Gnuradio::runtime
Gnuradio::pmt
core_system_parameters core_system_parameters
PRIVATE PRIVATE
Boost::boost
Gflags::gflags Gflags::gflags
Glog::glog Glog::glog
core_receiver core_receiver

View File

@ -32,8 +32,7 @@
#include "channel_fsm.h" #include "channel_fsm.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage;
ChannelFsm::ChannelFsm() ChannelFsm::ChannelFsm()
{ {
@ -58,13 +57,13 @@ bool ChannelFsm::Event_stop_channel()
DLOG(INFO) << "CH = " << channel_ << ". Ev stop channel"; DLOG(INFO) << "CH = " << channel_ << ". Ev stop channel";
switch (d_state) switch (d_state)
{ {
case 0: //already in stanby case 0: // already in stanby
break; break;
case 1: //acquisition case 1: // acquisition
d_state = 0; d_state = 0;
stop_acquisition(); stop_acquisition();
break; break;
case 2: //tracking case 2: // tracking
d_state = 0; d_state = 0;
stop_tracking(); stop_tracking();
break; break;
@ -74,6 +73,7 @@ bool ChannelFsm::Event_stop_channel()
return true; return true;
} }
bool ChannelFsm::Event_start_acquisition() bool ChannelFsm::Event_start_acquisition()
{ {
std::lock_guard<std::mutex> lk(mx); std::lock_guard<std::mutex> lk(mx);

View File

@ -33,7 +33,6 @@
#define GNSS_SDR_CHANNEL_FSM_H #define GNSS_SDR_CHANNEL_FSM_H
#include "acquisition_interface.h" #include "acquisition_interface.h"
#include "telemetry_decoder_interface.h"
#include "tracking_interface.h" #include "tracking_interface.h"
#include <gnuradio/msg_queue.h> #include <gnuradio/msg_queue.h>
#include <cstdint> #include <cstdint>
@ -55,7 +54,7 @@ public:
void set_queue(gr::msg_queue::sptr queue); void set_queue(gr::msg_queue::sptr queue);
void set_channel(uint32_t channel); void set_channel(uint32_t channel);
//FSM EVENTS // FSM EVENTS
bool Event_start_acquisition(); bool Event_start_acquisition();
bool Event_valid_acquisition(); bool Event_valid_acquisition();
bool Event_stop_channel(); bool Event_stop_channel();
@ -79,4 +78,4 @@ private:
std::mutex mx; std::mutex mx;
}; };
#endif /*GNSS_SDR_CHANNEL_FSM_H*/ #endif // GNSS_SDR_CHANNEL_FSM_H

View File

@ -30,12 +30,13 @@
#include "channel_msg_receiver_cc.h" #include "channel_msg_receiver_cc.h"
#include <boost/any.hpp>
#include <boost/bind.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/gr_complex.h> #include <gnuradio/gr_complex.h>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <cstdint> #include <cstdint>
#include <utility>
using google::LogMessage;
channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat) channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat)
@ -44,6 +45,19 @@ channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<Channe
} }
channel_msg_receiver_cc::channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat) : gr::block("channel_msg_receiver_cc", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
{
this->message_port_register_in(pmt::mp("events"));
this->set_msg_handler(pmt::mp("events"), boost::bind(&channel_msg_receiver_cc::msg_handler_events, this, _1));
d_channel_fsm = std::move(channel_fsm);
d_repeat = repeat;
}
channel_msg_receiver_cc::~channel_msg_receiver_cc() = default;
void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg) void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
{ {
bool result = false; bool result = false;
@ -82,16 +96,3 @@ void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
LOG(WARNING) << "msg_handler_telemetry invalid event"; LOG(WARNING) << "msg_handler_telemetry invalid event";
} }
} }
channel_msg_receiver_cc::channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat) : gr::block("channel_msg_receiver_cc", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
{
this->message_port_register_in(pmt::mp("events"));
this->set_msg_handler(pmt::mp("events"), boost::bind(&channel_msg_receiver_cc::msg_handler_events, this, _1));
d_channel_fsm = std::move(channel_fsm);
d_repeat = repeat;
}
channel_msg_receiver_cc::~channel_msg_receiver_cc() = default;

View File

@ -33,6 +33,8 @@
#include "channel_fsm.h" #include "channel_fsm.h"
#include <gnuradio/block.h> #include <gnuradio/block.h>
#include <pmt/pmt.h>
#include <memory>
class channel_msg_receiver_cc; class channel_msg_receiver_cc;

View File

@ -30,12 +30,11 @@
*/ */
#include "array_signal_conditioner.h" #include "array_signal_conditioner.h"
#include "configuration_interface.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility> #include <utility>
using google::LogMessage;
// Constructor // Constructor
ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configuration, ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configuration,
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> data_type_adapt,

View File

@ -34,14 +34,14 @@
#include "gnss_block_interface.h" #include "gnss_block_interface.h"
#include <gnuradio/msg_queue.h> #include <gnuradio/block.h>
#include <cstddef>
#include <memory>
#include <string> #include <string>
class ConfigurationInterface; class ConfigurationInterface;
class AcquisitionInterface;
class TrackingInterface;
class TelemetryDecoderInterface;
/*! /*!
* \brief This class wraps blocks to change data_type_adapter, input_filter and resampler * \brief This class wraps blocks to change data_type_adapter, input_filter and resampler

View File

@ -30,12 +30,11 @@
*/ */
#include "signal_conditioner.h" #include "signal_conditioner.h"
#include "configuration_interface.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility> #include <utility>
using google::LogMessage;
// Constructor // Constructor
SignalConditioner::SignalConditioner(ConfigurationInterface *configuration, SignalConditioner::SignalConditioner(ConfigurationInterface *configuration,
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> data_type_adapt,

View File

@ -33,12 +33,12 @@
#define GNSS_SDR_SIGNAL_CONDITIONER_H_ #define GNSS_SDR_SIGNAL_CONDITIONER_H_
#include "gnss_block_interface.h" #include "gnss_block_interface.h"
#include <gnuradio/block.h>
#include <cstddef>
#include <memory>
#include <string> #include <string>
class ConfigurationInterface; class ConfigurationInterface;
class AcquisitionInterface;
class TrackingInterface;
class TelemetryDecoderInterface;
/*! /*!
* \brief This class wraps blocks to change data_type_adapter, input_filter and resampler * \brief This class wraps blocks to change data_type_adapter, input_filter and resampler

View File

@ -35,8 +35,6 @@
#include <utility> #include <utility>
using google::LogMessage;
ByteToShort::ByteToShort(ConfigurationInterface* configuration, std::string role, ByteToShort::ByteToShort(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
{ {

View File

@ -34,7 +34,6 @@
#include <glog/logging.h> #include <glog/logging.h>
#include <volk/volk.h> #include <volk/volk.h>
using google::LogMessage;
IbyteToCbyte::IbyteToCbyte(ConfigurationInterface* configuration, const std::string& role, IbyteToCbyte::IbyteToCbyte(ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -32,7 +32,6 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
IbyteToComplex::IbyteToComplex(ConfigurationInterface* configuration, const std::string& role, IbyteToComplex::IbyteToComplex(ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -35,8 +35,6 @@
#include <volk/volk.h> #include <volk/volk.h>
using google::LogMessage;
IbyteToCshort::IbyteToCshort(ConfigurationInterface* configuration, const std::string& role, IbyteToCshort::IbyteToCshort(ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {

View File

@ -32,7 +32,6 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, const std::string& role, IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -34,7 +34,6 @@
#include <glog/logging.h> #include <glog/logging.h>
#include <volk/volk.h> #include <volk/volk.h>
using google::LogMessage;
IshortToCshort::IshortToCshort(ConfigurationInterface* configuration, const std::string& role, IshortToCshort::IshortToCshort(ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -35,8 +35,6 @@
#include <gnuradio/blocks/file_sink.h> #include <gnuradio/blocks/file_sink.h>
using google::LogMessage;
BeamformerFilter::BeamformerFilter( BeamformerFilter::BeamformerFilter(
ConfigurationInterface* configuration, const std::string& role, ConfigurationInterface* configuration, const std::string& role,
unsigned int in_stream, unsigned int out_stream) : role_(role), in_stream_(in_stream), out_stream_(out_stream) unsigned int in_stream, unsigned int out_stream) : role_(role), in_stream_(in_stream), out_stream_(out_stream)

View File

@ -37,8 +37,6 @@
#include <utility> #include <utility>
using google::LogMessage;
FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role, FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
{ {

View File

@ -38,7 +38,6 @@
#include <volk/volk.h> #include <volk/volk.h>
#include <utility> #include <utility>
using google::LogMessage;
FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration, std::string role, FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -36,8 +36,6 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
NotchFilter::NotchFilter(ConfigurationInterface* configuration, const std::string& role, NotchFilter::NotchFilter(ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {

View File

@ -36,7 +36,6 @@
#include <glog/logging.h> #include <glog/logging.h>
#include <cmath> #include <cmath>
using google::LogMessage;
NotchFilterLite::NotchFilterLite(ConfigurationInterface* configuration, const std::string& role, NotchFilterLite::NotchFilterLite(ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -37,7 +37,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
using google::LogMessage;
PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration, std::string role, PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)

View File

@ -40,7 +40,6 @@ set(GNSS_SPLIBS_SOURCES
conjugate_ic.cc conjugate_ic.cc
gnss_sdr_create_directory.cc gnss_sdr_create_directory.cc
geofunctions.cc geofunctions.cc
rtcm.cc
) )
set(GNSS_SPLIBS_HEADERS set(GNSS_SPLIBS_HEADERS
@ -66,7 +65,6 @@ set(GNSS_SPLIBS_HEADERS
gnss_sdr_create_directory.h gnss_sdr_create_directory.h
gnss_circular_deque.h gnss_circular_deque.h
geofunctions.h geofunctions.h
rtcm.h
) )
if(ENABLE_FPGA) if(ENABLE_FPGA)
@ -114,20 +112,18 @@ target_link_libraries(algorithms_libs
Gflags::gflags Gflags::gflags
Gnuradio::runtime Gnuradio::runtime
Gnuradio::blocks Gnuradio::blocks
Volk::volk ${ORC_LIBRARIES}
Volkgnsssdr::volkgnsssdr
core_system_parameters
${OPT_LIBRARIES} ${OPT_LIBRARIES}
PRIVATE PRIVATE
core_system_parameters
Volk::volk ${ORC_LIBRARIES}
Volkgnsssdr::volkgnsssdr
Boost::filesystem Boost::filesystem
Gflags::gflags
Glog::glog Glog::glog
) )
target_include_directories(algorithms_libs target_include_directories(algorithms_libs
PUBLIC PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces ${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
) )
target_compile_definitions(algorithms_libs target_compile_definitions(algorithms_libs
@ -139,15 +135,6 @@ set_property(TARGET algorithms_libs
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
) )
if(OS_IS_MACOSX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang
target_compile_definitions(algorithms_libs
PUBLIC
-DBOOST_ASIO_HAS_STD_STRING_VIEW
)
endif()
endif()
if(ENABLE_CLANG_TIDY) if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE) if(CLANG_TIDY_EXE)
set_target_properties(algorithms_libs set_target_properties(algorithms_libs

View File

@ -31,7 +31,10 @@
#include "byte_x2_to_complex_byte.h" #include "byte_x2_to_complex_byte.h"
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <volk/volk.h> #include <volk_gnsssdr/volk_gnsssdr.h>
#include <algorithm> // for max
#include <complex> // for complex
#include <cstdint> // for int8_t
byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte() byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte()
@ -44,7 +47,7 @@ byte_x2_to_complex_byte::byte_x2_to_complex_byte() : sync_block("byte_x2_to_comp
gr::io_signature::make(2, 2, sizeof(int8_t)), // int8_t, defined in stdint.h and included in volk.h (signed char) gr::io_signature::make(2, 2, sizeof(int8_t)), // int8_t, defined in stdint.h and included in volk.h (signed char)
gr::io_signature::make(1, 1, sizeof(lv_8sc_t))) // lv_8sc_t is a Volk's typedef for std::complex<signed char> gr::io_signature::make(1, 1, sizeof(lv_8sc_t))) // lv_8sc_t is a Volk's typedef for std::complex<signed char>
{ {
const int alignment_multiple = volk_get_alignment() / sizeof(lv_8sc_t); const int alignment_multiple = volk_gnsssdr_get_alignment() / sizeof(lv_8sc_t);
set_alignment(std::max(1, alignment_multiple)); set_alignment(std::max(1, alignment_multiple));
} }

View File

@ -34,6 +34,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h> #include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class byte_x2_to_complex_byte; class byte_x2_to_complex_byte;
@ -49,10 +50,9 @@ class byte_x2_to_complex_byte : public gr::sync_block
{ {
private: private:
friend byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte(); friend byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte();
public:
byte_x2_to_complex_byte(); byte_x2_to_complex_byte();
public:
int work(int noutput_items, int work(int noutput_items,
gr_vector_const_void_star &input_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items); gr_vector_void_star &output_items);

View File

@ -32,6 +32,7 @@
#include "complex_byte_to_float_x2.h" #include "complex_byte_to_float_x2.h"
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <volk/volk.h> #include <volk/volk.h>
#include <algorithm> // for max
complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2() complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2()

View File

@ -34,6 +34,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h> #include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class complex_byte_to_float_x2; class complex_byte_to_float_x2;
@ -49,10 +50,9 @@ class complex_byte_to_float_x2 : public gr::sync_block
{ {
private: private:
friend complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2(); friend complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2();
public:
complex_byte_to_float_x2(); complex_byte_to_float_x2();
public:
int work(int noutput_items, int work(int noutput_items,
gr_vector_const_void_star &input_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items); gr_vector_void_star &output_items);

View File

@ -32,7 +32,7 @@
#include "complex_float_to_complex_byte.h" #include "complex_float_to_complex_byte.h"
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <volk_gnsssdr/volk_gnsssdr.h> #include <volk_gnsssdr/volk_gnsssdr.h>
#include <algorithm> // for max
complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte() complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte()
{ {

View File

@ -33,6 +33,8 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h> #include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class complex_float_to_complex_byte; class complex_float_to_complex_byte;
@ -47,10 +49,9 @@ class complex_float_to_complex_byte : public gr::sync_block
{ {
private: private:
friend complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte(); friend complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte();
public:
complex_float_to_complex_byte(); complex_float_to_complex_byte();
public:
int work(int noutput_items, int work(int noutput_items,
gr_vector_const_void_star &input_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items); gr_vector_void_star &output_items);

View File

@ -31,6 +31,7 @@
#include "conjugate_cc.h" #include "conjugate_cc.h"
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <volk/volk.h> #include <volk/volk.h>
#include <algorithm> // for max
conjugate_cc_sptr make_conjugate_cc() conjugate_cc_sptr make_conjugate_cc()

View File

@ -33,6 +33,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h> #include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class conjugate_cc; class conjugate_cc;
@ -48,10 +49,9 @@ class conjugate_cc : public gr::sync_block
{ {
private: private:
friend conjugate_cc_sptr make_conjugate_cc(); friend conjugate_cc_sptr make_conjugate_cc();
public:
conjugate_cc(); conjugate_cc();
public:
int work(int noutput_items, int work(int noutput_items,
gr_vector_const_void_star &input_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items); gr_vector_void_star &output_items);

View File

@ -31,6 +31,7 @@
#include "conjugate_ic.h" #include "conjugate_ic.h"
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <volk_gnsssdr/volk_gnsssdr.h> #include <volk_gnsssdr/volk_gnsssdr.h>
#include <algorithm> // for max
conjugate_ic_sptr make_conjugate_ic() conjugate_ic_sptr make_conjugate_ic()

View File

@ -33,6 +33,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h> #include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class conjugate_ic; class conjugate_ic;
@ -48,10 +49,9 @@ class conjugate_ic : public gr::sync_block
{ {
private: private:
friend conjugate_ic_sptr make_conjugate_ic(); friend conjugate_ic_sptr make_conjugate_ic();
public:
conjugate_ic(); conjugate_ic();
public:
int work(int noutput_items, int work(int noutput_items,
gr_vector_const_void_star &input_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items); gr_vector_void_star &output_items);

View File

@ -31,7 +31,7 @@
#include "conjugate_sc.h" #include "conjugate_sc.h"
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <volk_gnsssdr/volk_gnsssdr.h> #include <volk_gnsssdr/volk_gnsssdr.h>
#include <algorithm> // for max
conjugate_sc_sptr make_conjugate_sc() conjugate_sc_sptr make_conjugate_sc()
{ {

View File

@ -33,6 +33,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h> #include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class conjugate_sc; class conjugate_sc;
@ -48,10 +49,9 @@ class conjugate_sc : public gr::sync_block
{ {
private: private:
friend conjugate_sc_sptr make_conjugate_sc(); friend conjugate_sc_sptr make_conjugate_sc();
public:
conjugate_sc(); conjugate_sc();
public:
int work(int noutput_items, int work(int noutput_items,
gr_vector_const_void_star &input_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items); gr_vector_void_star &output_items);

View File

@ -32,6 +32,7 @@
#include "cshort_to_float_x2.h" #include "cshort_to_float_x2.h"
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <volk/volk.h> #include <volk/volk.h>
#include <algorithm> // for max
cshort_to_float_x2_sptr make_cshort_to_float_x2() cshort_to_float_x2_sptr make_cshort_to_float_x2()

View File

@ -34,6 +34,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <gnuradio/sync_block.h> #include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class cshort_to_float_x2; class cshort_to_float_x2;
@ -49,10 +50,9 @@ class cshort_to_float_x2 : public gr::sync_block
{ {
private: private:
friend cshort_to_float_x2_sptr make_cshort_to_float_x2(); friend cshort_to_float_x2_sptr make_cshort_to_float_x2();
public:
cshort_to_float_x2(); cshort_to_float_x2();
public:
int work(int noutput_items, int work(int noutput_items,
gr_vector_const_void_star &input_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items); gr_vector_void_star &output_items);

View File

@ -131,6 +131,12 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
{ {
_dest[(i + delay) % _samplesPerCode] = _code[i]; _dest[(i + delay) % _samplesPerCode] = _code[i];
} }
if (_fs != _codeFreqBasis)
delete[] _code; {
free(_code);
}
else
{
delete[] _code;
}
} }

View File

@ -40,7 +40,6 @@
#include <string> #include <string>
#include <sys/mman.h> // libraries used by the GIPO #include <sys/mman.h> // libraries used by the GIPO
using google::LogMessage;
#define PAGE_SIZE 0x10000 // default page size for the multicorrelator memory map #define PAGE_SIZE 0x10000 // default page size for the multicorrelator memory map
#define TEST_REG_SANITY_CHECK 0x55AA // value to check the presence of the test register (to detect the hw) #define TEST_REG_SANITY_CHECK 0x55AA // value to check the presence of the test register (to detect the hw)

View File

@ -33,10 +33,11 @@
#include "pass_through.h" #include "pass_through.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <volk/volk.h> #include <gnuradio/gr_complex.h>
#include <complex> #include <volk/volk_complex.h>
#include <cstdint> // for int8_t
#include <ostream> // for operator<<
using google::LogMessage;
Pass_Through::Pass_Through(ConfigurationInterface* configuration, const std::string& role, Pass_Through::Pass_Through(ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int in_streams,

View File

@ -38,7 +38,8 @@
#include "conjugate_sc.h" #include "conjugate_sc.h"
#include "gnss_block_interface.h" #include "gnss_block_interface.h"
#include <gnuradio/blocks/copy.h> #include <gnuradio/blocks/copy.h>
#include <gnuradio/hier_block2.h> #include <gnuradio/runtime_types.h>
#include <cstddef>
#include <string> #include <string>

View File

@ -66,9 +66,8 @@ source_group(Headers FILES ${RTKLIB_LIB_HEADERS})
add_library(algorithms_libs_rtklib ${RTKLIB_LIB_SOURCES} ${RTKLIB_LIB_HEADERS}) add_library(algorithms_libs_rtklib ${RTKLIB_LIB_SOURCES} ${RTKLIB_LIB_HEADERS})
target_link_libraries(algorithms_libs_rtklib target_link_libraries(algorithms_libs_rtklib
PUBLIC
core_system_parameters
PRIVATE PRIVATE
core_system_parameters
Gflags::gflags Gflags::gflags
Glog::glog Glog::glog
) )

View File

@ -29,7 +29,20 @@
*/ */
#include "rtklib_conversions.h" #include "rtklib_conversions.h"
#include "MATH_CONSTANTS.h" // for PI, PI_2
#include "beidou_dnav_ephemeris.h" // for Beidou_Dnav_Ephemeris
#include "galileo_almanac.h" // for Galileo_Almanac
#include "galileo_ephemeris.h" // for Galileo_Ephemeris
#include "glonass_gnav_ephemeris.h" // for Glonass_Gnav_Ephemeris
#include "glonass_gnav_utc_model.h" // for Glonass_Gnav_Utc_Model
#include "gnss_obs_codes.h" // for CODE_L1C, CODE_L2S, CODE_L5X
#include "gnss_synchro.h" // for Gnss_Synchro
#include "gps_almanac.h" // for Gps_Almanac
#include "gps_cnav_ephemeris.h" // for Gps_CNAV_Ephemeris
#include "gps_ephemeris.h" // for Gps_Ephemeris
#include "rtklib_rtkcmn.h" #include "rtklib_rtkcmn.h"
#include <cmath>
#include <cstdint>
obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band) obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band)
{ {

Some files were not shown because too many files have changed in this diff Show More