mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Improve const correctness, fix string comparisons
This commit is contained in:
		| @@ -49,30 +49,10 @@ namespace bc = boost::integer; | |||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
|  |  | ||||||
| bool RtklibPvt::get_latest_PVT(double* longitude_deg, |  | ||||||
|     double* latitude_deg, |  | ||||||
|     double* height_m, |  | ||||||
|     double* ground_speed_kmh, |  | ||||||
|     double* course_over_ground_deg, |  | ||||||
|     time_t* UTC_time) |  | ||||||
| { |  | ||||||
|     return pvt_->get_latest_PVT(longitude_deg, |  | ||||||
|         latitude_deg, |  | ||||||
|         height_m, |  | ||||||
|         ground_speed_kmh, |  | ||||||
|         course_over_ground_deg, |  | ||||||
|         UTC_time); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| void RtklibPvt::clear_ephemeris() |  | ||||||
| { |  | ||||||
|     pvt_->clear_ephemeris(); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, | RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, | ||||||
|     std::string role, |     const std::string& role, | ||||||
|     unsigned int in_streams, |     unsigned int in_streams, | ||||||
|     unsigned int out_streams) : role_(role), |     unsigned int out_streams) : role_(std::move(role)), | ||||||
|                                 in_streams_(in_streams), |                                 in_streams_(in_streams), | ||||||
|                                 out_streams_(out_streams) |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
| @@ -537,6 +517,28 @@ RtklibPvt::~RtklibPvt() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | bool RtklibPvt::get_latest_PVT(double* longitude_deg, | ||||||
|  |     double* latitude_deg, | ||||||
|  |     double* height_m, | ||||||
|  |     double* ground_speed_kmh, | ||||||
|  |     double* course_over_ground_deg, | ||||||
|  |     time_t* UTC_time) | ||||||
|  | { | ||||||
|  |     return pvt_->get_latest_PVT(longitude_deg, | ||||||
|  |         latitude_deg, | ||||||
|  |         height_m, | ||||||
|  |         ground_speed_kmh, | ||||||
|  |         course_over_ground_deg, | ||||||
|  |         UTC_time); | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void RtklibPvt::clear_ephemeris() | ||||||
|  | { | ||||||
|  |     pvt_->clear_ephemeris(); | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| std::map<int, Gps_Ephemeris> RtklibPvt::get_gps_ephemeris() const | std::map<int, Gps_Ephemeris> RtklibPvt::get_gps_ephemeris() const | ||||||
| { | { | ||||||
|     return pvt_->get_gps_ephemeris_map(); |     return pvt_->get_gps_ephemeris_map(); | ||||||
|   | |||||||
| @@ -46,7 +46,7 @@ class RtklibPvt : public PvtInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     RtklibPvt(ConfigurationInterface* configuration, |     RtklibPvt(ConfigurationInterface* configuration, | ||||||
|         std::string role, |         const std::string& role, | ||||||
|         unsigned int in_streams, |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,11 +29,11 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "rtklib_pvt_cc.h" | #include "rtklib_pvt_cc.h" | ||||||
|  | #include "display.h" | ||||||
| #include "galileo_almanac.h" | #include "galileo_almanac.h" | ||||||
| #include "galileo_almanac_helper.h" | #include "galileo_almanac_helper.h" | ||||||
| #include "pvt_conf.h" |  | ||||||
| #include "display.h" |  | ||||||
| #include "gnss_sdr_create_directory.h" | #include "gnss_sdr_create_directory.h" | ||||||
|  | #include "pvt_conf.h" | ||||||
| #include <boost/archive/xml_oarchive.hpp> | #include <boost/archive/xml_oarchive.hpp> | ||||||
| #include <boost/archive/xml_iarchive.hpp> | #include <boost/archive/xml_iarchive.hpp> | ||||||
| #include <boost/exception/all.hpp> | #include <boost/exception/all.hpp> | ||||||
| @@ -59,7 +59,7 @@ using google::LogMessage; | |||||||
|  |  | ||||||
| rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels, | rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels, | ||||||
|     const Pvt_Conf& conf_, |     const Pvt_Conf& conf_, | ||||||
|     rtk_t& rtk) |     const rtk_t& rtk) | ||||||
| { | { | ||||||
|     return rtklib_pvt_cc_sptr(new rtklib_pvt_cc(nchannels, |     return rtklib_pvt_cc_sptr(new rtklib_pvt_cc(nchannels, | ||||||
|         conf_, |         conf_, | ||||||
| @@ -268,9 +268,9 @@ void rtklib_pvt_cc::clear_ephemeris() | |||||||
|  |  | ||||||
| rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels, | rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels, | ||||||
|     const Pvt_Conf& conf_, |     const Pvt_Conf& conf_, | ||||||
|     rtk_t& rtk) : gr::sync_block("rtklib_pvt_cc", |     const rtk_t& rtk) : gr::sync_block("rtklib_pvt_cc", | ||||||
|                       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)) | ||||||
| { | { | ||||||
|     d_output_rate_ms = conf_.output_rate_ms; |     d_output_rate_ms = conf_.output_rate_ms; | ||||||
|     d_display_rate_ms = conf_.display_rate_ms; |     d_display_rate_ms = conf_.display_rate_ms; | ||||||
| @@ -858,7 +858,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_cc::save_gnss_synchro_map_xml(const std::string& file_name) | ||||||
| { | { | ||||||
|     if (gnss_observables_map.empty() == false) |     if (gnss_observables_map.empty() == false) | ||||||
|         { |         { | ||||||
| @@ -885,7 +885,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_cc::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; | ||||||
|   | |||||||
| @@ -59,7 +59,7 @@ typedef boost::shared_ptr<rtklib_pvt_cc> rtklib_pvt_cc_sptr; | |||||||
|  |  | ||||||
| rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t n_channels, | rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t n_channels, | ||||||
|     const Pvt_Conf& conf_, |     const Pvt_Conf& conf_, | ||||||
|     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 | ||||||
| @@ -69,7 +69,7 @@ class rtklib_pvt_cc : public gr::sync_block | |||||||
| private: | private: | ||||||
|     friend rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels, |     friend rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels, | ||||||
|         const Pvt_Conf& conf_, |         const Pvt_Conf& conf_, | ||||||
|         rtk_t& rtk); |         const rtk_t& rtk); | ||||||
|  |  | ||||||
|     void msg_handler_telemetry(pmt::pmt_t msg); |     void msg_handler_telemetry(pmt::pmt_t msg); | ||||||
|  |  | ||||||
| @@ -131,9 +131,9 @@ private: | |||||||
|     bool send_sys_v_ttff_msg(ttff_msgbuf ttff); |     bool send_sys_v_ttff_msg(ttff_msgbuf ttff); | ||||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; |     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||||
|  |  | ||||||
|     bool save_gnss_synchro_map_xml(const std::string file_name);  //debug helper function |     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 |     bool load_gnss_synchro_map_xml(const std::string& file_name);  //debug helper function | ||||||
|  |  | ||||||
|     bool d_xml_storage; |     bool d_xml_storage; | ||||||
|     std::string xml_base_path; |     std::string xml_base_path; | ||||||
| @@ -147,7 +147,7 @@ private: | |||||||
| public: | public: | ||||||
|     rtklib_pvt_cc(uint32_t nchannels, |     rtklib_pvt_cc(uint32_t nchannels, | ||||||
|         const Pvt_Conf& conf_, |         const Pvt_Conf& conf_, | ||||||
|         rtk_t& rtk); |         const rtk_t& rtk); | ||||||
|  |  | ||||||
|     /*! |     /*! | ||||||
|      * \brief Get latest set of ephemeris from PVT block |      * \brief Get latest set of ephemeris from PVT block | ||||||
|   | |||||||
| @@ -63,7 +63,7 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, 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 | ||||||
|     d_nchannels = nchannels; |     d_nchannels = nchannels; | ||||||
|   | |||||||
| @@ -87,7 +87,7 @@ private: | |||||||
| public: | public: | ||||||
|     sol_t pvt_sol; |     sol_t pvt_sol; | ||||||
|     ssat_t pvt_ssat[MAXSAT]; |     ssat_t pvt_ssat[MAXSAT]; | ||||||
|     rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, 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); | ||||||
|   | |||||||
| @@ -30,7 +30,6 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "galileo_e1_pcps_8ms_ambiguous_acquisition.h" | #include "galileo_e1_pcps_8ms_ambiguous_acquisition.h" | ||||||
| #include <boost/lexical_cast.hpp> |  | ||||||
| #include <boost/math/distributions/exponential.hpp> | #include <boost/math/distributions/exponential.hpp> | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
| #include "galileo_e1_signal_processing.h" | #include "galileo_e1_signal_processing.h" | ||||||
| @@ -40,12 +39,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GalileoE1Pcps8msAmbiguousAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( | GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
| @@ -56,7 +57,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( | |||||||
|     item_type_ = configuration_->property(role + ".item_type", |     item_type_ = configuration_->property(role + ".item_type", | ||||||
|         default_item_type); |         default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     dump_ = configuration_->property(role + ".dump", false); |     dump_ = configuration_->property(role + ".dump", false); | ||||||
|     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); |     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); | ||||||
| @@ -86,7 +87,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( | |||||||
|  |  | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = galileo_pcps_8ms_make_acquisition_cc(sampled_ms_, max_dwells_, |             acquisition_cc_ = galileo_pcps_8ms_make_acquisition_cc(sampled_ms_, max_dwells_, | ||||||
| @@ -107,7 +108,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -125,10 +126,15 @@ GalileoE1Pcps8msAmbiguousAcquisition::~GalileoE1Pcps8msAmbiguousAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GalileoE1Pcps8msAmbiguousAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GalileoE1Pcps8msAmbiguousAcquisition::set_channel(unsigned int channel) | void GalileoE1Pcps8msAmbiguousAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_channel(channel_); |             acquisition_cc_->set_channel(channel_); | ||||||
|         } |         } | ||||||
| @@ -137,7 +143,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GalileoE1Pcps8msAmbiguousAcquisition::set_threshold(float threshold) | void GalileoE1Pcps8msAmbiguousAcquisition::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); |     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); | ||||||
|  |  | ||||||
| @@ -152,7 +158,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_threshold(float threshold) | |||||||
|  |  | ||||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; |     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_threshold(threshold_); |             acquisition_cc_->set_threshold(threshold_); | ||||||
|         } |         } | ||||||
| @@ -163,7 +169,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_doppler_max(unsigned int doppler_ | |||||||
| { | { | ||||||
|     doppler_max_ = doppler_max; |     doppler_max_ = doppler_max; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_max(doppler_max_); |             acquisition_cc_->set_doppler_max(doppler_max_); | ||||||
|         } |         } | ||||||
| @@ -173,7 +179,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_doppler_max(unsigned int doppler_ | |||||||
| void GalileoE1Pcps8msAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | void GalileoE1Pcps8msAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | ||||||
| { | { | ||||||
|     doppler_step_ = doppler_step; |     doppler_step_ = doppler_step; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_step(doppler_step_); |             acquisition_cc_->set_doppler_step(doppler_step_); | ||||||
|         } |         } | ||||||
| @@ -184,7 +190,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_gnss_synchro( | |||||||
|     Gnss_Synchro* gnss_synchro) |     Gnss_Synchro* gnss_synchro) | ||||||
| { | { | ||||||
|     gnss_synchro_ = gnss_synchro; |     gnss_synchro_ = gnss_synchro; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); |             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||||
|         } |         } | ||||||
| @@ -193,7 +199,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_gnss_synchro( | |||||||
|  |  | ||||||
| signed int GalileoE1Pcps8msAmbiguousAcquisition::mag() | signed int GalileoE1Pcps8msAmbiguousAcquisition::mag() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_cc_->mag(); |             return acquisition_cc_->mag(); | ||||||
|         } |         } | ||||||
| @@ -213,10 +219,10 @@ void GalileoE1Pcps8msAmbiguousAcquisition::init() | |||||||
|  |  | ||||||
| void GalileoE1Pcps8msAmbiguousAcquisition::set_local_code() | void GalileoE1Pcps8msAmbiguousAcquisition::set_local_code() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             bool cboc = configuration_->property( |             bool cboc = configuration_->property( | ||||||
|                 "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false); |                 "Acquisition" + std::to_string(channel_) + ".cboc", false); | ||||||
|  |  | ||||||
|             std::complex<float>* code = new std::complex<float>[code_length_]; |             std::complex<float>* code = new std::complex<float>[code_length_]; | ||||||
|  |  | ||||||
| @@ -238,7 +244,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_local_code() | |||||||
|  |  | ||||||
| void GalileoE1Pcps8msAmbiguousAcquisition::reset() | void GalileoE1Pcps8msAmbiguousAcquisition::reset() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_active(true); |             acquisition_cc_->set_active(true); | ||||||
|         } |         } | ||||||
| @@ -267,7 +273,7 @@ float GalileoE1Pcps8msAmbiguousAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GalileoE1Pcps8msAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | void GalileoE1Pcps8msAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
| @@ -276,7 +282,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| void GalileoE1Pcps8msAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | void GalileoE1Pcps8msAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -48,7 +48,8 @@ class GalileoE1Pcps8msAmbiguousAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GalileoE1Pcps8msAmbiguousAcquisition(ConfigurationInterface* configuration, |     GalileoE1Pcps8msAmbiguousAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GalileoE1Pcps8msAmbiguousAcquisition(); |     virtual ~GalileoE1Pcps8msAmbiguousAcquisition(); | ||||||
| @@ -144,7 +145,7 @@ private: | |||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|     std::complex<float>* code_; |     std::complex<float>* code_; | ||||||
|   | |||||||
| @@ -35,20 +35,20 @@ | |||||||
| #include "Galileo_E1.h" | #include "Galileo_E1.h" | ||||||
| #include "gnss_sdr_flags.h" | #include "gnss_sdr_flags.h" | ||||||
| #include "acq_conf.h" | #include "acq_conf.h" | ||||||
| #include <boost/lexical_cast.hpp> |  | ||||||
| #include <boost/math/distributions/exponential.hpp> | #include <boost/math/distributions/exponential.hpp> | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
|  |  | ||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GalileoE1PcpsAmbiguousAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( | GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     Acq_Conf acq_parameters; |     Acq_Conf acq_parameters; | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
| @@ -59,7 +59,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( | |||||||
|  |  | ||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in_; |     acq_parameters.fs_in = fs_in_; | ||||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); |     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); | ||||||
| @@ -128,7 +128,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -146,6 +146,11 @@ GalileoE1PcpsAmbiguousAcquisition::~GalileoE1PcpsAmbiguousAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GalileoE1PcpsAmbiguousAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel) | void GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
| @@ -155,7 +160,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold) | void GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); |     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); | ||||||
|  |  | ||||||
| @@ -214,7 +219,7 @@ void GalileoE1PcpsAmbiguousAcquisition::init() | |||||||
| void GalileoE1PcpsAmbiguousAcquisition::set_local_code() | void GalileoE1PcpsAmbiguousAcquisition::set_local_code() | ||||||
| { | { | ||||||
|     bool cboc = configuration_->property( |     bool cboc = configuration_->property( | ||||||
|         "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false); |         "Acquisition" + std::to_string(channel_) + ".cboc", false); | ||||||
|  |  | ||||||
|     std::complex<float>* code = new std::complex<float>[code_length_]; |     std::complex<float>* code = new std::complex<float>[code_length_]; | ||||||
|  |  | ||||||
| @@ -277,15 +282,15 @@ float GalileoE1PcpsAmbiguousAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | void GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             // Since a byte-based acq implementation is not available, |             // Since a byte-based acq implementation is not available, | ||||||
|             // we just convert cshorts to gr_complex |             // we just convert cshorts to gr_complex | ||||||
| @@ -302,15 +307,15 @@ void GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| void GalileoE1PcpsAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | void GalileoE1PcpsAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); |             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||||
|             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); |             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||||
| @@ -325,15 +330,15 @@ void GalileoE1PcpsAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_left_block() | gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_left_block() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             return cbyte_to_float_x2_; |             return cbyte_to_float_x2_; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -51,7 +51,8 @@ class GalileoE1PcpsAmbiguousAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GalileoE1PcpsAmbiguousAcquisition(ConfigurationInterface* configuration, |     GalileoE1PcpsAmbiguousAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GalileoE1PcpsAmbiguousAcquisition(); |     virtual ~GalileoE1PcpsAmbiguousAcquisition(); | ||||||
| @@ -154,7 +155,7 @@ private: | |||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     bool blocking_; |     bool blocking_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|   | |||||||
| @@ -41,13 +41,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GalileoE1PcpsAmbiguousAcquisitionFpga::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     //printf("top acq constructor start\n"); |     //printf("top acq constructor start\n"); | ||||||
|     pcpsconf_fpga_t acq_parameters; |     pcpsconf_fpga_t acq_parameters; | ||||||
| @@ -59,8 +60,8 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | |||||||
|  |  | ||||||
|     //    item_type_ = configuration_->property(role + ".item_type", default_item_type); |     //    item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||||
|     long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in; |     acq_parameters.fs_in = fs_in; | ||||||
|     //if_ = configuration_->property(role + ".if", 0); |     //if_ = configuration_->property(role + ".if", 0); | ||||||
|     //acq_parameters.freq = if_; |     //acq_parameters.freq = if_; | ||||||
| @@ -296,7 +297,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     //threshold_ = 0.0; |     //threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     //printf("top acq constructor end\n"); |     //printf("top acq constructor end\n"); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -310,6 +311,11 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::~GalileoE1PcpsAmbiguousAcquisitionFpga() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GalileoE1PcpsAmbiguousAcquisitionFpga::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GalileoE1PcpsAmbiguousAcquisitionFpga::set_channel(unsigned int channel) | void GalileoE1PcpsAmbiguousAcquisitionFpga::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     //printf("top acq set channel start\n"); |     //printf("top acq set channel start\n"); | ||||||
|   | |||||||
| @@ -52,7 +52,8 @@ class GalileoE1PcpsAmbiguousAcquisitionFpga : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GalileoE1PcpsAmbiguousAcquisitionFpga(ConfigurationInterface* configuration, |     GalileoE1PcpsAmbiguousAcquisitionFpga(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GalileoE1PcpsAmbiguousAcquisitionFpga(); |     virtual ~GalileoE1PcpsAmbiguousAcquisitionFpga(); | ||||||
|   | |||||||
| @@ -30,7 +30,6 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "galileo_e1_pcps_cccwsr_ambiguous_acquisition.h" | #include "galileo_e1_pcps_cccwsr_ambiguous_acquisition.h" | ||||||
| #include <boost/lexical_cast.hpp> |  | ||||||
| #include <boost/math/distributions/exponential.hpp> | #include <boost/math/distributions/exponential.hpp> | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
| #include "galileo_e1_signal_processing.h" | #include "galileo_e1_signal_processing.h" | ||||||
| @@ -40,13 +39,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition( | GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
| @@ -56,7 +56,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition | |||||||
|  |  | ||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     dump_ = configuration_->property(role + ".dump", false); |     dump_ = configuration_->property(role + ".dump", false); | ||||||
|     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); |     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); | ||||||
| @@ -88,7 +88,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition | |||||||
|     code_data_ = new gr_complex[vector_length_]; |     code_data_ = new gr_complex[vector_length_]; | ||||||
|     code_pilot_ = new gr_complex[vector_length_]; |     code_pilot_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_cccwsr_make_acquisition_cc(sampled_ms_, max_dwells_, |             acquisition_cc_ = pcps_cccwsr_make_acquisition_cc(sampled_ms_, max_dwells_, | ||||||
| @@ -109,7 +109,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -128,10 +128,15 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::~GalileoE1PcpsCccwsrAmbiguousAcquisitio | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GalileoE1PcpsCccwsrAmbiguousAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_channel(unsigned int channel) | void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_channel(channel_); |             acquisition_cc_->set_channel(channel_); | ||||||
|         } |         } | ||||||
| @@ -140,7 +145,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_threshold(float threshold) | void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     //    float pfa = configuration_->property(role_+ boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     //    float pfa = configuration_->property(role_+ std::to_string(channel_) + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     //    if(pfa==0.0) pfa = configuration_->property(role_+".pfa", 0.0); |     //    if(pfa==0.0) pfa = configuration_->property(role_+".pfa", 0.0); | ||||||
|  |  | ||||||
| @@ -157,7 +162,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_threshold(float threshold) | |||||||
|  |  | ||||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; |     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_threshold(threshold_); |             acquisition_cc_->set_threshold(threshold_); | ||||||
|         } |         } | ||||||
| @@ -168,7 +173,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_doppler_max(unsigned int doppl | |||||||
| { | { | ||||||
|     doppler_max_ = doppler_max; |     doppler_max_ = doppler_max; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_max(doppler_max_); |             acquisition_cc_->set_doppler_max(doppler_max_); | ||||||
|         } |         } | ||||||
| @@ -178,7 +183,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_doppler_max(unsigned int doppl | |||||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | ||||||
| { | { | ||||||
|     doppler_step_ = doppler_step; |     doppler_step_ = doppler_step; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_step(doppler_step_); |             acquisition_cc_->set_doppler_step(doppler_step_); | ||||||
|         } |         } | ||||||
| @@ -188,7 +193,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_gnss_synchro( | |||||||
|     Gnss_Synchro* gnss_synchro) |     Gnss_Synchro* gnss_synchro) | ||||||
| { | { | ||||||
|     gnss_synchro_ = gnss_synchro; |     gnss_synchro_ = gnss_synchro; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); |             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||||
|         } |         } | ||||||
| @@ -197,7 +202,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_gnss_synchro( | |||||||
|  |  | ||||||
| signed int GalileoE1PcpsCccwsrAmbiguousAcquisition::mag() | signed int GalileoE1PcpsCccwsrAmbiguousAcquisition::mag() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_cc_->mag(); |             return acquisition_cc_->mag(); | ||||||
|         } |         } | ||||||
| @@ -217,10 +222,10 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::init() | |||||||
|  |  | ||||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_local_code() | void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_local_code() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             bool cboc = configuration_->property( |             bool cboc = configuration_->property( | ||||||
|                 "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false); |                 "Acquisition" + std::to_string(channel_) + ".cboc", false); | ||||||
|  |  | ||||||
|             char signal[3]; |             char signal[3]; | ||||||
|  |  | ||||||
| @@ -241,7 +246,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_local_code() | |||||||
|  |  | ||||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::reset() | void GalileoE1PcpsCccwsrAmbiguousAcquisition::reset() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_active(true); |             acquisition_cc_->set_active(true); | ||||||
|         } |         } | ||||||
| @@ -264,7 +269,7 @@ float GalileoE1PcpsCccwsrAmbiguousAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | void GalileoE1PcpsCccwsrAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
| @@ -273,7 +278,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::connect(gr::top_block_sptr top_blo | |||||||
|  |  | ||||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | void GalileoE1PcpsCccwsrAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -48,7 +48,8 @@ class GalileoE1PcpsCccwsrAmbiguousAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GalileoE1PcpsCccwsrAmbiguousAcquisition(ConfigurationInterface* configuration, |     GalileoE1PcpsCccwsrAmbiguousAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GalileoE1PcpsCccwsrAmbiguousAcquisition(); |     virtual ~GalileoE1PcpsCccwsrAmbiguousAcquisition(); | ||||||
| @@ -145,7 +146,7 @@ private: | |||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|     std::complex<float>* code_data_; |     std::complex<float>* code_data_; | ||||||
|   | |||||||
| @@ -30,7 +30,6 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "galileo_e1_pcps_quicksync_ambiguous_acquisition.h" | #include "galileo_e1_pcps_quicksync_ambiguous_acquisition.h" | ||||||
| #include <boost/lexical_cast.hpp> |  | ||||||
| #include <boost/math/distributions/exponential.hpp> | #include <boost/math/distributions/exponential.hpp> | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
| #include "galileo_e1_signal_processing.h" | #include "galileo_e1_signal_processing.h" | ||||||
| @@ -40,13 +39,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcquisition( | GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
| @@ -57,7 +57,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui | |||||||
|     item_type_ = configuration_->property(role + ".item_type", |     item_type_ = configuration_->property(role + ".item_type", | ||||||
|         default_item_type); |         default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     dump_ = configuration_->property(role + ".dump", false); |     dump_ = configuration_->property(role + ".dump", false); | ||||||
|     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); |     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); | ||||||
| @@ -119,7 +119,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui | |||||||
|               << ", Folding factor: " << folding_factor_ |               << ", Folding factor: " << folding_factor_ | ||||||
|               << ", Sampled  ms: " << sampled_ms_ |               << ", Sampled  ms: " << sampled_ms_ | ||||||
|               << ", Code Length: " << code_length_; |               << ", Code Length: " << code_length_; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_, |             acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_, | ||||||
| @@ -142,7 +142,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -160,10 +160,15 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::~GalileoE1PcpsQuickSyncAmbiguousAcqu | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GalileoE1PcpsQuickSyncAmbiguousAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_channel(unsigned int channel) | void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_channel(channel_); |             acquisition_cc_->set_channel(channel_); | ||||||
|         } |         } | ||||||
| @@ -172,7 +177,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_channel(unsigned int channe | |||||||
|  |  | ||||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_threshold(float threshold) | void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); |     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); | ||||||
|  |  | ||||||
| @@ -187,7 +192,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_threshold(float threshold) | |||||||
|  |  | ||||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; |     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_threshold(threshold_); |             acquisition_cc_->set_threshold(threshold_); | ||||||
|         } |         } | ||||||
| @@ -198,7 +203,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_max(unsigned int do | |||||||
| { | { | ||||||
|     doppler_max_ = doppler_max; |     doppler_max_ = doppler_max; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_max(doppler_max_); |             acquisition_cc_->set_doppler_max(doppler_max_); | ||||||
|         } |         } | ||||||
| @@ -208,7 +213,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_max(unsigned int do | |||||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | ||||||
| { | { | ||||||
|     doppler_step_ = doppler_step; |     doppler_step_ = doppler_step; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_step(doppler_step_); |             acquisition_cc_->set_doppler_step(doppler_step_); | ||||||
|         } |         } | ||||||
| @@ -218,7 +223,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_gnss_synchro( | |||||||
|     Gnss_Synchro* gnss_synchro) |     Gnss_Synchro* gnss_synchro) | ||||||
| { | { | ||||||
|     gnss_synchro_ = gnss_synchro; |     gnss_synchro_ = gnss_synchro; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); |             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||||
|         } |         } | ||||||
| @@ -228,7 +233,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_gnss_synchro( | |||||||
| signed int | signed int | ||||||
| GalileoE1PcpsQuickSyncAmbiguousAcquisition::mag() | GalileoE1PcpsQuickSyncAmbiguousAcquisition::mag() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_cc_->mag(); |             return acquisition_cc_->mag(); | ||||||
|         } |         } | ||||||
| @@ -248,10 +253,10 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::init() | |||||||
|  |  | ||||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_local_code() | void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_local_code() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             bool cboc = configuration_->property( |             bool cboc = configuration_->property( | ||||||
|                 "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false); |                 "Acquisition" + std::to_string(channel_) + ".cboc", false); | ||||||
|  |  | ||||||
|             std::complex<float>* code = new std::complex<float>[code_length_]; |             std::complex<float>* code = new std::complex<float>[code_length_]; | ||||||
|  |  | ||||||
| @@ -269,14 +274,14 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_local_code() | |||||||
|             acquisition_cc_->set_local_code(code_); |             acquisition_cc_->set_local_code(code_); | ||||||
|  |  | ||||||
|             delete[] code; |             delete[] code; | ||||||
|             code = NULL; |             code = nullptr; | ||||||
|         } |         } | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::reset() | void GalileoE1PcpsQuickSyncAmbiguousAcquisition::reset() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_active(true); |             acquisition_cc_->set_active(true); | ||||||
|         } |         } | ||||||
| @@ -284,7 +289,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::reset() | |||||||
|  |  | ||||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_state(int state) | void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_state(int state) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_state(state); |             acquisition_cc_->set_state(state); | ||||||
|         } |         } | ||||||
| @@ -314,7 +319,7 @@ float GalileoE1PcpsQuickSyncAmbiguousAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | void GalileoE1PcpsQuickSyncAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
| @@ -323,7 +328,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::connect(gr::top_block_sptr top_ | |||||||
|  |  | ||||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | void GalileoE1PcpsQuickSyncAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -49,7 +49,8 @@ class GalileoE1PcpsQuickSyncAmbiguousAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GalileoE1PcpsQuickSyncAmbiguousAcquisition(ConfigurationInterface* configuration, |     GalileoE1PcpsQuickSyncAmbiguousAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GalileoE1PcpsQuickSyncAmbiguousAcquisition(); |     virtual ~GalileoE1PcpsQuickSyncAmbiguousAcquisition(); | ||||||
| @@ -150,7 +151,7 @@ private: | |||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     unsigned int folding_factor_; |     unsigned int folding_factor_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|     std::complex<float>* code_; |     std::complex<float>* code_; | ||||||
|   | |||||||
| @@ -30,7 +30,6 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "galileo_e1_pcps_tong_ambiguous_acquisition.h" | #include "galileo_e1_pcps_tong_ambiguous_acquisition.h" | ||||||
| #include <boost/lexical_cast.hpp> |  | ||||||
| #include <boost/math/distributions/exponential.hpp> | #include <boost/math/distributions/exponential.hpp> | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
| #include "galileo_e1_signal_processing.h" | #include "galileo_e1_signal_processing.h" | ||||||
| @@ -40,13 +39,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GalileoE1PcpsTongAmbiguousAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
| @@ -57,7 +57,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | |||||||
|     item_type_ = configuration_->property(role + ".item_type", |     item_type_ = configuration_->property(role + ".item_type", | ||||||
|         default_item_type); |         default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     dump_ = configuration_->property(role + ".dump", false); |     dump_ = configuration_->property(role + ".dump", false); | ||||||
|     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); |     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); | ||||||
| @@ -90,7 +90,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | |||||||
|  |  | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, |             acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, | ||||||
| @@ -112,7 +112,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -130,10 +130,15 @@ GalileoE1PcpsTongAmbiguousAcquisition::~GalileoE1PcpsTongAmbiguousAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GalileoE1PcpsTongAmbiguousAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GalileoE1PcpsTongAmbiguousAcquisition::set_channel(unsigned int channel) | void GalileoE1PcpsTongAmbiguousAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_channel(channel_); |             acquisition_cc_->set_channel(channel_); | ||||||
|         } |         } | ||||||
| @@ -142,7 +147,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GalileoE1PcpsTongAmbiguousAcquisition::set_threshold(float threshold) | void GalileoE1PcpsTongAmbiguousAcquisition::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); |     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); | ||||||
|  |  | ||||||
| @@ -157,7 +162,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_threshold(float threshold) | |||||||
|  |  | ||||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; |     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_threshold(threshold_); |             acquisition_cc_->set_threshold(threshold_); | ||||||
|         } |         } | ||||||
| @@ -168,7 +173,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_doppler_max(unsigned int doppler | |||||||
| { | { | ||||||
|     doppler_max_ = doppler_max; |     doppler_max_ = doppler_max; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_max(doppler_max_); |             acquisition_cc_->set_doppler_max(doppler_max_); | ||||||
|         } |         } | ||||||
| @@ -178,7 +183,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_doppler_max(unsigned int doppler | |||||||
| void GalileoE1PcpsTongAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | void GalileoE1PcpsTongAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | ||||||
| { | { | ||||||
|     doppler_step_ = doppler_step; |     doppler_step_ = doppler_step; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_step(doppler_step_); |             acquisition_cc_->set_doppler_step(doppler_step_); | ||||||
|         } |         } | ||||||
| @@ -189,7 +194,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_gnss_synchro( | |||||||
|     Gnss_Synchro* gnss_synchro) |     Gnss_Synchro* gnss_synchro) | ||||||
| { | { | ||||||
|     gnss_synchro_ = gnss_synchro; |     gnss_synchro_ = gnss_synchro; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); |             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||||
|         } |         } | ||||||
| @@ -198,7 +203,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_gnss_synchro( | |||||||
|  |  | ||||||
| signed int GalileoE1PcpsTongAmbiguousAcquisition::mag() | signed int GalileoE1PcpsTongAmbiguousAcquisition::mag() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_cc_->mag(); |             return acquisition_cc_->mag(); | ||||||
|         } |         } | ||||||
| @@ -218,10 +223,10 @@ void GalileoE1PcpsTongAmbiguousAcquisition::init() | |||||||
|  |  | ||||||
| void GalileoE1PcpsTongAmbiguousAcquisition::set_local_code() | void GalileoE1PcpsTongAmbiguousAcquisition::set_local_code() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             bool cboc = configuration_->property( |             bool cboc = configuration_->property( | ||||||
|                 "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false); |                 "Acquisition" + std::to_string(channel_) + ".cboc", false); | ||||||
|  |  | ||||||
|             std::complex<float>* code = new std::complex<float>[code_length_]; |             std::complex<float>* code = new std::complex<float>[code_length_]; | ||||||
|  |  | ||||||
| @@ -243,7 +248,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_local_code() | |||||||
|  |  | ||||||
| void GalileoE1PcpsTongAmbiguousAcquisition::reset() | void GalileoE1PcpsTongAmbiguousAcquisition::reset() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_active(true); |             acquisition_cc_->set_active(true); | ||||||
|         } |         } | ||||||
| @@ -278,7 +283,7 @@ float GalileoE1PcpsTongAmbiguousAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GalileoE1PcpsTongAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | void GalileoE1PcpsTongAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
| @@ -287,7 +292,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::connect(gr::top_block_sptr top_block | |||||||
|  |  | ||||||
| void GalileoE1PcpsTongAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | void GalileoE1PcpsTongAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -48,7 +48,8 @@ class GalileoE1PcpsTongAmbiguousAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GalileoE1PcpsTongAmbiguousAcquisition(ConfigurationInterface* configuration, |     GalileoE1PcpsTongAmbiguousAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GalileoE1PcpsTongAmbiguousAcquisition(); |     virtual ~GalileoE1PcpsTongAmbiguousAcquisition(); | ||||||
| @@ -149,7 +150,7 @@ private: | |||||||
|     unsigned int tong_init_val_; |     unsigned int tong_init_val_; | ||||||
|     unsigned int tong_max_val_; |     unsigned int tong_max_val_; | ||||||
|     unsigned int tong_max_dwells_; |     unsigned int tong_max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|     std::complex<float>* code_; |     std::complex<float>* code_; | ||||||
|   | |||||||
| @@ -36,7 +36,6 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "galileo_e5a_noncoherent_iq_acquisition_caf.h" | #include "galileo_e5a_noncoherent_iq_acquisition_caf.h" | ||||||
| #include <boost/lexical_cast.hpp> |  | ||||||
| #include <boost/math/distributions/exponential.hpp> | #include <boost/math/distributions/exponential.hpp> | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
| #include "galileo_e5_signal_processing.h" | #include "galileo_e5_signal_processing.h" | ||||||
| @@ -46,13 +45,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
| @@ -62,7 +62,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | |||||||
|  |  | ||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     dump_ = configuration_->property(role + ".dump", false); |     dump_ = configuration_->property(role + ".dump", false); | ||||||
|     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); |     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); | ||||||
| @@ -101,7 +101,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | |||||||
|         { |         { | ||||||
|             both_signal_components = true; |             both_signal_components = true; | ||||||
|         } |         } | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(sampled_ms_, max_dwells_, |             acquisition_cc_ = galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(sampled_ms_, max_dwells_, | ||||||
| @@ -117,7 +117,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -136,10 +136,15 @@ GalileoE5aNoncoherentIQAcquisitionCaf::~GalileoE5aNoncoherentIQAcquisitionCaf() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GalileoE5aNoncoherentIQAcquisitionCaf::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel(unsigned int channel) | void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_channel(channel_); |             acquisition_cc_->set_channel(channel_); | ||||||
|         } |         } | ||||||
| @@ -148,7 +153,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold) | void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); |     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); | ||||||
|  |  | ||||||
| @@ -163,7 +168,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold) | |||||||
|  |  | ||||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; |     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_threshold(threshold_); |             acquisition_cc_->set_threshold(threshold_); | ||||||
|         } |         } | ||||||
| @@ -174,7 +179,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_doppler_max(unsigned int doppler | |||||||
| { | { | ||||||
|     doppler_max_ = doppler_max; |     doppler_max_ = doppler_max; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_max(doppler_max_); |             acquisition_cc_->set_doppler_max(doppler_max_); | ||||||
|         } |         } | ||||||
| @@ -184,7 +189,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_doppler_max(unsigned int doppler | |||||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::set_doppler_step(unsigned int doppler_step) | void GalileoE5aNoncoherentIQAcquisitionCaf::set_doppler_step(unsigned int doppler_step) | ||||||
| { | { | ||||||
|     doppler_step_ = doppler_step; |     doppler_step_ = doppler_step; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_step(doppler_step_); |             acquisition_cc_->set_doppler_step(doppler_step_); | ||||||
|         } |         } | ||||||
| @@ -195,7 +200,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_gnss_synchro( | |||||||
|     Gnss_Synchro* gnss_synchro) |     Gnss_Synchro* gnss_synchro) | ||||||
| { | { | ||||||
|     gnss_synchro_ = gnss_synchro; |     gnss_synchro_ = gnss_synchro; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); |             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||||
|         } |         } | ||||||
| @@ -204,7 +209,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_gnss_synchro( | |||||||
|  |  | ||||||
| signed int GalileoE5aNoncoherentIQAcquisitionCaf::mag() | signed int GalileoE5aNoncoherentIQAcquisitionCaf::mag() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_cc_->mag(); |             return acquisition_cc_->mag(); | ||||||
|         } |         } | ||||||
| @@ -224,7 +229,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::init() | |||||||
|  |  | ||||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code() | void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             std::complex<float>* codeI = new std::complex<float>[code_length_]; |             std::complex<float>* codeI = new std::complex<float>[code_length_]; | ||||||
|             std::complex<float>* codeQ = new std::complex<float>[code_length_]; |             std::complex<float>* codeQ = new std::complex<float>[code_length_]; | ||||||
| @@ -281,7 +286,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code() | |||||||
|  |  | ||||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::reset() | void GalileoE5aNoncoherentIQAcquisitionCaf::reset() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_active(true); |             acquisition_cc_->set_active(true); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -49,7 +49,8 @@ class GalileoE5aNoncoherentIQAcquisitionCaf : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GalileoE5aNoncoherentIQAcquisitionCaf(ConfigurationInterface* configuration, |     GalileoE5aNoncoherentIQAcquisitionCaf(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GalileoE5aNoncoherentIQAcquisitionCaf(); |     virtual ~GalileoE5aNoncoherentIQAcquisitionCaf(); | ||||||
| @@ -150,7 +151,7 @@ private: | |||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|     int Zero_padding; |     int Zero_padding; | ||||||
|   | |||||||
| @@ -34,7 +34,6 @@ | |||||||
| #include "Galileo_E5a.h" | #include "Galileo_E5a.h" | ||||||
| #include "gnss_sdr_flags.h" | #include "gnss_sdr_flags.h" | ||||||
| #include "acq_conf.h" | #include "acq_conf.h" | ||||||
| #include <boost/lexical_cast.hpp> |  | ||||||
| #include <boost/math/distributions/exponential.hpp> | #include <boost/math/distributions/exponential.hpp> | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||||
| @@ -42,12 +41,13 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GalileoE5aPcpsAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration, | GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration, | ||||||
|     std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     Acq_Conf acq_parameters = Acq_Conf(); |     Acq_Conf acq_parameters = Acq_Conf(); | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
| @@ -58,7 +58,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con | |||||||
|  |  | ||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in_; |     acq_parameters.fs_in = fs_in_; | ||||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E5a_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); |     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E5a_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); | ||||||
| @@ -91,11 +91,11 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con | |||||||
|  |  | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(lv_16sc_t); |             item_size_ = sizeof(lv_16sc_t); | ||||||
|         } |         } | ||||||
| @@ -118,7 +118,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -136,6 +136,11 @@ GalileoE5aPcpsAcquisition::~GalileoE5aPcpsAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GalileoE5aPcpsAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GalileoE5aPcpsAcquisition::set_channel(unsigned int channel) | void GalileoE5aPcpsAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
| @@ -145,7 +150,7 @@ void GalileoE5aPcpsAcquisition::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GalileoE5aPcpsAcquisition::set_threshold(float threshold) | void GalileoE5aPcpsAcquisition::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     if (pfa == 0.0) |     if (pfa == 0.0) | ||||||
|         { |         { | ||||||
| @@ -264,11 +269,11 @@ void GalileoE5aPcpsAcquisition::set_state(int state) | |||||||
|  |  | ||||||
| void GalileoE5aPcpsAcquisition::connect(gr::top_block_sptr top_block __attribute__((unused))) | void GalileoE5aPcpsAcquisition::connect(gr::top_block_sptr top_block __attribute__((unused))) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
| @@ -281,11 +286,11 @@ void GalileoE5aPcpsAcquisition::connect(gr::top_block_sptr top_block __attribute | |||||||
|  |  | ||||||
| void GalileoE5aPcpsAcquisition::disconnect(gr::top_block_sptr top_block __attribute__((unused))) | void GalileoE5aPcpsAcquisition::disconnect(gr::top_block_sptr top_block __attribute__((unused))) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -43,7 +43,8 @@ class GalileoE5aPcpsAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration, |     GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GalileoE5aPcpsAcquisition(); |     virtual ~GalileoE5aPcpsAcquisition(); | ||||||
| @@ -157,7 +158,7 @@ private: | |||||||
|     unsigned int in_streams_; |     unsigned int in_streams_; | ||||||
|     unsigned int out_streams_; |     unsigned int out_streams_; | ||||||
|  |  | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|  |  | ||||||
|     float threshold_; |     float threshold_; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -33,7 +33,6 @@ | |||||||
| #include "galileo_e5_signal_processing.h" | #include "galileo_e5_signal_processing.h" | ||||||
| #include "Galileo_E5a.h" | #include "Galileo_E5a.h" | ||||||
| #include "gnss_sdr_flags.h" | #include "gnss_sdr_flags.h" | ||||||
| #include <boost/lexical_cast.hpp> |  | ||||||
| #include <boost/math/distributions/exponential.hpp> | #include <boost/math/distributions/exponential.hpp> | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||||
| @@ -41,12 +40,13 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GalileoE5aPcpsAcquisitionFpga::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration, | GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration, | ||||||
|     std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     //printf("creating the E5A acquisition"); |     //printf("creating the E5A acquisition"); | ||||||
|     pcpsconf_fpga_t acq_parameters; |     pcpsconf_fpga_t acq_parameters; | ||||||
| @@ -58,8 +58,8 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf | |||||||
|  |  | ||||||
|     //item_type_ = configuration_->property(role + ".item_type", default_item_type); |     //item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); | ||||||
|     long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in; |     acq_parameters.fs_in = fs_in; | ||||||
|     //acq_parameters.freq = 0; |     //acq_parameters.freq = 0; | ||||||
|  |  | ||||||
| @@ -209,7 +209,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     //threshold_ = 0.0; |     //threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     //printf("creating the E5A acquisition end"); |     //printf("creating the E5A acquisition end"); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -221,6 +221,11 @@ GalileoE5aPcpsAcquisitionFpga::~GalileoE5aPcpsAcquisitionFpga() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GalileoE5aPcpsAcquisitionFpga::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GalileoE5aPcpsAcquisitionFpga::set_channel(unsigned int channel) | void GalileoE5aPcpsAcquisitionFpga::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
| @@ -231,7 +236,7 @@ void GalileoE5aPcpsAcquisitionFpga::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GalileoE5aPcpsAcquisitionFpga::set_threshold(float threshold) | void GalileoE5aPcpsAcquisitionFpga::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     //    float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     //    float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|     // |     // | ||||||
|     //    if (pfa == 0.0) |     //    if (pfa == 0.0) | ||||||
|     //        { |     //        { | ||||||
|   | |||||||
| @@ -45,7 +45,8 @@ class GalileoE5aPcpsAcquisitionFpga : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration, |     GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GalileoE5aPcpsAcquisitionFpga(); |     virtual ~GalileoE5aPcpsAcquisitionFpga(); | ||||||
| @@ -160,7 +161,7 @@ private: | |||||||
|     unsigned int in_streams_; |     unsigned int in_streams_; | ||||||
|     unsigned int out_streams_; |     unsigned int out_streams_; | ||||||
|  |  | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|  |  | ||||||
|  |  | ||||||
|     float threshold_; |     float threshold_; | ||||||
|   | |||||||
| @@ -43,13 +43,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GlonassL1CaPcpsAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     Acq_Conf acq_parameters = Acq_Conf(); |     Acq_Conf acq_parameters = Acq_Conf(); | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
| @@ -60,7 +61,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | |||||||
|  |  | ||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in_; |     acq_parameters.fs_in = fs_in_; | ||||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GLONASS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); |     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GLONASS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); | ||||||
| @@ -94,7 +95,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | |||||||
|  |  | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("cshort") == 0) |     if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(lv_16sc_t); |             item_size_ = sizeof(lv_16sc_t); | ||||||
|         } |         } | ||||||
| @@ -114,7 +115,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | |||||||
|     acquisition_ = pcps_make_acquisition(acq_parameters); |     acquisition_ = pcps_make_acquisition(acq_parameters); | ||||||
|     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; |     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; | ||||||
|  |  | ||||||
|     if (item_type_.compare("cbyte") == 0) |     if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); |             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); | ||||||
|             float_to_complex_ = gr::blocks::float_to_complex::make(); |             float_to_complex_ = gr::blocks::float_to_complex::make(); | ||||||
| @@ -123,7 +124,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -141,6 +142,11 @@ GlonassL1CaPcpsAcquisition::~GlonassL1CaPcpsAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GlonassL1CaPcpsAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GlonassL1CaPcpsAcquisition::set_channel(unsigned int channel) | void GlonassL1CaPcpsAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
| @@ -261,15 +267,15 @@ float GlonassL1CaPcpsAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GlonassL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | void GlonassL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0); |             top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||||
|             top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1); |             top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||||
| @@ -284,15 +290,15 @@ void GlonassL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| void GlonassL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | void GlonassL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             // Since a byte-based acq implementation is not available, |             // Since a byte-based acq implementation is not available, | ||||||
|             // we just convert cshorts to gr_complex |             // we just convert cshorts to gr_complex | ||||||
| @@ -309,15 +315,15 @@ void GlonassL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| gr::basic_block_sptr GlonassL1CaPcpsAcquisition::get_left_block() | gr::basic_block_sptr GlonassL1CaPcpsAcquisition::get_left_block() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             return cbyte_to_float_x2_; |             return cbyte_to_float_x2_; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -51,7 +51,8 @@ class GlonassL1CaPcpsAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GlonassL1CaPcpsAcquisition(ConfigurationInterface* configuration, |     GlonassL1CaPcpsAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GlonassL1CaPcpsAcquisition(); |     virtual ~GlonassL1CaPcpsAcquisition(); | ||||||
| @@ -153,7 +154,7 @@ private: | |||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     bool blocking_; |     bool blocking_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|   | |||||||
| @@ -42,13 +42,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GlonassL2CaPcpsAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     Acq_Conf acq_parameters = Acq_Conf(); |     Acq_Conf acq_parameters = Acq_Conf(); | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
| @@ -59,7 +60,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | |||||||
|  |  | ||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in_; |     acq_parameters.fs_in = fs_in_; | ||||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GLONASS_L2_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); |     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GLONASS_L2_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); | ||||||
| @@ -93,7 +94,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | |||||||
|  |  | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("cshort") == 0) |     if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(lv_16sc_t); |             item_size_ = sizeof(lv_16sc_t); | ||||||
|         } |         } | ||||||
| @@ -113,7 +114,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | |||||||
|     acquisition_ = pcps_make_acquisition(acq_parameters); |     acquisition_ = pcps_make_acquisition(acq_parameters); | ||||||
|     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; |     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; | ||||||
|  |  | ||||||
|     if (item_type_.compare("cbyte") == 0) |     if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); |             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); | ||||||
|             float_to_complex_ = gr::blocks::float_to_complex::make(); |             float_to_complex_ = gr::blocks::float_to_complex::make(); | ||||||
| @@ -122,7 +123,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -140,6 +141,11 @@ GlonassL2CaPcpsAcquisition::~GlonassL2CaPcpsAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GlonassL2CaPcpsAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GlonassL2CaPcpsAcquisition::set_channel(unsigned int channel) | void GlonassL2CaPcpsAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
| @@ -260,15 +266,15 @@ float GlonassL2CaPcpsAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GlonassL2CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | void GlonassL2CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             // Since a byte-based acq implementation is not available, |             // Since a byte-based acq implementation is not available, | ||||||
|             // we just convert cshorts to gr_complex |             // we just convert cshorts to gr_complex | ||||||
| @@ -285,15 +291,15 @@ void GlonassL2CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| void GlonassL2CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | void GlonassL2CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); |             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||||
|             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); |             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||||
| @@ -308,15 +314,15 @@ void GlonassL2CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| gr::basic_block_sptr GlonassL2CaPcpsAcquisition::get_left_block() | gr::basic_block_sptr GlonassL2CaPcpsAcquisition::get_left_block() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             return cbyte_to_float_x2_; |             return cbyte_to_float_x2_; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -50,7 +50,8 @@ class GlonassL2CaPcpsAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GlonassL2CaPcpsAcquisition(ConfigurationInterface* configuration, |     GlonassL2CaPcpsAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GlonassL2CaPcpsAcquisition(); |     virtual ~GlonassL2CaPcpsAcquisition(); | ||||||
| @@ -152,7 +153,7 @@ private: | |||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     bool blocking_; |     bool blocking_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|   | |||||||
| @@ -45,13 +45,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GpsL1CaPcpsAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     Acq_Conf acq_parameters = Acq_Conf(); |     Acq_Conf acq_parameters = Acq_Conf(); | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
| @@ -61,7 +62,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | |||||||
|     DLOG(INFO) << "role " << role; |     DLOG(INFO) << "role " << role; | ||||||
|  |  | ||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in_; |     acq_parameters.fs_in = fs_in_; | ||||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); |     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); | ||||||
| @@ -95,7 +96,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | |||||||
|     vector_length_ = std::floor(acq_parameters.sampled_ms * acq_parameters.samples_per_ms) * (acq_parameters.bit_transition_flag ? 2 : 1); |     vector_length_ = std::floor(acq_parameters.sampled_ms * acq_parameters.samples_per_ms) * (acq_parameters.bit_transition_flag ? 2 : 1); | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("cshort") == 0) |     if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(lv_16sc_t); |             item_size_ = sizeof(lv_16sc_t); | ||||||
|         } |         } | ||||||
| @@ -109,7 +110,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | |||||||
|     acquisition_ = pcps_make_acquisition(acq_parameters); |     acquisition_ = pcps_make_acquisition(acq_parameters); | ||||||
|     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; |     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; | ||||||
|  |  | ||||||
|     if (item_type_.compare("cbyte") == 0) |     if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); |             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); | ||||||
|             float_to_complex_ = gr::blocks::float_to_complex::make(); |             float_to_complex_ = gr::blocks::float_to_complex::make(); | ||||||
| @@ -118,7 +119,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -136,6 +137,11 @@ GpsL1CaPcpsAcquisition::~GpsL1CaPcpsAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GpsL1CaPcpsAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GpsL1CaPcpsAcquisition::set_channel(unsigned int channel) | void GpsL1CaPcpsAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
| @@ -249,15 +255,15 @@ float GpsL1CaPcpsAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             // Since a byte-based acq implementation is not available, |             // Since a byte-based acq implementation is not available, | ||||||
|             // we just convert cshorts to gr_complex |             // we just convert cshorts to gr_complex | ||||||
| @@ -274,15 +280,15 @@ void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| void GpsL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | void GpsL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); |             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||||
|             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); |             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||||
| @@ -297,15 +303,15 @@ void GpsL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_left_block() | gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_left_block() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             return cbyte_to_float_x2_; |             return cbyte_to_float_x2_; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -55,7 +55,8 @@ class GpsL1CaPcpsAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GpsL1CaPcpsAcquisition(ConfigurationInterface* configuration, |     GpsL1CaPcpsAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GpsL1CaPcpsAcquisition(); |     virtual ~GpsL1CaPcpsAcquisition(); | ||||||
| @@ -157,7 +158,7 @@ private: | |||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     bool blocking_; |     bool blocking_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|   | |||||||
| @@ -42,13 +42,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GpsL1CaPcpsAcquisitionFineDoppler::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( | GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
|     std::string default_dump_filename = "./acquisition.mat"; |     std::string default_dump_filename = "./acquisition.mat"; | ||||||
| @@ -57,7 +58,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( | |||||||
|     Acq_Conf acq_parameters = Acq_Conf(); |     Acq_Conf acq_parameters = Acq_Conf(); | ||||||
|  |  | ||||||
|     item_type_ = configuration->property(role + ".item_type", default_item_type); |     item_type_ = configuration->property(role + ".item_type", default_item_type); | ||||||
|     long fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in_; |     acq_parameters.fs_in = fs_in_; | ||||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); |     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); | ||||||
| @@ -80,7 +81,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( | |||||||
|     acq_parameters.samples_per_ms = vector_length_; |     acq_parameters.samples_per_ms = vector_length_; | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_make_acquisition_fine_doppler_cc(acq_parameters); |             acquisition_cc_ = pcps_make_acquisition_fine_doppler_cc(acq_parameters); | ||||||
| @@ -94,7 +95,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -112,6 +113,11 @@ GpsL1CaPcpsAcquisitionFineDoppler::~GpsL1CaPcpsAcquisitionFineDoppler() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GpsL1CaPcpsAcquisitionFineDoppler::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GpsL1CaPcpsAcquisitionFineDoppler::set_channel(unsigned int channel) | void GpsL1CaPcpsAcquisitionFineDoppler::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|   | |||||||
| @@ -49,7 +49,8 @@ class GpsL1CaPcpsAcquisitionFineDoppler : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GpsL1CaPcpsAcquisitionFineDoppler(ConfigurationInterface* configuration, |     GpsL1CaPcpsAcquisitionFineDoppler(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GpsL1CaPcpsAcquisitionFineDoppler(); |     virtual ~GpsL1CaPcpsAcquisitionFineDoppler(); | ||||||
| @@ -142,7 +143,7 @@ private: | |||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     int max_dwells_; |     int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|     std::complex<float>* code_; |     std::complex<float>* code_; | ||||||
|   | |||||||
| @@ -48,13 +48,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GpsL1CaPcpsAcquisitionFpga::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( | GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     pcpsconf_fpga_t acq_parameters; |     pcpsconf_fpga_t acq_parameters; | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
| @@ -62,8 +63,8 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( | |||||||
|  |  | ||||||
|     DLOG(INFO) << "role " << role; |     DLOG(INFO) << "role " << role; | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     //fs_in = fs_in/2.0; // downampling filter |     //fs_in = fs_in/2.0; // downampling filter | ||||||
|     //printf("####### DEBUG Acq: fs_in = %d\n", fs_in); |     //printf("####### DEBUG Acq: fs_in = %d\n", fs_in); | ||||||
|     acq_parameters.fs_in = fs_in; |     acq_parameters.fs_in = fs_in; | ||||||
| @@ -173,7 +174,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( | |||||||
|  |  | ||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -183,6 +184,11 @@ GpsL1CaPcpsAcquisitionFpga::~GpsL1CaPcpsAcquisitionFpga() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GpsL1CaPcpsAcquisitionFpga::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GpsL1CaPcpsAcquisitionFpga::set_channel(unsigned int channel) | void GpsL1CaPcpsAcquisitionFpga::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|   | |||||||
| @@ -53,7 +53,8 @@ class GpsL1CaPcpsAcquisitionFpga : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GpsL1CaPcpsAcquisitionFpga(ConfigurationInterface* configuration, |     GpsL1CaPcpsAcquisitionFpga(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GpsL1CaPcpsAcquisitionFpga(); |     virtual ~GpsL1CaPcpsAcquisitionFpga(); | ||||||
|   | |||||||
| @@ -42,13 +42,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GpsL1CaPcpsAssistedAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
|     std::string default_dump_filename = "./data/acquisition.dat"; |     std::string default_dump_filename = "./data/acquisition.dat"; | ||||||
| @@ -56,7 +57,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | |||||||
|     DLOG(INFO) << "role " << role; |     DLOG(INFO) << "role " << role; | ||||||
|  |  | ||||||
|     item_type_ = configuration->property(role + ".item_type", default_item_type); |     item_type_ = configuration->property(role + ".item_type", default_item_type); | ||||||
|     long fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     dump_ = configuration->property(role + ".dump", false); |     dump_ = configuration->property(role + ".dump", false); | ||||||
|     doppler_max_ = configuration->property(role + ".doppler_max", 5000); |     doppler_max_ = configuration->property(role + ".doppler_max", 5000); | ||||||
| @@ -71,7 +72,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | |||||||
|  |  | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_make_assisted_acquisition_cc(max_dwells_, sampled_ms_, |             acquisition_cc_ = pcps_make_assisted_acquisition_cc(max_dwells_, sampled_ms_, | ||||||
| @@ -87,7 +88,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -105,6 +106,11 @@ GpsL1CaPcpsAssistedAcquisition::~GpsL1CaPcpsAssistedAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GpsL1CaPcpsAssistedAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GpsL1CaPcpsAssistedAcquisition::set_channel(unsigned int channel) | void GpsL1CaPcpsAssistedAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|   | |||||||
| @@ -49,7 +49,8 @@ class GpsL1CaPcpsAssistedAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GpsL1CaPcpsAssistedAcquisition(ConfigurationInterface* configuration, |     GpsL1CaPcpsAssistedAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GpsL1CaPcpsAssistedAcquisition(); |     virtual ~GpsL1CaPcpsAssistedAcquisition(); | ||||||
| @@ -140,7 +141,7 @@ private: | |||||||
|     int doppler_min_; |     int doppler_min_; | ||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     int max_dwells_; |     int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|     std::complex<float>* code_; |     std::complex<float>* code_; | ||||||
|   | |||||||
| @@ -40,13 +40,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GpsL1CaPcpsOpenClAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( | GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
| @@ -57,7 +58,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( | |||||||
|     item_type_ = configuration_->property(role + ".item_type", |     item_type_ = configuration_->property(role + ".item_type", | ||||||
|         default_item_type); |         default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     dump_ = configuration_->property(role + ".dump", false); |     dump_ = configuration_->property(role + ".dump", false); | ||||||
|     doppler_max_ = configuration->property(role + ".doppler_max", 5000); |     doppler_max_ = configuration->property(role + ".doppler_max", 5000); | ||||||
| @@ -85,7 +86,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( | |||||||
|  |  | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_make_opencl_acquisition_cc(sampled_ms_, max_dwells_, |             acquisition_cc_ = pcps_make_opencl_acquisition_cc(sampled_ms_, max_dwells_, | ||||||
| @@ -106,7 +107,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -124,10 +125,15 @@ GpsL1CaPcpsOpenClAcquisition::~GpsL1CaPcpsOpenClAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GpsL1CaPcpsOpenClAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GpsL1CaPcpsOpenClAcquisition::set_channel(unsigned int channel) | void GpsL1CaPcpsOpenClAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_channel(channel_); |             acquisition_cc_->set_channel(channel_); | ||||||
|         } |         } | ||||||
| @@ -136,7 +142,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GpsL1CaPcpsOpenClAcquisition::set_threshold(float threshold) | void GpsL1CaPcpsOpenClAcquisition::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     if (pfa == 0.0) |     if (pfa == 0.0) | ||||||
|         { |         { | ||||||
| @@ -153,7 +159,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_threshold(float threshold) | |||||||
|  |  | ||||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; |     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_threshold(threshold_); |             acquisition_cc_->set_threshold(threshold_); | ||||||
|         } |         } | ||||||
| @@ -163,7 +169,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_threshold(float threshold) | |||||||
| void GpsL1CaPcpsOpenClAcquisition::set_doppler_max(unsigned int doppler_max) | void GpsL1CaPcpsOpenClAcquisition::set_doppler_max(unsigned int doppler_max) | ||||||
| { | { | ||||||
|     doppler_max_ = doppler_max; |     doppler_max_ = doppler_max; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_max(doppler_max_); |             acquisition_cc_->set_doppler_max(doppler_max_); | ||||||
|         } |         } | ||||||
| @@ -173,7 +179,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_doppler_max(unsigned int doppler_max) | |||||||
| void GpsL1CaPcpsOpenClAcquisition::set_doppler_step(unsigned int doppler_step) | void GpsL1CaPcpsOpenClAcquisition::set_doppler_step(unsigned int doppler_step) | ||||||
| { | { | ||||||
|     doppler_step_ = doppler_step; |     doppler_step_ = doppler_step; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_step(doppler_step_); |             acquisition_cc_->set_doppler_step(doppler_step_); | ||||||
|         } |         } | ||||||
| @@ -183,7 +189,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_doppler_step(unsigned int doppler_step) | |||||||
| void GpsL1CaPcpsOpenClAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | void GpsL1CaPcpsOpenClAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | ||||||
| { | { | ||||||
|     gnss_synchro_ = gnss_synchro; |     gnss_synchro_ = gnss_synchro; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); |             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||||
|         } |         } | ||||||
| @@ -192,7 +198,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | |||||||
|  |  | ||||||
| signed int GpsL1CaPcpsOpenClAcquisition::mag() | signed int GpsL1CaPcpsOpenClAcquisition::mag() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_cc_->mag(); |             return acquisition_cc_->mag(); | ||||||
|         } |         } | ||||||
| @@ -212,7 +218,7 @@ void GpsL1CaPcpsOpenClAcquisition::init() | |||||||
|  |  | ||||||
| void GpsL1CaPcpsOpenClAcquisition::set_local_code() | void GpsL1CaPcpsOpenClAcquisition::set_local_code() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             std::complex<float>* code = new std::complex<float>[code_length_]; |             std::complex<float>* code = new std::complex<float>[code_length_]; | ||||||
|  |  | ||||||
| @@ -233,7 +239,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_local_code() | |||||||
|  |  | ||||||
| void GpsL1CaPcpsOpenClAcquisition::reset() | void GpsL1CaPcpsOpenClAcquisition::reset() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_active(true); |             acquisition_cc_->set_active(true); | ||||||
|         } |         } | ||||||
| @@ -265,7 +271,7 @@ float GpsL1CaPcpsOpenClAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GpsL1CaPcpsOpenClAcquisition::connect(gr::top_block_sptr top_block) | void GpsL1CaPcpsOpenClAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
| @@ -274,7 +280,7 @@ void GpsL1CaPcpsOpenClAcquisition::connect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| void GpsL1CaPcpsOpenClAcquisition::disconnect(gr::top_block_sptr top_block) | void GpsL1CaPcpsOpenClAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -48,7 +48,8 @@ class GpsL1CaPcpsOpenClAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GpsL1CaPcpsOpenClAcquisition(ConfigurationInterface* configuration, |     GpsL1CaPcpsOpenClAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GpsL1CaPcpsOpenClAcquisition(); |     virtual ~GpsL1CaPcpsOpenClAcquisition(); | ||||||
| @@ -144,7 +145,7 @@ private: | |||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|     std::complex<float>* code_; |     std::complex<float>* code_; | ||||||
|   | |||||||
| @@ -41,13 +41,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GpsL1CaPcpsQuickSyncAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
| @@ -56,7 +57,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | |||||||
|     DLOG(INFO) << "role " << role; |     DLOG(INFO) << "role " << role; | ||||||
|  |  | ||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     dump_ = configuration_->property(role + ".dump", false); |     dump_ = configuration_->property(role + ".dump", false); | ||||||
|     doppler_max_ = configuration->property(role + ".doppler_max", 5000); |     doppler_max_ = configuration->property(role + ".doppler_max", 5000); | ||||||
| @@ -112,7 +113,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | |||||||
|               << ", Sampled  ms: " << sampled_ms_ |               << ", Sampled  ms: " << sampled_ms_ | ||||||
|               << ", Code Length: " << code_length_; |               << ", Code Length: " << code_length_; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_, |             acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_, | ||||||
| @@ -135,7 +136,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -153,10 +154,15 @@ GpsL1CaPcpsQuickSyncAcquisition::~GpsL1CaPcpsQuickSyncAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GpsL1CaPcpsQuickSyncAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_channel(unsigned int channel) | void GpsL1CaPcpsQuickSyncAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_channel(channel_); |             acquisition_cc_->set_channel(channel_); | ||||||
|         } |         } | ||||||
| @@ -165,9 +171,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold) | void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     float pfa = configuration_->property(role_ + |     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|                                              boost::lexical_cast<std::string>(channel_) + ".pfa", |  | ||||||
|         0.0); |  | ||||||
|  |  | ||||||
|     if (pfa == 0.0) |     if (pfa == 0.0) | ||||||
|         { |         { | ||||||
| @@ -184,7 +188,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold) | |||||||
|  |  | ||||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; |     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_threshold(threshold_); |             acquisition_cc_->set_threshold(threshold_); | ||||||
|         } |         } | ||||||
| @@ -194,7 +198,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold) | |||||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_doppler_max(unsigned int doppler_max) | void GpsL1CaPcpsQuickSyncAcquisition::set_doppler_max(unsigned int doppler_max) | ||||||
| { | { | ||||||
|     doppler_max_ = doppler_max; |     doppler_max_ = doppler_max; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_max(doppler_max_); |             acquisition_cc_->set_doppler_max(doppler_max_); | ||||||
|         } |         } | ||||||
| @@ -204,7 +208,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_doppler_max(unsigned int doppler_max) | |||||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_doppler_step(unsigned int doppler_step) | void GpsL1CaPcpsQuickSyncAcquisition::set_doppler_step(unsigned int doppler_step) | ||||||
| { | { | ||||||
|     doppler_step_ = doppler_step; |     doppler_step_ = doppler_step; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_step(doppler_step_); |             acquisition_cc_->set_doppler_step(doppler_step_); | ||||||
|         } |         } | ||||||
| @@ -214,7 +218,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_doppler_step(unsigned int doppler_step | |||||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | void GpsL1CaPcpsQuickSyncAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | ||||||
| { | { | ||||||
|     gnss_synchro_ = gnss_synchro; |     gnss_synchro_ = gnss_synchro; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); |             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||||
|         } |         } | ||||||
| @@ -223,7 +227,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchr | |||||||
|  |  | ||||||
| signed int GpsL1CaPcpsQuickSyncAcquisition::mag() | signed int GpsL1CaPcpsQuickSyncAcquisition::mag() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_cc_->mag(); |             return acquisition_cc_->mag(); | ||||||
|         } |         } | ||||||
| @@ -243,13 +247,12 @@ void GpsL1CaPcpsQuickSyncAcquisition::init() | |||||||
|  |  | ||||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_local_code() | void GpsL1CaPcpsQuickSyncAcquisition::set_local_code() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             std::complex<float>* code = new std::complex<float>[code_length_](); |             std::complex<float>* code = new std::complex<float>[code_length_](); | ||||||
|  |  | ||||||
|             gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0); |             gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0); | ||||||
|  |  | ||||||
|  |  | ||||||
|             for (unsigned int i = 0; i < (sampled_ms_ / folding_factor_); i++) |             for (unsigned int i = 0; i < (sampled_ms_ / folding_factor_); i++) | ||||||
|                 { |                 { | ||||||
|                     memcpy(&(code_[i * code_length_]), code, |                     memcpy(&(code_[i * code_length_]), code, | ||||||
| @@ -266,7 +269,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_local_code() | |||||||
|  |  | ||||||
| void GpsL1CaPcpsQuickSyncAcquisition::reset() | void GpsL1CaPcpsQuickSyncAcquisition::reset() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_active(true); |             acquisition_cc_->set_active(true); | ||||||
|         } |         } | ||||||
| @@ -275,7 +278,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::reset() | |||||||
|  |  | ||||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_state(int state) | void GpsL1CaPcpsQuickSyncAcquisition::set_state(int state) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_state(state); |             acquisition_cc_->set_state(state); | ||||||
|         } |         } | ||||||
| @@ -304,7 +307,7 @@ float GpsL1CaPcpsQuickSyncAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GpsL1CaPcpsQuickSyncAcquisition::connect(gr::top_block_sptr top_block) | void GpsL1CaPcpsQuickSyncAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
| @@ -313,7 +316,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::connect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| void GpsL1CaPcpsQuickSyncAcquisition::disconnect(gr::top_block_sptr top_block) | void GpsL1CaPcpsQuickSyncAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -50,7 +50,8 @@ class GpsL1CaPcpsQuickSyncAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GpsL1CaPcpsQuickSyncAcquisition(ConfigurationInterface* configuration, |     GpsL1CaPcpsQuickSyncAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GpsL1CaPcpsQuickSyncAcquisition(); |     virtual ~GpsL1CaPcpsQuickSyncAcquisition(); | ||||||
| @@ -151,7 +152,7 @@ private: | |||||||
|     unsigned int sampled_ms_; |     unsigned int sampled_ms_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     unsigned int folding_factor_; |     unsigned int folding_factor_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|     std::complex<float>* code_; |     std::complex<float>* code_; | ||||||
|   | |||||||
| @@ -40,13 +40,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GpsL1CaPcpsTongAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
| @@ -56,7 +57,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | |||||||
|  |  | ||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     dump_ = configuration_->property(role + ".dump", false); |     dump_ = configuration_->property(role + ".dump", false); | ||||||
|     doppler_max_ = configuration->property(role + ".doppler_max", 5000); |     doppler_max_ = configuration->property(role + ".doppler_max", 5000); | ||||||
| @@ -76,7 +77,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | |||||||
|  |  | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(gr_complex); |             item_size_ = sizeof(gr_complex); | ||||||
|             acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, fs_in_, |             acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, fs_in_, | ||||||
| @@ -97,7 +98,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -115,10 +116,15 @@ GpsL1CaPcpsTongAcquisition::~GpsL1CaPcpsTongAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GpsL1CaPcpsTongAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GpsL1CaPcpsTongAcquisition::set_channel(unsigned int channel) | void GpsL1CaPcpsTongAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_channel(channel_); |             acquisition_cc_->set_channel(channel_); | ||||||
|         } |         } | ||||||
| @@ -127,7 +133,7 @@ void GpsL1CaPcpsTongAcquisition::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GpsL1CaPcpsTongAcquisition::set_threshold(float threshold) | void GpsL1CaPcpsTongAcquisition::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     if (pfa == 0.0) |     if (pfa == 0.0) | ||||||
|         { |         { | ||||||
| @@ -144,7 +150,7 @@ void GpsL1CaPcpsTongAcquisition::set_threshold(float threshold) | |||||||
|  |  | ||||||
|     DLOG(INFO) << "Channel " << channel_ << "  Threshold = " << threshold_; |     DLOG(INFO) << "Channel " << channel_ << "  Threshold = " << threshold_; | ||||||
|  |  | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_threshold(threshold_); |             acquisition_cc_->set_threshold(threshold_); | ||||||
|         } |         } | ||||||
| @@ -154,7 +160,7 @@ void GpsL1CaPcpsTongAcquisition::set_threshold(float threshold) | |||||||
| void GpsL1CaPcpsTongAcquisition::set_doppler_max(unsigned int doppler_max) | void GpsL1CaPcpsTongAcquisition::set_doppler_max(unsigned int doppler_max) | ||||||
| { | { | ||||||
|     doppler_max_ = doppler_max; |     doppler_max_ = doppler_max; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_max(doppler_max_); |             acquisition_cc_->set_doppler_max(doppler_max_); | ||||||
|         } |         } | ||||||
| @@ -164,7 +170,7 @@ void GpsL1CaPcpsTongAcquisition::set_doppler_max(unsigned int doppler_max) | |||||||
| void GpsL1CaPcpsTongAcquisition::set_doppler_step(unsigned int doppler_step) | void GpsL1CaPcpsTongAcquisition::set_doppler_step(unsigned int doppler_step) | ||||||
| { | { | ||||||
|     doppler_step_ = doppler_step; |     doppler_step_ = doppler_step; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_doppler_step(doppler_step_); |             acquisition_cc_->set_doppler_step(doppler_step_); | ||||||
|         } |         } | ||||||
| @@ -174,7 +180,7 @@ void GpsL1CaPcpsTongAcquisition::set_doppler_step(unsigned int doppler_step) | |||||||
| void GpsL1CaPcpsTongAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | void GpsL1CaPcpsTongAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | ||||||
| { | { | ||||||
|     gnss_synchro_ = gnss_synchro; |     gnss_synchro_ = gnss_synchro; | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); |             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||||
|         } |         } | ||||||
| @@ -183,7 +189,7 @@ void GpsL1CaPcpsTongAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | |||||||
|  |  | ||||||
| signed int GpsL1CaPcpsTongAcquisition::mag() | signed int GpsL1CaPcpsTongAcquisition::mag() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_cc_->mag(); |             return acquisition_cc_->mag(); | ||||||
|         } |         } | ||||||
| @@ -202,7 +208,7 @@ void GpsL1CaPcpsTongAcquisition::init() | |||||||
|  |  | ||||||
| void GpsL1CaPcpsTongAcquisition::set_local_code() | void GpsL1CaPcpsTongAcquisition::set_local_code() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             std::complex<float>* code = new std::complex<float>[code_length_]; |             std::complex<float>* code = new std::complex<float>[code_length_]; | ||||||
|  |  | ||||||
| @@ -223,7 +229,7 @@ void GpsL1CaPcpsTongAcquisition::set_local_code() | |||||||
|  |  | ||||||
| void GpsL1CaPcpsTongAcquisition::reset() | void GpsL1CaPcpsTongAcquisition::reset() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_active(true); |             acquisition_cc_->set_active(true); | ||||||
|         } |         } | ||||||
| @@ -232,7 +238,7 @@ void GpsL1CaPcpsTongAcquisition::reset() | |||||||
|  |  | ||||||
| void GpsL1CaPcpsTongAcquisition::set_state(int state) | void GpsL1CaPcpsTongAcquisition::set_state(int state) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             acquisition_cc_->set_state(state); |             acquisition_cc_->set_state(state); | ||||||
|         } |         } | ||||||
| @@ -263,7 +269,7 @@ float GpsL1CaPcpsTongAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GpsL1CaPcpsTongAcquisition::connect(gr::top_block_sptr top_block) | void GpsL1CaPcpsTongAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
| @@ -272,7 +278,7 @@ void GpsL1CaPcpsTongAcquisition::connect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| void GpsL1CaPcpsTongAcquisition::disconnect(gr::top_block_sptr top_block) | void GpsL1CaPcpsTongAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); |             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -49,7 +49,8 @@ class GpsL1CaPcpsTongAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GpsL1CaPcpsTongAcquisition(ConfigurationInterface* configuration, |     GpsL1CaPcpsTongAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GpsL1CaPcpsTongAcquisition(); |     virtual ~GpsL1CaPcpsTongAcquisition(); | ||||||
| @@ -150,7 +151,7 @@ private: | |||||||
|     unsigned int tong_init_val_; |     unsigned int tong_init_val_; | ||||||
|     unsigned int tong_max_val_; |     unsigned int tong_max_val_; | ||||||
|     unsigned int tong_max_dwells_; |     unsigned int tong_max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|     std::complex<float>* code_; |     std::complex<float>* code_; | ||||||
|   | |||||||
| @@ -43,13 +43,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GpsL2MPcpsAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     Acq_Conf acq_parameters = Acq_Conf(); |     Acq_Conf acq_parameters = Acq_Conf(); | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
| @@ -61,7 +62,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | |||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|     //float pfa =  configuration_->property(role + ".pfa", 0.0); |     //float pfa =  configuration_->property(role + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in_; |     acq_parameters.fs_in = fs_in_; | ||||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L2_M_CODE_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); |     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L2_M_CODE_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); | ||||||
| @@ -97,7 +98,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | |||||||
|  |  | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("cshort") == 0) |     if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(lv_16sc_t); |             item_size_ = sizeof(lv_16sc_t); | ||||||
|         } |         } | ||||||
| @@ -116,7 +117,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | |||||||
|     acquisition_ = pcps_make_acquisition(acq_parameters); |     acquisition_ = pcps_make_acquisition(acq_parameters); | ||||||
|     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; |     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; | ||||||
|  |  | ||||||
|     if (item_type_.compare("cbyte") == 0) |     if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); |             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); | ||||||
|             float_to_complex_ = gr::blocks::float_to_complex::make(); |             float_to_complex_ = gr::blocks::float_to_complex::make(); | ||||||
| @@ -125,7 +126,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     num_codes_ = acq_parameters.sampled_ms / acq_parameters.ms_per_code; |     num_codes_ = acq_parameters.sampled_ms / acq_parameters.ms_per_code; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
| @@ -144,6 +145,11 @@ GpsL2MPcpsAcquisition::~GpsL2MPcpsAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GpsL2MPcpsAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GpsL2MPcpsAcquisition::set_channel(unsigned int channel) | void GpsL2MPcpsAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
| @@ -153,7 +159,7 @@ void GpsL2MPcpsAcquisition::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GpsL2MPcpsAcquisition::set_threshold(float threshold) | void GpsL2MPcpsAcquisition::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     if (pfa == 0.0) |     if (pfa == 0.0) | ||||||
|         { |         { | ||||||
| @@ -263,15 +269,15 @@ float GpsL2MPcpsAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GpsL2MPcpsAcquisition::connect(gr::top_block_sptr top_block) | void GpsL2MPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             // Since a byte-based acq implementation is not available, |             // Since a byte-based acq implementation is not available, | ||||||
|             // we just convert cshorts to gr_complex |             // we just convert cshorts to gr_complex | ||||||
| @@ -288,15 +294,15 @@ void GpsL2MPcpsAcquisition::connect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| void GpsL2MPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | void GpsL2MPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); |             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||||
|             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); |             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||||
| @@ -311,15 +317,15 @@ void GpsL2MPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| gr::basic_block_sptr GpsL2MPcpsAcquisition::get_left_block() | gr::basic_block_sptr GpsL2MPcpsAcquisition::get_left_block() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             return cbyte_to_float_x2_; |             return cbyte_to_float_x2_; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -53,7 +53,8 @@ class GpsL2MPcpsAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GpsL2MPcpsAcquisition(ConfigurationInterface* configuration, |     GpsL2MPcpsAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GpsL2MPcpsAcquisition(); |     virtual ~GpsL2MPcpsAcquisition(); | ||||||
| @@ -154,7 +155,7 @@ private: | |||||||
|     unsigned int doppler_max_; |     unsigned int doppler_max_; | ||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     bool blocking_; |     bool blocking_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|   | |||||||
| @@ -43,13 +43,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GpsL2MPcpsAcquisitionFpga::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( | GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     //pcpsconf_t acq_parameters; |     //pcpsconf_t acq_parameters; | ||||||
|     pcpsconf_fpga_t acq_parameters; |     pcpsconf_fpga_t acq_parameters; | ||||||
| @@ -62,7 +63,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( | |||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|     //float pfa =  configuration_->property(role + ".pfa", 0.0); |     //float pfa =  configuration_->property(role + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in_; |     acq_parameters.fs_in = fs_in_; | ||||||
|     //if_ = configuration_->property(role + ".if", 0); |     //if_ = configuration_->property(role + ".if", 0); | ||||||
| @@ -153,7 +154,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( | |||||||
|  |  | ||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|  |  | ||||||
|  |  | ||||||
|     //    vector_length_ = code_length_; |     //    vector_length_ = code_length_; | ||||||
| @@ -206,6 +207,11 @@ GpsL2MPcpsAcquisitionFpga::~GpsL2MPcpsAcquisitionFpga() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GpsL2MPcpsAcquisitionFpga::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GpsL2MPcpsAcquisitionFpga::set_channel(unsigned int channel) | void GpsL2MPcpsAcquisitionFpga::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
| @@ -215,7 +221,7 @@ void GpsL2MPcpsAcquisitionFpga::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GpsL2MPcpsAcquisitionFpga::set_threshold(float threshold) | void GpsL2MPcpsAcquisitionFpga::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     //    float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     //    float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|     // |     // | ||||||
|     //    if (pfa == 0.0) |     //    if (pfa == 0.0) | ||||||
|     //        { |     //        { | ||||||
|   | |||||||
| @@ -54,7 +54,8 @@ class GpsL2MPcpsAcquisitionFpga : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GpsL2MPcpsAcquisitionFpga(ConfigurationInterface* configuration, |     GpsL2MPcpsAcquisitionFpga(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GpsL2MPcpsAcquisitionFpga(); |     virtual ~GpsL2MPcpsAcquisitionFpga(); | ||||||
| @@ -157,7 +158,7 @@ private: | |||||||
|     unsigned int doppler_max_; |     unsigned int doppler_max_; | ||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     //long if_; |     //long if_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     bool blocking_; |     bool blocking_; | ||||||
|   | |||||||
| @@ -43,13 +43,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GpsL5iPcpsAcquisition::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     Acq_Conf acq_parameters = Acq_Conf(); |     Acq_Conf acq_parameters = Acq_Conf(); | ||||||
|     configuration_ = configuration; |     configuration_ = configuration; | ||||||
| @@ -60,7 +61,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | |||||||
|  |  | ||||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); |     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in_; |     acq_parameters.fs_in = fs_in_; | ||||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5i_CODE_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); |     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5i_CODE_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); | ||||||
| @@ -89,7 +90,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | |||||||
|     vector_length_ = std::floor(acq_parameters.sampled_ms * acq_parameters.samples_per_ms) * (acq_parameters.bit_transition_flag ? 2 : 1); |     vector_length_ = std::floor(acq_parameters.sampled_ms * acq_parameters.samples_per_ms) * (acq_parameters.bit_transition_flag ? 2 : 1); | ||||||
|     code_ = new gr_complex[vector_length_]; |     code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
|     if (item_type_.compare("cshort") == 0) |     if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             item_size_ = sizeof(lv_16sc_t); |             item_size_ = sizeof(lv_16sc_t); | ||||||
|         } |         } | ||||||
| @@ -108,7 +109,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | |||||||
|     acquisition_ = pcps_make_acquisition(acq_parameters); |     acquisition_ = pcps_make_acquisition(acq_parameters); | ||||||
|     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; |     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; | ||||||
|  |  | ||||||
|     if (item_type_.compare("cbyte") == 0) |     if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); |             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); | ||||||
|             float_to_complex_ = gr::blocks::float_to_complex::make(); |             float_to_complex_ = gr::blocks::float_to_complex::make(); | ||||||
| @@ -116,7 +117,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     threshold_ = 0.0; |     threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     if (in_streams_ > 1) |     if (in_streams_ > 1) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "This implementation only supports one input stream"; |             LOG(ERROR) << "This implementation only supports one input stream"; | ||||||
| @@ -134,6 +135,11 @@ GpsL5iPcpsAcquisition::~GpsL5iPcpsAcquisition() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GpsL5iPcpsAcquisition::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GpsL5iPcpsAcquisition::set_channel(unsigned int channel) | void GpsL5iPcpsAcquisition::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
| @@ -143,7 +149,7 @@ void GpsL5iPcpsAcquisition::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GpsL5iPcpsAcquisition::set_threshold(float threshold) | void GpsL5iPcpsAcquisition::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|  |  | ||||||
|     if (pfa == 0.0) |     if (pfa == 0.0) | ||||||
|         { |         { | ||||||
| @@ -251,15 +257,15 @@ float GpsL5iPcpsAcquisition::calculate_threshold(float pfa) | |||||||
|  |  | ||||||
| void GpsL5iPcpsAcquisition::connect(gr::top_block_sptr top_block) | void GpsL5iPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to connect |             // nothing to connect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             // Since a byte-based acq implementation is not available, |             // Since a byte-based acq implementation is not available, | ||||||
|             // we just convert cshorts to gr_complex |             // we just convert cshorts to gr_complex | ||||||
| @@ -276,15 +282,15 @@ void GpsL5iPcpsAcquisition::connect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| void GpsL5iPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | void GpsL5iPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             // nothing to disconnect |             // nothing to disconnect | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); |             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||||
|             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); |             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||||
| @@ -299,15 +305,15 @@ void GpsL5iPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | |||||||
|  |  | ||||||
| gr::basic_block_sptr GpsL5iPcpsAcquisition::get_left_block() | gr::basic_block_sptr GpsL5iPcpsAcquisition::get_left_block() | ||||||
| { | { | ||||||
|     if (item_type_.compare("gr_complex") == 0) |     if (item_type_ == "gr_complex") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cshort") == 0) |     else if (item_type_ == "cshort") | ||||||
|         { |         { | ||||||
|             return acquisition_; |             return acquisition_; | ||||||
|         } |         } | ||||||
|     else if (item_type_.compare("cbyte") == 0) |     else if (item_type_ == "cbyte") | ||||||
|         { |         { | ||||||
|             return cbyte_to_float_x2_; |             return cbyte_to_float_x2_; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -53,7 +53,8 @@ class GpsL5iPcpsAcquisition : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GpsL5iPcpsAcquisition(ConfigurationInterface* configuration, |     GpsL5iPcpsAcquisition(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GpsL5iPcpsAcquisition(); |     virtual ~GpsL5iPcpsAcquisition(); | ||||||
| @@ -154,7 +155,7 @@ private: | |||||||
|     unsigned int doppler_max_; |     unsigned int doppler_max_; | ||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     bool blocking_; |     bool blocking_; | ||||||
|     std::string dump_filename_; |     std::string dump_filename_; | ||||||
|   | |||||||
| @@ -43,13 +43,14 @@ | |||||||
|  |  | ||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| void GpsL5iPcpsAcquisitionFpga::stop_acquisition() |  | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
| GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( | GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( | ||||||
|     ConfigurationInterface* configuration, std::string role, |     ConfigurationInterface* configuration, | ||||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) |     const std::string& role, | ||||||
|  |     unsigned int in_streams, | ||||||
|  |     unsigned int out_streams) : role_(role), | ||||||
|  |                                 in_streams_(in_streams), | ||||||
|  |                                 out_streams_(out_streams) | ||||||
| { | { | ||||||
|     //printf("L5 ACQ CLASS CREATED\n"); |     //printf("L5 ACQ CLASS CREATED\n"); | ||||||
|     pcpsconf_fpga_t acq_parameters; |     pcpsconf_fpga_t acq_parameters; | ||||||
| @@ -61,8 +62,8 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( | |||||||
|  |  | ||||||
|     //item_type_ = configuration_->property(role + ".item_type", default_item_type); |     //item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||||
|  |  | ||||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); |     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||||
|     long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); |     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||||
|     acq_parameters.fs_in = fs_in; |     acq_parameters.fs_in = fs_in; | ||||||
|     //if_ = configuration_->property(role + ".if", 0); |     //if_ = configuration_->property(role + ".if", 0); | ||||||
|     //acq_parameters.freq = if_; |     //acq_parameters.freq = if_; | ||||||
| @@ -207,7 +208,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( | |||||||
|     channel_ = 0; |     channel_ = 0; | ||||||
|     //    threshold_ = 0.0; |     //    threshold_ = 0.0; | ||||||
|     doppler_step_ = 0; |     doppler_step_ = 0; | ||||||
|     gnss_synchro_ = 0; |     gnss_synchro_ = nullptr; | ||||||
|     //printf("L5 ACQ CLASS FINISHED\n"); |     //printf("L5 ACQ CLASS FINISHED\n"); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -219,6 +220,11 @@ GpsL5iPcpsAcquisitionFpga::~GpsL5iPcpsAcquisitionFpga() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void GpsL5iPcpsAcquisitionFpga::stop_acquisition() | ||||||
|  | { | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GpsL5iPcpsAcquisitionFpga::set_channel(unsigned int channel) | void GpsL5iPcpsAcquisitionFpga::set_channel(unsigned int channel) | ||||||
| { | { | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
| @@ -228,7 +234,7 @@ void GpsL5iPcpsAcquisitionFpga::set_channel(unsigned int channel) | |||||||
|  |  | ||||||
| void GpsL5iPcpsAcquisitionFpga::set_threshold(float threshold) | void GpsL5iPcpsAcquisitionFpga::set_threshold(float threshold) | ||||||
| { | { | ||||||
|     //    float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); |     //    float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||||
|     // |     // | ||||||
|     //    if (pfa == 0.0) |     //    if (pfa == 0.0) | ||||||
|     //        { |     //        { | ||||||
|   | |||||||
| @@ -54,7 +54,8 @@ class GpsL5iPcpsAcquisitionFpga : public AcquisitionInterface | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     GpsL5iPcpsAcquisitionFpga(ConfigurationInterface* configuration, |     GpsL5iPcpsAcquisitionFpga(ConfigurationInterface* configuration, | ||||||
|         std::string role, unsigned int in_streams, |         const std::string& role, | ||||||
|  |         unsigned int in_streams, | ||||||
|         unsigned int out_streams); |         unsigned int out_streams); | ||||||
|  |  | ||||||
|     virtual ~GpsL5iPcpsAcquisitionFpga(); |     virtual ~GpsL5iPcpsAcquisitionFpga(); | ||||||
| @@ -157,7 +158,7 @@ private: | |||||||
|     unsigned int doppler_max_; |     unsigned int doppler_max_; | ||||||
|     unsigned int doppler_step_; |     unsigned int doppler_step_; | ||||||
|     unsigned int max_dwells_; |     unsigned int max_dwells_; | ||||||
|     long fs_in_; |     int64_t fs_in_; | ||||||
|     //long if_; |     //long if_; | ||||||
|     bool dump_; |     bool dump_; | ||||||
|     bool blocking_; |     bool blocking_; | ||||||
|   | |||||||
| @@ -32,7 +32,6 @@ | |||||||
| #include "channel.h" | #include "channel.h" | ||||||
| #include "configuration_interface.h" | #include "configuration_interface.h" | ||||||
| #include "gnss_sdr_flags.h" | #include "gnss_sdr_flags.h" | ||||||
| #include <boost/lexical_cast.hpp> |  | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
| #include <cstdint> | #include <cstdint> | ||||||
|  |  | ||||||
| @@ -44,14 +43,14 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, | |||||||
|     std::shared_ptr<TrackingInterface> trk, std::shared_ptr<TelemetryDecoderInterface> nav, |     std::shared_ptr<TrackingInterface> trk, std::shared_ptr<TelemetryDecoderInterface> nav, | ||||||
|     std::string role, std::string implementation, gr::msg_queue::sptr queue) |     std::string role, std::string implementation, gr::msg_queue::sptr queue) | ||||||
| { | { | ||||||
|     pass_through_ = pass_through; |     pass_through_ = std::move(pass_through); | ||||||
|     acq_ = acq; |     acq_ = std::move(acq); | ||||||
|     trk_ = trk; |     trk_ = std::move(trk); | ||||||
|     nav_ = nav; |     nav_ = std::move(nav); | ||||||
|     role_ = role; |     role_ = std::move(role); | ||||||
|     implementation_ = implementation; |     implementation_ = std::move(implementation); | ||||||
|     channel_ = channel; |     channel_ = channel; | ||||||
|     queue_ = queue; |     queue_ = std::move(queue); | ||||||
|     channel_fsm_ = std::make_shared<ChannelFsm>(); |     channel_fsm_ = std::make_shared<ChannelFsm>(); | ||||||
|  |  | ||||||
|     flag_enable_fpga = configuration->property("Channel.enable_FPGA", false); |     flag_enable_fpga = configuration->property("Channel.enable_FPGA", false); | ||||||
| @@ -59,6 +58,7 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, | |||||||
|     trk_->set_channel(channel_); |     trk_->set_channel(channel_); | ||||||
|     nav_->set_channel(channel_); |     nav_->set_channel(channel_); | ||||||
|  |  | ||||||
|  |     gnss_synchro_ = Gnss_Synchro(); | ||||||
|     gnss_synchro_.Channel_ID = channel_; |     gnss_synchro_.Channel_ID = channel_; | ||||||
|     acq_->set_gnss_synchro(&gnss_synchro_); |     acq_->set_gnss_synchro(&gnss_synchro_); | ||||||
|     trk_->set_gnss_synchro(&gnss_synchro_); |     trk_->set_gnss_synchro(&gnss_synchro_); | ||||||
| @@ -76,21 +76,21 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, | |||||||
|  |  | ||||||
|     // IMPORTANT: Do not change the order between set_doppler_step and set_threshold |     // IMPORTANT: Do not change the order between set_doppler_step and set_threshold | ||||||
|  |  | ||||||
|     uint32_t doppler_step = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast<std::string>(channel_) + ".doppler_step", 0); |     uint32_t doppler_step = configuration->property("Acquisition_" + implementation_ + std::to_string(channel_) + ".doppler_step", 0); | ||||||
|     if (doppler_step == 0) doppler_step = configuration->property("Acquisition_" + implementation_ + ".doppler_step", 500); |     if (doppler_step == 0) doppler_step = configuration->property("Acquisition_" + implementation_ + ".doppler_step", 500); | ||||||
|     if (FLAGS_doppler_step != 0) doppler_step = static_cast<uint32_t>(FLAGS_doppler_step); |     if (FLAGS_doppler_step != 0) doppler_step = static_cast<uint32_t>(FLAGS_doppler_step); | ||||||
|     DLOG(INFO) << "Channel " << channel_ << " Doppler_step = " << doppler_step; |     DLOG(INFO) << "Channel " << channel_ << " Doppler_step = " << doppler_step; | ||||||
|  |  | ||||||
|     acq_->set_doppler_step(doppler_step); |     acq_->set_doppler_step(doppler_step); | ||||||
|  |  | ||||||
|     float threshold = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast<std::string>(channel_) + ".threshold", 0.0); |     float threshold = configuration->property("Acquisition_" + implementation_ + std::to_string(channel_) + ".threshold", 0.0); | ||||||
|     if (threshold == 0.0) threshold = configuration->property("Acquisition_" + implementation_ + ".threshold", 0.0); |     if (threshold == 0.0) threshold = configuration->property("Acquisition_" + implementation_ + ".threshold", 0.0); | ||||||
|  |  | ||||||
|     acq_->set_threshold(threshold); |     acq_->set_threshold(threshold); | ||||||
|  |  | ||||||
|     acq_->init(); |     acq_->init(); | ||||||
|  |  | ||||||
|     repeat_ = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast<std::string>(channel_) + ".repeat_satellite", false); |     repeat_ = configuration->property("Acquisition_" + implementation_ + std::to_string(channel_) + ".repeat_satellite", false); | ||||||
|     DLOG(INFO) << "Channel " << channel_ << " satellite repeat = " << repeat_; |     DLOG(INFO) << "Channel " << channel_ << " satellite repeat = " << repeat_; | ||||||
|  |  | ||||||
|     channel_fsm_->set_acquisition(acq_); |     channel_fsm_->set_acquisition(acq_); | ||||||
| @@ -107,7 +107,9 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, | |||||||
|  |  | ||||||
|  |  | ||||||
| // Destructor | // Destructor | ||||||
| Channel::~Channel() {} | Channel::~Channel() = default; | ||||||
|  |  | ||||||
|  |  | ||||||
| void Channel::connect(gr::top_block_sptr top_block) | void Channel::connect(gr::top_block_sptr top_block) | ||||||
| { | { | ||||||
|     if (connected_) |     if (connected_) | ||||||
|   | |||||||
| @@ -55,7 +55,7 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac | |||||||
|     std::string default_sample_type = "real"; |     std::string default_sample_type = "real"; | ||||||
|     double default_seconds_to_skip = 0.0; |     double default_seconds_to_skip = 0.0; | ||||||
|  |  | ||||||
|     samples_ = configuration->property(role + ".samples", 0L); |     samples_ = configuration->property(role + ".samples", 0ULL); | ||||||
|     sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0); |     sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0); | ||||||
|     filename_ = configuration->property(role + ".filename", default_filename); |     filename_ = configuration->property(role + ".filename", default_filename); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -129,7 +129,7 @@ public: | |||||||
|     } |     } | ||||||
|  |  | ||||||
| private: | private: | ||||||
|     unsigned long long samples_; |     uint64_t samples_; | ||||||
|     long sampling_frequency_; |     long sampling_frequency_; | ||||||
|     std::string filename_; |     std::string filename_; | ||||||
|     std::string item_type_; |     std::string item_type_; | ||||||
|   | |||||||
| @@ -35,6 +35,7 @@ | |||||||
| #ifndef GNSS_SDR_CONFIGURATION_INTERFACE_H_ | #ifndef GNSS_SDR_CONFIGURATION_INTERFACE_H_ | ||||||
| #define GNSS_SDR_CONFIGURATION_INTERFACE_H_ | #define GNSS_SDR_CONFIGURATION_INTERFACE_H_ | ||||||
|  |  | ||||||
|  | #include <cstdint> | ||||||
| #include <string> | #include <string> | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
| @@ -54,10 +55,12 @@ public: | |||||||
|     virtual ~ConfigurationInterface() {} |     virtual ~ConfigurationInterface() {} | ||||||
|     virtual std::string property(std::string property_name, std::string default_value) = 0; |     virtual std::string property(std::string property_name, std::string default_value) = 0; | ||||||
|     virtual bool property(std::string property_name, bool default_value) = 0; |     virtual bool property(std::string property_name, bool default_value) = 0; | ||||||
|     virtual long property(std::string property_name, long default_value) = 0; |     virtual int64_t property(std::string property_name, int64_t default_value) = 0; | ||||||
|     virtual int property(std::string property_name, int default_value) = 0; |     virtual uint64_t property(std::string property_name, uint64_t default_value) = 0; | ||||||
|     virtual unsigned int property(std::string property_name, unsigned int default_value) = 0; |     virtual int32_t property(std::string property_name, int32_t default_value) = 0; | ||||||
|     virtual unsigned short property(std::string property_name, unsigned short default_value) = 0; |     virtual uint32_t property(std::string property_name, uint32_t default_value) = 0; | ||||||
|  |     virtual int16_t property(std::string property_name, int16_t default_value) = 0; | ||||||
|  |     virtual uint16_t property(std::string property_name, uint16_t default_value) = 0; | ||||||
|     virtual float property(std::string property_name, float default_value) = 0; |     virtual float property(std::string property_name, float default_value) = 0; | ||||||
|     virtual double property(std::string property_name, double default_value) = 0; |     virtual double property(std::string property_name, double default_value) = 0; | ||||||
|     virtual void set_property(std::string property_name, std::string value) = 0; |     virtual void set_property(std::string property_name, std::string value) = 0; | ||||||
|   | |||||||
| @@ -70,13 +70,13 @@ std::string INIReader::Get(std::string section, std::string name, std::string de | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| long INIReader::GetInteger(std::string section, std::string name, long default_value) | int64_t INIReader::GetInteger(std::string section, std::string name, int64_t default_value) | ||||||
| { | { | ||||||
|     std::string valstr = Get(section, name, ""); |     std::string valstr = Get(section, name, ""); | ||||||
|     const char* value = valstr.c_str(); |     const char* value = valstr.c_str(); | ||||||
|     char* end; |     char* end; | ||||||
|     // This parses "1234" (decimal) and also "0x4D2" (hex) |     // This parses "1234" (decimal) and also "0x4D2" (hex) | ||||||
|     long n = strtol(value, &end, 0); |     int64_t n = strtol(value, &end, 0); | ||||||
|     return end > value ? n : default_value; |     return end > value ? n : default_value; | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -48,6 +48,7 @@ | |||||||
| #ifndef __INIREADER_H__ | #ifndef __INIREADER_H__ | ||||||
| #define __INIREADER_H__ | #define __INIREADER_H__ | ||||||
|  |  | ||||||
|  | #include <cstdint> | ||||||
| #include <map> | #include <map> | ||||||
| #include <string> | #include <string> | ||||||
|  |  | ||||||
| @@ -69,7 +70,7 @@ public: | |||||||
|         std::string default_value); |         std::string default_value); | ||||||
|  |  | ||||||
|     //! Get an integer (long) value from INI file, returning default_value if not found. |     //! Get an integer (long) value from INI file, returning default_value if not found. | ||||||
|     long GetInteger(std::string section, std::string name, long default_value); |     int64_t GetInteger(std::string section, std::string name, int64_t default_value); | ||||||
|  |  | ||||||
| private: | private: | ||||||
|     int _error; |     int _error; | ||||||
|   | |||||||
| @@ -55,11 +55,11 @@ bool StringConverter::convert(const std::string& value, bool default_value) | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| long StringConverter::convert(const std::string& value, long default_value) | int64_t StringConverter::convert(const std::string& value, int64_t default_value) | ||||||
| { | { | ||||||
|     std::stringstream stream(value); |     std::stringstream stream(value); | ||||||
|  |  | ||||||
|     long result; |     int64_t result; | ||||||
|     stream >> result; |     stream >> result; | ||||||
|  |  | ||||||
|     if (stream.fail()) |     if (stream.fail()) | ||||||
| @@ -73,7 +73,25 @@ long StringConverter::convert(const std::string& value, long default_value) | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| int StringConverter::convert(const std::string& value, int default_value) | uint64_t StringConverter::convert(const std::string& value, uint64_t default_value) | ||||||
|  | { | ||||||
|  |     std::stringstream stream(value); | ||||||
|  |  | ||||||
|  |     uint64_t result; | ||||||
|  |     stream >> result; | ||||||
|  |  | ||||||
|  |     if (stream.fail()) | ||||||
|  |         { | ||||||
|  |             return default_value; | ||||||
|  |         } | ||||||
|  |     else | ||||||
|  |         { | ||||||
|  |             return result; | ||||||
|  |         } | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | int32_t StringConverter::convert(const std::string& value, int32_t default_value) | ||||||
| { | { | ||||||
|     std::stringstream stream(value); |     std::stringstream stream(value); | ||||||
|  |  | ||||||
| @@ -91,11 +109,11 @@ int StringConverter::convert(const std::string& value, int default_value) | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| unsigned int StringConverter::convert(const std::string& value, unsigned int default_value) | uint32_t StringConverter::convert(const std::string& value, uint32_t default_value) | ||||||
| { | { | ||||||
|     std::stringstream stream(value); |     std::stringstream stream(value); | ||||||
|  |  | ||||||
|     unsigned int result; |     uint32_t result; | ||||||
|     stream >> result; |     stream >> result; | ||||||
|  |  | ||||||
|     if (stream.fail()) |     if (stream.fail()) | ||||||
| @@ -109,11 +127,29 @@ unsigned int StringConverter::convert(const std::string& value, unsigned int def | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| unsigned short StringConverter::convert(const std::string& value, unsigned short default_value) | uint16_t StringConverter::convert(const std::string& value, uint16_t default_value) | ||||||
| { | { | ||||||
|     std::stringstream stream(value); |     std::stringstream stream(value); | ||||||
|  |  | ||||||
|     unsigned short result; |     uint16_t result; | ||||||
|  |     stream >> result; | ||||||
|  |  | ||||||
|  |     if (stream.fail()) | ||||||
|  |         { | ||||||
|  |             return default_value; | ||||||
|  |         } | ||||||
|  |     else | ||||||
|  |         { | ||||||
|  |             return result; | ||||||
|  |         } | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | int16_t StringConverter::convert(const std::string& value, int16_t default_value) | ||||||
|  | { | ||||||
|  |     std::stringstream stream(value); | ||||||
|  |  | ||||||
|  |     int16_t result; | ||||||
|     stream >> result; |     stream >> result; | ||||||
|  |  | ||||||
|     if (stream.fail()) |     if (stream.fail()) | ||||||
|   | |||||||
| @@ -33,6 +33,7 @@ | |||||||
| #ifndef GNSS_SDR_STRING_CONVERTER_H_ | #ifndef GNSS_SDR_STRING_CONVERTER_H_ | ||||||
| #define GNSS_SDR_STRING_CONVERTER_H_ | #define GNSS_SDR_STRING_CONVERTER_H_ | ||||||
|  |  | ||||||
|  | #include <cstdint> | ||||||
| #include <string> | #include <string> | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
| @@ -46,10 +47,12 @@ public: | |||||||
|     virtual ~StringConverter(); |     virtual ~StringConverter(); | ||||||
|  |  | ||||||
|     bool convert(const std::string& value, bool default_value); |     bool convert(const std::string& value, bool default_value); | ||||||
|     long convert(const std::string& value, long default_value); |     int64_t convert(const std::string& value, int64_t default_value); | ||||||
|     int convert(const std::string& value, int default_value); |     uint64_t convert(const std::string& value, uint64_t default_value); | ||||||
|     unsigned int convert(const std::string& value, unsigned int default_value); |     int32_t convert(const std::string& value, int32_t default_value); | ||||||
|     unsigned short convert(const std::string& value, unsigned short default_value); |     uint32_t convert(const std::string& value, uint32_t default_value); | ||||||
|  |     int16_t convert(const std::string& value, int16_t default_value); | ||||||
|  |     uint16_t convert(const std::string& value, uint16_t default_value); | ||||||
|     float convert(const std::string& value, float default_value); |     float convert(const std::string& value, float default_value); | ||||||
|     double convert(const std::string& value, double default_value); |     double convert(const std::string& value, double default_value); | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -69,9 +69,7 @@ gnss_synchro_monitor::gnss_synchro_monitor(unsigned int n_channels, | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| gnss_synchro_monitor::~gnss_synchro_monitor() | gnss_synchro_monitor::~gnss_synchro_monitor() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |  | ||||||
| int gnss_synchro_monitor::work(int noutput_items, gr_vector_const_void_star& input_items, | int gnss_synchro_monitor::work(int noutput_items, gr_vector_const_void_star& input_items, | ||||||
|   | |||||||
| @@ -35,11 +35,11 @@ | |||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
| // Constructor | // Constructor | ||||||
| ControlMessageFactory::ControlMessageFactory() {} | ControlMessageFactory::ControlMessageFactory() = default; | ||||||
|  |  | ||||||
|  |  | ||||||
| // Destructor | // Destructor | ||||||
| ControlMessageFactory::~ControlMessageFactory() {} | ControlMessageFactory::~ControlMessageFactory() = default; | ||||||
|  |  | ||||||
|  |  | ||||||
| gr::message::sptr ControlMessageFactory::GetQueueMessage(unsigned int who, unsigned int what) | gr::message::sptr ControlMessageFactory::GetQueueMessage(unsigned int who, unsigned int what) | ||||||
| @@ -53,7 +53,7 @@ gr::message::sptr ControlMessageFactory::GetQueueMessage(unsigned int who, unsig | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> ControlMessageFactory::GetControlMessages(gr::message::sptr queue_message) | std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> ControlMessageFactory::GetControlMessages(const gr::message::sptr& queue_message) | ||||||
| { | { | ||||||
|     std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> control_messages = std::make_shared<std::vector<std::shared_ptr<ControlMessage>>>(); |     std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> control_messages = std::make_shared<std::vector<std::shared_ptr<ControlMessage>>>(); | ||||||
|     unsigned int control_messages_count = queue_message->length() / sizeof(ControlMessage); |     unsigned int control_messages_count = queue_message->length() / sizeof(ControlMessage); | ||||||
|   | |||||||
| @@ -58,7 +58,7 @@ public: | |||||||
|     virtual ~ControlMessageFactory(); |     virtual ~ControlMessageFactory(); | ||||||
|  |  | ||||||
|     gr::message::sptr GetQueueMessage(unsigned int who, unsigned int what); |     gr::message::sptr GetQueueMessage(unsigned int who, unsigned int what); | ||||||
|     std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> GetControlMessages(gr::message::sptr queue_message); |     std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> GetControlMessages(const gr::message::sptr& queue_message); | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif /*GNSS_SDR_CONTROL_MESSAGE_FACTORY_H_*/ | #endif /*GNSS_SDR_CONTROL_MESSAGE_FACTORY_H_*/ | ||||||
|   | |||||||
| @@ -166,7 +166,7 @@ void ControlThread::init() | |||||||
|     else |     else | ||||||
|         { |         { | ||||||
|             // fill agnss_ref_time_ |             // fill agnss_ref_time_ | ||||||
|             struct tm tm; |             struct tm tm = {}; | ||||||
|             if (strptime(ref_time_str.c_str(), "%d/%m/%Y %H:%M:%S", &tm) != nullptr) |             if (strptime(ref_time_str.c_str(), "%d/%m/%Y %H:%M:%S", &tm) != nullptr) | ||||||
|                 { |                 { | ||||||
|                     agnss_ref_time_.d_tv_sec = timegm(&tm); |                     agnss_ref_time_.d_tv_sec = timegm(&tm); | ||||||
| @@ -190,8 +190,6 @@ void ControlThread::init() | |||||||
|  |  | ||||||
| ControlThread::~ControlThread() | ControlThread::~ControlThread() | ||||||
| { | { | ||||||
|     // save navigation data to files |  | ||||||
|     // if (save_assistance_to_XML() == true) {} |  | ||||||
|     if (msqid != -1) msgctl(msqid, IPC_RMID, NULL); |     if (msqid != -1) msgctl(msqid, IPC_RMID, NULL); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -878,7 +876,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time | |||||||
|     std::vector<unsigned int> visible_gps; |     std::vector<unsigned int> visible_gps; | ||||||
|     std::vector<unsigned int> visible_gal; |     std::vector<unsigned int> visible_gal; | ||||||
|     std::shared_ptr<PvtInterface> pvt_ptr = flowgraph_->get_pvt(); |     std::shared_ptr<PvtInterface> pvt_ptr = flowgraph_->get_pvt(); | ||||||
|     struct tm tstruct; |     struct tm tstruct = {}; | ||||||
|     char buf[80]; |     char buf[80]; | ||||||
|     tstruct = *gmtime(&rx_utc_time); |     tstruct = *gmtime(&rx_utc_time); | ||||||
|     strftime(buf, sizeof(buf), "%d/%m/%Y %H:%M:%S ", &tstruct); |     strftime(buf, sizeof(buf), "%d/%m/%Y %H:%M:%S ", &tstruct); | ||||||
|   | |||||||
| @@ -34,8 +34,8 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "file_configuration.h" | #include "file_configuration.h" | ||||||
| #include "in_memory_configuration.h" |  | ||||||
| #include "INIReader.h" | #include "INIReader.h" | ||||||
|  | #include "in_memory_configuration.h" | ||||||
| #include "string_converter.h" | #include "string_converter.h" | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
| #include <string> | #include <string> | ||||||
| @@ -45,7 +45,7 @@ using google::LogMessage; | |||||||
|  |  | ||||||
| FileConfiguration::FileConfiguration(std::string filename) | FileConfiguration::FileConfiguration(std::string filename) | ||||||
| { | { | ||||||
|     filename_ = filename; |     filename_ = std::move(filename); | ||||||
|     init(); |     init(); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -84,13 +84,13 @@ bool FileConfiguration::property(std::string property_name, bool default_value) | |||||||
|         } |         } | ||||||
|     else |     else | ||||||
|         { |         { | ||||||
|             std::string empty = ""; |             std::string empty; | ||||||
|             return converter_->convert(property(property_name, empty), default_value); |             return converter_->convert(property(property_name, empty), default_value); | ||||||
|         } |         } | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| long FileConfiguration::property(std::string property_name, long default_value) | int64_t FileConfiguration::property(std::string property_name, int64_t default_value) | ||||||
| { | { | ||||||
|     if (overrided_->is_present(property_name)) |     if (overrided_->is_present(property_name)) | ||||||
|         { |         { | ||||||
| @@ -98,7 +98,21 @@ long FileConfiguration::property(std::string property_name, long default_value) | |||||||
|         } |         } | ||||||
|     else |     else | ||||||
|         { |         { | ||||||
|             std::string empty = ""; |             std::string empty; | ||||||
|  |             return converter_->convert(property(property_name, empty), default_value); | ||||||
|  |         } | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | uint64_t FileConfiguration::property(std::string property_name, uint64_t default_value) | ||||||
|  | { | ||||||
|  |     if (overrided_->is_present(property_name)) | ||||||
|  |         { | ||||||
|  |             return overrided_->property(property_name, default_value); | ||||||
|  |         } | ||||||
|  |     else | ||||||
|  |         { | ||||||
|  |             std::string empty; | ||||||
|             return converter_->convert(property(property_name, empty), default_value); |             return converter_->convert(property(property_name, empty), default_value); | ||||||
|         } |         } | ||||||
| } | } | ||||||
| @@ -112,7 +126,7 @@ int FileConfiguration::property(std::string property_name, int default_value) | |||||||
|         } |         } | ||||||
|     else |     else | ||||||
|         { |         { | ||||||
|             std::string empty = ""; |             std::string empty; | ||||||
|             return converter_->convert(property(property_name, empty), default_value); |             return converter_->convert(property(property_name, empty), default_value); | ||||||
|         } |         } | ||||||
| } | } | ||||||
| @@ -126,13 +140,13 @@ unsigned int FileConfiguration::property(std::string property_name, unsigned int | |||||||
|         } |         } | ||||||
|     else |     else | ||||||
|         { |         { | ||||||
|             std::string empty = ""; |             std::string empty; | ||||||
|             return converter_->convert(property(property_name, empty), default_value); |             return converter_->convert(property(property_name, empty), default_value); | ||||||
|         } |         } | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| unsigned short FileConfiguration::property(std::string property_name, unsigned short default_value) | uint16_t FileConfiguration::property(std::string property_name, uint16_t default_value) | ||||||
| { | { | ||||||
|     if (overrided_->is_present(property_name)) |     if (overrided_->is_present(property_name)) | ||||||
|         { |         { | ||||||
| @@ -140,7 +154,21 @@ unsigned short FileConfiguration::property(std::string property_name, unsigned s | |||||||
|         } |         } | ||||||
|     else |     else | ||||||
|         { |         { | ||||||
|             std::string empty = ""; |             std::string empty; | ||||||
|  |             return converter_->convert(property(property_name, empty), default_value); | ||||||
|  |         } | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | int16_t FileConfiguration::property(std::string property_name, int16_t default_value) | ||||||
|  | { | ||||||
|  |     if (overrided_->is_present(property_name)) | ||||||
|  |         { | ||||||
|  |             return overrided_->property(property_name, default_value); | ||||||
|  |         } | ||||||
|  |     else | ||||||
|  |         { | ||||||
|  |             std::string empty; | ||||||
|             return converter_->convert(property(property_name, empty), default_value); |             return converter_->convert(property(property_name, empty), default_value); | ||||||
|         } |         } | ||||||
| } | } | ||||||
| @@ -154,7 +182,7 @@ float FileConfiguration::property(std::string property_name, float default_value | |||||||
|         } |         } | ||||||
|     else |     else | ||||||
|         { |         { | ||||||
|             std::string empty = ""; |             std::string empty; | ||||||
|             return converter_->convert(property(property_name, empty), default_value); |             return converter_->convert(property(property_name, empty), default_value); | ||||||
|         } |         } | ||||||
| } | } | ||||||
| @@ -168,7 +196,7 @@ double FileConfiguration::property(std::string property_name, double default_val | |||||||
|         } |         } | ||||||
|     else |     else | ||||||
|         { |         { | ||||||
|             std::string empty = ""; |             std::string empty; | ||||||
|             return converter_->convert(property(property_name, empty), default_value); |             return converter_->convert(property(property_name, empty), default_value); | ||||||
|         } |         } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -37,6 +37,7 @@ | |||||||
| #define GNSS_SDR_FILE_CONFIGURATION_H_ | #define GNSS_SDR_FILE_CONFIGURATION_H_ | ||||||
|  |  | ||||||
| #include "configuration_interface.h" | #include "configuration_interface.h" | ||||||
|  | #include <cstdint> | ||||||
| #include <memory> | #include <memory> | ||||||
| #include <string> | #include <string> | ||||||
|  |  | ||||||
| @@ -62,10 +63,12 @@ public: | |||||||
|     ~FileConfiguration(); |     ~FileConfiguration(); | ||||||
|     std::string property(std::string property_name, std::string default_value); |     std::string property(std::string property_name, std::string default_value); | ||||||
|     bool property(std::string property_name, bool default_value); |     bool property(std::string property_name, bool default_value); | ||||||
|     long property(std::string property_name, long default_value); |     int64_t property(std::string property_name, int64_t default_value); | ||||||
|     int property(std::string property_name, int default_value); |     uint64_t property(std::string property_name, uint64_t default_value); | ||||||
|     unsigned int property(std::string property_name, unsigned int default_value); |     int32_t property(std::string property_name, int32_t default_value); | ||||||
|     unsigned short property(std::string property_name, unsigned short default_value); |     uint32_t property(std::string property_name, uint32_t default_value); | ||||||
|  |     int16_t property(std::string property_name, int16_t default_value); | ||||||
|  |     uint16_t property(std::string property_name, uint16_t default_value); | ||||||
|     float property(std::string property_name, float default_value); |     float property(std::string property_name, float default_value); | ||||||
|     double property(std::string property_name, double default_value); |     double property(std::string property_name, double default_value); | ||||||
|     void set_property(std::string property_name, std::string value); |     void set_property(std::string property_name, std::string value); | ||||||
|   | |||||||
| @@ -172,10 +172,10 @@ | |||||||
| using google::LogMessage; | using google::LogMessage; | ||||||
|  |  | ||||||
|  |  | ||||||
| GNSSBlockFactory::GNSSBlockFactory() {} | GNSSBlockFactory::GNSSBlockFactory() = default; | ||||||
|  |  | ||||||
|  |  | ||||||
| GNSSBlockFactory::~GNSSBlockFactory() {} | GNSSBlockFactory::~GNSSBlockFactory() = default; | ||||||
|  |  | ||||||
|  |  | ||||||
| std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalSource( | std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalSource( | ||||||
| @@ -355,7 +355,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1C( | |||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
|     std::string acq_item_type = configuration->property("Acquisition_1C" + appendix1 + ".item_type", default_item_type); |     std::string acq_item_type = configuration->property("Acquisition_1C" + appendix1 + ".item_type", default_item_type); | ||||||
|     std::string trk_item_type = configuration->property("Tracking_1C" + appendix2 + ".item_type", default_item_type); |     std::string trk_item_type = configuration->property("Tracking_1C" + appendix2 + ".item_type", default_item_type); | ||||||
|     if (acq_item_type.compare(trk_item_type)) |     if (acq_item_type.compare(trk_item_type) != 0) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; |             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; | ||||||
|         } |         } | ||||||
| @@ -420,7 +420,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_2S( | |||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
|     std::string acq_item_type = configuration->property("Acquisition_2S" + appendix1 + ".item_type", default_item_type); |     std::string acq_item_type = configuration->property("Acquisition_2S" + appendix1 + ".item_type", default_item_type); | ||||||
|     std::string trk_item_type = configuration->property("Tracking_2S" + appendix2 + ".item_type", default_item_type); |     std::string trk_item_type = configuration->property("Tracking_2S" + appendix2 + ".item_type", default_item_type); | ||||||
|     if (acq_item_type.compare(trk_item_type)) |     if (acq_item_type.compare(trk_item_type) != 0) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; |             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; | ||||||
|         } |         } | ||||||
| @@ -488,7 +488,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1B( | |||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
|     std::string acq_item_type = configuration->property("Acquisition_1B" + appendix1 + ".item_type", default_item_type); |     std::string acq_item_type = configuration->property("Acquisition_1B" + appendix1 + ".item_type", default_item_type); | ||||||
|     std::string trk_item_type = configuration->property("Tracking_1B" + appendix2 + ".item_type", default_item_type); |     std::string trk_item_type = configuration->property("Tracking_1B" + appendix2 + ".item_type", default_item_type); | ||||||
|     if (acq_item_type.compare(trk_item_type)) |     if (acq_item_type.compare(trk_item_type) != 0) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; |             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; | ||||||
|         } |         } | ||||||
| @@ -556,7 +556,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_5X( | |||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
|     std::string acq_item_type = configuration->property("Acquisition_5X" + appendix1 + ".item_type", default_item_type); |     std::string acq_item_type = configuration->property("Acquisition_5X" + appendix1 + ".item_type", default_item_type); | ||||||
|     std::string trk_item_type = configuration->property("Tracking_5X" + appendix2 + ".item_type", default_item_type); |     std::string trk_item_type = configuration->property("Tracking_5X" + appendix2 + ".item_type", default_item_type); | ||||||
|     if (acq_item_type.compare(trk_item_type)) |     if (acq_item_type.compare(trk_item_type) != 0) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; |             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; | ||||||
|         } |         } | ||||||
| @@ -625,7 +625,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1G( | |||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
|     std::string acq_item_type = configuration->property("Acquisition_1G" + appendix1 + ".item_type", default_item_type); |     std::string acq_item_type = configuration->property("Acquisition_1G" + appendix1 + ".item_type", default_item_type); | ||||||
|     std::string trk_item_type = configuration->property("Tracking_1G" + appendix2 + ".item_type", default_item_type); |     std::string trk_item_type = configuration->property("Tracking_1G" + appendix2 + ".item_type", default_item_type); | ||||||
|     if (acq_item_type.compare(trk_item_type)) |     if (acq_item_type.compare(trk_item_type) != 0) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; |             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; | ||||||
|         } |         } | ||||||
| @@ -694,7 +694,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_2G( | |||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
|     std::string acq_item_type = configuration->property("Acquisition_2G" + appendix1 + ".item_type", default_item_type); |     std::string acq_item_type = configuration->property("Acquisition_2G" + appendix1 + ".item_type", default_item_type); | ||||||
|     std::string trk_item_type = configuration->property("Tracking_2G" + appendix2 + ".item_type", default_item_type); |     std::string trk_item_type = configuration->property("Tracking_2G" + appendix2 + ".item_type", default_item_type); | ||||||
|     if (acq_item_type.compare(trk_item_type)) |     if (acq_item_type.compare(trk_item_type) != 0) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; |             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; | ||||||
|         } |         } | ||||||
| @@ -762,7 +762,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_L5( | |||||||
|     std::string default_item_type = "gr_complex"; |     std::string default_item_type = "gr_complex"; | ||||||
|     std::string acq_item_type = configuration->property("Acquisition_L5" + appendix1 + ".item_type", default_item_type); |     std::string acq_item_type = configuration->property("Acquisition_L5" + appendix1 + ".item_type", default_item_type); | ||||||
|     std::string trk_item_type = configuration->property("Tracking_L5" + appendix2 + ".item_type", default_item_type); |     std::string trk_item_type = configuration->property("Tracking_L5" + appendix2 + ".item_type", default_item_type); | ||||||
|     if (acq_item_type.compare(trk_item_type)) |     if (acq_item_type.compare(trk_item_type) != 0) | ||||||
|         { |         { | ||||||
|             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; |             LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!"; | ||||||
|         } |         } | ||||||
| @@ -1505,7 +1505,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock( | |||||||
|     else if (implementation.compare("GPS_L1_CA_KF_Tracking") == 0) |     else if (implementation.compare("GPS_L1_CA_KF_Tracking") == 0) | ||||||
|         { |         { | ||||||
|             std::unique_ptr<GNSSBlockInterface> block_(new GpsL1CaKfTracking(configuration.get(), role, in_streams, |             std::unique_ptr<GNSSBlockInterface> block_(new GpsL1CaKfTracking(configuration.get(), role, in_streams, | ||||||
|                     out_streams)); |                 out_streams)); | ||||||
|             block = std::move(block_); |             block = std::move(block_); | ||||||
|         } |         } | ||||||
|     else if (implementation.compare("GPS_L1_CA_DLL_PLL_C_Aid_Tracking") == 0) |     else if (implementation.compare("GPS_L1_CA_DLL_PLL_C_Aid_Tracking") == 0) | ||||||
| @@ -1886,7 +1886,7 @@ std::unique_ptr<TrackingInterface> GNSSBlockFactory::GetTrkBlock( | |||||||
|     else if (implementation.compare("GPS_L1_CA_KF_Tracking") == 0) |     else if (implementation.compare("GPS_L1_CA_KF_Tracking") == 0) | ||||||
|         { |         { | ||||||
|             std::unique_ptr<TrackingInterface> block_(new GpsL1CaKfTracking(configuration.get(), role, in_streams, |             std::unique_ptr<TrackingInterface> block_(new GpsL1CaKfTracking(configuration.get(), role, in_streams, | ||||||
|                     out_streams)); |                 out_streams)); | ||||||
|             block = std::move(block_); |             block = std::move(block_); | ||||||
|         } |         } | ||||||
|     else if (implementation.compare("GPS_L1_CA_DLL_PLL_C_Aid_Tracking") == 0) |     else if (implementation.compare("GPS_L1_CA_DLL_PLL_C_Aid_Tracking") == 0) | ||||||
|   | |||||||
| @@ -1611,7 +1611,7 @@ void GNSSFlowgraph::set_channels_state() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| Gnss_Signal GNSSFlowgraph::search_next_signal(std::string searched_signal, bool pop, bool tracked) | Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal, bool pop, bool tracked) | ||||||
| { | { | ||||||
|     Gnss_Signal result; |     Gnss_Signal result; | ||||||
|     bool untracked_satellite = true; |     bool untracked_satellite = true; | ||||||
|   | |||||||
| @@ -148,7 +148,7 @@ private: | |||||||
|     void set_signals_list(); |     void set_signals_list(); | ||||||
|     void set_channels_state();  // Initializes the channels state (start acquisition or keep standby) |     void set_channels_state();  // Initializes the channels state (start acquisition or keep standby) | ||||||
|                                 // using the configuration parameters (number of channels and max channels in acquisition) |                                 // using the configuration parameters (number of channels and max channels in acquisition) | ||||||
|     Gnss_Signal search_next_signal(std::string searched_signal, bool pop, bool tracked = false); |     Gnss_Signal search_next_signal(const std::string& searched_signal, bool pop, bool tracked = false); | ||||||
|     bool connected_; |     bool connected_; | ||||||
|     bool running_; |     bool running_; | ||||||
|     int sources_count_; |     int sources_count_; | ||||||
| @@ -200,7 +200,7 @@ private: | |||||||
|  |  | ||||||
|     bool enable_monitor_; |     bool enable_monitor_; | ||||||
|     gr::basic_block_sptr GnssSynchroMonitor_; |     gr::basic_block_sptr GnssSynchroMonitor_; | ||||||
|     std::vector<std::string> split_string(const std::string &s, char delim); |     std::vector<std::string> split_string(const std::string& s, char delim); | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif /*GNSS_SDR_GNSS_FLOWGRAPH_H_*/ | #endif /*GNSS_SDR_GNSS_FLOWGRAPH_H_*/ | ||||||
|   | |||||||
| @@ -64,49 +64,63 @@ std::string InMemoryConfiguration::property(std::string property_name, std::stri | |||||||
|  |  | ||||||
| bool InMemoryConfiguration::property(std::string property_name, bool default_value) | bool InMemoryConfiguration::property(std::string property_name, bool default_value) | ||||||
| { | { | ||||||
|     std::string empty = ""; |     std::string empty; | ||||||
|     return converter_->convert(property(property_name, empty), default_value); |     return converter_->convert(property(property_name, empty), default_value); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| long InMemoryConfiguration::property(std::string property_name, long default_value) | int64_t InMemoryConfiguration::property(std::string property_name, int64_t default_value) | ||||||
| { | { | ||||||
|     std::string empty = ""; |     std::string empty; | ||||||
|     return converter_->convert(property(property_name, empty), default_value); |     return converter_->convert(property(property_name, empty), default_value); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| int InMemoryConfiguration::property(std::string property_name, int default_value) | uint64_t InMemoryConfiguration::property(std::string property_name, uint64_t default_value) | ||||||
| { | { | ||||||
|     std::string empty = ""; |     std::string empty; | ||||||
|     return converter_->convert(property(property_name, empty), default_value); |     return converter_->convert(property(property_name, empty), default_value); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| unsigned int InMemoryConfiguration::property(std::string property_name, unsigned int default_value) | int32_t InMemoryConfiguration::property(std::string property_name, int32_t default_value) | ||||||
| { | { | ||||||
|     std::string empty = ""; |     std::string empty; | ||||||
|     return converter_->convert(property(property_name, empty), default_value); |     return converter_->convert(property(property_name, empty), default_value); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| unsigned short InMemoryConfiguration::property(std::string property_name, unsigned short default_value) | uint32_t InMemoryConfiguration::property(std::string property_name, uint32_t default_value) | ||||||
| { | { | ||||||
|     std::string empty = ""; |     std::string empty; | ||||||
|  |     return converter_->convert(property(property_name, empty), default_value); | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | uint16_t InMemoryConfiguration::property(std::string property_name, uint16_t default_value) | ||||||
|  | { | ||||||
|  |     std::string empty; | ||||||
|  |     return converter_->convert(property(property_name, empty), default_value); | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | int16_t InMemoryConfiguration::property(std::string property_name, int16_t default_value) | ||||||
|  | { | ||||||
|  |     std::string empty; | ||||||
|     return converter_->convert(property(property_name, empty), default_value); |     return converter_->convert(property(property_name, empty), default_value); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| float InMemoryConfiguration::property(std::string property_name, float default_value) | float InMemoryConfiguration::property(std::string property_name, float default_value) | ||||||
| { | { | ||||||
|     std::string empty = ""; |     std::string empty; | ||||||
|     return converter_->convert(property(property_name, empty), default_value); |     return converter_->convert(property(property_name, empty), default_value); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| double InMemoryConfiguration::property(std::string property_name, double default_value) | double InMemoryConfiguration::property(std::string property_name, double default_value) | ||||||
| { | { | ||||||
|     std::string empty = ""; |     std::string empty; | ||||||
|     return converter_->convert(property(property_name, empty), default_value); |     return converter_->convert(property(property_name, empty), default_value); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -124,7 +138,7 @@ void InMemoryConfiguration::supersede_property(std::string property_name, std::s | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| bool InMemoryConfiguration::is_present(std::string property_name) | bool InMemoryConfiguration::is_present(const std::string& property_name) | ||||||
| { | { | ||||||
|     return (properties_.find(property_name) != properties_.end()); |     return (properties_.find(property_name) != properties_.end()); | ||||||
| } | } | ||||||
|   | |||||||
| @@ -36,6 +36,7 @@ | |||||||
| #define GNSS_SDR_IN_MEMORY_CONFIGURATION_H_ | #define GNSS_SDR_IN_MEMORY_CONFIGURATION_H_ | ||||||
|  |  | ||||||
| #include "configuration_interface.h" | #include "configuration_interface.h" | ||||||
|  | #include <cstdint> | ||||||
| #include <map> | #include <map> | ||||||
| #include <memory> | #include <memory> | ||||||
| #include <string> | #include <string> | ||||||
| @@ -56,15 +57,17 @@ public: | |||||||
|     virtual ~InMemoryConfiguration(); |     virtual ~InMemoryConfiguration(); | ||||||
|     std::string property(std::string property_name, std::string default_value); |     std::string property(std::string property_name, std::string default_value); | ||||||
|     bool property(std::string property_name, bool default_value); |     bool property(std::string property_name, bool default_value); | ||||||
|     long property(std::string property_name, long default_value); |     int64_t property(std::string property_name, int64_t default_value); | ||||||
|     int property(std::string property_name, int default_value); |     uint64_t property(std::string property_name, uint64_t default_value); | ||||||
|     unsigned int property(std::string property_name, unsigned int default_value); |     int32_t property(std::string property_name, int32_t default_value); | ||||||
|     unsigned short property(std::string property_name, unsigned short default_value); |     uint32_t property(std::string property_name, uint32_t default_value); | ||||||
|  |     int16_t property(std::string property_name, int16_t default_value); | ||||||
|  |     uint16_t property(std::string property_name, uint16_t default_value); | ||||||
|     float property(std::string property_name, float default_value); |     float property(std::string property_name, float default_value); | ||||||
|     double property(std::string property_name, double default_value); |     double property(std::string property_name, double default_value); | ||||||
|     void set_property(std::string property_name, std::string value); |     void set_property(std::string property_name, std::string value); | ||||||
|     void supersede_property(std::string property_name, std::string value); |     void supersede_property(std::string property_name, std::string value); | ||||||
|     bool is_present(std::string property_name); |     bool is_present(const std::string& property_name); | ||||||
|  |  | ||||||
| private: | private: | ||||||
|     std::map<std::string, std::string> properties_; |     std::map<std::string, std::string> properties_; | ||||||
|   | |||||||
| @@ -142,7 +142,7 @@ std::string TcpCmdInterface::status(const std::vector<std::string> &commandLine | |||||||
|             &course_over_ground_deg, |             &course_over_ground_deg, | ||||||
|             &UTC_time) == true) |             &UTC_time) == true) | ||||||
|         { |         { | ||||||
|             struct tm tstruct; |             struct tm tstruct = {}; | ||||||
|             char buf1[80]; |             char buf1[80]; | ||||||
|             tstruct = *gmtime(&UTC_time); |             tstruct = *gmtime(&UTC_time); | ||||||
|             strftime(buf1, sizeof(buf1), "%d/%m/%Y %H:%M:%S", &tstruct); |             strftime(buf1, sizeof(buf1), "%d/%m/%Y %H:%M:%S", &tstruct); | ||||||
| @@ -173,7 +173,7 @@ std::string TcpCmdInterface::hotstart(const std::vector<std::string> &commandLin | |||||||
|     if (commandLine.size() > 5) |     if (commandLine.size() > 5) | ||||||
|         { |         { | ||||||
|             // Read commandline time parameter |             // Read commandline time parameter | ||||||
|             struct tm tm; |             struct tm tm = {}; | ||||||
|             if (strptime(commandLine.at(1).c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr) |             if (strptime(commandLine.at(1).c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr) | ||||||
|                 { |                 { | ||||||
|                     response = "ERROR: time parameter malformed\n"; |                     response = "ERROR: time parameter malformed\n"; | ||||||
| @@ -219,7 +219,7 @@ std::string TcpCmdInterface::warmstart(const std::vector<std::string> &commandLi | |||||||
|         { |         { | ||||||
|             std::string tmp_str; |             std::string tmp_str; | ||||||
|             // Read commandline time parameter |             // Read commandline time parameter | ||||||
|             struct tm tm; |             struct tm tm = {}; | ||||||
|             tmp_str = commandLine.at(1) + commandLine.at(2); |             tmp_str = commandLine.at(1) + commandLine.at(2); | ||||||
|             if (strptime(commandLine.at(1).c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr) |             if (strptime(commandLine.at(1).c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr) | ||||||
|                 { |                 { | ||||||
| @@ -336,7 +336,7 @@ void TcpCmdInterface::run_cmd_server(int tcp_port) | |||||||
|                                         { |                                         { | ||||||
|                                             try |                                             try | ||||||
|                                                 { |                                                 { | ||||||
|                                                     if (cmd_vector.at(0).compare("exit") == 0) |                                                     if (cmd_vector.at(0) == "exit") | ||||||
|                                                         { |                                                         { | ||||||
|                                                             error = boost::asio::error::eof; |                                                             error = boost::asio::error::eof; | ||||||
|                                                             // send cmd response |                                                             // send cmd response | ||||||
|   | |||||||
| @@ -28,23 +28,24 @@ | |||||||
|  * |  * | ||||||
|  * ------------------------------------------------------------------------- |  * ------------------------------------------------------------------------- | ||||||
|  */ |  */ | ||||||
| #ifndef GNSS_SDR_TCPCMDINTERFACE_H_ | #ifndef GNSS_SDR_TCP_CMD_INTERFACE_H_ | ||||||
| #define GNSS_SDR_TCPCMDINTERFACE_H_ | #define GNSS_SDR_TCP_CMD_INTERFACE_H_ | ||||||
|  |  | ||||||
| #include "pvt_interface.h" | #include "pvt_interface.h" | ||||||
|  | #include <armadillo> | ||||||
|  | #include <boost/asio.hpp> | ||||||
|  | #include <glog/logging.h> | ||||||
|  | #include <gnuradio/message.h> | ||||||
|  | #include <gnuradio/msg_queue.h> | ||||||
|  | #include <algorithm> | ||||||
|  | #include <cstdint> | ||||||
|  | #include <ctime> | ||||||
| #include <functional> | #include <functional> | ||||||
| #include <iostream> | #include <iostream> | ||||||
| #include <string> | #include <string> | ||||||
| #include <vector> |  | ||||||
| #include <unordered_map> | #include <unordered_map> | ||||||
| #include <algorithm> | #include <vector> | ||||||
| #include <boost/asio.hpp> |  | ||||||
| #include <glog/logging.h> |  | ||||||
| #include <cstdint> |  | ||||||
| #include <gnuradio/message.h> |  | ||||||
| #include <gnuradio/msg_queue.h> |  | ||||||
| #include <armadillo> |  | ||||||
| #include <ctime> |  | ||||||
|  |  | ||||||
| class TcpCmdInterface | class TcpCmdInterface | ||||||
| { | { | ||||||
| @@ -53,10 +54,12 @@ public: | |||||||
|     virtual ~TcpCmdInterface(); |     virtual ~TcpCmdInterface(); | ||||||
|     void run_cmd_server(int tcp_port); |     void run_cmd_server(int tcp_port); | ||||||
|     void set_msg_queue(gr::msg_queue::sptr control_queue); |     void set_msg_queue(gr::msg_queue::sptr control_queue); | ||||||
|  |  | ||||||
|     /*! |     /*! | ||||||
|      * \brief gets the UTC time parsed from the last TC command issued |      * \brief gets the UTC time parsed from the last TC command issued | ||||||
|      */ |      */ | ||||||
|     time_t get_utc_time(); |     time_t get_utc_time(); | ||||||
|  |  | ||||||
|     /*! |     /*! | ||||||
|      * \brief gets the Latitude, Longitude and Altitude vector from the last TC command issued |      * \brief gets the Latitude, Longitude and Altitude vector from the last TC command issued | ||||||
|      */ |      */ | ||||||
| @@ -89,4 +92,4 @@ private: | |||||||
|     std::shared_ptr<PvtInterface> PVT_sptr_; |     std::shared_ptr<PvtInterface> PVT_sptr_; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif /* GNSS_SDR_TCPCMDINTERFACE_H_ */ | #endif /* GNSS_SDR_TCP_CMD_INTERFACE_H_ */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez