mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
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:
parent
6bdd4305eb
commit
b04d77f402
@ -60,11 +60,11 @@ endif()
|
|||||||
target_link_libraries(telemetry_decoder_adapters
|
target_link_libraries(telemetry_decoder_adapters
|
||||||
PUBLIC
|
PUBLIC
|
||||||
telemetry_decoder_gr_blocks
|
telemetry_decoder_gr_blocks
|
||||||
|
telemetry_decoder_libs
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Gflags::gflags
|
Gflags::gflags
|
||||||
Glog::glog
|
Glog::glog
|
||||||
Gnuradio::runtime
|
Gnuradio::runtime
|
||||||
telemetry_decoder_libs
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(telemetry_decoder_adapters
|
target_include_directories(telemetry_decoder_adapters
|
||||||
|
@ -32,12 +32,10 @@ BeidouB1iTelemetryDecoder::BeidouB1iTelemetryDecoder(
|
|||||||
in_streams_(in_streams),
|
in_streams_(in_streams),
|
||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_dump_filename("./navigation.dat");
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
||||||
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_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() << ")";
|
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
if (in_streams_ > 1)
|
if (in_streams_ > 1)
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "beidou_b1i_telemetry_decoder_gs.h"
|
#include "beidou_b1i_telemetry_decoder_gs.h"
|
||||||
#include "gnss_satellite.h" // for Gnss_Satellite
|
#include "gnss_satellite.h" // for Gnss_Satellite
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
#include "telemetry_decoder_interface.h"
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
@ -86,12 +87,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
beidou_b1i_telemetry_decoder_gs_sptr telemetry_decoder_;
|
beidou_b1i_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||||
Gnss_Satellite satellite_;
|
Gnss_Satellite satellite_;
|
||||||
std::string dump_filename_;
|
Tlm_Conf tlm_parameters_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
int channel_;
|
int channel_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
bool dump_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,13 +27,10 @@ BeidouB3iTelemetryDecoder::BeidouB3iTelemetryDecoder(
|
|||||||
unsigned int in_streams, unsigned int out_streams)
|
unsigned int in_streams, unsigned int out_streams)
|
||||||
: role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
: role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_dump_filename("./navigation.dat");
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
||||||
dump_filename_ =
|
|
||||||
configuration->property(role + ".dump_filename", default_dump_filename);
|
|
||||||
// make telemetry decoder object
|
// 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() << ")";
|
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
if (in_streams_ > 1)
|
if (in_streams_ > 1)
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "gnss_satellite.h" // for Gnss_Satellite
|
#include "gnss_satellite.h" // for Gnss_Satellite
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
#include "telemetry_decoder_interface.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -81,12 +82,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
beidou_b3i_telemetry_decoder_gs_sptr telemetry_decoder_;
|
beidou_b3i_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||||
Gnss_Satellite satellite_;
|
Gnss_Satellite satellite_;
|
||||||
std::string dump_filename_;
|
Tlm_Conf tlm_parameters_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
int channel_;
|
int channel_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
bool dump_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
@ -33,12 +33,10 @@ GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(
|
|||||||
in_streams_(in_streams),
|
in_streams_(in_streams),
|
||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_dump_filename("./navigation.dat");
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
||||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
|
||||||
// make telemetry decoder object
|
// 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() << ")";
|
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
if (in_streams_ > 1)
|
if (in_streams_ > 1)
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "gnss_satellite.h"
|
#include "gnss_satellite.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
#include "telemetry_decoder_interface.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -89,12 +90,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
|
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||||
Gnss_Satellite satellite_;
|
Gnss_Satellite satellite_;
|
||||||
std::string dump_filename_;
|
Tlm_Conf tlm_parameters_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
int channel_;
|
int channel_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
bool dump_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,12 +36,10 @@ GalileoE5aTelemetryDecoder::GalileoE5aTelemetryDecoder(
|
|||||||
in_streams_(in_streams),
|
in_streams_(in_streams),
|
||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_dump_filename("./navigation.dat");
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
||||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
|
||||||
// make telemetry decoder object
|
// 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() << ")";
|
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
if (in_streams_ > 1)
|
if (in_streams_ > 1)
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "gnss_satellite.h" // for Gnss_Satellite
|
#include "gnss_satellite.h" // for Gnss_Satellite
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
#include "telemetry_decoder_interface.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -91,12 +92,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
|
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||||
Gnss_Satellite satellite_;
|
Gnss_Satellite satellite_;
|
||||||
std::string dump_filename_;
|
Tlm_Conf tlm_parameters_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
int channel_;
|
int channel_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
bool dump_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,12 +34,10 @@ GalileoE5bTelemetryDecoder::GalileoE5bTelemetryDecoder(
|
|||||||
in_streams_(in_streams),
|
in_streams_(in_streams),
|
||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_dump_filename("./navigation.dat");
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
||||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
|
||||||
// make telemetry decoder object
|
// 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() << ")";
|
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
if (in_streams_ > 1)
|
if (in_streams_ > 1)
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "gnss_satellite.h"
|
#include "gnss_satellite.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
#include "telemetry_decoder_interface.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -104,12 +105,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
|
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||||
Gnss_Satellite satellite_;
|
Gnss_Satellite satellite_;
|
||||||
std::string dump_filename_;
|
Tlm_Conf tlm_parameters_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
int channel_;
|
int channel_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
bool dump_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,12 +33,10 @@ GalileoE6TelemetryDecoder::GalileoE6TelemetryDecoder(
|
|||||||
in_streams_(in_streams),
|
in_streams_(in_streams),
|
||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_dump_filename("./navigation.dat");
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
||||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
|
||||||
// make telemetry decoder object
|
// 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() << ")";
|
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
if (in_streams_ > 1)
|
if (in_streams_ > 1)
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "gnss_satellite.h"
|
#include "gnss_satellite.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
#include "telemetry_decoder_interface.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -103,12 +104,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
|
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||||
Gnss_Satellite satellite_;
|
Gnss_Satellite satellite_;
|
||||||
std::string dump_filename_;
|
Tlm_Conf tlm_parameters_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
int channel_;
|
int channel_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
bool dump_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,12 +33,10 @@ GlonassL1CaTelemetryDecoder::GlonassL1CaTelemetryDecoder(
|
|||||||
in_streams_(in_streams),
|
in_streams_(in_streams),
|
||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_dump_filename("./navigation.dat");
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
||||||
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_gs(satellite_, dump_);
|
telemetry_decoder_ = glonass_l1_ca_make_telemetry_decoder_gs(satellite_, tlm_parameters_);
|
||||||
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)
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "gnss_satellite.h" // for Gnss_Satellite
|
#include "gnss_satellite.h" // for Gnss_Satellite
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
#include "telemetry_decoder_interface.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -85,12 +86,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
glonass_l1_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
|
glonass_l1_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||||
Gnss_Satellite satellite_;
|
Gnss_Satellite satellite_;
|
||||||
std::string dump_filename_;
|
Tlm_Conf tlm_parameters_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
int channel_;
|
int channel_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
bool dump_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,12 +32,10 @@ GlonassL2CaTelemetryDecoder::GlonassL2CaTelemetryDecoder(
|
|||||||
in_streams_(in_streams),
|
in_streams_(in_streams),
|
||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_dump_filename("./navigation.dat");
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
||||||
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_gs(satellite_, dump_);
|
telemetry_decoder_ = glonass_l2_ca_make_telemetry_decoder_gs(satellite_, tlm_parameters_);
|
||||||
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)
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "gnss_satellite.h" // for Gnss_Satellite
|
#include "gnss_satellite.h" // for Gnss_Satellite
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
#include "telemetry_decoder_interface.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -84,12 +85,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
glonass_l2_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
|
glonass_l2_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||||
Gnss_Satellite satellite_;
|
Gnss_Satellite satellite_;
|
||||||
std::string dump_filename_;
|
Tlm_Conf tlm_parameters_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
int channel_;
|
int channel_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
bool dump_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,12 +32,10 @@ GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder(
|
|||||||
in_streams_(in_streams),
|
in_streams_(in_streams),
|
||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_dump_filename("./navigation.dat");
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
||||||
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_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() << ")";
|
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
if (in_streams_ > 1)
|
if (in_streams_ > 1)
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "gps_l1_ca_telemetry_decoder_gs.h"
|
#include "gps_l1_ca_telemetry_decoder_gs.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
#include "telemetry_decoder_interface.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -88,12 +89,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
gps_l1_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
|
gps_l1_ca_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||||
Gnss_Satellite satellite_;
|
Gnss_Satellite satellite_;
|
||||||
std::string dump_filename_;
|
Tlm_Conf tlm_parameters_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
int channel_;
|
int channel_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
bool dump_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,12 +32,10 @@ GpsL2CTelemetryDecoder::GpsL2CTelemetryDecoder(
|
|||||||
in_streams_(in_streams),
|
in_streams_(in_streams),
|
||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_dump_filename("./navigation.dat");
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
||||||
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_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() << ")";
|
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
if (in_streams_ > 1)
|
if (in_streams_ > 1)
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "gps_l2c_telemetry_decoder_gs.h"
|
#include "gps_l2c_telemetry_decoder_gs.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
#include "telemetry_decoder_interface.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -86,12 +87,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
gps_l2c_telemetry_decoder_gs_sptr telemetry_decoder_;
|
gps_l2c_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||||
Gnss_Satellite satellite_;
|
Gnss_Satellite satellite_;
|
||||||
std::string dump_filename_;
|
Tlm_Conf tlm_parameters_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
int channel_;
|
int channel_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
bool dump_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,12 +32,10 @@ GpsL5TelemetryDecoder::GpsL5TelemetryDecoder(
|
|||||||
in_streams_(in_streams),
|
in_streams_(in_streams),
|
||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
const std::string default_dump_filename("./navigation.dat");
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
tlm_parameters_.SetFromConfiguration(configuration, role);
|
||||||
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_gs(satellite_, dump_);
|
telemetry_decoder_ = gps_l5_make_telemetry_decoder_gs(satellite_, tlm_parameters_);
|
||||||
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)
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include "gps_l5_telemetry_decoder_gs.h"
|
#include "gps_l5_telemetry_decoder_gs.h"
|
||||||
#include "telemetry_decoder_interface.h"
|
#include "telemetry_decoder_interface.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -86,12 +87,12 @@ public:
|
|||||||
private:
|
private:
|
||||||
gps_l5_telemetry_decoder_gs_sptr telemetry_decoder_;
|
gps_l5_telemetry_decoder_gs_sptr telemetry_decoder_;
|
||||||
Gnss_Satellite satellite_;
|
Gnss_Satellite satellite_;
|
||||||
|
Tlm_Conf tlm_parameters_;
|
||||||
std::string dump_filename_;
|
std::string dump_filename_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
int channel_;
|
int channel_;
|
||||||
unsigned int in_streams_;
|
unsigned int in_streams_;
|
||||||
unsigned int out_streams_;
|
unsigned int out_streams_;
|
||||||
bool dump_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,16 +62,16 @@ namespace errorlib = boost::system;
|
|||||||
|
|
||||||
|
|
||||||
beidou_b1i_telemetry_decoder_gs_sptr
|
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(
|
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_gs",
|
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)),
|
||||||
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
|
// prevent telemetry symbols accumulation in output buffers
|
||||||
this->set_max_noutput_items(1);
|
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
|
// Control messages to tracking block
|
||||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||||
// initialize internal vars
|
// 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_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
LOG(INFO) << "Initializing BeiDou B1I Telemetry Decoding for satellite " << this->d_satellite;
|
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
|
try
|
||||||
{
|
{
|
||||||
@ -492,7 +494,6 @@ void beidou_b1i_telemetry_decoder_gs::set_channel(int32_t channel)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
d_dump_filename = "telemetry";
|
|
||||||
d_dump_filename.append(std::to_string(d_channel));
|
d_dump_filename.append(std::to_string(d_channel));
|
||||||
d_dump_filename.append(".dat");
|
d_dump_filename.append(".dat");
|
||||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "beidou_dnav_navigation_message.h"
|
#include "beidou_dnav_navigation_message.h"
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "gnss_satellite.h"
|
#include "gnss_satellite.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <boost/circular_buffer.hpp>
|
#include <boost/circular_buffer.hpp>
|
||||||
#include <gnuradio/block.h> // for block
|
#include <gnuradio/block.h> // for block
|
||||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
#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(
|
beidou_b1i_telemetry_decoder_gs_sptr beidou_b1i_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
const Gnss_Satellite &satellite,
|
||||||
bool dump);
|
const Tlm_Conf &conf);
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -70,9 +71,9 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend beidou_b1i_telemetry_decoder_gs_sptr beidou_b1i_make_telemetry_decoder_gs(
|
friend beidou_b1i_telemetry_decoder_gs_sptr beidou_b1i_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
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;
|
int32_t save_matfile() const;
|
||||||
|
|
||||||
@ -121,6 +122,7 @@ private:
|
|||||||
bool d_sent_tlm_failed_msg;
|
bool d_sent_tlm_failed_msg;
|
||||||
bool Flag_valid_word;
|
bool Flag_valid_word;
|
||||||
bool d_dump;
|
bool d_dump;
|
||||||
|
bool d_dump_mat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,14 +61,14 @@ namespace errorlib = boost::system;
|
|||||||
|
|
||||||
beidou_b3i_telemetry_decoder_gs_sptr
|
beidou_b3i_telemetry_decoder_gs_sptr
|
||||||
beidou_b3i_make_telemetry_decoder_gs(const Gnss_Satellite &satellite,
|
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(
|
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::block("beidou_b3i_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)))
|
||||||
@ -80,7 +80,9 @@ beidou_b3i_telemetry_decoder_gs::beidou_b3i_telemetry_decoder_gs(
|
|||||||
// Control messages to tracking block
|
// Control messages to tracking block
|
||||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||||
// initialize internal vars
|
// 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_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
LOG(INFO) << "Initializing BeiDou B3I Telemetry Decoding for satellite " << this->d_satellite;
|
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
|
try
|
||||||
{
|
{
|
||||||
@ -509,7 +511,6 @@ void beidou_b3i_telemetry_decoder_gs::set_channel(int32_t channel)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
d_dump_filename = "telemetry";
|
|
||||||
d_dump_filename.append(std::to_string(d_channel));
|
d_dump_filename.append(std::to_string(d_channel));
|
||||||
d_dump_filename.append(".dat");
|
d_dump_filename.append(".dat");
|
||||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "beidou_dnav_navigation_message.h"
|
#include "beidou_dnav_navigation_message.h"
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "gnss_satellite.h"
|
#include "gnss_satellite.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <boost/circular_buffer.hpp>
|
#include <boost/circular_buffer.hpp>
|
||||||
#include <gnuradio/block.h> // for block
|
#include <gnuradio/block.h> // for block
|
||||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
#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(
|
beidou_b3i_telemetry_decoder_gs_sptr beidou_b3i_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
const Gnss_Satellite &satellite,
|
||||||
bool dump);
|
const Tlm_Conf &conf);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class implements a block that decodes the BeiDou DNAV data.
|
* \brief This class implements a block that decodes the BeiDou DNAV data.
|
||||||
@ -68,9 +69,9 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend beidou_b3i_telemetry_decoder_gs_sptr beidou_b3i_make_telemetry_decoder_gs(
|
friend beidou_b3i_telemetry_decoder_gs_sptr beidou_b3i_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
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;
|
int32_t save_matfile() const;
|
||||||
|
|
||||||
@ -118,6 +119,7 @@ private:
|
|||||||
bool d_sent_tlm_failed_msg;
|
bool d_sent_tlm_failed_msg;
|
||||||
bool Flag_valid_word;
|
bool Flag_valid_word;
|
||||||
bool d_dump;
|
bool d_dump;
|
||||||
|
bool d_dump_mat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,16 +67,17 @@ namespace errorlib = boost::system;
|
|||||||
|
|
||||||
|
|
||||||
galileo_telemetry_decoder_gs_sptr
|
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(
|
galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite, int frame_type,
|
const Gnss_Satellite &satellite,
|
||||||
bool dump) : gr::block("galileo_telemetry_decoder_gs", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
const Tlm_Conf &conf,
|
||||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
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
|
// prevent telemetry symbols accumulation in output buffers
|
||||||
this->set_max_noutput_items(1);
|
this->set_max_noutput_items(1);
|
||||||
@ -89,7 +90,9 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
|
|||||||
d_band = '1';
|
d_band = '1';
|
||||||
|
|
||||||
// initialize internal vars
|
// 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_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
d_frame_type = frame_type;
|
d_frame_type = frame_type;
|
||||||
DLOG(INFO) << "Initializing GALILEO UNIFIED TELEMETRY DECODER";
|
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
|
try
|
||||||
{
|
{
|
||||||
@ -677,7 +680,6 @@ void galileo_telemetry_decoder_gs::set_channel(int32_t channel)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
d_dump_filename = "telemetry";
|
|
||||||
d_dump_filename.append(std::to_string(d_channel));
|
d_dump_filename.append(std::to_string(d_channel));
|
||||||
d_dump_filename.append(".dat");
|
d_dump_filename.append(".dat");
|
||||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "galileo_inav_message.h"
|
#include "galileo_inav_message.h"
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "gnss_satellite.h"
|
#include "gnss_satellite.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <boost/circular_buffer.hpp>
|
#include <boost/circular_buffer.hpp>
|
||||||
#include <gnuradio/block.h> // for block
|
#include <gnuradio/block.h> // for block
|
||||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
#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(
|
galileo_telemetry_decoder_gs_sptr galileo_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
const Gnss_Satellite &satellite,
|
||||||
int frame_type,
|
const Tlm_Conf &conf,
|
||||||
bool dump);
|
int frame_type);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \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
|
||||||
@ -74,10 +75,10 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend galileo_telemetry_decoder_gs_sptr galileo_make_telemetry_decoder_gs(
|
friend galileo_telemetry_decoder_gs_sptr galileo_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
const Gnss_Satellite &satellite,
|
||||||
int frame_type,
|
const Tlm_Conf &conf,
|
||||||
bool dump);
|
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_nn = 2; // Coding rate 1/n
|
||||||
const int32_t d_KK = 7; // Constraint Length
|
const int32_t d_KK = 7; // Constraint Length
|
||||||
@ -142,6 +143,7 @@ private:
|
|||||||
bool d_flag_parity;
|
bool d_flag_parity;
|
||||||
bool d_flag_preamble;
|
bool d_flag_preamble;
|
||||||
bool d_dump;
|
bool d_dump;
|
||||||
|
bool d_dump_mat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,16 +59,16 @@ namespace errorlib = boost::system;
|
|||||||
|
|
||||||
|
|
||||||
glonass_l1_ca_telemetry_decoder_gs_sptr
|
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(
|
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_gs", 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)))
|
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||||
{
|
{
|
||||||
// prevent telemetry symbols accumulation in output buffers
|
// prevent telemetry symbols accumulation in output buffers
|
||||||
this->set_max_noutput_items(1);
|
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
|
// Control messages to tracking block
|
||||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||||
// initialize internal vars
|
// 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_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
LOG(INFO) << "Initializing GLONASS L1 CA TELEMETRY DECODING";
|
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
|
try
|
||||||
{
|
{
|
||||||
d_dump_filename = "telemetry";
|
|
||||||
d_dump_filename.append(std::to_string(d_channel));
|
d_dump_filename.append(std::to_string(d_channel));
|
||||||
d_dump_filename.append(".dat");
|
d_dump_filename.append(".dat");
|
||||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "gnss_satellite.h"
|
#include "gnss_satellite.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <boost/circular_buffer.hpp>
|
#include <boost/circular_buffer.hpp>
|
||||||
#include <gnuradio/block.h> // for block
|
#include <gnuradio/block.h> // for block
|
||||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
#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(
|
glonass_l1_ca_telemetry_decoder_gs_sptr glonass_l1_ca_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
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
|
* \brief This class implements a block that decodes the GNAV data defined in GLONASS ICD v5.1
|
||||||
@ -74,9 +75,9 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend glonass_l1_ca_telemetry_decoder_gs_sptr glonass_l1_ca_make_telemetry_decoder_gs(
|
friend glonass_l1_ca_telemetry_decoder_gs_sptr glonass_l1_ca_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
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};
|
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_TOW_set; // Indicates when time of week is set
|
||||||
bool Flag_valid_word;
|
bool Flag_valid_word;
|
||||||
bool d_dump;
|
bool d_dump;
|
||||||
|
bool d_dump_mat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,16 +59,16 @@ namespace errorlib = boost::system;
|
|||||||
|
|
||||||
|
|
||||||
glonass_l2_ca_telemetry_decoder_gs_sptr
|
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(
|
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_gs", 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)))
|
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||||
{
|
{
|
||||||
// prevent telemetry symbols accumulation in output buffers
|
// prevent telemetry symbols accumulation in output buffers
|
||||||
this->set_max_noutput_items(1);
|
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
|
// Control messages to tracking block
|
||||||
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||||
// initialize internal vars
|
// 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_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
LOG(INFO) << "Initializing GLONASS L2 CA TELEMETRY DECODING";
|
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
|
try
|
||||||
{
|
{
|
||||||
@ -377,7 +379,6 @@ void glonass_l2_ca_telemetry_decoder_gs::set_channel(int32_t channel)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
d_dump_filename = "telemetry";
|
|
||||||
d_dump_filename.append(std::to_string(d_channel));
|
d_dump_filename.append(std::to_string(d_channel));
|
||||||
d_dump_filename.append(".dat");
|
d_dump_filename.append(".dat");
|
||||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "gnss_satellite.h"
|
#include "gnss_satellite.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <boost/circular_buffer.hpp>
|
#include <boost/circular_buffer.hpp>
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
#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(
|
glonass_l2_ca_telemetry_decoder_gs_sptr glonass_l2_ca_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
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
|
* \brief This class implements a block that decodes the GNAV data defined in GLONASS ICD v5.1
|
||||||
@ -72,9 +73,9 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend glonass_l2_ca_telemetry_decoder_gs_sptr glonass_l2_ca_make_telemetry_decoder_gs(
|
friend glonass_l2_ca_telemetry_decoder_gs_sptr glonass_l2_ca_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
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};
|
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 d_flag_preamble; // Flag indicating when preamble was found
|
||||||
bool flag_TOW_set; // Indicates when time of week is set
|
bool flag_TOW_set; // Indicates when time of week is set
|
||||||
bool d_dump;
|
bool d_dump;
|
||||||
|
bool d_dump_mat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -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_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(
|
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_gs", 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)))
|
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||||
{
|
{
|
||||||
// prevent telemetry symbols accumulation in output buffers
|
// prevent telemetry symbols accumulation in output buffers
|
||||||
this->set_max_noutput_items(1);
|
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;
|
d_sent_tlm_failed_msg = false;
|
||||||
|
|
||||||
// initialize internal vars
|
// 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_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
DLOG(INFO) << "Initializing GPS L1 TELEMETRY DECODER";
|
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
|
try
|
||||||
{
|
{
|
||||||
@ -325,7 +328,6 @@ void gps_l1_ca_telemetry_decoder_gs::set_channel(int32_t channel)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
d_dump_filename = "telemetry";
|
|
||||||
d_dump_filename.append(std::to_string(d_channel));
|
d_dump_filename.append(std::to_string(d_channel));
|
||||||
d_dump_filename.append(".dat");
|
d_dump_filename.append(".dat");
|
||||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "gnss_satellite.h"
|
#include "gnss_satellite.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include "gps_navigation_message.h"
|
#include "gps_navigation_message.h"
|
||||||
#include <boost/circular_buffer.hpp>
|
#include <boost/circular_buffer.hpp>
|
||||||
#include <gnuradio/block.h> // for block
|
#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(
|
gps_l1_ca_telemetry_decoder_gs_sptr gps_l1_ca_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
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
|
* \brief This class implements a block that decodes the NAV data defined in IS-GPS-200K
|
||||||
@ -68,9 +69,9 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend gps_l1_ca_telemetry_decoder_gs_sptr gps_l1_ca_make_telemetry_decoder_gs(
|
friend gps_l1_ca_telemetry_decoder_gs_sptr gps_l1_ca_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
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;
|
int32_t save_matfile() const;
|
||||||
|
|
||||||
@ -112,6 +113,7 @@ private:
|
|||||||
bool d_flag_PLL_180_deg_phase_locked;
|
bool d_flag_PLL_180_deg_phase_locked;
|
||||||
bool d_flag_TOW_set;
|
bool d_flag_TOW_set;
|
||||||
bool d_dump;
|
bool d_dump;
|
||||||
|
bool d_dump_mat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,16 +58,17 @@ namespace errorlib = boost::system;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
gps_l2c_telemetry_decoder_gs_sptr
|
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(
|
gps_l2c_telemetry_decoder_gs::gps_l2c_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite, bool dump) : gr::block("gps_l2c_telemetry_decoder_gs",
|
const Gnss_Satellite &satellite,
|
||||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
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)),
|
||||||
|
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||||
{
|
{
|
||||||
// prevent telemetry symbols accumulation in output buffers
|
// prevent telemetry symbols accumulation in output buffers
|
||||||
this->set_max_noutput_items(1);
|
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
|
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
|
// 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_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
DLOG(INFO) << "GPS L2C M TELEMETRY PROCESSING: satellite " << d_satellite;
|
DLOG(INFO) << "GPS L2C M TELEMETRY PROCESSING: satellite " << d_satellite;
|
||||||
// set_output_multiple (1);
|
// 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
|
try
|
||||||
{
|
{
|
||||||
@ -256,7 +259,6 @@ void gps_l2c_telemetry_decoder_gs::set_channel(int channel)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
d_dump_filename = "telemetry_L2CM_";
|
|
||||||
d_dump_filename.append(std::to_string(d_channel));
|
d_dump_filename.append(std::to_string(d_channel));
|
||||||
d_dump_filename.append(".dat");
|
d_dump_filename.append(".dat");
|
||||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "gnss_satellite.h"
|
#include "gnss_satellite.h"
|
||||||
#include "gps_cnav_navigation_message.h"
|
#include "gps_cnav_navigation_message.h"
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
||||||
#include <cstdint>
|
#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(
|
gps_l2c_telemetry_decoder_gs_sptr gps_l2c_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
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
|
* \brief This class implements a block that decodes CNAV data defined in IS-GPS-200K
|
||||||
@ -68,9 +69,9 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend gps_l2c_telemetry_decoder_gs_sptr gps_l2c_make_telemetry_decoder_gs(
|
friend gps_l2c_telemetry_decoder_gs_sptr gps_l2c_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
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;
|
int32_t save_matfile() const;
|
||||||
|
|
||||||
@ -99,6 +100,7 @@ private:
|
|||||||
bool d_sent_tlm_failed_msg;
|
bool d_sent_tlm_failed_msg;
|
||||||
bool d_flag_PLL_180_deg_phase_locked;
|
bool d_flag_PLL_180_deg_phase_locked;
|
||||||
bool d_flag_valid_word;
|
bool d_flag_valid_word;
|
||||||
|
bool d_dump_mat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,16 +57,17 @@ namespace errorlib = boost::system;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
gps_l5_telemetry_decoder_gs_sptr
|
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(
|
gps_l5_telemetry_decoder_gs::gps_l5_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite, bool dump) : gr::block("gps_l5_telemetry_decoder_gs",
|
const Gnss_Satellite &satellite,
|
||||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
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)),
|
||||||
|
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||||
{
|
{
|
||||||
// prevent telemetry symbols accumulation in output buffers
|
// prevent telemetry symbols accumulation in output buffers
|
||||||
this->set_max_noutput_items(1);
|
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
|
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
|
// 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_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
DLOG(INFO) << "GPS L5 TELEMETRY PROCESSING: satellite " << d_satellite;
|
DLOG(INFO) << "GPS L5 TELEMETRY PROCESSING: satellite " << d_satellite;
|
||||||
d_channel = 0;
|
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
|
try
|
||||||
{
|
{
|
||||||
@ -253,7 +256,6 @@ void gps_l5_telemetry_decoder_gs::set_channel(int32_t channel)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
d_dump_filename = "telemetry_L5_";
|
|
||||||
d_dump_filename.append(std::to_string(d_channel));
|
d_dump_filename.append(std::to_string(d_channel));
|
||||||
d_dump_filename.append(".dat");
|
d_dump_filename.append(".dat");
|
||||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "gnss_satellite.h" // for Gnss_Satellite
|
#include "gnss_satellite.h" // for Gnss_Satellite
|
||||||
#include "gps_cnav_navigation_message.h" // for Gps_CNAV_Navigation_Message
|
#include "gps_cnav_navigation_message.h" // for Gps_CNAV_Navigation_Message
|
||||||
|
#include "tlm_conf.h"
|
||||||
#include <boost/circular_buffer.hpp>
|
#include <boost/circular_buffer.hpp>
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
#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(
|
gps_l5_telemetry_decoder_gs_sptr gps_l5_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
const Gnss_Satellite &satellite,
|
||||||
bool dump);
|
const Tlm_Conf& conf);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class implements a GPS L5 Telemetry decoder
|
* \brief This class implements a GPS L5 Telemetry decoder
|
||||||
@ -67,9 +68,9 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend gps_l5_telemetry_decoder_gs_sptr gps_l5_make_telemetry_decoder_gs(
|
friend gps_l5_telemetry_decoder_gs_sptr gps_l5_make_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite,
|
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;
|
int32_t save_matfile() const;
|
||||||
|
|
||||||
@ -95,6 +96,7 @@ private:
|
|||||||
bool d_flag_valid_word;
|
bool d_flag_valid_word;
|
||||||
bool d_sent_tlm_failed_msg;
|
bool d_sent_tlm_failed_msg;
|
||||||
bool d_dump;
|
bool d_dump;
|
||||||
|
bool d_dump_mat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,10 +11,12 @@
|
|||||||
add_subdirectory(libswiftcnav)
|
add_subdirectory(libswiftcnav)
|
||||||
|
|
||||||
set(TELEMETRY_DECODER_LIB_SOURCES
|
set(TELEMETRY_DECODER_LIB_SOURCES
|
||||||
|
tlm_conf.cc
|
||||||
viterbi_decoder.cc
|
viterbi_decoder.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
set(TELEMETRY_DECODER_LIB_HEADERS
|
set(TELEMETRY_DECODER_LIB_HEADERS
|
||||||
|
tlm_conf.h
|
||||||
viterbi_decoder.h
|
viterbi_decoder.h
|
||||||
convolutional.h
|
convolutional.h
|
||||||
)
|
)
|
||||||
@ -46,6 +48,11 @@ target_link_libraries(telemetry_decoder_libs
|
|||||||
Glog::glog
|
Glog::glog
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(telemetry_decoder_libs
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||||
|
)
|
||||||
|
|
||||||
if(ENABLE_CLANG_TIDY)
|
if(ENABLE_CLANG_TIDY)
|
||||||
if(CLANG_TIDY_EXE)
|
if(CLANG_TIDY_EXE)
|
||||||
set_target_properties(telemetry_decoder_libs
|
set_target_properties(telemetry_decoder_libs
|
||||||
|
37
src/algorithms/telemetry_decoder/libs/tlm_conf.cc
Normal file
37
src/algorithms/telemetry_decoder/libs/tlm_conf.cc
Normal 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);
|
||||||
|
}
|
48
src/algorithms/telemetry_decoder/libs/tlm_conf.h
Normal file
48
src/algorithms/telemetry_decoder/libs/tlm_conf.h
Normal 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
|
Loading…
Reference in New Issue
Block a user