mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-24 06:50:08 +00:00
Apply changes suggested by clang-tidy
This commit is contained in:
parent
31b7a01c51
commit
6a1eec93b6
@ -38,13 +38,13 @@ Channel::Channel(const ConfigurationInterface* configuration,
|
||||
trk_(std::move(trk)),
|
||||
nav_(std::move(nav)),
|
||||
role_(role),
|
||||
channel_(channel)
|
||||
channel_(channel), flag_enable_fpga_(configuration->property("GNSS-SDR.enable_FPGA", false)), glonass_extend_correlation_ms_(configuration->property("Tracking_1G.extend_correlation_ms", 0) + configuration->property("Tracking_2G.extend_correlation_ms", 0))
|
||||
{
|
||||
glonass_extend_correlation_ms_ = configuration->property("Tracking_1G.extend_correlation_ms", 0) + configuration->property("Tracking_2G.extend_correlation_ms", 0);
|
||||
|
||||
|
||||
channel_fsm_ = std::make_shared<ChannelFsm>();
|
||||
|
||||
flag_enable_fpga_ = configuration->property("GNSS-SDR.enable_FPGA", false);
|
||||
|
||||
|
||||
acq_->set_channel(channel_);
|
||||
acq_->set_channel_fsm(channel_fsm_);
|
||||
@ -273,7 +273,7 @@ void Channel::start_acquisition()
|
||||
DLOG(INFO) << "Channel start_acquisition()";
|
||||
}
|
||||
|
||||
bool Channel::glonass_dll_pll_c_aid_tracking_check()
|
||||
bool Channel::glonass_dll_pll_c_aid_tracking_check() const
|
||||
{
|
||||
if (glonass_extend_correlation_ms_)
|
||||
{
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
inline std::shared_ptr<TelemetryDecoderInterface> telemetry() const { return nav_; }
|
||||
|
||||
private:
|
||||
bool glonass_dll_pll_c_aid_tracking_check();
|
||||
bool glonass_dll_pll_c_aid_tracking_check() const;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
std::shared_ptr<AcquisitionInterface> acq_;
|
||||
std::shared_ptr<TrackingInterface> trk_;
|
||||
|
@ -31,7 +31,8 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(const ConfigurationInterface* configu
|
||||
unsigned int out_streams)
|
||||
: role_(std::move(role)),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
out_streams_(out_streams),
|
||||
dump_(configuration->property(role + ".dump", false))
|
||||
{
|
||||
const std::string default_input_item_type("gr_complex");
|
||||
const std::string default_output_item_type("gr_complex");
|
||||
@ -59,7 +60,6 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(const ConfigurationInterface* configu
|
||||
intermediate_freq_ = configuration->property(role_ + ".IF", default_intermediate_freq);
|
||||
sampling_freq_ = configuration->property(role_ + ".sampling_frequency", default_sampling_freq);
|
||||
decimation_factor_ = configuration->property(role_ + ".decimation_factor", default_decimation_factor);
|
||||
dump_ = configuration->property(role_ + ".dump", false);
|
||||
|
||||
if (filter_type != "lowpass")
|
||||
{
|
||||
|
@ -25,15 +25,17 @@
|
||||
#include <ostream> // for operator<<
|
||||
|
||||
|
||||
Pass_Through::Pass_Through(const ConfigurationInterface* configuration, const std::string& role,
|
||||
Pass_Through::Pass_Through(const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams)
|
||||
: role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
out_streams_(out_streams),
|
||||
inverted_spectrum(configuration->property(role + ".inverted_spectrum", false))
|
||||
{
|
||||
const std::string default_item_type("gr_complex");
|
||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
|
||||
|
||||
if (item_type_ == "float")
|
||||
{
|
||||
|
@ -23,16 +23,18 @@
|
||||
#include <ostream> // for operator<<
|
||||
|
||||
HybridObservables::HybridObservables(const ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams),
|
||||
dump_(configuration->property(role + ".dump", false)),
|
||||
dump_mat_(configuration->property(role + ".dump_mat", true))
|
||||
{
|
||||
const std::string default_dump_filename("./observables.dat");
|
||||
DLOG(INFO) << "role " << role;
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
dump_mat_ = configuration->property(role + ".dump_mat", true);
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
Obs_Conf conf{};
|
||||
|
||||
conf.dump = dump_;
|
||||
conf.dump_mat = dump_mat_;
|
||||
conf.dump_filename = dump_filename_;
|
||||
@ -46,7 +48,7 @@ HybridObservables::HybridObservables(const ConfigurationInterface* configuration
|
||||
{
|
||||
conf.smoothing_factor = configuration->property(role + ".smoothing_factor", conf.smoothing_factor);
|
||||
}
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
if (conf.enable_carrier_smoothing == true)
|
||||
{
|
||||
LOG(INFO) << "Observables carrier smoothing enabled with smoothing factor " << conf.smoothing_factor;
|
||||
|
@ -27,15 +27,14 @@ SbasL1TelemetryDecoder::SbasL1TelemetryDecoder(
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
out_streams_(out_streams),
|
||||
dump_(configuration->property(role + ".dump", false))
|
||||
{
|
||||
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);
|
||||
// make telemetry decoder object
|
||||
telemetry_decoder_ = sbas_l1_make_telemetry_decoder_gs(satellite_, dump_); // TODO fix me
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ float cn0_m2m4_estimator(const gr_complex* Prompt_buffer, int length, float coh_
|
||||
* \f$NBP=(\sum^{N-1}_{i=0}Im(Pc(i)))^2+(\sum^{N-1}_{i=0}Re(Pc(i)))^2\f$, and
|
||||
* \f$Pc(i)\f$ is the prompt correlator output for the sample index i.
|
||||
*/
|
||||
float carrier_lock_detector(gr_complex* Prompt_buffer, int length)
|
||||
float carrier_lock_detector(const gr_complex* Prompt_buffer, int length)
|
||||
{
|
||||
float tmp_sum_I = 0.0;
|
||||
float tmp_sum_Q = 0.0;
|
||||
|
@ -106,7 +106,7 @@ float cn0_m2m4_estimator(const gr_complex* Prompt_buffer, int length, float coh_
|
||||
* Volume I, Chapter 8: GPS Receivers, AJ Systems, Los Altos, CA 94024.
|
||||
* Inc.: 329-407.
|
||||
*/
|
||||
float carrier_lock_detector(gr_complex* Prompt_buffer, int length);
|
||||
float carrier_lock_detector(const gr_complex* Prompt_buffer, int length);
|
||||
|
||||
|
||||
/** \} */
|
||||
|
@ -46,7 +46,7 @@ void Gps_Navigation_Message::print_gps_word_bytes(uint32_t GPS_word) const
|
||||
}
|
||||
|
||||
|
||||
bool Gps_Navigation_Message::read_navigation_bool(const std::bitset<GPS_SUBFRAME_BITS>& bits, const std::vector<std::pair<int32_t, int32_t>>& parameter) const
|
||||
bool Gps_Navigation_Message::read_navigation_bool(const std::bitset<GPS_SUBFRAME_BITS>& bits, const std::vector<std::pair<int32_t, int32_t> /*unused*/>& parameter) const
|
||||
{
|
||||
bool value;
|
||||
|
||||
@ -62,7 +62,7 @@ bool Gps_Navigation_Message::read_navigation_bool(const std::bitset<GPS_SUBFRAME
|
||||
}
|
||||
|
||||
|
||||
uint64_t Gps_Navigation_Message::read_navigation_unsigned(const std::bitset<GPS_SUBFRAME_BITS>& bits, const std::vector<std::pair<int32_t, int32_t>>& parameter) const
|
||||
uint64_t Gps_Navigation_Message::read_navigation_unsigned(const std::bitset<GPS_SUBFRAME_BITS>& bits, const std::vector<std::pair<int32_t, int32_t> /*unused*/>& parameter) const
|
||||
{
|
||||
uint64_t value = 0ULL;
|
||||
const int32_t num_of_slices = parameter.size();
|
||||
@ -81,7 +81,7 @@ uint64_t Gps_Navigation_Message::read_navigation_unsigned(const std::bitset<GPS_
|
||||
}
|
||||
|
||||
|
||||
int64_t Gps_Navigation_Message::read_navigation_signed(const std::bitset<GPS_SUBFRAME_BITS>& bits, const std::vector<std::pair<int32_t, int32_t>>& parameter) const
|
||||
int64_t Gps_Navigation_Message::read_navigation_signed(const std::bitset<GPS_SUBFRAME_BITS>& bits, const std::vector<std::pair<int32_t, int32_t> /*unused*/>& parameter) const
|
||||
{
|
||||
int64_t value = 0LL;
|
||||
const int32_t num_of_slices = parameter.size();
|
||||
@ -112,7 +112,7 @@ int64_t Gps_Navigation_Message::read_navigation_signed(const std::bitset<GPS_SUB
|
||||
}
|
||||
|
||||
|
||||
int32_t Gps_Navigation_Message::subframe_decoder(char* subframe)
|
||||
int32_t Gps_Navigation_Message::subframe_decoder(const char* subframe)
|
||||
{
|
||||
uint32_t gps_word;
|
||||
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
/*!
|
||||
* \brief Decodes the GPS NAV message
|
||||
*/
|
||||
int32_t subframe_decoder(char* subframe);
|
||||
int32_t subframe_decoder(const char* subframe);
|
||||
|
||||
/*!
|
||||
* \brief Computes the Coordinated Universal Time (UTC) and
|
||||
|
@ -171,7 +171,7 @@ private:
|
||||
GpsL1CADllPllTrackingTestFpga_msg_rx();
|
||||
|
||||
public:
|
||||
int rx_message;
|
||||
int rx_message{0};
|
||||
~GpsL1CADllPllTrackingTestFpga_msg_rx() override; //!< Default destructor
|
||||
};
|
||||
|
||||
@ -201,8 +201,7 @@ void GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_channel_events(const pmt:
|
||||
GpsL1CADllPllTrackingTestFpga_msg_rx::GpsL1CADllPllTrackingTestFpga_msg_rx()
|
||||
: gr::block("GpsL1CADllPllTrackingTestFpga_msg_rx",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(0, 0, 0)),
|
||||
rx_message(0)
|
||||
gr::io_signature::make(0, 0, 0))
|
||||
{
|
||||
this->message_port_register_in(pmt::mp("events"));
|
||||
this->set_msg_handler(pmt::mp("events"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user