Fix dump_filename parameter in TelemetryDecoder blocks.

New parameter dump_mat, by default set equal to dump. If set to false, dump files are not converted to .mat
New class to configure Telemetry blocks more easily
This commit is contained in:
Carles Fernandez 2020-11-21 19:37:22 +01:00
parent 6bdd4305eb
commit b04d77f402
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
42 changed files with 249 additions and 151 deletions

View File

@ -60,11 +60,11 @@ endif()
target_link_libraries(telemetry_decoder_adapters
PUBLIC
telemetry_decoder_gr_blocks
telemetry_decoder_libs
PRIVATE
Gflags::gflags
Glog::glog
Gnuradio::runtime
telemetry_decoder_libs
)
target_include_directories(telemetry_decoder_adapters

View File

@ -32,12 +32,10 @@ BeidouB1iTelemetryDecoder::BeidouB1iTelemetryDecoder(
in_streams_(in_streams),
out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
tlm_parameters_.SetFromConfiguration(configuration, role);
// make telemetry decoder object
telemetry_decoder_ = beidou_b1i_make_telemetry_decoder_gs(satellite_, dump_); // TODO fix me
telemetry_decoder_ = beidou_b1i_make_telemetry_decoder_gs(satellite_, tlm_parameters_);
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)

View File

@ -26,6 +26,7 @@
#include "beidou_b1i_telemetry_decoder_gs.h"
#include "gnss_satellite.h" // for Gnss_Satellite
#include "gnss_synchro.h"
#include "tlm_conf.h"
#include "telemetry_decoder_interface.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
@ -86,12 +87,11 @@ public:
private:
beidou_b1i_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
std::string dump_filename_;
Tlm_Conf tlm_parameters_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};

View File

@ -27,13 +27,10 @@ BeidouB3iTelemetryDecoder::BeidouB3iTelemetryDecoder(
unsigned int in_streams, unsigned int out_streams)
: role_(role), in_streams_(in_streams), out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ =
configuration->property(role + ".dump_filename", default_dump_filename);
tlm_parameters_.SetFromConfiguration(configuration, role);
// make telemetry decoder object
telemetry_decoder_ = beidou_b3i_make_telemetry_decoder_gs(satellite_, dump_);
telemetry_decoder_ = beidou_b3i_make_telemetry_decoder_gs(satellite_, tlm_parameters_);
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)

View File

@ -25,6 +25,7 @@
#include "gnss_satellite.h" // for Gnss_Satellite
#include "gnss_synchro.h"
#include "telemetry_decoder_interface.h"
#include "tlm_conf.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
#include <string>
@ -81,12 +82,11 @@ public:
private:
beidou_b3i_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
std::string dump_filename_;
Tlm_Conf tlm_parameters_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};
/** \} */

View File

@ -33,12 +33,10 @@ GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(
in_streams_(in_streams),
out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
tlm_parameters_.SetFromConfiguration(configuration, role);
// make telemetry decoder object
telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, 1, dump_); // unified galileo decoder set to INAV (frame_type=1)
telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, tlm_parameters_, 1); // unified galileo decoder set to INAV (frame_type=1)
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)

View File

@ -28,6 +28,7 @@
#include "gnss_satellite.h"
#include "gnss_synchro.h"
#include "telemetry_decoder_interface.h"
#include "tlm_conf.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
#include <string>
@ -89,12 +90,11 @@ public:
private:
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
std::string dump_filename_;
Tlm_Conf tlm_parameters_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};

View File

@ -36,12 +36,10 @@ GalileoE5aTelemetryDecoder::GalileoE5aTelemetryDecoder(
in_streams_(in_streams),
out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
tlm_parameters_.SetFromConfiguration(configuration, role);
// make telemetry decoder object
telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, 2, dump_); // unified galileo decoder set to FNAV (frame_type=2)
telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, tlm_parameters_, 2); // unified galileo decoder set to FNAV (frame_type=2)
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)

View File

@ -30,6 +30,7 @@
#include "gnss_satellite.h" // for Gnss_Satellite
#include "gnss_synchro.h"
#include "telemetry_decoder_interface.h"
#include "tlm_conf.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
#include <string>
@ -91,12 +92,11 @@ public:
private:
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
std::string dump_filename_;
Tlm_Conf tlm_parameters_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};

View File

@ -34,12 +34,10 @@ GalileoE5bTelemetryDecoder::GalileoE5bTelemetryDecoder(
in_streams_(in_streams),
out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
tlm_parameters_.SetFromConfiguration(configuration, role);
// make telemetry decoder object
telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, 1, dump_); // unified galileo decoder set to INAV (frame_type=1)
telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, tlm_parameters_, 1); // unified galileo decoder set to INAV (frame_type=1)
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)

View File

@ -28,6 +28,7 @@
#include "gnss_satellite.h"
#include "gnss_synchro.h"
#include "telemetry_decoder_interface.h"
#include "tlm_conf.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
#include <string>
@ -104,12 +105,11 @@ public:
private:
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
std::string dump_filename_;
Tlm_Conf tlm_parameters_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};

View File

@ -33,12 +33,10 @@ GalileoE6TelemetryDecoder::GalileoE6TelemetryDecoder(
in_streams_(in_streams),
out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
tlm_parameters_.SetFromConfiguration(configuration, role);
// make telemetry decoder object
telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, 3, dump_); // unified galileo decoder set to CNAV (frame_type=3)
telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, tlm_parameters_, 3); // unified galileo decoder set to CNAV (frame_type=3)
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)

View File

@ -27,6 +27,7 @@
#include "gnss_satellite.h"
#include "gnss_synchro.h"
#include "telemetry_decoder_interface.h"
#include "tlm_conf.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
#include <string>
@ -103,12 +104,11 @@ public:
private:
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
std::string dump_filename_;
Tlm_Conf tlm_parameters_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};

View File

@ -33,12 +33,10 @@ GlonassL1CaTelemetryDecoder::GlonassL1CaTelemetryDecoder(
in_streams_(in_streams),
out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
tlm_parameters_.SetFromConfiguration(configuration, role);
// make telemetry decoder object
telemetry_decoder_ = glonass_l1_ca_make_telemetry_decoder_gs(satellite_, dump_);
telemetry_decoder_ = glonass_l1_ca_make_telemetry_decoder_gs(satellite_, tlm_parameters_);
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)

View File

@ -27,6 +27,7 @@
#include "gnss_satellite.h" // for Gnss_Satellite
#include "gnss_synchro.h"
#include "telemetry_decoder_interface.h"
#include "tlm_conf.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
#include <string>
@ -85,12 +86,11 @@ public:
private:
glonass_l1_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
std::string dump_filename_;
Tlm_Conf tlm_parameters_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};

View File

@ -32,12 +32,10 @@ GlonassL2CaTelemetryDecoder::GlonassL2CaTelemetryDecoder(
in_streams_(in_streams),
out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
tlm_parameters_.SetFromConfiguration(configuration, role);
// make telemetry decoder object
telemetry_decoder_ = glonass_l2_ca_make_telemetry_decoder_gs(satellite_, dump_);
telemetry_decoder_ = glonass_l2_ca_make_telemetry_decoder_gs(satellite_, tlm_parameters_);
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)

View File

@ -26,6 +26,7 @@
#include "gnss_satellite.h" // for Gnss_Satellite
#include "gnss_synchro.h"
#include "telemetry_decoder_interface.h"
#include "tlm_conf.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
#include <string>
@ -84,12 +85,11 @@ public:
private:
glonass_l2_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
std::string dump_filename_;
Tlm_Conf tlm_parameters_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};

View File

@ -32,12 +32,10 @@ GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder(
in_streams_(in_streams),
out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
tlm_parameters_.SetFromConfiguration(configuration, role);
// make telemetry decoder object
telemetry_decoder_ = gps_l1_ca_make_telemetry_decoder_gs(satellite_, dump_); // TODO fix me
telemetry_decoder_ = gps_l1_ca_make_telemetry_decoder_gs(satellite_, tlm_parameters_);
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)

View File

@ -26,6 +26,7 @@
#include "gnss_synchro.h"
#include "gps_l1_ca_telemetry_decoder_gs.h"
#include "telemetry_decoder_interface.h"
#include "tlm_conf.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
#include <string>
@ -88,12 +89,11 @@ public:
private:
gps_l1_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
std::string dump_filename_;
Tlm_Conf tlm_parameters_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};

View File

@ -32,12 +32,10 @@ GpsL2CTelemetryDecoder::GpsL2CTelemetryDecoder(
in_streams_(in_streams),
out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
tlm_parameters_.SetFromConfiguration(configuration, role);
// make telemetry decoder object
telemetry_decoder_ = gps_l2c_make_telemetry_decoder_gs(satellite_, dump_); // TODO fix me
telemetry_decoder_ = gps_l2c_make_telemetry_decoder_gs(satellite_, tlm_parameters_);
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)

View File

@ -26,6 +26,7 @@
#include "gnss_synchro.h"
#include "gps_l2c_telemetry_decoder_gs.h"
#include "telemetry_decoder_interface.h"
#include "tlm_conf.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
#include <string>
@ -86,12 +87,11 @@ public:
private:
gps_l2c_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
std::string dump_filename_;
Tlm_Conf tlm_parameters_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};

View File

@ -32,12 +32,10 @@ GpsL5TelemetryDecoder::GpsL5TelemetryDecoder(
in_streams_(in_streams),
out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
tlm_parameters_.SetFromConfiguration(configuration, role);
// make telemetry decoder object
telemetry_decoder_ = gps_l5_make_telemetry_decoder_gs(satellite_, dump_);
telemetry_decoder_ = gps_l5_make_telemetry_decoder_gs(satellite_, tlm_parameters_);
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)

View File

@ -27,6 +27,7 @@
#include "gnss_synchro.h"
#include "gps_l5_telemetry_decoder_gs.h"
#include "telemetry_decoder_interface.h"
#include "tlm_conf.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
#include <string>
@ -86,12 +87,12 @@ public:
private:
gps_l5_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
Tlm_Conf tlm_parameters_;
std::string dump_filename_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};

View File

@ -62,16 +62,16 @@ namespace errorlib = boost::system;
beidou_b1i_telemetry_decoder_gs_sptr
beidou_b1i_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
beidou_b1i_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf)
{
return beidou_b1i_telemetry_decoder_gs_sptr(new beidou_b1i_telemetry_decoder_gs(satellite, dump));
return beidou_b1i_telemetry_decoder_gs_sptr(new beidou_b1i_telemetry_decoder_gs(satellite, conf));
}
beidou_b1i_telemetry_decoder_gs::beidou_b1i_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
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)))
const Tlm_Conf &conf) : 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)))
{
// prevent telemetry symbols accumulation in output buffers
this->set_max_noutput_items(1);
@ -80,7 +80,9 @@ beidou_b1i_telemetry_decoder_gs::beidou_b1i_telemetry_decoder_gs(
// Control messages to tracking block
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
// initialize internal vars
d_dump = dump;
d_dump_filename = conf.dump_filename;
d_dump = conf.dump;
d_dump_mat = conf.dump_mat;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
LOG(INFO) << "Initializing BeiDou B1I Telemetry Decoding for satellite " << this->d_satellite;
@ -147,7 +149,7 @@ beidou_b1i_telemetry_decoder_gs::~beidou_b1i_telemetry_decoder_gs()
}
}
}
if (d_dump && (pos != 0))
if (d_dump && (pos != 0) && d_dump_mat)
{
try
{
@ -492,7 +494,6 @@ void beidou_b1i_telemetry_decoder_gs::set_channel(int32_t channel)
{
try
{
d_dump_filename = "telemetry";
d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);

View File

@ -26,6 +26,7 @@
#include "beidou_dnav_navigation_message.h"
#include "gnss_block_interface.h"
#include "gnss_satellite.h"
#include "tlm_conf.h"
#include <boost/circular_buffer.hpp>
#include <gnuradio/block.h> // for block
#include <gnuradio/types.h> // for gr_vector_const_void_star
@ -46,7 +47,7 @@ using beidou_b1i_telemetry_decoder_gs_sptr = gnss_shared_ptr<beidou_b1i_telemetr
beidou_b1i_telemetry_decoder_gs_sptr beidou_b1i_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf &conf);
/*!
@ -70,9 +71,9 @@ public:
private:
friend beidou_b1i_telemetry_decoder_gs_sptr beidou_b1i_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf &conf);
beidou_b1i_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
beidou_b1i_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
int32_t save_matfile() const;
@ -121,6 +122,7 @@ private:
bool d_sent_tlm_failed_msg;
bool Flag_valid_word;
bool d_dump;
bool d_dump_mat;
};

View File

@ -61,14 +61,14 @@ namespace errorlib = boost::system;
beidou_b3i_telemetry_decoder_gs_sptr
beidou_b3i_make_telemetry_decoder_gs(const Gnss_Satellite &satellite,
bool dump)
const Tlm_Conf &conf)
{
return beidou_b3i_telemetry_decoder_gs_sptr(new beidou_b3i_telemetry_decoder_gs(satellite, dump));
return beidou_b3i_telemetry_decoder_gs_sptr(new beidou_b3i_telemetry_decoder_gs(satellite, conf));
}
beidou_b3i_telemetry_decoder_gs::beidou_b3i_telemetry_decoder_gs(
const Gnss_Satellite &satellite, bool dump)
const Gnss_Satellite &satellite, const Tlm_Conf &conf)
: gr::block("beidou_b3i_telemetry_decoder_gs",
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
@ -80,7 +80,9 @@ beidou_b3i_telemetry_decoder_gs::beidou_b3i_telemetry_decoder_gs(
// Control messages to tracking block
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
// initialize internal vars
d_dump = dump;
d_dump_filename = conf.dump_filename;
d_dump = conf.dump;
d_dump_mat = conf.dump_mat;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
LOG(INFO) << "Initializing BeiDou B3I Telemetry Decoding for satellite " << this->d_satellite;
@ -147,7 +149,7 @@ beidou_b3i_telemetry_decoder_gs::~beidou_b3i_telemetry_decoder_gs()
}
}
}
if (d_dump && (pos != 0))
if (d_dump && (pos != 0) && d_dump_mat)
{
try
{
@ -509,7 +511,6 @@ void beidou_b3i_telemetry_decoder_gs::set_channel(int32_t channel)
{
try
{
d_dump_filename = "telemetry";
d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);

View File

@ -23,6 +23,7 @@
#include "beidou_dnav_navigation_message.h"
#include "gnss_block_interface.h"
#include "gnss_satellite.h"
#include "tlm_conf.h"
#include <boost/circular_buffer.hpp>
#include <gnuradio/block.h> // for block
#include <gnuradio/types.h> // for gr_vector_const_void_star
@ -45,7 +46,7 @@ using beidou_b3i_telemetry_decoder_gs_sptr =
beidou_b3i_telemetry_decoder_gs_sptr beidou_b3i_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf &conf);
/*!
* \brief This class implements a block that decodes the BeiDou DNAV data.
@ -68,9 +69,9 @@ public:
private:
friend beidou_b3i_telemetry_decoder_gs_sptr beidou_b3i_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf &conf);
beidou_b3i_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
beidou_b3i_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
int32_t save_matfile() const;
@ -118,6 +119,7 @@ private:
bool d_sent_tlm_failed_msg;
bool Flag_valid_word;
bool d_dump;
bool d_dump_mat;
};

View File

@ -67,16 +67,17 @@ namespace errorlib = boost::system;
galileo_telemetry_decoder_gs_sptr
galileo_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, int frame_type, bool dump)
galileo_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf, int frame_type)
{
return galileo_telemetry_decoder_gs_sptr(new galileo_telemetry_decoder_gs(satellite, frame_type, dump));
return galileo_telemetry_decoder_gs_sptr(new galileo_telemetry_decoder_gs(satellite, conf, frame_type));
}
galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
const Gnss_Satellite &satellite, int frame_type,
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)))
const Gnss_Satellite &satellite,
const Tlm_Conf &conf,
int frame_type) : gr::block("galileo_telemetry_decoder_gs", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{
// prevent telemetry symbols accumulation in output buffers
this->set_max_noutput_items(1);
@ -89,7 +90,9 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
d_band = '1';
// initialize internal vars
d_dump = dump;
d_dump_filename = conf.dump_filename;
d_dump = conf.dump;
d_dump_mat = conf.dump_mat;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
d_frame_type = frame_type;
DLOG(INFO) << "Initializing GALILEO UNIFIED TELEMETRY DECODER";
@ -254,7 +257,7 @@ galileo_telemetry_decoder_gs::~galileo_telemetry_decoder_gs()
}
}
}
if (d_dump && (pos != 0))
if (d_dump && (pos != 0) && d_dump_mat)
{
try
{
@ -677,7 +680,6 @@ void galileo_telemetry_decoder_gs::set_channel(int32_t channel)
{
try
{
d_dump_filename = "telemetry";
d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);

View File

@ -28,6 +28,7 @@
#include "galileo_inav_message.h"
#include "gnss_block_interface.h"
#include "gnss_satellite.h"
#include "tlm_conf.h"
#include <boost/circular_buffer.hpp>
#include <gnuradio/block.h> // for block
#include <gnuradio/types.h> // for gr_vector_const_void_star
@ -49,8 +50,8 @@ using galileo_telemetry_decoder_gs_sptr = gnss_shared_ptr<galileo_telemetry_deco
galileo_telemetry_decoder_gs_sptr galileo_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
int frame_type,
bool dump);
const Tlm_Conf &conf,
int frame_type);
/*!
* \brief This class implements a block that decodes the INAV and FNAV data defined in Galileo ICD
@ -74,10 +75,10 @@ public:
private:
friend galileo_telemetry_decoder_gs_sptr galileo_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
int frame_type,
bool dump);
const Tlm_Conf &conf,
int frame_type);
galileo_telemetry_decoder_gs(const Gnss_Satellite &satellite, int frame_type, bool dump);
galileo_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf, int frame_type);
const int32_t d_nn = 2; // Coding rate 1/n
const int32_t d_KK = 7; // Constraint Length
@ -142,6 +143,7 @@ private:
bool d_flag_parity;
bool d_flag_preamble;
bool d_dump;
bool d_dump_mat;
};

View File

@ -59,16 +59,16 @@ namespace errorlib = boost::system;
glonass_l1_ca_telemetry_decoder_gs_sptr
glonass_l1_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
glonass_l1_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf)
{
return glonass_l1_ca_telemetry_decoder_gs_sptr(new glonass_l1_ca_telemetry_decoder_gs(satellite, dump));
return glonass_l1_ca_telemetry_decoder_gs_sptr(new glonass_l1_ca_telemetry_decoder_gs(satellite, conf));
}
glonass_l1_ca_telemetry_decoder_gs::glonass_l1_ca_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
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)))
const Tlm_Conf &conf) : 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)))
{
// prevent telemetry symbols accumulation in output buffers
this->set_max_noutput_items(1);
@ -77,7 +77,9 @@ glonass_l1_ca_telemetry_decoder_gs::glonass_l1_ca_telemetry_decoder_gs(
// Control messages to tracking block
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
// initialize internal vars
d_dump = dump;
d_dump_filename = conf.dump_filename;
d_dump = conf.dump;
d_dump_mat = conf.dump_mat;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
LOG(INFO) << "Initializing GLONASS L1 CA TELEMETRY DECODING";
@ -378,7 +380,6 @@ void glonass_l1_ca_telemetry_decoder_gs::set_channel(int32_t channel)
{
try
{
d_dump_filename = "telemetry";
d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);

View File

@ -27,6 +27,7 @@
#include "gnss_block_interface.h"
#include "gnss_satellite.h"
#include "gnss_synchro.h"
#include "tlm_conf.h"
#include <boost/circular_buffer.hpp>
#include <gnuradio/block.h> // for block
#include <gnuradio/types.h> // for gr_vector_const_void_star
@ -47,7 +48,7 @@ using glonass_l1_ca_telemetry_decoder_gs_sptr = gnss_shared_ptr<glonass_l1_ca_te
glonass_l1_ca_telemetry_decoder_gs_sptr glonass_l1_ca_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf &conf);
/*!
* \brief This class implements a block that decodes the GNAV data defined in GLONASS ICD v5.1
@ -74,9 +75,9 @@ public:
private:
friend glonass_l1_ca_telemetry_decoder_gs_sptr glonass_l1_ca_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf &conf);
glonass_l1_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
glonass_l1_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
const std::array<uint16_t, GLONASS_GNAV_PREAMBLE_LENGTH_BITS> d_preambles_bits{GLONASS_GNAV_PREAMBLE};
@ -120,6 +121,7 @@ private:
bool flag_TOW_set; // Indicates when time of week is set
bool Flag_valid_word;
bool d_dump;
bool d_dump_mat;
};

View File

@ -59,16 +59,16 @@ namespace errorlib = boost::system;
glonass_l2_ca_telemetry_decoder_gs_sptr
glonass_l2_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
glonass_l2_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf)
{
return glonass_l2_ca_telemetry_decoder_gs_sptr(new glonass_l2_ca_telemetry_decoder_gs(satellite, dump));
return glonass_l2_ca_telemetry_decoder_gs_sptr(new glonass_l2_ca_telemetry_decoder_gs(satellite, conf));
}
glonass_l2_ca_telemetry_decoder_gs::glonass_l2_ca_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
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)))
const Tlm_Conf &conf) : 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)))
{
// prevent telemetry symbols accumulation in output buffers
this->set_max_noutput_items(1);
@ -77,7 +77,9 @@ glonass_l2_ca_telemetry_decoder_gs::glonass_l2_ca_telemetry_decoder_gs(
// Control messages to tracking block
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
// initialize internal vars
d_dump = dump;
d_dump_filename = conf.dump_filename;
d_dump = conf.dump;
d_dump_mat = conf.dump_mat;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
LOG(INFO) << "Initializing GLONASS L2 CA TELEMETRY DECODING";
@ -140,7 +142,7 @@ glonass_l2_ca_telemetry_decoder_gs::~glonass_l2_ca_telemetry_decoder_gs()
}
}
}
if (d_dump && (pos != 0))
if (d_dump && (pos != 0) && d_dump_mat)
{
try
{
@ -377,7 +379,6 @@ void glonass_l2_ca_telemetry_decoder_gs::set_channel(int32_t channel)
{
try
{
d_dump_filename = "telemetry";
d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);

View File

@ -26,6 +26,7 @@
#include "gnss_block_interface.h"
#include "gnss_satellite.h"
#include "gnss_synchro.h"
#include "tlm_conf.h"
#include <boost/circular_buffer.hpp>
#include <gnuradio/block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
@ -46,7 +47,7 @@ using glonass_l2_ca_telemetry_decoder_gs_sptr = gnss_shared_ptr<glonass_l2_ca_te
glonass_l2_ca_telemetry_decoder_gs_sptr glonass_l2_ca_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf &conf);
/*!
* \brief This class implements a block that decodes the GNAV data defined in GLONASS ICD v5.1
@ -72,9 +73,9 @@ public:
private:
friend glonass_l2_ca_telemetry_decoder_gs_sptr glonass_l2_ca_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf &conf);
glonass_l2_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
glonass_l2_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
const std::array<uint16_t, GLONASS_GNAV_PREAMBLE_LENGTH_BITS> d_preambles_bits{GLONASS_GNAV_PREAMBLE};
@ -114,6 +115,7 @@ private:
bool d_flag_preamble; // Flag indicating when preamble was found
bool flag_TOW_set; // Indicates when time of week is set
bool d_dump;
bool d_dump_mat;
};

View File

@ -71,16 +71,16 @@ auto rotl = [](uint32_t x, uint32_t n) { return (((x) << (n)) ^ ((x) >> (32 - (n
gps_l1_ca_telemetry_decoder_gs_sptr
gps_l1_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
gps_l1_ca_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf)
{
return gps_l1_ca_telemetry_decoder_gs_sptr(new gps_l1_ca_telemetry_decoder_gs(satellite, dump));
return gps_l1_ca_telemetry_decoder_gs_sptr(new gps_l1_ca_telemetry_decoder_gs(satellite, conf));
}
gps_l1_ca_telemetry_decoder_gs::gps_l1_ca_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
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)))
const Tlm_Conf &conf) : gr::block("gps_navigation_gs", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{
// prevent telemetry symbols accumulation in output buffers
this->set_max_noutput_items(1);
@ -93,7 +93,10 @@ gps_l1_ca_telemetry_decoder_gs::gps_l1_ca_telemetry_decoder_gs(
d_sent_tlm_failed_msg = false;
// initialize internal vars
d_dump = dump;
d_dump_filename = conf.dump_filename;
d_dump = conf.dump;
d_dump_mat = conf.dump_mat;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
DLOG(INFO) << "Initializing GPS L1 TELEMETRY DECODER";
@ -162,7 +165,7 @@ gps_l1_ca_telemetry_decoder_gs::~gps_l1_ca_telemetry_decoder_gs()
}
}
}
if (d_dump && (pos != 0))
if (d_dump && (pos != 0) && d_dump_mat)
{
try
{
@ -325,7 +328,6 @@ void gps_l1_ca_telemetry_decoder_gs::set_channel(int32_t channel)
{
try
{
d_dump_filename = "telemetry";
d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);

View File

@ -24,6 +24,7 @@
#include "gnss_block_interface.h"
#include "gnss_satellite.h"
#include "gnss_synchro.h"
#include "tlm_conf.h"
#include "gps_navigation_message.h"
#include <boost/circular_buffer.hpp>
#include <gnuradio/block.h> // for block
@ -46,7 +47,7 @@ using gps_l1_ca_telemetry_decoder_gs_sptr = gnss_shared_ptr<gps_l1_ca_telemetry_
gps_l1_ca_telemetry_decoder_gs_sptr gps_l1_ca_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf& conf);
/*!
* \brief This class implements a block that decodes the NAV data defined in IS-GPS-200K
@ -68,9 +69,9 @@ public:
private:
friend gps_l1_ca_telemetry_decoder_gs_sptr gps_l1_ca_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf& conf);
gps_l1_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
gps_l1_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf& conf);
int32_t save_matfile() const;
@ -112,6 +113,7 @@ private:
bool d_flag_PLL_180_deg_phase_locked;
bool d_flag_TOW_set;
bool d_dump;
bool d_dump_mat;
};

View File

@ -58,16 +58,17 @@ namespace errorlib = boost::system;
#endif
gps_l2c_telemetry_decoder_gs_sptr
gps_l2c_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
gps_l2c_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf)
{
return gps_l2c_telemetry_decoder_gs_sptr(new gps_l2c_telemetry_decoder_gs(satellite, dump));
return gps_l2c_telemetry_decoder_gs_sptr(new gps_l2c_telemetry_decoder_gs(satellite, conf));
}
gps_l2c_telemetry_decoder_gs::gps_l2c_telemetry_decoder_gs(
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)))
const Gnss_Satellite &satellite,
const Tlm_Conf &conf) : 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)))
{
// prevent telemetry symbols accumulation in output buffers
this->set_max_noutput_items(1);
@ -80,7 +81,9 @@ gps_l2c_telemetry_decoder_gs::gps_l2c_telemetry_decoder_gs(
d_max_symbols_without_valid_frame = GPS_L2_CNAV_DATA_PAGE_BITS * GPS_L2_SYMBOLS_PER_BIT * 5; // rise alarm if 5 consecutive subframes have no valid CRC
// initialize internal vars
d_dump = dump;
d_dump_filename = conf.dump_filename;
d_dump = conf.dump;
d_dump_mat = conf.dump_mat;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
DLOG(INFO) << "GPS L2C M TELEMETRY PROCESSING: satellite " << d_satellite;
// set_output_multiple (1);
@ -123,7 +126,7 @@ gps_l2c_telemetry_decoder_gs::~gps_l2c_telemetry_decoder_gs()
}
}
}
if (d_dump && (pos != 0))
if (d_dump && (pos != 0) && d_dump_mat)
{
try
{
@ -256,7 +259,6 @@ void gps_l2c_telemetry_decoder_gs::set_channel(int channel)
{
try
{
d_dump_filename = "telemetry_L2CM_";
d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);

View File

@ -23,6 +23,7 @@
#include "gnss_block_interface.h"
#include "gnss_satellite.h"
#include "gps_cnav_navigation_message.h"
#include "tlm_conf.h"
#include <gnuradio/block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <cstdint>
@ -46,7 +47,7 @@ using gps_l2c_telemetry_decoder_gs_sptr = gnss_shared_ptr<gps_l2c_telemetry_deco
gps_l2c_telemetry_decoder_gs_sptr gps_l2c_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf& conf);
/*!
* \brief This class implements a block that decodes CNAV data defined in IS-GPS-200K
@ -68,9 +69,9 @@ public:
private:
friend gps_l2c_telemetry_decoder_gs_sptr gps_l2c_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf& conf);
gps_l2c_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
gps_l2c_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf& conf);
int32_t save_matfile() const;
@ -99,6 +100,7 @@ private:
bool d_sent_tlm_failed_msg;
bool d_flag_PLL_180_deg_phase_locked;
bool d_flag_valid_word;
bool d_dump_mat;
};

View File

@ -57,16 +57,17 @@ namespace errorlib = boost::system;
#endif
gps_l5_telemetry_decoder_gs_sptr
gps_l5_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump)
gps_l5_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf)
{
return gps_l5_telemetry_decoder_gs_sptr(new gps_l5_telemetry_decoder_gs(satellite, dump));
return gps_l5_telemetry_decoder_gs_sptr(new gps_l5_telemetry_decoder_gs(satellite, conf));
}
gps_l5_telemetry_decoder_gs::gps_l5_telemetry_decoder_gs(
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)))
const Gnss_Satellite &satellite,
const Tlm_Conf &conf) : 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)))
{
// prevent telemetry symbols accumulation in output buffers
this->set_max_noutput_items(1);
@ -79,7 +80,9 @@ gps_l5_telemetry_decoder_gs::gps_l5_telemetry_decoder_gs(
d_max_symbols_without_valid_frame = GPS_L5_CNAV_DATA_PAGE_BITS * GPS_L5_SYMBOLS_PER_BIT * 10; // rise alarm if 20 consecutive subframes have no valid CRC
// initialize internal vars
d_dump = dump;
d_dump_filename = conf.dump_filename;
d_dump = conf.dump;
d_dump_mat = conf.dump_mat;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
DLOG(INFO) << "GPS L5 TELEMETRY PROCESSING: satellite " << d_satellite;
d_channel = 0;
@ -118,7 +121,7 @@ gps_l5_telemetry_decoder_gs::~gps_l5_telemetry_decoder_gs()
}
}
}
if (d_dump && (pos != 0))
if (d_dump && (pos != 0) && d_dump_mat)
{
try
{
@ -253,7 +256,6 @@ void gps_l5_telemetry_decoder_gs::set_channel(int32_t channel)
{
try
{
d_dump_filename = "telemetry_L5_";
d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);

View File

@ -24,6 +24,7 @@
#include "gnss_block_interface.h"
#include "gnss_satellite.h" // for Gnss_Satellite
#include "gps_cnav_navigation_message.h" // for Gps_CNAV_Navigation_Message
#include "tlm_conf.h"
#include <boost/circular_buffer.hpp>
#include <gnuradio/block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
@ -48,7 +49,7 @@ using gps_l5_telemetry_decoder_gs_sptr = gnss_shared_ptr<gps_l5_telemetry_decode
gps_l5_telemetry_decoder_gs_sptr gps_l5_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf& conf);
/*!
* \brief This class implements a GPS L5 Telemetry decoder
@ -67,9 +68,9 @@ public:
private:
friend gps_l5_telemetry_decoder_gs_sptr gps_l5_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,
bool dump);
const Tlm_Conf& conf);
gps_l5_telemetry_decoder_gs(const Gnss_Satellite &satellite, bool dump);
gps_l5_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf& conf);
int32_t save_matfile() const;
@ -95,6 +96,7 @@ private:
bool d_flag_valid_word;
bool d_sent_tlm_failed_msg;
bool d_dump;
bool d_dump_mat;
};

View File

@ -11,10 +11,12 @@
add_subdirectory(libswiftcnav)
set(TELEMETRY_DECODER_LIB_SOURCES
tlm_conf.cc
viterbi_decoder.cc
)
set(TELEMETRY_DECODER_LIB_HEADERS
tlm_conf.h
viterbi_decoder.h
convolutional.h
)
@ -46,6 +48,11 @@ target_link_libraries(telemetry_decoder_libs
Glog::glog
)
target_include_directories(telemetry_decoder_libs
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
)
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(telemetry_decoder_libs

View File

@ -0,0 +1,37 @@
/*!
* \file tlm_conf.cc
* \brief Class that contains all the configuration parameters for generic
* telemetry decoder block.
* \author Carles Fernandez, 2020. cfernandez(at)cttc.es
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
*
* GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver
*
* This file is part of GNSS-SDR.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#include "tlm_conf.h"
Tlm_Conf::Tlm_Conf()
{
dump = false;
dump_mat = false;
}
void Tlm_Conf::SetFromConfiguration(const ConfigurationInterface *configuration,
const std::string &role)
{
const std::string default_dumpname("telemetry");
dump_filename = configuration->property(role + ".dump_filename", default_dumpname);
dump = configuration->property(role + ".dump", false);
dump_mat = configuration->property(role + ".dump_mat", dump);
}

View File

@ -0,0 +1,48 @@
/*!
* \file tlm_conf.h
* \brief Class that contains all the configuration parameters for generic
* telemetry decoder block.
* \author Carles Fernandez, 2020. cfernandez(at)cttc.es
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
*
* GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver
*
* This file is part of GNSS-SDR.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_TLM_CONF_H
#define GNSS_SDR_TLM_CONF_H
#include "configuration_interface.h"
#include <string>
/** \addtogroup Telemetry_Decoder
* \{ */
/** \addtogroup Telemetry_Decoder_libs
* \{ */
class Tlm_Conf
{
public:
Tlm_Conf();
void SetFromConfiguration(const ConfigurationInterface *configuration, const std::string &role);
std::string dump_filename;
bool dump;
bool dump_mat;
};
/** \} */
/** \} */
#endif // GNSS_SDR_TLM_CONF_H