1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-25 04:27:39 +00:00

Improve constructors

Code cleaning
This commit is contained in:
Carles Fernandez
2021-10-11 15:17:20 +02:00
parent 6e96b41025
commit ed6432301e
6 changed files with 79 additions and 88 deletions

View File

@@ -107,7 +107,8 @@ rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
const Pvt_Conf& conf_,
const rtk_t& rtk) : gr::sync_block("rtklib_pvt_gs",
const rtk_t& rtk)
: gr::sync_block("rtklib_pvt_gs",
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(0, 0, 0)),
d_dump_filename(conf_.dump_filename),
@@ -160,7 +161,6 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
d_waiting_obs_block_rx_clock_offset_correction_msg(false),
d_enable_rx_clock_correction(conf_.enable_rx_clock_correction),
d_an_printer_enabled(conf_.an_output_enabled)
{
// Send feedback message to observables block with the receiver clock offset
this->message_port_register_out(pmt::mp("pvt_to_observables"));

View File

@@ -52,7 +52,6 @@ Rtklib_Solver::Rtklib_Solver(const rtk_t &rtk,
d_flag_dump_mat_enabled(flag_dump_to_mat)
{
// init empty ephemeris for all the available GNSS channels
this->set_averaging_flag(false);
// ############# ENABLE DATA FILE LOG #################

View File

@@ -47,7 +47,8 @@ hybrid_observables_gs_sptr hybrid_observables_gs_make(const Obs_Conf &conf_)
}
hybrid_observables_gs::hybrid_observables_gs(const Obs_Conf &conf_) : gr::block("hybrid_observables_gs",
hybrid_observables_gs::hybrid_observables_gs(const Obs_Conf &conf_)
: gr::block("hybrid_observables_gs",
gr::io_signature::make(conf_.nchannels_in, conf_.nchannels_in, sizeof(Gnss_Synchro)),
gr::io_signature::make(conf_.nchannels_out, conf_.nchannels_out, sizeof(Gnss_Synchro))),
d_conf(conf_),
@@ -62,7 +63,6 @@ hybrid_observables_gs::hybrid_observables_gs(const Obs_Conf &conf_) : gr::block(
d_T_rx_TOW_set(false),
d_dump(conf_.dump),
d_dump_mat(conf_.dump_mat && d_dump)
{
// PVT input message port
this->message_port_register_in(pmt::mp("pvt_to_observables"));

View File

@@ -18,13 +18,6 @@
#include "obs_conf.h"
#include "gnss_sdr_flags.h"
Obs_Conf::Obs_Conf() : dump_filename("obs_dump.dat"),
smoothing_factor(FLAGS_carrier_smoothing_factor),
nchannels_in(0U),
nchannels_out(0U),
observable_interval_ms(20U),
enable_carrier_smoothing(false),
dump(false),
dump_mat(false)
Obs_Conf::Obs_Conf() : smoothing_factor(FLAGS_carrier_smoothing_factor)
{
}

View File

@@ -32,14 +32,14 @@ class Obs_Conf
public:
Obs_Conf();
std::string dump_filename;
int32_t smoothing_factor;
uint32_t nchannels_in;
uint32_t nchannels_out;
uint32_t observable_interval_ms;
bool enable_carrier_smoothing;
bool dump;
bool dump_mat;
std::string dump_filename{"obs_dump.dat"};
int32_t smoothing_factor{0};
uint32_t nchannels_in{0U};
uint32_t nchannels_out{0U};
uint32_t observable_interval_ms{20U};
bool enable_carrier_smoothing{false};
bool dump{false};
bool dump_mat{false};
};
/** \} */

View File

@@ -523,7 +523,6 @@ void galileo_telemetry_decoder_gs::decode_CNAV_word(float *page_symbols, int32_t
// 2. Viterbi decoder
// 2.1 Take into account the NOT gate in G2 polynomial (Galileo ICD Figure 13, FEC encoder)
// 2.2 Take into account the possible inversion of the polarity due to PLL lock at 180 degrees
for (int32_t i = 0; i < page_length; i++)
{
if ((i + 1) % 2 == 0)