1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00

Replace GNU Radio blocks name termination _cc by _gs to emphasize that their data items are Gnss_Synchro objects

This commit is contained in:
Carles Fernandez 2019-03-02 02:21:03 +01:00
parent fcfe63ba08
commit a9cc2d0eab
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
45 changed files with 333 additions and 334 deletions

View File

@ -711,7 +711,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
pvt_output_parameters.udp_port = configuration->property(role + ".monitor_udp_port", 1234); pvt_output_parameters.udp_port = configuration->property(role + ".monitor_udp_port", 1234);
// make PVT object // make PVT object
pvt_ = rtklib_make_pvt_cc(in_streams_, pvt_output_parameters, rtk); pvt_ = rtklib_make_pvt_gs(in_streams_, pvt_output_parameters, rtk);
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")"; DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
if (out_streams_ > 0) if (out_streams_ > 0)
{ {

View File

@ -38,7 +38,7 @@
#include "gps_ephemeris.h" #include "gps_ephemeris.h"
#include "pvt_interface.h" #include "pvt_interface.h"
#include "rtklib.h" #include "rtklib.h"
#include "rtklib_pvt_cc.h" #include "rtklib_pvt_gs.h"
#include <map> #include <map>
#include <string> #include <string>
@ -99,7 +99,7 @@ public:
time_t* UTC_time) override; time_t* UTC_time) override;
private: private:
rtklib_pvt_cc_sptr pvt_; rtklib_pvt_gs_sptr pvt_;
rtk_t rtk{}; rtk_t rtk{};
std::string role_; std::string role_;
unsigned int in_streams_; unsigned int in_streams_;

View File

@ -17,11 +17,11 @@
# #
set(PVT_GR_BLOCKS_SOURCES set(PVT_GR_BLOCKS_SOURCES
rtklib_pvt_cc.cc rtklib_pvt_gs.cc
) )
set(PVT_GR_BLOCKS_HEADERS set(PVT_GR_BLOCKS_HEADERS
rtklib_pvt_cc.h rtklib_pvt_gs.h
) )
source_group(Headers FILES ${PVT_GR_BLOCKS_HEADERS}) source_group(Headers FILES ${PVT_GR_BLOCKS_HEADERS})

View File

@ -1,5 +1,5 @@
/*! /*!
* \file rtklib_pvt_cc.cc * \file rtklib_pvt_gs.cc
* \brief Interface of a Position Velocity and Time computation block * \brief Interface of a Position Velocity and Time computation block
* \author Javier Arribas, 2017. jarribas(at)cttc.es * \author Javier Arribas, 2017. jarribas(at)cttc.es
* *
@ -28,11 +28,11 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#include "rtklib_pvt_cc.h"
#include "display.h" #include "display.h"
#include "galileo_almanac_helper.h" #include "galileo_almanac_helper.h"
#include "gnss_sdr_create_directory.h" #include "gnss_sdr_create_directory.h"
#include "pvt_conf.h" #include "pvt_conf.h"
#include "rtklib_pvt_gs.h"
#include <boost/archive/xml_iarchive.hpp> #include <boost/archive/xml_iarchive.hpp>
#include <boost/archive/xml_oarchive.hpp> #include <boost/archive/xml_oarchive.hpp>
#include <boost/exception/all.hpp> #include <boost/exception/all.hpp>
@ -57,19 +57,19 @@ namespace bc = boost::integer;
using google::LogMessage; using google::LogMessage;
rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels, rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
const Pvt_Conf& conf_, const Pvt_Conf& conf_,
const rtk_t& rtk) const rtk_t& rtk)
{ {
return rtklib_pvt_cc_sptr(new rtklib_pvt_cc(nchannels, return rtklib_pvt_gs_sptr(new rtklib_pvt_gs(nchannels,
conf_, conf_,
rtk)); rtk));
} }
rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels, rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
const Pvt_Conf& conf_, const Pvt_Conf& conf_,
const rtk_t& rtk) : gr::sync_block("rtklib_pvt_cc", const rtk_t& rtk) : gr::sync_block("rtklib_pvt_gs",
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(0, 0, 0)) gr::io_signature::make(0, 0, 0))
{ {
@ -118,7 +118,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
// GPS Ephemeris data message port in // GPS Ephemeris data message port in
this->message_port_register_in(pmt::mp("telemetry")); this->message_port_register_in(pmt::mp("telemetry"));
this->set_msg_handler(pmt::mp("telemetry"), boost::bind(&rtklib_pvt_cc::msg_handler_telemetry, this, _1)); this->set_msg_handler(pmt::mp("telemetry"), boost::bind(&rtklib_pvt_gs::msg_handler_telemetry, this, _1));
// initialize kml_printer // initialize kml_printer
std::string kml_dump_filename; std::string kml_dump_filename;
@ -336,7 +336,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
} }
rtklib_pvt_cc::~rtklib_pvt_cc() rtklib_pvt_gs::~rtklib_pvt_gs()
{ {
msgctl(sysv_msqid, IPC_RMID, nullptr); msgctl(sysv_msqid, IPC_RMID, nullptr);
try try
@ -883,7 +883,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
} }
void rtklib_pvt_cc::msg_handler_telemetry(const pmt::pmt_t& msg) void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
{ {
try try
{ {
@ -1097,43 +1097,43 @@ void rtklib_pvt_cc::msg_handler_telemetry(const pmt::pmt_t& msg)
} }
std::map<int, Gps_Ephemeris> rtklib_pvt_cc::get_gps_ephemeris_map() const std::map<int, Gps_Ephemeris> rtklib_pvt_gs::get_gps_ephemeris_map() const
{ {
return d_pvt_solver->gps_ephemeris_map; return d_pvt_solver->gps_ephemeris_map;
} }
std::map<int, Gps_Almanac> rtklib_pvt_cc::get_gps_almanac_map() const std::map<int, Gps_Almanac> rtklib_pvt_gs::get_gps_almanac_map() const
{ {
return d_pvt_solver->gps_almanac_map; return d_pvt_solver->gps_almanac_map;
} }
std::map<int, Galileo_Ephemeris> rtklib_pvt_cc::get_galileo_ephemeris_map() const std::map<int, Galileo_Ephemeris> rtklib_pvt_gs::get_galileo_ephemeris_map() const
{ {
return d_pvt_solver->galileo_ephemeris_map; return d_pvt_solver->galileo_ephemeris_map;
} }
std::map<int, Galileo_Almanac> rtklib_pvt_cc::get_galileo_almanac_map() const std::map<int, Galileo_Almanac> rtklib_pvt_gs::get_galileo_almanac_map() const
{ {
return d_pvt_solver->galileo_almanac_map; return d_pvt_solver->galileo_almanac_map;
} }
std::map<int, Beidou_Dnav_Ephemeris> rtklib_pvt_cc::get_beidou_dnav_ephemeris_map() const std::map<int, Beidou_Dnav_Ephemeris> rtklib_pvt_gs::get_beidou_dnav_ephemeris_map() const
{ {
return d_pvt_solver->beidou_dnav_ephemeris_map; return d_pvt_solver->beidou_dnav_ephemeris_map;
} }
std::map<int, Beidou_Dnav_Almanac> rtklib_pvt_cc::get_beidou_dnav_almanac_map() const std::map<int, Beidou_Dnav_Almanac> rtklib_pvt_gs::get_beidou_dnav_almanac_map() const
{ {
return d_pvt_solver->beidou_dnav_almanac_map; return d_pvt_solver->beidou_dnav_almanac_map;
} }
void rtklib_pvt_cc::clear_ephemeris() void rtklib_pvt_gs::clear_ephemeris()
{ {
d_pvt_solver->gps_ephemeris_map.clear(); d_pvt_solver->gps_ephemeris_map.clear();
d_pvt_solver->gps_almanac_map.clear(); d_pvt_solver->gps_almanac_map.clear();
@ -1144,13 +1144,13 @@ void rtklib_pvt_cc::clear_ephemeris()
} }
bool rtklib_pvt_cc::observables_pairCompare_min(const std::pair<int, Gnss_Synchro>& a, const std::pair<int, Gnss_Synchro>& b) bool rtklib_pvt_gs::observables_pairCompare_min(const std::pair<int, Gnss_Synchro>& a, const std::pair<int, Gnss_Synchro>& b)
{ {
return (a.second.Pseudorange_m) < (b.second.Pseudorange_m); return (a.second.Pseudorange_m) < (b.second.Pseudorange_m);
} }
bool rtklib_pvt_cc::send_sys_v_ttff_msg(ttff_msgbuf ttff) bool rtklib_pvt_gs::send_sys_v_ttff_msg(ttff_msgbuf ttff)
{ {
// Fill Sys V message structures // Fill Sys V message structures
int msgsend_size; int msgsend_size;
@ -1166,7 +1166,7 @@ bool rtklib_pvt_cc::send_sys_v_ttff_msg(ttff_msgbuf ttff)
} }
bool rtklib_pvt_cc::save_gnss_synchro_map_xml(const std::string& file_name) bool rtklib_pvt_gs::save_gnss_synchro_map_xml(const std::string& file_name)
{ {
if (gnss_observables_map.empty() == false) if (gnss_observables_map.empty() == false)
{ {
@ -1191,7 +1191,7 @@ bool rtklib_pvt_cc::save_gnss_synchro_map_xml(const std::string& file_name)
} }
bool rtklib_pvt_cc::load_gnss_synchro_map_xml(const std::string& file_name) bool rtklib_pvt_gs::load_gnss_synchro_map_xml(const std::string& file_name)
{ {
// load from xml (boost serialize) // load from xml (boost serialize)
std::ifstream ifs; std::ifstream ifs;
@ -1212,7 +1212,7 @@ bool rtklib_pvt_cc::load_gnss_synchro_map_xml(const std::string& file_name)
} }
std::vector<std::string> rtklib_pvt_cc::split_string(const std::string& s, char delim) const std::vector<std::string> rtklib_pvt_gs::split_string(const std::string& s, char delim) const
{ {
std::vector<std::string> v; std::vector<std::string> v;
std::stringstream ss(s); std::stringstream ss(s);
@ -1227,7 +1227,7 @@ std::vector<std::string> rtklib_pvt_cc::split_string(const std::string& s, char
} }
bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg, bool rtklib_pvt_gs::get_latest_PVT(double* longitude_deg,
double* latitude_deg, double* latitude_deg,
double* height_m, double* height_m,
double* ground_speed_kmh, double* ground_speed_kmh,
@ -1250,7 +1250,7 @@ bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
} }
int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_items, int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_items,
gr_vector_void_star& output_items __attribute__((unused))) gr_vector_void_star& output_items __attribute__((unused)))
{ {
for (int32_t epoch = 0; epoch < noutput_items; epoch++) for (int32_t epoch = 0; epoch < noutput_items; epoch++)

View File

@ -1,5 +1,5 @@
/*! /*!
* \file rtklib_pvt_cc.h * \file rtklib_pvt_gs.h
* \brief Interface of a Position Velocity and Time computation block * \brief Interface of a Position Velocity and Time computation block
* \author Javier Arribas, 2017. jarribas(at)cttc.es * \author Javier Arribas, 2017. jarribas(at)cttc.es
* *
@ -28,8 +28,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_RTKLIB_PVT_CC_H #ifndef GNSS_SDR_RTKLIB_PVT_GS_H
#define GNSS_SDR_RTKLIB_PVT_CC_H #define GNSS_SDR_RTKLIB_PVT_GS_H
#include "beidou_dnav_almanac.h" #include "beidou_dnav_almanac.h"
#include "beidou_dnav_ephemeris.h" #include "beidou_dnav_ephemeris.h"
@ -63,21 +63,21 @@
#include <vector> #include <vector>
class rtklib_pvt_cc; class rtklib_pvt_gs;
using rtklib_pvt_cc_sptr = boost::shared_ptr<rtklib_pvt_cc>; using rtklib_pvt_gs_sptr = boost::shared_ptr<rtklib_pvt_gs>;
rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels, rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
const Pvt_Conf& conf_, const Pvt_Conf& conf_,
const rtk_t& rtk); const rtk_t& rtk);
/*! /*!
* \brief This class implements a block that computes the PVT solution using the RTKLIB integrated library * \brief This class implements a block that computes the PVT solution using the RTKLIB integrated library
*/ */
class rtklib_pvt_cc : public gr::sync_block class rtklib_pvt_gs : public gr::sync_block
{ {
private: private:
friend rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels, friend rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
const Pvt_Conf& conf_, const Pvt_Conf& conf_,
const rtk_t& rtk); const rtk_t& rtk);
@ -158,11 +158,11 @@ private:
std::vector<std::string> split_string(const std::string& s, char delim) const; std::vector<std::string> split_string(const std::string& s, char delim) const;
public: public:
rtklib_pvt_cc(uint32_t nchannels, rtklib_pvt_gs(uint32_t nchannels,
const Pvt_Conf& conf_, const Pvt_Conf& conf_,
const rtk_t& rtk); const rtk_t& rtk);
~rtklib_pvt_cc(); //!< Default destructor ~rtklib_pvt_gs(); //!< Default destructor
/*! /*!
* \brief Get latest set of GPS ephemeris from PVT block * \brief Get latest set of GPS ephemeris from PVT block

View File

@ -46,7 +46,7 @@ HybridObservables::HybridObservables(ConfigurationInterface* configuration,
dump_mat_ = configuration->property(role + ".dump_mat", true); dump_mat_ = configuration->property(role + ".dump_mat", true);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
observables_ = hybrid_make_observables_cc(in_streams_, out_streams_, dump_, dump_mat_, dump_filename_); observables_ = hybrid_make_observables_gs(in_streams_, out_streams_, dump_, dump_mat_, dump_filename_);
DLOG(INFO) << "Observables block ID (" << observables_->unique_id() << ")"; DLOG(INFO) << "Observables block ID (" << observables_->unique_id() << ")";
} }

View File

@ -34,7 +34,7 @@
#ifndef GNSS_SDR_HYBRID_OBSERVABLES_H_ #ifndef GNSS_SDR_HYBRID_OBSERVABLES_H_
#define GNSS_SDR_HYBRID_OBSERVABLES_H_ #define GNSS_SDR_HYBRID_OBSERVABLES_H_
#include "hybrid_observables_cc.h" #include "hybrid_observables_gs.h"
#include "observables_interface.h" #include "observables_interface.h"
#include <string> #include <string>
@ -81,7 +81,7 @@ public:
} }
private: private:
hybrid_observables_cc_sptr observables_; hybrid_observables_gs_sptr observables_;
bool dump_; bool dump_;
bool dump_mat_; bool dump_mat_;
std::string dump_filename_; std::string dump_filename_;

View File

@ -17,11 +17,11 @@
# #
set(OBS_GR_BLOCKS_SOURCES set(OBS_GR_BLOCKS_SOURCES
hybrid_observables_cc.cc hybrid_observables_gs.cc
) )
set(OBS_GR_BLOCKS_HEADERS set(OBS_GR_BLOCKS_HEADERS
hybrid_observables_cc.h hybrid_observables_gs.h
) )
source_group(Headers FILES ${OBS_GR_BLOCKS_HEADERS}) source_group(Headers FILES ${OBS_GR_BLOCKS_HEADERS})

View File

@ -1,5 +1,5 @@
/*! /*!
* \file hybrid_observables_cc.cc * \file hybrid_observables_gs.cc
* \brief Implementation of the observables computation block * \brief Implementation of the observables computation block
* \author Javier Arribas 2017. jarribas(at)cttc.es * \author Javier Arribas 2017. jarribas(at)cttc.es
* \author Antonio Ramos 2018. antonio.ramos(at)cttc.es * \author Antonio Ramos 2018. antonio.ramos(at)cttc.es
@ -29,10 +29,10 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#include "hybrid_observables_cc.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "display.h" #include "display.h"
#include "gnss_sdr_create_directory.h" #include "gnss_sdr_create_directory.h"
#include "hybrid_observables_gs.h"
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
@ -49,17 +49,17 @@
using google::LogMessage; using google::LogMessage;
hybrid_observables_cc_sptr hybrid_make_observables_cc(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, bool dump_mat, std::string dump_filename) hybrid_observables_gs_sptr hybrid_make_observables_gs(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, bool dump_mat, std::string dump_filename)
{ {
return hybrid_observables_cc_sptr(new hybrid_observables_cc(nchannels_in, nchannels_out, dump, dump_mat, std::move(dump_filename))); return hybrid_observables_gs_sptr(new hybrid_observables_gs(nchannels_in, nchannels_out, dump, dump_mat, std::move(dump_filename)));
} }
hybrid_observables_cc::hybrid_observables_cc(uint32_t nchannels_in, hybrid_observables_gs::hybrid_observables_gs(uint32_t nchannels_in,
uint32_t nchannels_out, uint32_t nchannels_out,
bool dump, bool dump,
bool dump_mat, bool dump_mat,
std::string dump_filename) : gr::block("hybrid_observables_cc", std::string dump_filename) : gr::block("hybrid_observables_gs",
gr::io_signature::make(nchannels_in, nchannels_in, sizeof(Gnss_Synchro)), gr::io_signature::make(nchannels_in, nchannels_in, sizeof(Gnss_Synchro)),
gr::io_signature::make(nchannels_out, nchannels_out, sizeof(Gnss_Synchro))) gr::io_signature::make(nchannels_out, nchannels_out, sizeof(Gnss_Synchro)))
{ {
@ -120,12 +120,12 @@ hybrid_observables_cc::hybrid_observables_cc(uint32_t nchannels_in,
T_rx_TOW_set = false; T_rx_TOW_set = false;
// rework // rework
d_Rx_clock_buffer.resize(10); // 10*20 ms = 200 ms of data in buffer d_Rx_clock_buffer.set_capacity(10); // 10*20 ms = 200 ms of data in buffer
d_Rx_clock_buffer.clear(); // Clear all the elements in the buffer d_Rx_clock_buffer.clear(); // Clear all the elements in the buffer
} }
hybrid_observables_cc::~hybrid_observables_cc() hybrid_observables_gs::~hybrid_observables_gs()
{ {
delete d_gnss_synchro_history; delete d_gnss_synchro_history;
if (d_dump_file.is_open()) if (d_dump_file.is_open())
@ -153,7 +153,7 @@ hybrid_observables_cc::~hybrid_observables_cc()
} }
int32_t hybrid_observables_cc::save_matfile() int32_t hybrid_observables_gs::save_matfile()
{ {
// READ DUMP FILE // READ DUMP FILE
std::string dump_filename = d_dump_filename; std::string dump_filename = d_dump_filename;
@ -342,13 +342,13 @@ int32_t hybrid_observables_cc::save_matfile()
} }
double hybrid_observables_cc::compute_T_rx_s(const Gnss_Synchro &a) double hybrid_observables_gs::compute_T_rx_s(const Gnss_Synchro &a)
{ {
return ((static_cast<double>(a.Tracking_sample_counter) + a.Code_phase_samples) / static_cast<double>(a.fs)); return ((static_cast<double>(a.Tracking_sample_counter) + a.Code_phase_samples) / static_cast<double>(a.fs));
} }
bool hybrid_observables_cc::interp_trk_obs(Gnss_Synchro &interpolated_obs, const uint32_t &ch, const uint64_t &rx_clock) bool hybrid_observables_gs::interp_trk_obs(Gnss_Synchro &interpolated_obs, const uint32_t &ch, const uint64_t &rx_clock)
{ {
int32_t nearest_element = -1; int32_t nearest_element = -1;
int64_t abs_diff; int64_t abs_diff;
@ -427,7 +427,7 @@ bool hybrid_observables_cc::interp_trk_obs(Gnss_Synchro &interpolated_obs, const
} }
void hybrid_observables_cc::forecast(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items_required) void hybrid_observables_gs::forecast(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items_required)
{ {
for (int32_t n = 0; n < static_cast<int32_t>(d_nchannels_in) - 1; n++) for (int32_t n = 0; n < static_cast<int32_t>(d_nchannels_in) - 1; n++)
{ {
@ -438,18 +438,18 @@ void hybrid_observables_cc::forecast(int noutput_items __attribute__((unused)),
} }
void hybrid_observables_cc::update_TOW(std::vector<Gnss_Synchro> &data) void hybrid_observables_gs::update_TOW(const std::vector<Gnss_Synchro> &data)
{ {
//1. Set the TOW using the minimum TOW in the observables. //1. Set the TOW using the minimum TOW in the observables.
// this will be the receiver time. // this will be the receiver time.
//2. If the TOW is set, it must be incremented by the desired receiver time step. //2. If the TOW is set, it must be incremented by the desired receiver time step.
// the time step must match the observables timer block (connected to the las input channel) // the time step must match the observables timer block (connected to the las input channel)
std::vector<Gnss_Synchro>::iterator it; std::vector<Gnss_Synchro>::const_iterator it;
// if (!T_rx_TOW_set) // if (!T_rx_TOW_set)
// { // {
//uint32_t TOW_ref = std::numeric_limits<uint32_t>::max(); //uint32_t TOW_ref = std::numeric_limits<uint32_t>::max();
uint32_t TOW_ref = 0U; uint32_t TOW_ref = 0U;
for (it = data.begin(); it != data.end(); it++) for (it = data.cbegin(); it != data.cend(); it++)
{ {
if (it->Flag_valid_word) if (it->Flag_valid_word)
{ {
@ -475,7 +475,7 @@ void hybrid_observables_cc::update_TOW(std::vector<Gnss_Synchro> &data)
} }
void hybrid_observables_cc::compute_pranges(std::vector<Gnss_Synchro> &data) void hybrid_observables_gs::compute_pranges(std::vector<Gnss_Synchro> &data)
{ {
std::vector<Gnss_Synchro>::iterator it; std::vector<Gnss_Synchro>::iterator it;
for (it = data.begin(); it != data.end(); it++) for (it = data.begin(); it != data.end(); it++)
@ -498,7 +498,7 @@ void hybrid_observables_cc::compute_pranges(std::vector<Gnss_Synchro> &data)
} }
int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)), int hybrid_observables_gs::general_work(int noutput_items __attribute__((unused)),
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items) gr_vector_void_star &output_items)
{ {
@ -599,12 +599,12 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
epoch_data.push_back(interpolated_gnss_synchro); epoch_data.push_back(interpolated_gnss_synchro);
} }
update_TOW(epoch_data); update_TOW(epoch_data);
//debug code: // debug code:
// if (T_rx_TOW_ms % 20 != 0) // if (T_rx_TOW_ms % 20 != 0)
// { // {
// std::cout << "Warning: RX TOW is not multiple of 20 ms\n"; // std::cout << "Warning: RX TOW is not multiple of 20 ms\n";
// } // }
// std::cout << "T_rx_TOW_ms=" << T_rx_TOW_ms << " T_rx_TOW_offset_ms=" << T_rx_TOW_offset_ms << " ->" << T_rx_TOW_ms % 20 << std::endl; // std::cout << "T_rx_TOW_ms=" << T_rx_TOW_ms << " T_rx_TOW_offset_ms=" << T_rx_TOW_offset_ms << " ->" << T_rx_TOW_ms % 20 << std::endl;
} }
} }

View File

@ -1,5 +1,5 @@
/*! /*!
* \file hybrid_observables_cc.h * \file hybrid_observables_gs.h
* \brief Interface of the observables computation block * \brief Interface of the observables computation block
* \author Mara Branzanti 2013. mara.branzanti(at)gmail.com * \author Mara Branzanti 2013. mara.branzanti(at)gmail.com
* \author Javier Arribas 2013. jarribas(at)cttc.es * \author Javier Arribas 2013. jarribas(at)cttc.es
@ -7,7 +7,7 @@
* *
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
* *
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) * Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
* *
* GNSS-SDR is a software defined Global Navigation * GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver * Satellite Systems receiver
@ -31,8 +31,8 @@
*/ */
#ifndef GNSS_SDR_HYBRID_OBSERVABLES_CC_H #ifndef GNSS_SDR_HYBRID_OBSERVABLES_GS_H
#define GNSS_SDR_HYBRID_OBSERVABLES_CC_H #define GNSS_SDR_HYBRID_OBSERVABLES_GS_H
#include "gnss_circular_deque.h" #include "gnss_circular_deque.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
@ -43,33 +43,33 @@
#include <utility> #include <utility>
class hybrid_observables_cc; class hybrid_observables_gs;
using hybrid_observables_cc_sptr = boost::shared_ptr<hybrid_observables_cc>; using hybrid_observables_gs_sptr = boost::shared_ptr<hybrid_observables_gs>;
hybrid_observables_cc_sptr hybrid_observables_gs_sptr
hybrid_make_observables_cc(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, bool dump_mat, std::string dump_filename); hybrid_make_observables_gs(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, bool dump_mat, std::string dump_filename);
/*! /*!
* \brief This class implements a block that computes observables * \brief This class implements a block that computes observables
*/ */
class hybrid_observables_cc : public gr::block class hybrid_observables_gs : public gr::block
{ {
public: public:
~hybrid_observables_cc(); ~hybrid_observables_gs();
int general_work(int noutput_items, gr_vector_int& ninput_items, int general_work(int noutput_items, gr_vector_int& ninput_items,
gr_vector_const_void_star& input_items, gr_vector_void_star& output_items); gr_vector_const_void_star& input_items, gr_vector_void_star& output_items);
void forecast(int noutput_items, gr_vector_int& ninput_items_required); void forecast(int noutput_items, gr_vector_int& ninput_items_required);
private: private:
friend hybrid_observables_cc_sptr friend hybrid_observables_gs_sptr
hybrid_make_observables_cc(uint32_t nchannels_in, uint32_t nchannels_out, bool dump, bool dump_mat, std::string dump_filename); hybrid_make_observables_gs(uint32_t nchannels_in, uint32_t nchannels_out, bool dump, bool dump_mat, std::string dump_filename);
hybrid_observables_cc(uint32_t nchannels_in, uint32_t nchannels_out, bool dump, bool dump_mat, std::string dump_filename); hybrid_observables_gs(uint32_t nchannels_in, uint32_t nchannels_out, bool dump, bool dump_mat, std::string dump_filename);
bool interpolate_data(Gnss_Synchro& out, const uint32_t& ch, const double& ti); bool interpolate_data(Gnss_Synchro& out, const uint32_t& ch, const double& ti);
bool interp_trk_obs(Gnss_Synchro& interpolated_obs, const uint32_t& ch, const uint64_t& rx_clock); bool interp_trk_obs(Gnss_Synchro& interpolated_obs, const uint32_t& ch, const uint64_t& rx_clock);
double compute_T_rx_s(const Gnss_Synchro& a); double compute_T_rx_s(const Gnss_Synchro& a);
void compute_pranges(std::vector<Gnss_Synchro>& data); void compute_pranges(std::vector<Gnss_Synchro>& data);
void update_TOW(std::vector<Gnss_Synchro>& data); void update_TOW(const std::vector<Gnss_Synchro>& data);
int32_t save_matfile(); int32_t save_matfile();
//time history //time history

View File

@ -54,7 +54,7 @@ BeidouB1iTelemetryDecoder::BeidouB1iTelemetryDecoder(ConfigurationInterface* con
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object // make telemetry decoder object
telemetry_decoder_ = beidou_b1i_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me telemetry_decoder_ = beidou_b1i_make_telemetry_decoder_gs(satellite_, dump_); // TODO fix me
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0; channel_ = 0;
if (in_streams_ > 1) if (in_streams_ > 1)

View File

@ -34,7 +34,7 @@
#ifndef GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_H_ #ifndef GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_H_
#define GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_H_ #define GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_H_
#include "beidou_b1i_telemetry_decoder_cc.h" #include "beidou_b1i_telemetry_decoder_gs.h"
#include "telemetry_decoder_interface.h" #include "telemetry_decoder_interface.h"
#include <string> #include <string>
@ -83,7 +83,7 @@ public:
} }
private: private:
beidou_b1i_telemetry_decoder_cc_sptr telemetry_decoder_; beidou_b1i_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_; Gnss_Satellite satellite_;
int channel_; int channel_;
bool dump_; bool dump_;

View File

@ -55,7 +55,7 @@ GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(ConfigurationInterface* c
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object // make telemetry decoder object
telemetry_decoder_ = galileo_make_telemetry_decoder_cc(satellite_, 1, dump_); //unified galileo decoder set to INAV (frame_type=1) telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, 1, dump_); // unified galileo decoder set to INAV (frame_type=1)
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0; channel_ = 0;
if (in_streams_ > 1) if (in_streams_ > 1)

View File

@ -35,7 +35,7 @@
#define GNSS_SDR_GALILEO_E1B_TELEMETRY_DECODER_H_ #define GNSS_SDR_GALILEO_E1B_TELEMETRY_DECODER_H_
#include "galileo_telemetry_decoder_cc.h" #include "galileo_telemetry_decoder_gs.h"
#include "gnss_satellite.h" #include "gnss_satellite.h"
#include "telemetry_decoder_interface.h" #include "telemetry_decoder_interface.h"
#include <string> #include <string>
@ -87,7 +87,7 @@ public:
} }
private: private:
galileo_telemetry_decoder_cc_sptr telemetry_decoder_; galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_; Gnss_Satellite satellite_;
int channel_; int channel_;
bool dump_; bool dump_;

View File

@ -58,7 +58,7 @@ GalileoE5aTelemetryDecoder::GalileoE5aTelemetryDecoder(ConfigurationInterface* c
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object // make telemetry decoder object
telemetry_decoder_ = galileo_make_telemetry_decoder_cc(satellite_, 2, dump_); //unified galileo decoder set to FNAV (frame_type=2) telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, 2, dump_); // unified galileo decoder set to FNAV (frame_type=2)
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0; channel_ = 0;
if (in_streams_ > 1) if (in_streams_ > 1)

View File

@ -37,7 +37,7 @@
#ifndef GNSS_SDR_GALILEO_E5A_TELEMETRY_DECODER_H_ #ifndef GNSS_SDR_GALILEO_E5A_TELEMETRY_DECODER_H_
#define GNSS_SDR_GALILEO_E5A_TELEMETRY_DECODER_H_ #define GNSS_SDR_GALILEO_E5A_TELEMETRY_DECODER_H_
#include "galileo_telemetry_decoder_cc.h" #include "galileo_telemetry_decoder_gs.h"
#include "telemetry_decoder_interface.h" #include "telemetry_decoder_interface.h"
#include <string> #include <string>
@ -87,7 +87,7 @@ public:
} }
private: private:
galileo_telemetry_decoder_cc_sptr telemetry_decoder_; galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_; Gnss_Satellite satellite_;
int channel_; int channel_;
bool dump_; bool dump_;

View File

@ -54,7 +54,7 @@ GlonassL1CaTelemetryDecoder::GlonassL1CaTelemetryDecoder(ConfigurationInterface*
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object // make telemetry decoder object
telemetry_decoder_ = glonass_l1_ca_make_telemetry_decoder_cc(satellite_, dump_); telemetry_decoder_ = glonass_l1_ca_make_telemetry_decoder_gs(satellite_, dump_);
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0; channel_ = 0;
if (in_streams_ > 1) if (in_streams_ > 1)

View File

@ -34,7 +34,7 @@
#ifndef GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_H_ #ifndef GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_H_
#define GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_H_ #define GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_H_
#include "glonass_l1_ca_telemetry_decoder_cc.h" #include "glonass_l1_ca_telemetry_decoder_gs.h"
#include "telemetry_decoder_interface.h" #include "telemetry_decoder_interface.h"
#include <string> #include <string>
@ -78,7 +78,7 @@ public:
} }
private: private:
glonass_l1_ca_telemetry_decoder_cc_sptr telemetry_decoder_; glonass_l1_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_; Gnss_Satellite satellite_;
int channel_; int channel_;
bool dump_; bool dump_;

View File

@ -53,7 +53,7 @@ GlonassL2CaTelemetryDecoder::GlonassL2CaTelemetryDecoder(ConfigurationInterface*
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object // make telemetry decoder object
telemetry_decoder_ = glonass_l2_ca_make_telemetry_decoder_cc(satellite_, dump_); telemetry_decoder_ = glonass_l2_ca_make_telemetry_decoder_gs(satellite_, dump_);
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0; channel_ = 0;
if (in_streams_ > 1) if (in_streams_ > 1)

View File

@ -33,7 +33,7 @@
#ifndef GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_H_ #ifndef GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_H_
#define GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_H_ #define GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_H_
#include "glonass_l2_ca_telemetry_decoder_cc.h" #include "glonass_l2_ca_telemetry_decoder_gs.h"
#include "telemetry_decoder_interface.h" #include "telemetry_decoder_interface.h"
#include <string> #include <string>
@ -77,7 +77,7 @@ public:
} }
private: private:
glonass_l2_ca_telemetry_decoder_cc_sptr telemetry_decoder_; glonass_l2_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_; Gnss_Satellite satellite_;
int channel_; int channel_;
bool dump_; bool dump_;

View File

@ -54,7 +54,7 @@ GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder(ConfigurationInterface* configu
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object // make telemetry decoder object
telemetry_decoder_ = gps_l1_ca_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me telemetry_decoder_ = gps_l1_ca_make_telemetry_decoder_gs(satellite_, dump_); // TODO fix me
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0; channel_ = 0;
if (in_streams_ > 1) if (in_streams_ > 1)

View File

@ -33,7 +33,7 @@
#ifndef GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_H_ #ifndef GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_H_
#define GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_H_ #define GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_H_
#include "gps_l1_ca_telemetry_decoder_cc.h" #include "gps_l1_ca_telemetry_decoder_gs.h"
#include "telemetry_decoder_interface.h" #include "telemetry_decoder_interface.h"
#include <string> #include <string>
@ -82,7 +82,7 @@ public:
} }
private: private:
gps_l1_ca_telemetry_decoder_cc_sptr telemetry_decoder_; gps_l1_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_; Gnss_Satellite satellite_;
int channel_; int channel_;
bool dump_; bool dump_;

View File

@ -54,7 +54,7 @@ GpsL2CTelemetryDecoder::GpsL2CTelemetryDecoder(ConfigurationInterface* configura
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object // make telemetry decoder object
telemetry_decoder_ = gps_l2c_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me telemetry_decoder_ = gps_l2c_make_telemetry_decoder_gs(satellite_, dump_); // TODO fix me
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0; channel_ = 0;
if (in_streams_ > 1) if (in_streams_ > 1)

View File

@ -33,7 +33,7 @@
#ifndef GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_H_ #ifndef GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_H_
#define GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_H_ #define GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_H_
#include "gps_l2c_telemetry_decoder_cc.h" #include "gps_l2c_telemetry_decoder_gs.h"
#include "telemetry_decoder_interface.h" #include "telemetry_decoder_interface.h"
#include <string> #include <string>
@ -81,7 +81,7 @@ public:
} }
private: private:
gps_l2c_telemetry_decoder_cc_sptr telemetry_decoder_; gps_l2c_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_; Gnss_Satellite satellite_;
int channel_; int channel_;
bool dump_; bool dump_;

View File

@ -50,7 +50,7 @@ GpsL5TelemetryDecoder::GpsL5TelemetryDecoder(ConfigurationInterface* configurati
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object // make telemetry decoder object
telemetry_decoder_ = gps_l5_make_telemetry_decoder_cc(satellite_, dump_); telemetry_decoder_ = gps_l5_make_telemetry_decoder_gs(satellite_, dump_);
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0; channel_ = 0;
if (in_streams_ > 1) if (in_streams_ > 1)

View File

@ -35,7 +35,7 @@
#include "gnss_satellite.h" #include "gnss_satellite.h"
#include "gps_l5_telemetry_decoder_cc.h" #include "gps_l5_telemetry_decoder_gs.h"
#include "telemetry_decoder_interface.h" #include "telemetry_decoder_interface.h"
#include <string> #include <string>
@ -84,7 +84,7 @@ public:
} }
private: private:
gps_l5_telemetry_decoder_cc_sptr telemetry_decoder_; gps_l5_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_; Gnss_Satellite satellite_;
int channel_; int channel_;
bool dump_; bool dump_;

View File

@ -33,7 +33,7 @@
#include "sbas_l1_telemetry_decoder.h" #include "sbas_l1_telemetry_decoder.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "sbas_ephemeris.h" #include "sbas_ephemeris.h"
#include "sbas_l1_telemetry_decoder_cc.h" #include "sbas_l1_telemetry_decoder_gs.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
@ -52,7 +52,7 @@ SbasL1TelemetryDecoder::SbasL1TelemetryDecoder(ConfigurationInterface* configura
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object // make telemetry decoder object
telemetry_decoder_ = sbas_l1_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me telemetry_decoder_ = sbas_l1_make_telemetry_decoder_gs(satellite_, dump_); // TODO fix me
channel_ = 0; channel_ = 0;
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
if (in_streams_ > 1) if (in_streams_ > 1)

View File

@ -34,7 +34,7 @@
#define GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_H_ #define GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_H_
#include "sbas_l1_telemetry_decoder_cc.h" #include "sbas_l1_telemetry_decoder_gs.h"
#include "telemetry_decoder_interface.h" #include "telemetry_decoder_interface.h"
#include <string> #include <string>
@ -86,7 +86,7 @@ public:
} }
private: private:
sbas_l1_telemetry_decoder_cc_sptr telemetry_decoder_; sbas_l1_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_; Gnss_Satellite satellite_;
int channel_; int channel_;
bool dump_; bool dump_;

View File

@ -17,25 +17,25 @@
# #
set(TELEMETRY_DECODER_GR_BLOCKS_SOURCES set(TELEMETRY_DECODER_GR_BLOCKS_SOURCES
gps_l1_ca_telemetry_decoder_cc.cc gps_l1_ca_telemetry_decoder_gs.cc
gps_l2c_telemetry_decoder_cc.cc gps_l2c_telemetry_decoder_gs.cc
gps_l5_telemetry_decoder_cc.cc gps_l5_telemetry_decoder_gs.cc
sbas_l1_telemetry_decoder_cc.cc sbas_l1_telemetry_decoder_gs.cc
glonass_l1_ca_telemetry_decoder_cc.cc glonass_l1_ca_telemetry_decoder_gs.cc
glonass_l2_ca_telemetry_decoder_cc.cc glonass_l2_ca_telemetry_decoder_gs.cc
galileo_telemetry_decoder_cc.cc galileo_telemetry_decoder_gs.cc
beidou_b1i_telemetry_decoder_cc.cc beidou_b1i_telemetry_decoder_gs.cc
) )
set(TELEMETRY_DECODER_GR_BLOCKS_HEADERS set(TELEMETRY_DECODER_GR_BLOCKS_HEADERS
gps_l1_ca_telemetry_decoder_cc.h gps_l1_ca_telemetry_decoder_gs.h
gps_l2c_telemetry_decoder_cc.h gps_l2c_telemetry_decoder_gs.h
gps_l5_telemetry_decoder_cc.h gps_l5_telemetry_decoder_gs.h
sbas_l1_telemetry_decoder_cc.h sbas_l1_telemetry_decoder_gs.h
glonass_l1_ca_telemetry_decoder_cc.h glonass_l1_ca_telemetry_decoder_gs.h
glonass_l2_ca_telemetry_decoder_cc.h glonass_l2_ca_telemetry_decoder_gs.h
galileo_telemetry_decoder_cc.h galileo_telemetry_decoder_gs.h
beidou_b1i_telemetry_decoder_cc.h beidou_b1i_telemetry_decoder_gs.h
) )
list(SORT TELEMETRY_DECODER_GR_BLOCKS_HEADERS) list(SORT TELEMETRY_DECODER_GR_BLOCKS_HEADERS)

View File

@ -1,5 +1,5 @@
/*! /*!
* \file beidou_b1i_telemetry_decoder_cc.cc * \file beidou_b1i_telemetry_decoder_gs.cc
* \brief Implementation of an adapter of a BEIDOU BI1 DNAV data decoder block * \brief Implementation of an adapter of a BEIDOU BI1 DNAV data decoder block
* to a TelemetryDecoderInterface * to a TelemetryDecoderInterface
* \note Code added as part of GSoC 2018 program * \note Code added as part of GSoC 2018 program
@ -32,7 +32,7 @@
*/ */
#include "beidou_b1i_telemetry_decoder_cc.h" #include "beidou_b1i_telemetry_decoder_gs.h"
#include "convolutional.h" #include "convolutional.h"
#include "display.h" #include "display.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
@ -47,16 +47,16 @@
using google::LogMessage; using google::LogMessage;
beidou_b1i_telemetry_decoder_cc_sptr beidou_b1i_telemetry_decoder_gs_sptr
beidou_b1i_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump) beidou_b1i_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
{ {
return beidou_b1i_telemetry_decoder_cc_sptr(new beidou_b1i_telemetry_decoder_cc(satellite, dump)); return beidou_b1i_telemetry_decoder_gs_sptr(new beidou_b1i_telemetry_decoder_gs(satellite, dump));
} }
beidou_b1i_telemetry_decoder_cc::beidou_b1i_telemetry_decoder_cc( beidou_b1i_telemetry_decoder_gs::beidou_b1i_telemetry_decoder_gs(
const Gnss_Satellite &satellite, const Gnss_Satellite &satellite,
bool dump) : gr::block("beidou_b1i_telemetry_decoder_cc", bool dump) : gr::block("beidou_b1i_telemetry_decoder_gs",
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{ {
@ -133,7 +133,7 @@ beidou_b1i_telemetry_decoder_cc::beidou_b1i_telemetry_decoder_cc(
} }
beidou_b1i_telemetry_decoder_cc::~beidou_b1i_telemetry_decoder_cc() beidou_b1i_telemetry_decoder_gs::~beidou_b1i_telemetry_decoder_gs()
{ {
volk_gnsssdr_free(d_preamble_samples); volk_gnsssdr_free(d_preamble_samples);
volk_gnsssdr_free(d_secondary_code_symbols); volk_gnsssdr_free(d_secondary_code_symbols);
@ -153,7 +153,7 @@ beidou_b1i_telemetry_decoder_cc::~beidou_b1i_telemetry_decoder_cc()
} }
void beidou_b1i_telemetry_decoder_cc::decode_bch15_11_01(const int32_t *bits, int32_t *decbits) void beidou_b1i_telemetry_decoder_gs::decode_bch15_11_01(const int32_t *bits, int32_t *decbits)
{ {
int32_t bit, err, reg[4] = {1, 1, 1, 1}; int32_t bit, err, reg[4] = {1, 1, 1, 1};
int32_t errind[15] = {14, 13, 10, 12, 6, 9, 4, 11, 0, 5, 7, 8, 1, 3, 2}; int32_t errind[15] = {14, 13, 10, 12, 6, 9, 4, 11, 0, 5, 7, 8, 1, 3, 2};
@ -182,7 +182,7 @@ void beidou_b1i_telemetry_decoder_cc::decode_bch15_11_01(const int32_t *bits, in
} }
void beidou_b1i_telemetry_decoder_cc::decode_word( void beidou_b1i_telemetry_decoder_gs::decode_word(
int32_t word_counter, int32_t word_counter,
const double *enc_word_symbols, const double *enc_word_symbols,
int32_t *dec_word_symbols) int32_t *dec_word_symbols)
@ -224,7 +224,7 @@ void beidou_b1i_telemetry_decoder_cc::decode_word(
} }
void beidou_b1i_telemetry_decoder_cc::decode_subframe(double *frame_symbols) void beidou_b1i_telemetry_decoder_gs::decode_subframe(double *frame_symbols)
{ {
// 1. Transform from symbols to bits // 1. Transform from symbols to bits
std::string data_bits; std::string data_bits;
@ -252,7 +252,6 @@ void beidou_b1i_telemetry_decoder_cc::decode_subframe(double *frame_symbols)
d_nav.d1_subframe_decoder(data_bits); d_nav.d1_subframe_decoder(data_bits);
} }
// 3. Check operation executed correctly // 3. Check operation executed correctly
if (d_nav.flag_crc_test == true) if (d_nav.flag_crc_test == true)
{ {
@ -298,7 +297,7 @@ void beidou_b1i_telemetry_decoder_cc::decode_subframe(double *frame_symbols)
} }
void beidou_b1i_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satellite) void beidou_b1i_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satellite)
{ {
uint32_t sat_prn = 0; uint32_t sat_prn = 0;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
@ -348,7 +347,7 @@ void beidou_b1i_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satell
} }
void beidou_b1i_telemetry_decoder_cc::set_channel(int32_t channel) void beidou_b1i_telemetry_decoder_gs::set_channel(int32_t channel)
{ {
d_channel = channel; d_channel = channel;
LOG(INFO) << "Navigation channel set to " << channel; LOG(INFO) << "Navigation channel set to " << channel;
@ -375,7 +374,7 @@ void beidou_b1i_telemetry_decoder_cc::set_channel(int32_t channel)
} }
int beidou_b1i_telemetry_decoder_cc::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)), int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{ {
int32_t corr_value = 0; int32_t corr_value = 0;

View File

@ -1,5 +1,5 @@
/*! /*!
* \file beidou_b1i_telemetry_decoder_cc.h * \file beidou_b1i_telemetry_decoder_gs.h
* \brief Implementation of an adapter of a BEIDOU BI1 DNAV data decoder block * \brief Implementation of an adapter of a BEIDOU BI1 DNAV data decoder block
* to a TelemetryDecoderInterface * to a TelemetryDecoderInterface
* \details Code added as part of GSoC 2018 program. However new modifications included to mimic * \details Code added as part of GSoC 2018 program. However new modifications included to mimic
@ -32,8 +32,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_CC_H #ifndef GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_GS_H
#define GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_CC_H #define GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_GS_H
#include "Beidou_B1I.h" #include "Beidou_B1I.h"
#include "beidou_dnav_almanac.h" #include "beidou_dnav_almanac.h"
@ -48,11 +48,11 @@
#include <string> #include <string>
class beidou_b1i_telemetry_decoder_cc; class beidou_b1i_telemetry_decoder_gs;
using beidou_b1i_telemetry_decoder_cc_sptr = boost::shared_ptr<beidou_b1i_telemetry_decoder_cc>; using beidou_b1i_telemetry_decoder_gs_sptr = boost::shared_ptr<beidou_b1i_telemetry_decoder_gs>;
beidou_b1i_telemetry_decoder_cc_sptr beidou_b1i_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); beidou_b1i_telemetry_decoder_gs_sptr beidou_b1i_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
//!!!! edit //!!!! edit
/*! /*!
@ -61,10 +61,10 @@ beidou_b1i_telemetry_decoder_cc_sptr beidou_b1i_make_telemetry_decoder_cc(const
* \see <a href="http://russianspacesystems.ru/wp-content/uploads/2016/08/ICD_GLONASS_eng_v5.1.pdf">GLONASS ICD</a> * \see <a href="http://russianspacesystems.ru/wp-content/uploads/2016/08/ICD_GLONASS_eng_v5.1.pdf">GLONASS ICD</a>
* *
*/ */
class beidou_b1i_telemetry_decoder_cc : public gr::block class beidou_b1i_telemetry_decoder_gs : public gr::block
{ {
public: public:
~beidou_b1i_telemetry_decoder_cc(); //!< Class destructor ~beidou_b1i_telemetry_decoder_gs(); //!< Class destructor
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
void set_channel(int channel); //!< Set receiver's channel void set_channel(int channel); //!< Set receiver's channel
@ -75,9 +75,9 @@ public:
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
private: private:
friend beidou_b1i_telemetry_decoder_cc_sptr friend beidou_b1i_telemetry_decoder_gs_sptr
beidou_b1i_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); beidou_b1i_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
beidou_b1i_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); beidou_b1i_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
void decode_subframe(double *symbols); void decode_subframe(double *symbols);
void decode_word(int32_t word_counter, const double *enc_word_symbols, int32_t *dec_word_symbols); void decode_word(int32_t word_counter, const double *enc_word_symbols, int32_t *dec_word_symbols);

View File

@ -1,5 +1,5 @@
/*! /*!
* \file galileo_telemetry_decoder_cc.cc * \file galileo_telemetry_decoder_gs.cc
* \brief Implementation of a Galileo unified INAV and FNAV message demodulator block * \brief Implementation of a Galileo unified INAV and FNAV message demodulator block
* \author Javier Arribas 2018. jarribas(at)cttc.es * \author Javier Arribas 2018. jarribas(at)cttc.es
* *
@ -29,9 +29,9 @@
*/ */
#include "galileo_telemetry_decoder_cc.h"
#include "convolutional.h" #include "convolutional.h"
#include "display.h" #include "display.h"
#include "galileo_telemetry_decoder_gs.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <glog/logging.h> #include <glog/logging.h>
@ -45,16 +45,16 @@
using google::LogMessage; using google::LogMessage;
galileo_telemetry_decoder_cc_sptr galileo_telemetry_decoder_gs_sptr
galileo_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, int frame_type, bool dump) galileo_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, int frame_type, bool dump)
{ {
return galileo_telemetry_decoder_cc_sptr(new galileo_telemetry_decoder_cc(satellite, frame_type, dump)); return galileo_telemetry_decoder_gs_sptr(new galileo_telemetry_decoder_gs(satellite, frame_type, dump));
} }
galileo_telemetry_decoder_cc::galileo_telemetry_decoder_cc( galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
const Gnss_Satellite &satellite, int frame_type, const Gnss_Satellite &satellite, int frame_type,
bool dump) : gr::block("galileo_telemetry_decoder_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), bool dump) : gr::block("galileo_telemetry_decoder_gs", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{ {
// Ephemeris data port out // Ephemeris data port out
@ -213,7 +213,7 @@ galileo_telemetry_decoder_cc::galileo_telemetry_decoder_cc(
} }
galileo_telemetry_decoder_cc::~galileo_telemetry_decoder_cc() galileo_telemetry_decoder_gs::~galileo_telemetry_decoder_gs()
{ {
volk_gnsssdr_free(d_preamble_samples); volk_gnsssdr_free(d_preamble_samples);
if (d_frame_type == 2) if (d_frame_type == 2)
@ -239,14 +239,14 @@ galileo_telemetry_decoder_cc::~galileo_telemetry_decoder_cc()
} }
void galileo_telemetry_decoder_cc::viterbi_decoder(double *page_part_symbols, int32_t *page_part_bits) void galileo_telemetry_decoder_gs::viterbi_decoder(double *page_part_symbols, int32_t *page_part_bits)
{ {
Viterbi(page_part_bits, out0, state0, out1, state1, Viterbi(page_part_bits, out0, state0, out1, state1,
page_part_symbols, KK, nn, DataLength); page_part_symbols, KK, nn, DataLength);
} }
void galileo_telemetry_decoder_cc::deinterleaver(int32_t rows, int32_t cols, const double *in, double *out) void galileo_telemetry_decoder_gs::deinterleaver(int32_t rows, int32_t cols, const double *in, double *out)
{ {
for (int32_t r = 0; r < rows; r++) for (int32_t r = 0; r < rows; r++)
{ {
@ -258,7 +258,7 @@ void galileo_telemetry_decoder_cc::deinterleaver(int32_t rows, int32_t cols, con
} }
void galileo_telemetry_decoder_cc::decode_INAV_word(double *page_part_symbols, int32_t frame_length) void galileo_telemetry_decoder_gs::decode_INAV_word(double *page_part_symbols, int32_t frame_length)
{ {
// 1. De-interleave // 1. De-interleave
auto *page_part_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment())); auto *page_part_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment()));
@ -352,7 +352,7 @@ void galileo_telemetry_decoder_cc::decode_INAV_word(double *page_part_symbols, i
} }
void galileo_telemetry_decoder_cc::decode_FNAV_word(double *page_symbols, int32_t frame_length) void galileo_telemetry_decoder_gs::decode_FNAV_word(double *page_symbols, int32_t frame_length)
{ {
// 1. De-interleave // 1. De-interleave
auto *page_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment())); auto *page_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment()));
@ -420,7 +420,7 @@ void galileo_telemetry_decoder_cc::decode_FNAV_word(double *page_symbols, int32_
} }
void galileo_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satellite) void galileo_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satellite)
{ {
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
DLOG(INFO) << "Setting decoder Finite State Machine to satellite " << d_satellite; DLOG(INFO) << "Setting decoder Finite State Machine to satellite " << d_satellite;
@ -428,7 +428,7 @@ void galileo_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satellite
} }
void galileo_telemetry_decoder_cc::set_channel(int32_t channel) void galileo_telemetry_decoder_gs::set_channel(int32_t channel)
{ {
d_channel = channel; d_channel = channel;
DLOG(INFO) << "Navigation channel set to " << channel; DLOG(INFO) << "Navigation channel set to " << channel;
@ -455,7 +455,7 @@ void galileo_telemetry_decoder_cc::set_channel(int32_t channel)
} }
int galileo_telemetry_decoder_cc::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)), int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{ {
int32_t corr_value = 0; int32_t corr_value = 0;

View File

@ -1,5 +1,5 @@
/*! /*!
* \file galileo_telemetry_decoder_cc.h * \file galileo_telemetry_decoder_gs.h
* \brief Implementation of a Galileo unified INAV and FNAV message demodulator block * \brief Implementation of a Galileo unified INAV and FNAV message demodulator block
* \author Javier Arribas 2018. jarribas(at)cttc.es * \author Javier Arribas 2018. jarribas(at)cttc.es
* *
@ -29,8 +29,8 @@
*/ */
#ifndef GNSS_SDR_GALILEO_TELEMETRY_DECODER_CC_H #ifndef GNSS_SDR_GALILEO_TELEMETRY_DECODER_GS_H
#define GNSS_SDR_GALILEO_TELEMETRY_DECODER_CC_H #define GNSS_SDR_GALILEO_TELEMETRY_DECODER_GS_H
#include "Galileo_E1.h" #include "Galileo_E1.h"
@ -48,19 +48,19 @@
#include <fstream> #include <fstream>
#include <string> #include <string>
class galileo_telemetry_decoder_cc; class galileo_telemetry_decoder_gs;
using galileo_telemetry_decoder_cc_sptr = boost::shared_ptr<galileo_telemetry_decoder_cc>; using galileo_telemetry_decoder_gs_sptr = boost::shared_ptr<galileo_telemetry_decoder_gs>;
galileo_telemetry_decoder_cc_sptr galileo_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, int frame_type, bool dump); galileo_telemetry_decoder_gs_sptr galileo_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, int frame_type, bool dump);
/*! /*!
* \brief This class implements a block that decodes the INAV and FNAV data defined in Galileo ICD * \brief This class implements a block that decodes the INAV and FNAV data defined in Galileo ICD
*/ */
class galileo_telemetry_decoder_cc : public gr::block class galileo_telemetry_decoder_gs : public gr::block
{ {
public: public:
~galileo_telemetry_decoder_cc(); ~galileo_telemetry_decoder_gs();
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
void set_channel(int32_t channel); //!< Set receiver's channel void set_channel(int32_t channel); //!< Set receiver's channel
int32_t flag_even_word_arrived; int32_t flag_even_word_arrived;
@ -72,9 +72,9 @@ public:
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
private: private:
friend galileo_telemetry_decoder_cc_sptr friend galileo_telemetry_decoder_gs_sptr
galileo_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, int frame_type, bool dump); galileo_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, int frame_type, bool dump);
galileo_telemetry_decoder_cc(const Gnss_Satellite &satellite, int frame_type, bool dump); galileo_telemetry_decoder_gs(const Gnss_Satellite &satellite, int frame_type, bool dump);
void viterbi_decoder(double *page_part_symbols, int32_t *page_part_bits); void viterbi_decoder(double *page_part_symbols, int32_t *page_part_bits);

View File

@ -1,5 +1,5 @@
/*! /*!
* \file glonass_l1_ca_telemetry_decoder_cc.cc * \file glonass_l1_ca_telemetry_decoder_gs.cc
* \brief Implementation of an adapter of a GLONASS L1 C/A NAV data decoder block * \brief Implementation of an adapter of a GLONASS L1 C/A NAV data decoder block
* to a TelemetryDecoderInterface * to a TelemetryDecoderInterface
* \note Code added as part of GSoC 2017 program * \note Code added as part of GSoC 2017 program
@ -31,7 +31,7 @@
*/ */
#include "glonass_l1_ca_telemetry_decoder_cc.h" #include "glonass_l1_ca_telemetry_decoder_gs.h"
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
@ -42,16 +42,16 @@
using google::LogMessage; using google::LogMessage;
glonass_l1_ca_telemetry_decoder_cc_sptr glonass_l1_ca_telemetry_decoder_gs_sptr
glonass_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump) glonass_l1_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
{ {
return glonass_l1_ca_telemetry_decoder_cc_sptr(new glonass_l1_ca_telemetry_decoder_cc(satellite, dump)); return glonass_l1_ca_telemetry_decoder_gs_sptr(new glonass_l1_ca_telemetry_decoder_gs(satellite, dump));
} }
glonass_l1_ca_telemetry_decoder_cc::glonass_l1_ca_telemetry_decoder_cc( glonass_l1_ca_telemetry_decoder_gs::glonass_l1_ca_telemetry_decoder_gs(
const Gnss_Satellite &satellite, const Gnss_Satellite &satellite,
bool dump) : gr::block("glonass_l1_ca_telemetry_decoder_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), bool dump) : gr::block("glonass_l1_ca_telemetry_decoder_gs", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{ {
// Ephemeris data port out // Ephemeris data port out
@ -109,7 +109,7 @@ glonass_l1_ca_telemetry_decoder_cc::glonass_l1_ca_telemetry_decoder_cc(
} }
glonass_l1_ca_telemetry_decoder_cc::~glonass_l1_ca_telemetry_decoder_cc() glonass_l1_ca_telemetry_decoder_gs::~glonass_l1_ca_telemetry_decoder_gs()
{ {
delete d_preambles_symbols; delete d_preambles_symbols;
if (d_dump_file.is_open() == true) if (d_dump_file.is_open() == true)
@ -126,7 +126,7 @@ glonass_l1_ca_telemetry_decoder_cc::~glonass_l1_ca_telemetry_decoder_cc()
} }
void glonass_l1_ca_telemetry_decoder_cc::decode_string(const double *frame_symbols, int32_t frame_length) void glonass_l1_ca_telemetry_decoder_gs::decode_string(const double *frame_symbols, int32_t frame_length)
{ {
double chip_acc = 0.0; double chip_acc = 0.0;
int32_t chip_acc_counter = 0; int32_t chip_acc_counter = 0;
@ -226,7 +226,7 @@ void glonass_l1_ca_telemetry_decoder_cc::decode_string(const double *frame_symbo
} }
void glonass_l1_ca_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satellite) void glonass_l1_ca_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satellite)
{ {
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
DLOG(INFO) << "Setting decoder Finite State Machine to satellite " << d_satellite; DLOG(INFO) << "Setting decoder Finite State Machine to satellite " << d_satellite;
@ -234,7 +234,7 @@ void glonass_l1_ca_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &sat
} }
void glonass_l1_ca_telemetry_decoder_cc::set_channel(int32_t channel) void glonass_l1_ca_telemetry_decoder_gs::set_channel(int32_t channel)
{ {
d_channel = channel; d_channel = channel;
LOG(INFO) << "Navigation channel set to " << channel; LOG(INFO) << "Navigation channel set to " << channel;
@ -261,7 +261,7 @@ void glonass_l1_ca_telemetry_decoder_cc::set_channel(int32_t channel)
} }
int glonass_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)), int glonass_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{ {
int32_t corr_value = 0; int32_t corr_value = 0;

View File

@ -1,5 +1,5 @@
/*! /*!
* \file glonass_l1_ca_telemetry_decoder_cc.h * \file glonass_l1_ca_telemetry_decoder_gs.h
* \brief Implementation of an adapter of a GLONASS L1 C/A NAV data decoder block * \brief Implementation of an adapter of a GLONASS L1 C/A NAV data decoder block
* to a TelemetryDecoderInterface * to a TelemetryDecoderInterface
* \note Code added as part of GSoC 2017 program * \note Code added as part of GSoC 2017 program
@ -30,8 +30,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_CC_H #ifndef GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_GS_H
#define GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_CC_H #define GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_GS_H
#include "GLONASS_L1_L2_CA.h" #include "GLONASS_L1_L2_CA.h"
@ -47,11 +47,11 @@
#include <string> #include <string>
class glonass_l1_ca_telemetry_decoder_cc; class glonass_l1_ca_telemetry_decoder_gs;
using glonass_l1_ca_telemetry_decoder_cc_sptr = boost::shared_ptr<glonass_l1_ca_telemetry_decoder_cc>; using glonass_l1_ca_telemetry_decoder_gs_sptr = boost::shared_ptr<glonass_l1_ca_telemetry_decoder_gs>;
glonass_l1_ca_telemetry_decoder_cc_sptr glonass_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); glonass_l1_ca_telemetry_decoder_gs_sptr glonass_l1_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
/*! /*!
* \brief This class implements a block that decodes the GNAV data defined in GLONASS ICD v5.1 * \brief This class implements a block that decodes the GNAV data defined in GLONASS ICD v5.1
@ -59,10 +59,10 @@ glonass_l1_ca_telemetry_decoder_cc_sptr glonass_l1_ca_make_telemetry_decoder_cc(
* \see <a href="http://russianspacesystems.ru/wp-content/uploads/2016/08/ICD_GLONASS_eng_v5.1.pdf">GLONASS ICD</a> * \see <a href="http://russianspacesystems.ru/wp-content/uploads/2016/08/ICD_GLONASS_eng_v5.1.pdf">GLONASS ICD</a>
* *
*/ */
class glonass_l1_ca_telemetry_decoder_cc : public gr::block class glonass_l1_ca_telemetry_decoder_gs : public gr::block
{ {
public: public:
~glonass_l1_ca_telemetry_decoder_cc(); //!< Class destructor ~glonass_l1_ca_telemetry_decoder_gs(); //!< Class destructor
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
void set_channel(int32_t channel); //!< Set receiver's channel void set_channel(int32_t channel); //!< Set receiver's channel
@ -73,9 +73,9 @@ public:
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
private: private:
friend glonass_l1_ca_telemetry_decoder_cc_sptr friend glonass_l1_ca_telemetry_decoder_gs_sptr
glonass_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); glonass_l1_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
glonass_l1_ca_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); glonass_l1_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
void decode_string(const double *symbols, int32_t frame_length); void decode_string(const double *symbols, int32_t frame_length);

View File

@ -1,5 +1,5 @@
/*! /*!
* \file glonass_l2_ca_telemetry_decoder_cc.cc * \file glonass_l2_ca_telemetry_decoder_gs.cc
* \brief Implementation of an adapter of a GLONASS L1 C/A NAV data decoder block * \brief Implementation of an adapter of a GLONASS L1 C/A NAV data decoder block
* to a TelemetryDecoderInterface * to a TelemetryDecoderInterface
* \author Damian Miralles, 2018. dmiralles2009(at)gmail.com * \author Damian Miralles, 2018. dmiralles2009(at)gmail.com
@ -30,8 +30,8 @@
*/ */
#include "glonass_l2_ca_telemetry_decoder_cc.h"
#include "display.h" #include "display.h"
#include "glonass_l2_ca_telemetry_decoder_gs.h"
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
@ -42,16 +42,16 @@
using google::LogMessage; using google::LogMessage;
glonass_l2_ca_telemetry_decoder_cc_sptr glonass_l2_ca_telemetry_decoder_gs_sptr
glonass_l2_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump) glonass_l2_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
{ {
return glonass_l2_ca_telemetry_decoder_cc_sptr(new glonass_l2_ca_telemetry_decoder_cc(satellite, dump)); return glonass_l2_ca_telemetry_decoder_gs_sptr(new glonass_l2_ca_telemetry_decoder_gs(satellite, dump));
} }
glonass_l2_ca_telemetry_decoder_cc::glonass_l2_ca_telemetry_decoder_cc( glonass_l2_ca_telemetry_decoder_gs::glonass_l2_ca_telemetry_decoder_gs(
const Gnss_Satellite &satellite, const Gnss_Satellite &satellite,
bool dump) : gr::block("glonass_l2_ca_telemetry_decoder_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), bool dump) : gr::block("glonass_l2_ca_telemetry_decoder_gs", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{ {
// Ephemeris data port out // Ephemeris data port out
@ -109,7 +109,7 @@ glonass_l2_ca_telemetry_decoder_cc::glonass_l2_ca_telemetry_decoder_cc(
} }
glonass_l2_ca_telemetry_decoder_cc::~glonass_l2_ca_telemetry_decoder_cc() glonass_l2_ca_telemetry_decoder_gs::~glonass_l2_ca_telemetry_decoder_gs()
{ {
delete d_preambles_symbols; delete d_preambles_symbols;
if (d_dump_file.is_open() == true) if (d_dump_file.is_open() == true)
@ -126,7 +126,7 @@ glonass_l2_ca_telemetry_decoder_cc::~glonass_l2_ca_telemetry_decoder_cc()
} }
void glonass_l2_ca_telemetry_decoder_cc::decode_string(const double *frame_symbols, int32_t frame_length) void glonass_l2_ca_telemetry_decoder_gs::decode_string(const double *frame_symbols, int32_t frame_length)
{ {
double chip_acc = 0.0; double chip_acc = 0.0;
int32_t chip_acc_counter = 0; int32_t chip_acc_counter = 0;
@ -226,7 +226,7 @@ void glonass_l2_ca_telemetry_decoder_cc::decode_string(const double *frame_symbo
} }
void glonass_l2_ca_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satellite) void glonass_l2_ca_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satellite)
{ {
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
DLOG(INFO) << "Setting decoder Finite State Machine to satellite " << d_satellite; DLOG(INFO) << "Setting decoder Finite State Machine to satellite " << d_satellite;
@ -234,7 +234,7 @@ void glonass_l2_ca_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &sat
} }
void glonass_l2_ca_telemetry_decoder_cc::set_channel(int32_t channel) void glonass_l2_ca_telemetry_decoder_gs::set_channel(int32_t channel)
{ {
d_channel = channel; d_channel = channel;
LOG(INFO) << "Navigation channel set to " << channel; LOG(INFO) << "Navigation channel set to " << channel;
@ -261,7 +261,7 @@ void glonass_l2_ca_telemetry_decoder_cc::set_channel(int32_t channel)
} }
int glonass_l2_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)), int glonass_l2_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{ {
int32_t corr_value = 0; int32_t corr_value = 0;

View File

@ -1,5 +1,5 @@
/*! /*!
* \file glonass_l2_ca_telemetry_decoder_cc.h * \file glonass_l2_ca_telemetry_decoder_gs.h
* \brief Implementation of an adapter of a GLONASS L2 C/A NAV data decoder block * \brief Implementation of an adapter of a GLONASS L2 C/A NAV data decoder block
* to a TelemetryDecoderInterface * to a TelemetryDecoderInterface
* \author Damian Miralles, 2018. dmiralles2009(at)gmail.com * \author Damian Miralles, 2018. dmiralles2009(at)gmail.com
@ -29,8 +29,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_CC_H #ifndef GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_GS_H
#define GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_CC_H #define GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_GS_H
#include "GLONASS_L1_L2_CA.h" #include "GLONASS_L1_L2_CA.h"
@ -46,21 +46,21 @@
#include <string> #include <string>
class glonass_l2_ca_telemetry_decoder_cc; class glonass_l2_ca_telemetry_decoder_gs;
using glonass_l2_ca_telemetry_decoder_cc_sptr = boost::shared_ptr<glonass_l2_ca_telemetry_decoder_cc>; using glonass_l2_ca_telemetry_decoder_gs_sptr = boost::shared_ptr<glonass_l2_ca_telemetry_decoder_gs>;
glonass_l2_ca_telemetry_decoder_cc_sptr glonass_l2_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); glonass_l2_ca_telemetry_decoder_gs_sptr glonass_l2_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
/*! /*!
* \brief This class implements a block that decodes the GNAV data defined in GLONASS ICD v5.1 * \brief This class implements a block that decodes the GNAV data defined in GLONASS ICD v5.1
* \see <a href="http://russianspacesystems.ru/wp-content/uploads/2016/08/ICD_GLONASS_eng_v5.1.pdf">GLONASS ICD</a> * \see <a href="http://russianspacesystems.ru/wp-content/uploads/2016/08/ICD_GLONASS_eng_v5.1.pdf">GLONASS ICD</a>
* *
*/ */
class glonass_l2_ca_telemetry_decoder_cc : public gr::block class glonass_l2_ca_telemetry_decoder_gs : public gr::block
{ {
public: public:
~glonass_l2_ca_telemetry_decoder_cc(); //!< Class destructor ~glonass_l2_ca_telemetry_decoder_gs(); //!< Class destructor
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
void set_channel(int32_t channel); //!< Set receiver's channel void set_channel(int32_t channel); //!< Set receiver's channel
@ -71,9 +71,9 @@ public:
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
private: private:
friend glonass_l2_ca_telemetry_decoder_cc_sptr friend glonass_l2_ca_telemetry_decoder_gs_sptr
glonass_l2_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); glonass_l2_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
glonass_l2_ca_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); glonass_l2_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
void decode_string(const double *symbols, int32_t frame_length); void decode_string(const double *symbols, int32_t frame_length);

View File

@ -1,5 +1,5 @@
/*! /*!
* \file gps_l1_ca_telemetry_decoder_cc.cc * \file gps_l1_ca_telemetry_decoder_gs.cc
* \brief Implementation of a NAV message demodulator block based on * \brief Implementation of a NAV message demodulator block based on
* Kay Borre book MATLAB-based GPS receiver * Kay Borre book MATLAB-based GPS receiver
* \author Javier Arribas, 2011. jarribas(at)cttc.es * \author Javier Arribas, 2011. jarribas(at)cttc.es
@ -29,7 +29,7 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#include "gps_l1_ca_telemetry_decoder_cc.h" #include "gps_l1_ca_telemetry_decoder_gs.h"
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
@ -42,16 +42,16 @@
using google::LogMessage; using google::LogMessage;
gps_l1_ca_telemetry_decoder_cc_sptr gps_l1_ca_telemetry_decoder_gs_sptr
gps_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump) gps_l1_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
{ {
return gps_l1_ca_telemetry_decoder_cc_sptr(new gps_l1_ca_telemetry_decoder_cc(satellite, dump)); return gps_l1_ca_telemetry_decoder_gs_sptr(new gps_l1_ca_telemetry_decoder_gs(satellite, dump));
} }
gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc( gps_l1_ca_telemetry_decoder_gs::gps_l1_ca_telemetry_decoder_gs(
const Gnss_Satellite &satellite, const Gnss_Satellite &satellite,
bool dump) : gr::block("gps_navigation_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), bool dump) : gr::block("gps_navigation_gs", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{ {
// Ephemeris data port out // Ephemeris data port out
@ -98,7 +98,7 @@ gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc(
} }
gps_l1_ca_telemetry_decoder_cc::~gps_l1_ca_telemetry_decoder_cc() gps_l1_ca_telemetry_decoder_gs::~gps_l1_ca_telemetry_decoder_gs()
{ {
volk_gnsssdr_free(d_preambles_symbols); volk_gnsssdr_free(d_preambles_symbols);
d_symbol_history.clear(); d_symbol_history.clear();
@ -116,7 +116,7 @@ gps_l1_ca_telemetry_decoder_cc::~gps_l1_ca_telemetry_decoder_cc()
} }
bool gps_l1_ca_telemetry_decoder_cc::gps_word_parityCheck(uint32_t gpsword) bool gps_l1_ca_telemetry_decoder_gs::gps_word_parityCheck(uint32_t gpsword)
{ {
uint32_t d1, d2, d3, d4, d5, d6, d7, t, parity; uint32_t d1, d2, d3, d4, d5, d6, d7, t, parity;
// XOR as many bits in parallel as possible. The magic constants pick // XOR as many bits in parallel as possible. The magic constants pick
@ -143,7 +143,7 @@ bool gps_l1_ca_telemetry_decoder_cc::gps_word_parityCheck(uint32_t gpsword)
} }
void gps_l1_ca_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satellite) void gps_l1_ca_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satellite)
{ {
d_nav.reset(); d_nav.reset();
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
@ -153,7 +153,7 @@ void gps_l1_ca_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satelli
} }
void gps_l1_ca_telemetry_decoder_cc::set_channel(int32_t channel) void gps_l1_ca_telemetry_decoder_gs::set_channel(int32_t channel)
{ {
d_channel = channel; d_channel = channel;
d_nav.i_channel_ID = channel; d_nav.i_channel_ID = channel;
@ -182,7 +182,7 @@ void gps_l1_ca_telemetry_decoder_cc::set_channel(int32_t channel)
} }
bool gps_l1_ca_telemetry_decoder_cc::decode_subframe() bool gps_l1_ca_telemetry_decoder_gs::decode_subframe()
{ {
char subframe[GPS_SUBFRAME_LENGTH]; char subframe[GPS_SUBFRAME_LENGTH];
@ -234,7 +234,7 @@ bool gps_l1_ca_telemetry_decoder_cc::decode_subframe()
{ {
GPS_frame_4bytes ^= 0x3FFFFFC0; // invert the data bits (using XOR) GPS_frame_4bytes ^= 0x3FFFFFC0; // invert the data bits (using XOR)
} }
if (gps_l1_ca_telemetry_decoder_cc::gps_word_parityCheck(GPS_frame_4bytes)) if (gps_l1_ca_telemetry_decoder_gs::gps_word_parityCheck(GPS_frame_4bytes))
{ {
subframe_synchro_confirmation = true; subframe_synchro_confirmation = true;
} }
@ -310,7 +310,7 @@ bool gps_l1_ca_telemetry_decoder_cc::decode_subframe()
} }
int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)), int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{ {
int32_t preamble_diff_ms = 0; int32_t preamble_diff_ms = 0;

View File

@ -1,5 +1,5 @@
/*! /*!
* \file gps_l1_ca_telemetry_decoder_cc.h * \file gps_l1_ca_telemetry_decoder_gs.h
* \brief Interface of a NAV message demodulator block based on * \brief Interface of a NAV message demodulator block based on
* Kay Borre book MATLAB-based GPS receiver * Kay Borre book MATLAB-based GPS receiver
* \author Javier Arribas, 2011. jarribas(at)cttc.es * \author Javier Arribas, 2011. jarribas(at)cttc.es
@ -28,8 +28,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_CC_H #ifndef GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_GS_H
#define GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_CC_H #define GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_GS_H
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "gnss_satellite.h" #include "gnss_satellite.h"
@ -40,21 +40,21 @@
#include <fstream> #include <fstream>
#include <string> #include <string>
class gps_l1_ca_telemetry_decoder_cc; class gps_l1_ca_telemetry_decoder_gs;
using gps_l1_ca_telemetry_decoder_cc_sptr = boost::shared_ptr<gps_l1_ca_telemetry_decoder_cc>; using gps_l1_ca_telemetry_decoder_gs_sptr = boost::shared_ptr<gps_l1_ca_telemetry_decoder_gs>;
gps_l1_ca_telemetry_decoder_cc_sptr gps_l1_ca_telemetry_decoder_gs_sptr
gps_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); gps_l1_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
/*! /*!
* \brief This class implements a block that decodes the NAV data defined in IS-GPS-200E * \brief This class implements a block that decodes the NAV data defined in IS-GPS-200E
* *
*/ */
class gps_l1_ca_telemetry_decoder_cc : public gr::block class gps_l1_ca_telemetry_decoder_gs : public gr::block
{ {
public: public:
~gps_l1_ca_telemetry_decoder_cc(); ~gps_l1_ca_telemetry_decoder_gs();
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
void set_channel(int channel); //!< Set receiver's channel void set_channel(int channel); //!< Set receiver's channel
@ -65,10 +65,10 @@ public:
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
private: private:
friend gps_l1_ca_telemetry_decoder_cc_sptr friend gps_l1_ca_telemetry_decoder_gs_sptr
gps_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); gps_l1_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
gps_l1_ca_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); gps_l1_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
bool gps_word_parityCheck(uint32_t gpsword); bool gps_word_parityCheck(uint32_t gpsword);

View File

@ -1,5 +1,5 @@
/*! /*!
* \file gps_l2c_telemetry_decoder_cc.cc * \file gps_l2c_telemetry_decoder_gs.cc
* \brief Implementation of a NAV message demodulator block based on * \brief Implementation of a NAV message demodulator block based on
* Kay Borre book MATLAB-based GPS receiver * Kay Borre book MATLAB-based GPS receiver
* \author Javier Arribas, 2015. jarribas(at)cttc.es * \author Javier Arribas, 2015. jarribas(at)cttc.es
@ -30,9 +30,9 @@
*/ */
#include "gps_l2c_telemetry_decoder_cc.h"
#include "display.h" #include "display.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
#include "gps_l2c_telemetry_decoder_gs.h"
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
@ -43,15 +43,15 @@
using google::LogMessage; using google::LogMessage;
gps_l2c_telemetry_decoder_cc_sptr gps_l2c_telemetry_decoder_gs_sptr
gps_l2c_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump) gps_l2c_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
{ {
return gps_l2c_telemetry_decoder_cc_sptr(new gps_l2c_telemetry_decoder_cc(satellite, dump)); return gps_l2c_telemetry_decoder_gs_sptr(new gps_l2c_telemetry_decoder_gs(satellite, dump));
} }
gps_l2c_telemetry_decoder_cc::gps_l2c_telemetry_decoder_cc( gps_l2c_telemetry_decoder_gs::gps_l2c_telemetry_decoder_gs(
const Gnss_Satellite &satellite, bool dump) : gr::block("gps_l2c_telemetry_decoder_cc", const Gnss_Satellite &satellite, bool dump) : gr::block("gps_l2c_telemetry_decoder_gs",
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{ {
@ -74,7 +74,7 @@ gps_l2c_telemetry_decoder_cc::gps_l2c_telemetry_decoder_cc(
} }
gps_l2c_telemetry_decoder_cc::~gps_l2c_telemetry_decoder_cc() gps_l2c_telemetry_decoder_gs::~gps_l2c_telemetry_decoder_gs()
{ {
if (d_dump_file.is_open() == true) if (d_dump_file.is_open() == true)
{ {
@ -90,14 +90,14 @@ gps_l2c_telemetry_decoder_cc::~gps_l2c_telemetry_decoder_cc()
} }
void gps_l2c_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satellite) void gps_l2c_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satellite)
{ {
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
DLOG(INFO) << "GPS L2C CNAV telemetry decoder in channel " << this->d_channel << " set to satellite " << d_satellite; DLOG(INFO) << "GPS L2C CNAV telemetry decoder in channel " << this->d_channel << " set to satellite " << d_satellite;
} }
void gps_l2c_telemetry_decoder_cc::set_channel(int channel) void gps_l2c_telemetry_decoder_gs::set_channel(int channel)
{ {
d_channel = channel; d_channel = channel;
LOG(INFO) << "GPS L2C CNAV channel set to " << channel; LOG(INFO) << "GPS L2C CNAV channel set to " << channel;
@ -125,7 +125,7 @@ void gps_l2c_telemetry_decoder_cc::set_channel(int channel)
} }
int gps_l2c_telemetry_decoder_cc::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)), int gps_l2c_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{ {
// get pointers on in- and output gnss-synchro objects // get pointers on in- and output gnss-synchro objects

View File

@ -1,5 +1,5 @@
/*! /*!
* \file gps_l2c_telemetry_decoder_cc.h * \file gps_l2c_telemetry_decoder_gs.h
* \brief Interface of a CNAV message demodulator block based on * \brief Interface of a CNAV message demodulator block based on
* Kay Borre book MATLAB-based GPS receiver * Kay Borre book MATLAB-based GPS receiver
* \author Javier Arribas, 2015. jarribas(at)cttc.es * \author Javier Arribas, 2015. jarribas(at)cttc.es
@ -28,8 +28,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_CC_H #ifndef GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_GS_H
#define GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_CC_H #define GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_GS_H
#include "GPS_L2C.h" #include "GPS_L2C.h"
@ -53,21 +53,21 @@ extern "C"
} }
class gps_l2c_telemetry_decoder_cc; class gps_l2c_telemetry_decoder_gs;
using gps_l2c_telemetry_decoder_cc_sptr = boost::shared_ptr<gps_l2c_telemetry_decoder_cc>; using gps_l2c_telemetry_decoder_gs_sptr = boost::shared_ptr<gps_l2c_telemetry_decoder_gs>;
gps_l2c_telemetry_decoder_cc_sptr gps_l2c_telemetry_decoder_gs_sptr
gps_l2c_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); gps_l2c_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
/*! /*!
* \brief This class implements a block that decodes the SBAS integrity and corrections data defined in RTCA MOPS DO-229 * \brief This class implements a block that decodes the SBAS integrity and corrections data defined in RTCA MOPS DO-229
* *
*/ */
class gps_l2c_telemetry_decoder_cc : public gr::block class gps_l2c_telemetry_decoder_gs : public gr::block
{ {
public: public:
~gps_l2c_telemetry_decoder_cc(); ~gps_l2c_telemetry_decoder_gs();
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
void set_channel(int32_t channel); //!< Set receiver's channel void set_channel(int32_t channel); //!< Set receiver's channel
@ -78,9 +78,9 @@ public:
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
private: private:
friend gps_l2c_telemetry_decoder_cc_sptr friend gps_l2c_telemetry_decoder_gs_sptr
gps_l2c_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); gps_l2c_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
gps_l2c_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); gps_l2c_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
bool d_dump; bool d_dump;
Gnss_Satellite d_satellite; Gnss_Satellite d_satellite;

View File

@ -1,5 +1,5 @@
/*! /*!
* \file gps_l5_telemetry_decoder_cc.cc * \file gps_l5_telemetry_decoder_gs.cc
* \brief Implementation of a CNAV message demodulator block * \brief Implementation of a CNAV message demodulator block
* \author Antonio Ramos, 2017. antonio.ramos(at)cttc.es * \author Antonio Ramos, 2017. antonio.ramos(at)cttc.es
* *
@ -29,11 +29,11 @@
*/ */
#include "gps_l5_telemetry_decoder_cc.h"
#include "display.h" #include "display.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
#include "gps_cnav_ephemeris.h" #include "gps_cnav_ephemeris.h"
#include "gps_cnav_iono.h" #include "gps_cnav_iono.h"
#include "gps_l5_telemetry_decoder_gs.h"
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
@ -44,15 +44,15 @@
using google::LogMessage; using google::LogMessage;
gps_l5_telemetry_decoder_cc_sptr gps_l5_telemetry_decoder_gs_sptr
gps_l5_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump) gps_l5_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
{ {
return gps_l5_telemetry_decoder_cc_sptr(new gps_l5_telemetry_decoder_cc(satellite, dump)); return gps_l5_telemetry_decoder_gs_sptr(new gps_l5_telemetry_decoder_gs(satellite, dump));
} }
gps_l5_telemetry_decoder_cc::gps_l5_telemetry_decoder_cc( gps_l5_telemetry_decoder_gs::gps_l5_telemetry_decoder_gs(
const Gnss_Satellite &satellite, bool dump) : gr::block("gps_l5_telemetry_decoder_cc", const Gnss_Satellite &satellite, bool dump) : gr::block("gps_l5_telemetry_decoder_gs",
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{ {
@ -86,7 +86,7 @@ gps_l5_telemetry_decoder_cc::gps_l5_telemetry_decoder_cc(
} }
gps_l5_telemetry_decoder_cc::~gps_l5_telemetry_decoder_cc() gps_l5_telemetry_decoder_gs::~gps_l5_telemetry_decoder_gs()
{ {
if (d_dump_file.is_open() == true) if (d_dump_file.is_open() == true)
{ {
@ -102,7 +102,7 @@ gps_l5_telemetry_decoder_cc::~gps_l5_telemetry_decoder_cc()
} }
void gps_l5_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satellite) void gps_l5_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satellite)
{ {
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
DLOG(INFO) << "GPS L5 CNAV telemetry decoder in channel " << this->d_channel << " set to satellite " << d_satellite; DLOG(INFO) << "GPS L5 CNAV telemetry decoder in channel " << this->d_channel << " set to satellite " << d_satellite;
@ -110,7 +110,7 @@ void gps_l5_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satellite)
} }
void gps_l5_telemetry_decoder_cc::set_channel(int32_t channel) void gps_l5_telemetry_decoder_gs::set_channel(int32_t channel)
{ {
d_channel = channel; d_channel = channel;
d_CNAV_Message.reset(); d_CNAV_Message.reset();
@ -139,7 +139,7 @@ void gps_l5_telemetry_decoder_cc::set_channel(int32_t channel)
} }
int gps_l5_telemetry_decoder_cc::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)), int gps_l5_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{ {
// get pointers on in- and output gnss-synchro objects // get pointers on in- and output gnss-synchro objects

View File

@ -1,5 +1,5 @@
/*! /*!
* \file gps_l5_telemetry_decoder_cc.h * \file gps_l5_telemetry_decoder_gs.h
* \brief Interface of a CNAV message demodulator block * \brief Interface of a CNAV message demodulator block
* \author Antonio Ramos, 2017. antonio.ramos(at)cttc.es * \author Antonio Ramos, 2017. antonio.ramos(at)cttc.es
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
@ -27,8 +27,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_GPS_L5_TELEMETRY_DECODER_CC_H #ifndef GNSS_SDR_GPS_L5_TELEMETRY_DECODER_GS_H
#define GNSS_SDR_GPS_L5_TELEMETRY_DECODER_CC_H #define GNSS_SDR_GPS_L5_TELEMETRY_DECODER_GS_H
#include "GPS_L5.h" #include "GPS_L5.h"
@ -51,30 +51,30 @@ extern "C"
} }
class gps_l5_telemetry_decoder_cc; class gps_l5_telemetry_decoder_gs;
using gps_l5_telemetry_decoder_cc_sptr = boost::shared_ptr<gps_l5_telemetry_decoder_cc>; using gps_l5_telemetry_decoder_gs_sptr = boost::shared_ptr<gps_l5_telemetry_decoder_gs>;
gps_l5_telemetry_decoder_cc_sptr gps_l5_telemetry_decoder_gs_sptr
gps_l5_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); gps_l5_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
/*! /*!
* \brief This class implements a GPS L5 Telemetry decoder * \brief This class implements a GPS L5 Telemetry decoder
* *
*/ */
class gps_l5_telemetry_decoder_cc : public gr::block class gps_l5_telemetry_decoder_gs : public gr::block
{ {
public: public:
~gps_l5_telemetry_decoder_cc(); ~gps_l5_telemetry_decoder_gs();
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
void set_channel(int32_t channel); //!< Set receiver's channel void set_channel(int32_t channel); //!< Set receiver's channel
int general_work(int noutput_items, gr_vector_int &ninput_items, int general_work(int noutput_items, gr_vector_int &ninput_items,
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
private: private:
friend gps_l5_telemetry_decoder_cc_sptr friend gps_l5_telemetry_decoder_gs_sptr
gps_l5_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); gps_l5_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
gps_l5_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); gps_l5_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
bool d_dump; bool d_dump;
Gnss_Satellite d_satellite; Gnss_Satellite d_satellite;

View File

@ -1,5 +1,5 @@
/*! /*!
* \file sbas_l1_telemetry_decoder_cc.cc * \file sbas_l1_telemetry_decoder_gs.cc
* \brief Implementation of a SBAS telemetry data decoder block * \brief Implementation of a SBAS telemetry data decoder block
* \author Daniel Fehr 2013. daniel.co(at)bluewin.ch * \author Daniel Fehr 2013. daniel.co(at)bluewin.ch
* *
@ -28,8 +28,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#include "sbas_l1_telemetry_decoder_cc.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
#include "sbas_l1_telemetry_decoder_gs.h"
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
@ -45,16 +45,16 @@ using google::LogMessage;
#define LMORE 5 // #define LMORE 5 //
sbas_l1_telemetry_decoder_cc_sptr sbas_l1_telemetry_decoder_gs_sptr
sbas_l1_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump) sbas_l1_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
{ {
return sbas_l1_telemetry_decoder_cc_sptr(new sbas_l1_telemetry_decoder_cc(satellite, dump)); return sbas_l1_telemetry_decoder_gs_sptr(new sbas_l1_telemetry_decoder_gs(satellite, dump));
} }
sbas_l1_telemetry_decoder_cc::sbas_l1_telemetry_decoder_cc( sbas_l1_telemetry_decoder_gs::sbas_l1_telemetry_decoder_gs(
const Gnss_Satellite &satellite, const Gnss_Satellite &satellite,
bool dump) : gr::block("sbas_l1_telemetry_decoder_cc", bool dump) : gr::block("sbas_l1_telemetry_decoder_gs",
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{ {
@ -70,7 +70,7 @@ sbas_l1_telemetry_decoder_cc::sbas_l1_telemetry_decoder_cc(
} }
sbas_l1_telemetry_decoder_cc::~sbas_l1_telemetry_decoder_cc() sbas_l1_telemetry_decoder_gs::~sbas_l1_telemetry_decoder_gs()
{ {
if (d_dump_file.is_open() == true) if (d_dump_file.is_open() == true)
{ {
@ -86,14 +86,14 @@ sbas_l1_telemetry_decoder_cc::~sbas_l1_telemetry_decoder_cc()
} }
void sbas_l1_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satellite) void sbas_l1_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satellite)
{ {
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
LOG(INFO) << "SBAS telemetry decoder in channel " << this->d_channel << " set to satellite " << d_satellite; LOG(INFO) << "SBAS telemetry decoder in channel " << this->d_channel << " set to satellite " << d_satellite;
} }
void sbas_l1_telemetry_decoder_cc::set_channel(int32_t channel) void sbas_l1_telemetry_decoder_gs::set_channel(int32_t channel)
{ {
d_channel = channel; d_channel = channel;
LOG(INFO) << "SBAS channel set to " << channel; LOG(INFO) << "SBAS channel set to " << channel;
@ -101,7 +101,7 @@ void sbas_l1_telemetry_decoder_cc::set_channel(int32_t channel)
// ### helper class for sample alignment ### // ### helper class for sample alignment ###
sbas_l1_telemetry_decoder_cc::Sample_Aligner::Sample_Aligner() sbas_l1_telemetry_decoder_gs::Sample_Aligner::Sample_Aligner()
{ {
d_n_smpls_in_history = 3; d_n_smpls_in_history = 3;
d_iir_par = 0.05; d_iir_par = 0.05;
@ -109,10 +109,10 @@ sbas_l1_telemetry_decoder_cc::Sample_Aligner::Sample_Aligner()
} }
sbas_l1_telemetry_decoder_cc::Sample_Aligner::~Sample_Aligner() = default; sbas_l1_telemetry_decoder_gs::Sample_Aligner::~Sample_Aligner() = default;
void sbas_l1_telemetry_decoder_cc::Sample_Aligner::reset() void sbas_l1_telemetry_decoder_gs::Sample_Aligner::reset()
{ {
d_past_sample = 0; d_past_sample = 0;
d_corr_paired = 0; d_corr_paired = 0;
@ -124,7 +124,7 @@ void sbas_l1_telemetry_decoder_cc::Sample_Aligner::reset()
/* /*
* samples length must be a multiple of two * samples length must be a multiple of two
*/ */
bool sbas_l1_telemetry_decoder_cc::Sample_Aligner::get_symbols(const std::vector<double> &samples, std::vector<double> &symbols) bool sbas_l1_telemetry_decoder_gs::Sample_Aligner::get_symbols(const std::vector<double> &samples, std::vector<double> &symbols)
{ {
double smpls[3] = {}; double smpls[3] = {};
double corr_diff; double corr_diff;
@ -134,12 +134,12 @@ bool sbas_l1_telemetry_decoder_cc::Sample_Aligner::get_symbols(const std::vector
VLOG(FLOW) << "get_symbols(): " VLOG(FLOW) << "get_symbols(): "
<< "d_past_sample=" << d_past_sample << "\tsamples size=" << samples.size(); << "d_past_sample=" << d_past_sample << "\tsamples size=" << samples.size();
for (uint32_t i_sym = 0; i_sym < samples.size() / sbas_l1_telemetry_decoder_cc::D_SAMPLES_PER_SYMBOL; i_sym++) for (uint32_t i_sym = 0; i_sym < samples.size() / sbas_l1_telemetry_decoder_gs::D_SAMPLES_PER_SYMBOL; i_sym++)
{ {
// get the next samples // get the next samples
for (int32_t i = 0; i < d_n_smpls_in_history; i++) for (int32_t i = 0; i < d_n_smpls_in_history; i++)
{ {
smpls[i] = static_cast<int32_t>(i_sym) * sbas_l1_telemetry_decoder_cc::D_SAMPLES_PER_SYMBOL + i - 1 == -1 ? d_past_sample : samples[i_sym * sbas_l1_telemetry_decoder_cc::D_SAMPLES_PER_SYMBOL + i - 1]; smpls[i] = static_cast<int32_t>(i_sym) * sbas_l1_telemetry_decoder_gs::D_SAMPLES_PER_SYMBOL + i - 1 == -1 ? d_past_sample : samples[i_sym * sbas_l1_telemetry_decoder_gs::D_SAMPLES_PER_SYMBOL + i - 1];
} }
// update the pseudo correlations (IIR method) of the two possible alignments // update the pseudo correlations (IIR method) of the two possible alignments
@ -182,7 +182,7 @@ bool sbas_l1_telemetry_decoder_cc::Sample_Aligner::get_symbols(const std::vector
// ### helper class for symbol alignment and viterbi decoding ### // ### helper class for symbol alignment and viterbi decoding ###
sbas_l1_telemetry_decoder_cc::Symbol_Aligner_And_Decoder::Symbol_Aligner_And_Decoder() sbas_l1_telemetry_decoder_gs::Symbol_Aligner_And_Decoder::Symbol_Aligner_And_Decoder()
{ {
// convolutional code properties // convolutional code properties
d_KK = 7; d_KK = 7;
@ -197,14 +197,14 @@ sbas_l1_telemetry_decoder_cc::Symbol_Aligner_And_Decoder::Symbol_Aligner_And_Dec
} }
sbas_l1_telemetry_decoder_cc::Symbol_Aligner_And_Decoder::~Symbol_Aligner_And_Decoder() sbas_l1_telemetry_decoder_gs::Symbol_Aligner_And_Decoder::~Symbol_Aligner_And_Decoder()
{ {
delete d_vd1; delete d_vd1;
delete d_vd2; delete d_vd2;
} }
void sbas_l1_telemetry_decoder_cc::Symbol_Aligner_And_Decoder::reset() void sbas_l1_telemetry_decoder_gs::Symbol_Aligner_And_Decoder::reset()
{ {
d_past_symbol = 0; d_past_symbol = 0;
d_vd1->reset(); d_vd1->reset();
@ -212,7 +212,7 @@ void sbas_l1_telemetry_decoder_cc::Symbol_Aligner_And_Decoder::reset()
} }
bool sbas_l1_telemetry_decoder_cc::Symbol_Aligner_And_Decoder::get_bits(const std::vector<double> &symbols, std::vector<int32_t> &bits) bool sbas_l1_telemetry_decoder_gs::Symbol_Aligner_And_Decoder::get_bits(const std::vector<double> &symbols, std::vector<int32_t> &bits)
{ {
const int32_t traceback_depth = 5 * d_KK; const int32_t traceback_depth = 5 * d_KK;
int32_t nbits_requested = symbols.size() / D_SYMBOLS_PER_BIT; int32_t nbits_requested = symbols.size() / D_SYMBOLS_PER_BIT;
@ -251,13 +251,13 @@ bool sbas_l1_telemetry_decoder_cc::Symbol_Aligner_And_Decoder::get_bits(const st
// ### helper class for detecting the preamble and collect the corresponding message candidates ### // ### helper class for detecting the preamble and collect the corresponding message candidates ###
void sbas_l1_telemetry_decoder_cc::Frame_Detector::reset() void sbas_l1_telemetry_decoder_gs::Frame_Detector::reset()
{ {
d_buffer.clear(); d_buffer.clear();
} }
void sbas_l1_telemetry_decoder_cc::Frame_Detector::get_frame_candidates(const std::vector<int32_t> &bits, std::vector<std::pair<int32_t, std::vector<int32_t>>> &msg_candidates) void sbas_l1_telemetry_decoder_gs::Frame_Detector::get_frame_candidates(const std::vector<int32_t> &bits, std::vector<std::pair<int32_t, std::vector<int32_t>>> &msg_candidates)
{ {
std::stringstream ss; std::stringstream ss;
uint32_t sbas_msg_length = 250; uint32_t sbas_msg_length = 250;
@ -321,12 +321,12 @@ void sbas_l1_telemetry_decoder_cc::Frame_Detector::get_frame_candidates(const st
// ### helper class for checking the CRC of the message candidates ### // ### helper class for checking the CRC of the message candidates ###
void sbas_l1_telemetry_decoder_cc::Crc_Verifier::reset() void sbas_l1_telemetry_decoder_gs::Crc_Verifier::reset()
{ {
} }
void sbas_l1_telemetry_decoder_cc::Crc_Verifier::get_valid_frames(const std::vector<msg_candiate_int_t> &msg_candidates, std::vector<msg_candiate_char_t> &valid_msgs) void sbas_l1_telemetry_decoder_gs::Crc_Verifier::get_valid_frames(const std::vector<msg_candiate_int_t> &msg_candidates, std::vector<msg_candiate_char_t> &valid_msgs)
{ {
std::stringstream ss; std::stringstream ss;
VLOG(FLOW) << "get_valid_frames(): " VLOG(FLOW) << "get_valid_frames(): "
@ -364,7 +364,7 @@ void sbas_l1_telemetry_decoder_cc::Crc_Verifier::get_valid_frames(const std::vec
} }
void sbas_l1_telemetry_decoder_cc::Crc_Verifier::zerropad_back_and_convert_to_bytes(const std::vector<int> &msg_candidate, std::vector<uint8_t> &bytes) void sbas_l1_telemetry_decoder_gs::Crc_Verifier::zerropad_back_and_convert_to_bytes(const std::vector<int> &msg_candidate, std::vector<uint8_t> &bytes)
{ {
std::stringstream ss; std::stringstream ss;
const size_t bits_per_byte = 8; const size_t bits_per_byte = 8;
@ -391,7 +391,7 @@ void sbas_l1_telemetry_decoder_cc::Crc_Verifier::zerropad_back_and_convert_to_by
} }
void sbas_l1_telemetry_decoder_cc::Crc_Verifier::zerropad_front_and_convert_to_bytes(const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes) void sbas_l1_telemetry_decoder_gs::Crc_Verifier::zerropad_front_and_convert_to_bytes(const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes)
{ {
std::stringstream ss; std::stringstream ss;
const size_t bits_per_byte = 8; const size_t bits_per_byte = 8;
@ -419,7 +419,7 @@ void sbas_l1_telemetry_decoder_cc::Crc_Verifier::zerropad_front_and_convert_to_b
} }
int sbas_l1_telemetry_decoder_cc::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)), int sbas_l1_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{ {
VLOG(FLOW) << "general_work(): " VLOG(FLOW) << "general_work(): "

View File

@ -1,5 +1,5 @@
/*! /*!
* \file sbas_l1_telemetry_decoder_cc.h * \file sbas_l1_telemetry_decoder_gs.h
* \brief Interface of a SBAS telemetry data decoder block * \brief Interface of a SBAS telemetry data decoder block
* \author Daniel Fehr 2013. daniel.co(at)bluewin.ch * \author Daniel Fehr 2013. daniel.co(at)bluewin.ch
* *
@ -28,8 +28,8 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_CC_H #ifndef GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H
#define GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_CC_H #define GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H
#include "gnss_satellite.h" #include "gnss_satellite.h"
#include "viterbi_decoder.h" #include "viterbi_decoder.h"
@ -44,21 +44,21 @@
#include <vector> #include <vector>
class sbas_l1_telemetry_decoder_cc; class sbas_l1_telemetry_decoder_gs;
using sbas_l1_telemetry_decoder_cc_sptr = boost::shared_ptr<sbas_l1_telemetry_decoder_cc>; using sbas_l1_telemetry_decoder_gs_sptr = boost::shared_ptr<sbas_l1_telemetry_decoder_gs>;
sbas_l1_telemetry_decoder_cc_sptr sbas_l1_telemetry_decoder_gs_sptr
sbas_l1_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); sbas_l1_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
/*! /*!
* \brief This class implements a block that decodes the SBAS integrity and corrections data defined in RTCA MOPS DO-229 * \brief This class implements a block that decodes the SBAS integrity and corrections data defined in RTCA MOPS DO-229
* *
*/ */
class sbas_l1_telemetry_decoder_cc : public gr::block class sbas_l1_telemetry_decoder_gs : public gr::block
{ {
public: public:
~sbas_l1_telemetry_decoder_cc(); ~sbas_l1_telemetry_decoder_gs();
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
void set_channel(int32_t channel); //!< Set receiver's channel void set_channel(int32_t channel); //!< Set receiver's channel
@ -69,9 +69,9 @@ public:
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
private: private:
friend sbas_l1_telemetry_decoder_cc_sptr friend sbas_l1_telemetry_decoder_gs_sptr
sbas_l1_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); sbas_l1_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
sbas_l1_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); sbas_l1_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
void viterbi_decoder(double *page_part_symbols, int32_t *page_part_bits); void viterbi_decoder(double *page_part_symbols, int32_t *page_part_bits);
void align_samples(); void align_samples();