mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Fix cmakelint and cpplint reported format errors
This commit is contained in:
parent
8a4055b5b8
commit
c8f7966688
@ -132,20 +132,16 @@ if(GRLIMESDR_FOUND AND NOT TARGET Gnuradio::limesdr)
|
||||
INTERFACE_LINK_LIBRARIES "${GRLIMESDR_LIBRARIES}"
|
||||
)
|
||||
|
||||
#check for PPS custom version
|
||||
file(READ ${GRLIMESDR_INCLUDE_DIR}/limesdr/source.h TMPTXT)
|
||||
|
||||
string(FIND "${TMPTXT}" "enable_PPS_mode" matchres)
|
||||
|
||||
message(STATUS ${matchres})
|
||||
|
||||
if(${matchres} EQUAL -1)
|
||||
message("Using standard gr-limesdr library ")
|
||||
else()
|
||||
set(GRLIMESDR_PPS True)
|
||||
#check for PPS custom version
|
||||
file(READ ${GRLIMESDR_INCLUDE_DIR}/limesdr/source.h TMPTXT)
|
||||
string(FIND "${TMPTXT}" "enable_PPS_mode" matchres)
|
||||
message(STATUS ${matchres})
|
||||
if(${matchres} EQUAL -1)
|
||||
message("Using standard gr-limesdr library ")
|
||||
else()
|
||||
set(GRLIMESDR_PPS True)
|
||||
message("Using custom gr-limesdr library with PPS support ")
|
||||
endif ()
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GRLIMESDR_LIBRARIES GRLIMESDR_INCLUDE_DIR)
|
||||
|
@ -269,11 +269,10 @@ if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(GRLIMESDR_PPS)
|
||||
target_compile_definitions(signal_source_adapters PUBLIC -DLimeSDR_PPS=1)
|
||||
endif()
|
||||
|
||||
|
||||
if(GRLIMESDR_PPS)
|
||||
target_compile_definitions(signal_source_adapters PUBLIC -DLimeSDR_PPS=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(signal_source_adapters
|
||||
|
@ -64,13 +64,13 @@ Kf_Conf::Kf_Conf()
|
||||
item_type = "gr_complex";
|
||||
|
||||
expected_cn0_dbhz = 0;
|
||||
//System covariances (Q)
|
||||
// System covariances (Q)
|
||||
code_phase_sd_chips = 0;
|
||||
code_rate_sd_chips_s = 0;
|
||||
carrier_phase_sd_rad = 0;
|
||||
carrier_freq_sd_hz = 0;
|
||||
carrier_freq_rate_sd_hz_s = 0;
|
||||
//initial Kalman covariance matrix (P)
|
||||
// initial Kalman covariance matrix (P)
|
||||
init_code_phase_sd_chips = 0;
|
||||
init_code_rate_sd_chips_s = 0;
|
||||
init_carrier_phase_sd_rad = 0;
|
||||
@ -128,7 +128,7 @@ void Kf_Conf::SetFromConfiguration(const ConfigurationInterface *configuration,
|
||||
|
||||
// Kalman filter covariances
|
||||
|
||||
//Measurement covariances (R)
|
||||
// Measurement covariances (R)
|
||||
expected_cn0_dbhz = configuration->property(role + ".expected_cn0_dbhz", 42.0);
|
||||
|
||||
code_disc_sd_chips = configuration->property(role + ".code_disc_sd_chips", 0.01);
|
||||
@ -137,7 +137,7 @@ void Kf_Conf::SetFromConfiguration(const ConfigurationInterface *configuration,
|
||||
enable_dynamic_measurement_covariance = configuration->property(role + ".enable_dynamic_measurement_covariance", false);
|
||||
use_estimated_cn0 = configuration->property(role + ".use_estimated_cn0", false);
|
||||
|
||||
//System covariances (Q)
|
||||
// System covariances (Q)
|
||||
code_phase_sd_chips = configuration->property(role + ".code_phase_sd_chips", 0.001);
|
||||
code_rate_sd_chips_s = configuration->property(role + ".code_rate_sd_chips_s", 0.001);
|
||||
|
||||
@ -145,7 +145,7 @@ void Kf_Conf::SetFromConfiguration(const ConfigurationInterface *configuration,
|
||||
carrier_freq_sd_hz = configuration->property(role + ".carrier_freq_sd_hz", 0.1);
|
||||
carrier_freq_rate_sd_hz_s = configuration->property(role + ".carrier_freq_rate_sd_hz_s", 1);
|
||||
|
||||
//System covariances (narrow) (Q)
|
||||
// System covariances (narrow) (Q)
|
||||
narrow_code_phase_sd_chips = configuration->property(role + ".narrow_code_phase_sd_chips", 0.001);
|
||||
narrow_code_rate_sd_chips_s = configuration->property(role + ".narrow_code_rate_sd_chips_s", 0.001);
|
||||
|
||||
@ -154,7 +154,7 @@ void Kf_Conf::SetFromConfiguration(const ConfigurationInterface *configuration,
|
||||
narrow_carrier_freq_rate_sd_hz_s = configuration->property(role + ".narrow_carrier_freq_rate_sd_hz_s", 1);
|
||||
|
||||
|
||||
//initial Kalman covariance matrix (P)
|
||||
// initial Kalman covariance matrix (P)
|
||||
init_code_phase_sd_chips = configuration->property(role + ".init_code_phase_sd_chips", 1);
|
||||
init_code_rate_sd_chips_s = configuration->property(role + ".init_code_rate_sd_chips_s", 100);
|
||||
|
||||
|
@ -65,15 +65,15 @@ public:
|
||||
bool dump;
|
||||
bool dump_mat;
|
||||
|
||||
//KF statistics
|
||||
//states: code_phase_chips, carrier_phase_rads, carrier_freq_hz, carrier_freq_rate_hz_s, code_freq_rate_chips_s
|
||||
//Measurement covariances (R)
|
||||
// KF statistics
|
||||
// states: code_phase_chips, carrier_phase_rads, carrier_freq_hz, carrier_freq_rate_hz_s, code_freq_rate_chips_s
|
||||
// Measurement covariances (R)
|
||||
double expected_cn0_dbhz;
|
||||
|
||||
double code_disc_sd_chips;
|
||||
double carrier_disc_sd_rads;
|
||||
|
||||
//System covariances (Q)
|
||||
// System covariances (Q)
|
||||
double code_phase_sd_chips;
|
||||
double code_rate_sd_chips_s;
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
double carrier_freq_sd_hz;
|
||||
double carrier_freq_rate_sd_hz_s;
|
||||
|
||||
//System covariances (narrow) (Q)
|
||||
// System covariances (narrow) (Q)
|
||||
double narrow_code_phase_sd_chips;
|
||||
double narrow_code_rate_sd_chips_s;
|
||||
|
||||
@ -89,7 +89,7 @@ public:
|
||||
double narrow_carrier_freq_sd_hz;
|
||||
double narrow_carrier_freq_rate_sd_hz_s;
|
||||
|
||||
//initial Kalman covariance matrix (P)
|
||||
// initial Kalman covariance matrix (P)
|
||||
double init_code_phase_sd_chips;
|
||||
double init_code_rate_sd_chips_s;
|
||||
|
||||
|
@ -23,7 +23,10 @@
|
||||
#include <pmt/pmt_sugar.h> // for mp
|
||||
#include <cmath> // for round
|
||||
#include <iostream> // for operator<<
|
||||
#include <string> // for string
|
||||
#include <memory>
|
||||
#include <string> // for string
|
||||
#include <vector>
|
||||
|
||||
|
||||
gnss_sdr_sample_counter::gnss_sdr_sample_counter(
|
||||
double _fs,
|
||||
@ -49,7 +52,7 @@ gnss_sdr_sample_counter::gnss_sdr_sample_counter(
|
||||
flag_m = false;
|
||||
flag_h = false;
|
||||
flag_days = false;
|
||||
set_tag_propagation_policy(TPP_DONT); //no tag propagation, the time tag will be adjusted and regenerated in work()
|
||||
set_tag_propagation_policy(TPP_DONT); // no tag propagation, the time tag will be adjusted and regenerated in work()
|
||||
}
|
||||
|
||||
|
||||
@ -140,7 +143,7 @@ int gnss_sdr_sample_counter::work(int noutput_items __attribute__((unused)),
|
||||
|
||||
//**************** time tags ****************
|
||||
std::vector<gr::tag_t> tags_vec;
|
||||
//notice that nitems_read is updated in decimation blocks after leaving work() with return 1, equivalent to call consume_each
|
||||
// notice that nitems_read is updated in decimation blocks after leaving work() with return 1, equivalent to call consume_each
|
||||
this->get_tags_in_range(tags_vec, 0, this->nitems_read(0), this->nitems_read(0) + samples_per_output);
|
||||
for (std::vector<gr::tag_t>::iterator it = tags_vec.begin(); it != tags_vec.end(); ++it)
|
||||
{
|
||||
@ -148,7 +151,7 @@ int gnss_sdr_sample_counter::work(int noutput_items __attribute__((unused)),
|
||||
{
|
||||
if (pmt::any_ref(it->value).type().hash_code() == typeid(const std::shared_ptr<GnssTime>).hash_code())
|
||||
{
|
||||
//recompute timestamp to match the last sample in the consumed samples in this batch
|
||||
// recompute timestamp to match the last sample in the consumed samples in this batch
|
||||
int64_t diff_samplecount = uint64diff(out[0].Tracking_sample_counter, it->offset);
|
||||
const std::shared_ptr<GnssTime> last_timetag = boost::any_cast<const std::shared_ptr<GnssTime>>(pmt::any_ref(it->value));
|
||||
double intpart;
|
||||
@ -157,9 +160,9 @@ int gnss_sdr_sample_counter::work(int noutput_items __attribute__((unused)),
|
||||
last_timetag->tow_ms = last_timetag->tow_ms + static_cast<int>(intpart);
|
||||
last_timetag->rx_time = static_cast<double>(out[0].Tracking_sample_counter) / fs;
|
||||
add_item_tag(0, this->nitems_written(0) + 1, pmt::mp("timetag"), pmt::make_any(last_timetag));
|
||||
//std::cout << "COUNTER TAG: this->nitems_read(0):" << this->nitems_read(0) << " sample_counter:" << sample_counter
|
||||
// std::cout << "COUNTER TAG: this->nitems_read(0):" << this->nitems_read(0) << " sample_counter:" << sample_counter
|
||||
// << " it->offset:" << it->offset << " diff:" << diff_samplecount << "\n";
|
||||
//getchar();
|
||||
// getchar();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1437,8 +1437,8 @@ int GNSSFlowgraph::connect_observables_to_pvt()
|
||||
{
|
||||
top_block_->connect(observables_->get_right_block(), i, pvt_->get_left_block(), i);
|
||||
top_block_->msg_connect(channels_.at(i)->get_right_block(), pmt::mp("telemetry"), pvt_->get_left_block(), pmt::mp("telemetry"));
|
||||
//experimental VTL
|
||||
//TODO: It is currently implemented only in dll_pll_veml_tracking, other configs will silently fail!
|
||||
// experimental VTL
|
||||
// TODO: It is currently implemented only in dll_pll_veml_tracking, other configs will silently fail!
|
||||
try
|
||||
{
|
||||
top_block_->msg_connect(pvt_->get_left_block(), pmt::mp("pvt_to_trk"), channels_.at(i)->get_left_block_trk(), pmt::mp("pvt_to_trk"));
|
||||
|
Loading…
Reference in New Issue
Block a user