1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00

Merge branch 'carlesfernandez:next' into osnma-cesare

This commit is contained in:
cesaaargm 2023-12-07 04:05:52 +01:00 committed by GitHub
commit 55e624e9f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
114 changed files with 638 additions and 409 deletions

View File

@ -20,7 +20,7 @@ if(DEFINED ENV{GFORTRAN_ROOT})
)
endif()
set(GCC_MAJOR_SERIES 13 12 11 10 9 8 7 6 5)
set(GCC_MAJOR_SERIES 14 13 12 11 10 9 8 7 6 5)
set(GCC4_SERIES 4.9.1 4.9 4.8.3 4.8.1 4.7.2 4.7 4.8.2 4.8 4.7 4.6 4.5 4.4.4 4.4)
set(GCC_SERIES ${GCC_MAJOR_SERIES} ${GCC4_SERIES})

View File

@ -406,7 +406,7 @@ if(GNURADIO_RUNTIME_INCLUDE_DIRS)
if("#include <log4cpp/Category.hh>" STREQUAL "${_file_line}")
set(_uses_log4cpp TRUE)
endif()
if("#include <spdlog/common.h>" STREQUAL "${_file_line}")
if("#include <spdlog/spdlog.h>" STREQUAL "${_file_line}")
set(_uses_spdlog TRUE)
endif()
endforeach()

View File

@ -191,9 +191,9 @@ endif()
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C++ compiler during Address Sanitized builds." FORCE)
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C compiler during Address Sanitized builds." FORCE)
set(CMAKE_EXE_LINKER_FLAGS_ASAN
"-W" CACHE STRING

View File

@ -14,6 +14,10 @@ All notable changes to GNSS-SDR will be documented in this file.
## [Unreleased](https://github.com/gnss-sdr/gnss-sdr/tree/next)
### Improvements in Efficiency:
- Fixed some performance inefficiencies detected by Coverity Scan.
### Improvements in Interoperability:
- Added a new PVT configuration boolean flag (`flag_geohash_log_out`) that
@ -41,6 +45,7 @@ All notable changes to GNSS-SDR will be documented in this file.
- Updated local `cpu_features` library to v0.9.0.
- `volk_gnsssdr`: fix syntax for Python 3.12 without breaking backward
compatibility with Python 2.7.
- Fixed linking against latest GNU Radio version.
### Improvements in Repeatability:
@ -54,6 +59,10 @@ All notable changes to GNSS-SDR will be documented in this file.
`PVT.kf_system_ecef_pos_sd_m=0.01`, in [m]; and
`PVT.kf_system_ecef_vel_sd_ms=0.001`, in [m/s].
### Improvements in Scalability:
- Fixed some potential data race conditions detected by Coverity Scan.
### Improvements in Usability:
- The Galileo E1B Reduced CED parameters usage has been set to `false` by
@ -71,6 +80,21 @@ All notable changes to GNSS-SDR will be documented in this file.
- The estimated CN0 value is now printed in the terminal when navigation data is
succesfully decoded.
- Fixed GPS navigation message satellite validation.
- Latitude and longitude are now reported in the terminal with six decimal
places (the sixth decimal place worths up to 0.11 m), instead of the
overkilling nine (the ninth decimal place worths up to 110 microns).
Similarly, height in meters is now reported with two decimal places instead of
three, and velocity in m/s also with two decimal places instead of three.
- Fixed the rate at which KLM, GPX, GeoJSON, and NMEA annotations are made. The
rate is now set by `PVT.output_rate_ms` (`500` ms by default), and can be
particularized by `PVT.kml_rate_ms`, `PVT.gpx_rate_ms`, `PVT.geojson_rate_ms`,
and `PVT.nmea_rate_ms`. Those values should be multiples of
`PVT.output_rate_ms`, or the least common multiple will be taken.
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/
&nbsp;
## [GNSS-SDR v0.0.18](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.18) - 2023-04-06

View File

@ -241,7 +241,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
{
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
d_dump_filename = dump_filename_;
d_dump_filename = std::move(dump_filename_);
}
else
{
@ -512,7 +512,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
std::ostringstream os;
#ifdef HAS_PUT_TIME
time_t when = std::time(nullptr);
auto const tm = *std::localtime(&when);
const auto& tm = *std::localtime(&when);
os << std::put_time(&tm, "%z");
#endif
std::string utc_diff_str = os.str(); // in ISO 8601 format: "+HHMM" or "-HHMM"
@ -2434,22 +2434,17 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
std::cout
<< TEXT_BOLD_GREEN
<< "Position at " << time_solution << UTC_solution_str
<< " using " << d_user_pvt_solver->get_num_valid_observations()
<< std::fixed << std::setprecision(9)
<< " observations is Lat = " << d_user_pvt_solver->get_latitude() << " [deg], Long = " << d_user_pvt_solver->get_longitude()
<< std::fixed << std::setprecision(3)
<< " [deg], Height = " << d_user_pvt_solver->get_height() << " [m]" << TEXT_RESET << '\n';
std::cout << std::setprecision(ss);
<< " using " << d_user_pvt_solver->get_num_valid_observations() << " observations is Lat = "
<< std::fixed << std::setprecision(6) << d_user_pvt_solver->get_latitude()
<< " [deg], Long = " << d_user_pvt_solver->get_longitude() << " [deg], Height = "
<< std::fixed << std::setprecision(2) << d_user_pvt_solver->get_height() << std::setprecision(ss) << " [m]" << TEXT_RESET << std::endl;
DLOG(INFO) << "RX clock offset: " << d_user_pvt_solver->get_time_offset_s() << "[s]";
std::cout
<< TEXT_BOLD_GREEN
<< "Velocity: " << std::fixed << std::setprecision(3)
<< "Velocity: " << std::fixed << std::setprecision(2)
<< "East: " << d_user_pvt_solver->get_rx_vel()[0] << " [m/s], North: " << d_user_pvt_solver->get_rx_vel()[1]
<< " [m/s], Up = " << d_user_pvt_solver->get_rx_vel()[2] << " [m/s]" << TEXT_RESET << '\n';
std::cout << std::setprecision(ss);
<< " [m/s], Up = " << d_user_pvt_solver->get_rx_vel()[2] << std::setprecision(ss) << " [m/s]" << TEXT_RESET << std::endl;
DLOG(INFO) << "RX clock drift: " << d_user_pvt_solver->get_clock_drift_ppm() << " [ppm]";
// boost::posix_time::ptime p_time;

View File

@ -56,13 +56,13 @@ public:
int32_t output_rate_ms = 0;
int32_t display_rate_ms = 0;
int32_t kml_rate_ms = 1000;
int32_t gpx_rate_ms = 1000;
int32_t geojson_rate_ms = 1000;
int32_t nmea_rate_ms = 1000;
int32_t kml_rate_ms = 20;
int32_t gpx_rate_ms = 20;
int32_t geojson_rate_ms = 20;
int32_t nmea_rate_ms = 20;
int32_t rinex_version = 0;
int32_t rinexobs_rate_ms = 0;
int32_t an_rate_ms = 1000;
int32_t an_rate_ms = 20;
int32_t max_obs_block_rx_clock_offset_ms = 40;
int udp_port = 0;
int udp_eph_port = 0;

View File

@ -5651,7 +5651,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int32_t, Gal
std::string E1B_DVS = std::to_string(galileo_ephemeris_iter->second.E1B_DVS);
std::string SVhealth_str = E5B_HS + std::to_string(galileo_ephemeris_iter->second.E5b_DVS) + "11" + "1" + std::string(E1B_DVS) + std::string(E1B_HS) + std::to_string(galileo_ephemeris_iter->second.E1B_DVS);
std::string SVhealth_str = std::move(E5B_HS) + std::to_string(galileo_ephemeris_iter->second.E5b_DVS) + "11" + "1" + std::string(E1B_DVS) + std::string(E1B_HS) + std::to_string(galileo_ephemeris_iter->second.E1B_DVS);
int32_t SVhealth = Rinex_Printer::toInt(SVhealth_str, 9);
line += Rinex_Printer::doub2for(static_cast<double>(SVhealth), 18, 2);
line += std::string(1, ' ');

View File

@ -647,7 +647,7 @@ private:
inline void join(const std::shared_ptr<RtcmListener>& participant)
{
participants_.insert(participant);
for (auto msg : recent_msgs_)
for (const auto& msg : recent_msgs_)
{
participant->deliver(msg);
}
@ -810,7 +810,7 @@ private:
inline void write(const Rtcm_Message& msg)
{
io_context_.post(
[this, msg]() {
[this, &msg]() {
bool write_in_progress = !write_msgs_.empty();
write_msgs_.push_back(msg);
if (!write_in_progress)

View File

@ -30,6 +30,7 @@
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -96,8 +97,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -29,6 +29,7 @@
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -95,8 +96,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -24,6 +24,7 @@
#include <gnuradio/blocks/stream_to_vector.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -92,8 +93,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_cc_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_cc_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -27,6 +27,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -95,8 +96,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -25,6 +25,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -121,8 +122,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_fpga_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_fpga_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -24,6 +24,7 @@
#include <gnuradio/blocks/stream_to_vector.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -93,8 +94,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_cc_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_cc_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -24,6 +24,7 @@
#include <gnuradio/blocks/stream_to_vector.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -93,9 +94,10 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_cc_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_cc_->set_channel_fsm(channel_fsm_);
}
/*!
* \brief Set statistics threshold of PCPS algorithm
*/

View File

@ -24,6 +24,7 @@
#include <gnuradio/blocks/stream_to_vector.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -93,9 +94,10 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_cc_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_cc_->set_channel_fsm(channel_fsm_);
}
/*!
* \brief Set statistics threshold of TONG algorithm
*/

View File

@ -29,6 +29,7 @@
#include "gnss_synchro.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -93,8 +94,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_cc_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_cc_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -25,6 +25,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -86,8 +87,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -25,6 +25,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -121,8 +122,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_fpga_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_fpga_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -26,6 +26,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -117,8 +118,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -26,6 +26,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -120,8 +121,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_fpga_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_fpga_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -27,6 +27,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -95,8 +96,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -29,6 +29,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -97,8 +98,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -28,6 +28,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -96,8 +97,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -31,6 +31,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* Classes for GNSS signal acquisition
@ -101,8 +102,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -55,7 +55,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
acq_parameters.fs_in = fs_in_;
acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD_S * static_cast<float>(acq_parameters.fs_in)));
acq_parameters.dump = dump_;
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
acq_parameters.dump_filename = dump_filename_;
if (FLAGS_doppler_max != 0)
{

View File

@ -25,6 +25,7 @@
#include "pcps_acquisition_fine_doppler_cc.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -95,8 +96,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_cc_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_cc_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -28,6 +28,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -122,8 +123,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_fpga_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_fpga_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -46,7 +46,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
{
const std::string default_item_type("gr_complex");
std::string default_dump_filename = "./data/acquisition.dat";
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
item_type_ = configuration->property(role_ + ".item_type", default_item_type);
int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);

View File

@ -25,6 +25,7 @@
#include "pcps_assisted_acquisition_cc.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -94,8 +95,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_cc_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_cc_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -24,6 +24,7 @@
#include <gnuradio/blocks/stream_to_vector.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -92,8 +93,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_cc_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_cc_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -99,7 +99,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
max_dwells_ = 2;
}
dump_filename_ = configuration_->property(role_ + ".dump_filename", default_dump_filename);
dump_filename_ = configuration_->property(role_ + ".dump_filename", std::move(default_dump_filename));
bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false);

View File

@ -26,6 +26,7 @@
#include <gnuradio/blocks/stream_to_vector.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -95,8 +96,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_cc_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_cc_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -61,7 +61,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
item_type_ = configuration_->property(role_ + ".item_type", default_item_type);
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
dump_filename_ = configuration_->property(role_ + ".dump_filename", default_dump_filename);
dump_filename_ = configuration_->property(role_ + ".dump_filename", std::move(default_dump_filename));
if (FLAGS_doppler_max != 0)
{

View File

@ -25,6 +25,7 @@
#include <gnuradio/blocks/stream_to_vector.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -93,8 +94,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_cc_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_cc_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -28,6 +28,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -97,8 +98,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -29,6 +29,7 @@
#include <cstddef> // for size_t
#include <memory> // for weak_ptr
#include <string> // for string
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -97,8 +98,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_fpga_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_fpga_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -28,6 +28,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
/** \addtogroup Acquisition
* \{ */
@ -96,8 +97,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -28,6 +28,7 @@
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
/** \addtogroup Acquisition
@ -124,8 +125,8 @@ public:
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_fpga_->set_channel_fsm(channel_fsm);
channel_fsm_ = std::move(channel_fsm);
acquisition_fpga_->set_channel_fsm(channel_fsm_);
}
/*!

View File

@ -730,7 +730,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
Gnss_Synchro current_synchro_data = Gnss_Synchro();
current_synchro_data = *d_gnss_synchro;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
return_value = 1; // Number of Gnss_Synchro objects produced
}

View File

@ -381,7 +381,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
Gnss_Synchro current_synchro_data = Gnss_Synchro();
current_synchro_data = *d_gnss_synchro;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
noutput_items = 1; // Number of Gnss_Synchro objects produced
}

View File

@ -871,6 +871,7 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
// Called by gnuradio to enable drivers, etc for i/o devices.
bool pcps_acquisition::start()
{
gr::thread::scoped_lock lk(d_setlock);
d_sample_counter = 0ULL;
calculate_threshold();
return true;
@ -1017,7 +1018,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
{
Gnss_Synchro current_synchro_data = d_monitor_queue.front();
d_monitor_queue.pop();
*out[i] = current_synchro_data;
*out[i] = std::move(current_synchro_data);
}
return num_gnss_synchro_objects;
}

View File

@ -84,7 +84,7 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con
{
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
d_dump_filename = dump_filename_;
d_dump_filename = std::move(dump_filename_);
}
else
{
@ -566,7 +566,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
Gnss_Synchro current_synchro_data = Gnss_Synchro();
current_synchro_data = *d_gnss_synchro;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
return_value = 1; // Number of Gnss_Synchro objects produced
}
break;

View File

@ -427,7 +427,7 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items,
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
Gnss_Synchro current_synchro_data = Gnss_Synchro();
current_synchro_data = *d_gnss_synchro;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
noutput_items = 1; // Number of Gnss_Synchro objects produced
}
break;

View File

@ -403,7 +403,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
Gnss_Synchro current_synchro_data = Gnss_Synchro();
current_synchro_data = *d_gnss_synchro;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
noutput_items = 1; // Number of Gnss_Synchro objects produced
}

View File

@ -765,7 +765,7 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items,
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
Gnss_Synchro current_synchro_data = Gnss_Synchro();
current_synchro_data = *d_gnss_synchro;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
noutput_items = 1; // Number of Gnss_Synchro objects produced
}

View File

@ -507,7 +507,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
auto** out = reinterpret_cast<Gnss_Synchro**>(&output_items[0]);
Gnss_Synchro current_synchro_data = Gnss_Synchro();
current_synchro_data = *d_gnss_synchro;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
noutput_items = 1; // Number of Gnss_Synchro objects produced
}

View File

@ -403,7 +403,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
Gnss_Synchro current_synchro_data = Gnss_Synchro();
current_synchro_data = *d_gnss_synchro;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
noutput_items = 1; // Number of Gnss_Synchro objects produced
}

View File

@ -212,6 +212,13 @@ gr::basic_block_sptr Channel::get_right_block()
}
Gnss_Signal Channel::get_signal()
{
std::lock_guard<std::mutex> lk(mx_);
return gnss_signal_;
}
void Channel::set_signal(const Gnss_Signal& gnss_signal)
{
std::lock_guard<std::mutex> lk(mx_);

View File

@ -84,7 +84,7 @@ public:
inline std::string role() override { return role_; }
inline std::string implementation() override { return std::string("Channel"); } //!< Returns "Channel"
inline size_t item_size() override { return 2 * sizeof(float); }
inline Gnss_Signal get_signal() const override { return gnss_signal_; }
Gnss_Signal get_signal() override;
void start_acquisition() override; //!< Start the State Machine
void stop_channel() override; //!< Stop the State Machine
void set_signal(const Gnss_Signal& gnss_signal_) override; //!< Sets the channel GNSS signal

View File

@ -73,7 +73,7 @@ void ArraySignalConditioner::disconnect(gr::top_block_sptr top_block)
// data_type_adapt_->disconnect(top_block);
in_filt_->disconnect(top_block);
res_->disconnect(top_block);
res_->disconnect(std::move(top_block));
connected_ = false;
}

View File

@ -101,7 +101,7 @@ void SignalConditioner::disconnect(gr::top_block_sptr top_block)
data_type_adapt_->disconnect(top_block);
in_filt_->disconnect(top_block);
res_->disconnect(top_block);
res_->disconnect(std::move(top_block));
connected_ = false;
}

View File

@ -26,7 +26,7 @@ ByteToShort::ByteToShort(const ConfigurationInterface* configuration,
unsigned int out_streams) : role_(std::move(role)),
in_streams_(in_streams),
out_streams_(out_streams),
dump_(configuration->property(role + ".dump", false))
dump_(configuration->property(role_ + ".dump", false))
{
const std::string default_input_item_type("byte");
const std::string default_output_item_type("short");

View File

@ -32,7 +32,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(const ConfigurationInterface* configu
: role_(std::move(role)),
in_streams_(in_streams),
out_streams_(out_streams),
dump_(configuration->property(role + ".dump", false))
dump_(configuration->property(role_ + ".dump", false))
{
const std::string default_input_item_type("gr_complex");
const std::string default_output_item_type("gr_complex");

View File

@ -2983,7 +2983,7 @@ pcv_t *searchpcv(int sat, const char *type, gtime_t time,
const pcvs_t *pcvs)
{
pcv_t *pcv;
char buff[MAXANT] = "";
char buff[MAXANT + 1] = "";
char *types[2];
char *p;
int i;
@ -3730,12 +3730,12 @@ int savenav(const char *file, const nav_t *nav)
}
auto id = satno2id(nav->eph[i].sat);
fprintf(fp,
"%s,%d,%d,%d,%d,%d,%d,%d,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,"
"%s,%d,%d,%d,%d,%ld,%ld,%ld,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,"
"%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,"
"%.14E,%.14E,%.14E,%.14E,%.14E,%d,%d\n",
id.data(), nav->eph[i].iode, nav->eph[i].iodc, nav->eph[i].sva,
nav->eph[i].svh, static_cast<int>(nav->eph[i].toe.time),
static_cast<int>(nav->eph[i].toc.time), static_cast<int>(nav->eph[i].ttr.time),
nav->eph[i].svh, static_cast<intmax_t>(nav->eph[i].toe.time),
static_cast<intmax_t>(nav->eph[i].toc.time), static_cast<intmax_t>(nav->eph[i].ttr.time),
nav->eph[i].A, nav->eph[i].e, nav->eph[i].i0, nav->eph[i].OMG0,
nav->eph[i].omg, nav->eph[i].M0, nav->eph[i].deln, nav->eph[i].OMGd,
nav->eph[i].idot, nav->eph[i].crc, nav->eph[i].crs, nav->eph[i].cuc,
@ -3751,11 +3751,11 @@ int savenav(const char *file, const nav_t *nav)
}
auto id = satno2id(nav->geph[i].sat);
fprintf(fp,
"%s,%d,%d,%d,%d,%d,%d,%d,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,"
"%s,%d,%d,%d,%d,%d,%ld,%ld,%.14E,%.14E,%.14E,%.14E,%.14E,%.14E,"
"%.14E,%.14E,%.14E,%.14E,%.14E,%.14E\n",
id.data(), nav->geph[i].iode, nav->geph[i].frq, nav->geph[i].svh,
nav->geph[i].sva, nav->geph[i].age, static_cast<int>(nav->geph[i].toe.time),
static_cast<int>(nav->geph[i].tof.time),
nav->geph[i].sva, nav->geph[i].age, static_cast<intmax_t>(nav->geph[i].toe.time),
static_cast<intmax_t>(nav->geph[i].tof.time),
nav->geph[i].pos[0], nav->geph[i].pos[1], nav->geph[i].pos[2],
nav->geph[i].vel[0], nav->geph[i].vel[1], nav->geph[i].vel[2],
nav->geph[i].acc[0], nav->geph[i].acc[1], nav->geph[i].acc[2],
@ -5017,6 +5017,7 @@ int rtk_uncompress(const char *file, char *uncfile)
char *p;
char cmd[2048] = "";
char tmpfile[1024] = "";
tmpfile[1023] = '\0';
char buff[1024];
char *fname;
char *dir = const_cast<char *>("");
@ -5067,6 +5068,7 @@ int rtk_uncompress(const char *file, char *uncfile)
std::strncpy(uncfile, tmpfile, 1024);
uncfile[p - tmpfile] = '\0';
std::strncpy(buff, tmpfile, 1024);
buff[1023] = '\0';
fname = buff;
if ((p = strrchr(buff, '/')))
{
@ -5158,6 +5160,7 @@ int expath(const char *path, char *paths[], int nmax)
int j;
int n = 0;
char tmp[1024] = "";
tmp[1023] = '\0';
struct dirent *d;
DIR *dp;
const char *file = path;
@ -5230,6 +5233,7 @@ int expath(const char *path, char *paths[], int nmax)
}
std::strncpy(paths[i], paths[j], 1024);
std::strncpy(paths[j], tmp, 1024);
paths[j][1023] = '\0';
}
}
}

View File

@ -81,7 +81,8 @@ serial_t *openserial(const char *path, int mode, char *msg)
char *p;
char parity = 'N';
char dev[128];
char port[128];
char port[128] = "";
port[127] = '\0';
char fctr[64] = "";
const speed_t bs[] = {
@ -105,7 +106,7 @@ serial_t *openserial(const char *path, int mode, char *msg)
}
else if (strlen(path) < 128)
{
std::strncpy(port, path, 128);
std::strncpy(port, path, 127);
port[127] = '\0';
}
@ -124,7 +125,6 @@ serial_t *openserial(const char *path, int mode, char *msg)
return nullptr;
}
parity = static_cast<char>(toupper(static_cast<int>(parity)));
std::string s_aux = "/dev/"s + std::string(port);
s_aux.resize(128, '\0');
int n = s_aux.length();
@ -705,7 +705,7 @@ void syncfile(file_t *file1, file_t *file2)
void decodetcppath(const char *path, char *addr, char *port, char *user,
char *passwd, char *mntpnt, char *str)
{
char buff[MAXSTRPATH] = "";
char buff[MAXSTRPATH + 1] = "";
char *p;
char *q;
@ -1827,7 +1827,7 @@ int statentrip(ntrip_t *ntrip)
void decodeftppath(const char *path, char *addr, char *file, char *user,
char *passwd, int *topts)
{
char buff[MAXSTRPATH] = "";
char buff[MAXSTRPATH + 1] = "";
char *p;
char *q;
@ -1896,7 +1896,7 @@ void decodeftppath(const char *path, char *addr, char *file, char *user,
p = buff;
}
std::strncpy(addr, p, 1024);
std::strncpy(addr, p, 1023);
addr[1023] = '\0';
}
@ -2254,7 +2254,7 @@ int stropen(stream_t *stream, int type, int mode, const char *path)
stream->mode = mode;
if (strlen(path) < MAXSTRPATH)
{
std::strncpy(stream->path, path, MAXSTRPATH);
std::strncpy(stream->path, path, MAXSTRPATH - 1);
stream->path[MAXSTRPATH - 1] = '\0';
}
stream->inb = stream->inr = stream->outb = stream->outr = 0;

View File

@ -15,70 +15,118 @@
#include <utility> // for pair
/*
* Option type
*/
option_t::option_t(std::string longform, std::string shortform, std::string msg, void (*callback)())
: longform("--" + longform),
shortform("-" + shortform),
msg(msg),
callback(callback) { option_type = VOID_CALLBACK; }
option_t::option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
void (*t_callback)())
: longform("--" + t_longform),
shortform("-" + t_shortform),
msg(std::move(t_msg)),
callback(t_callback)
{
option_type = VOID_CALLBACK;
}
option_t::option_t(std::string longform, std::string shortform, std::string msg, void (*callback)(int))
: longform("--" + longform),
shortform("-" + shortform),
msg(msg),
callback((void (*)())callback) { option_type = INT_CALLBACK; }
option_t::option_t(std::string longform, std::string shortform, std::string msg, void (*callback)(float))
: longform("--" + longform),
shortform("-" + shortform),
msg(msg),
callback((void (*)())callback) { option_type = FLOAT_CALLBACK; }
option_t::option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
void (*t_callback)(int))
: longform("--" + t_longform),
shortform("-" + t_shortform),
msg(std::move(t_msg)),
callback((void (*)())t_callback)
{
option_type = INT_CALLBACK;
}
option_t::option_t(std::string longform, std::string shortform, std::string msg, void (*callback)(bool))
: longform("--" + longform),
shortform("-" + shortform),
msg(msg),
callback((void (*)())callback) { option_type = BOOL_CALLBACK; }
option_t::option_t(std::string longform, std::string shortform, std::string msg, void (*callback)(std::string))
: longform("--" + longform),
shortform("-" + shortform),
msg(msg),
callback((void (*)())callback) { option_type = STRING_CALLBACK; }
option_t::option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
void (*t_callback)(float))
: longform("--" + t_longform),
shortform("-" + t_shortform),
msg(std::move(t_msg)),
callback((void (*)())t_callback)
{
option_type = FLOAT_CALLBACK;
}
option_t::option_t(std::string longform, std::string shortform, std::string msg, std::string printval)
: longform("--" + longform),
shortform("-" + shortform),
msg(msg),
printval(printval) { option_type = STRING; }
option_t::option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
void (*t_callback)(bool))
: longform("--" + t_longform),
shortform("-" + t_shortform),
msg(std::move(t_msg)),
callback((void (*)())t_callback)
{
option_type = BOOL_CALLBACK;
}
option_t::option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
void (*t_callback)(std::string))
: longform("--" + t_longform),
shortform("-" + t_shortform),
msg(std::move(t_msg)),
callback((void (*)())t_callback)
{
option_type = STRING_CALLBACK;
}
option_t::option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
std::string t_printval)
: longform("--" + t_longform),
shortform("-" + t_shortform),
msg(std::move(t_msg)),
printval(std::move(t_printval))
{
option_type = STRING;
}
/*
* Option List
*/
option_list::option_list(std::string program_name) : program_name(program_name)
option_list::option_list(std::string program_name) : d_program_name(program_name)
{
{
internal_list = std::vector<option_t>();
}
d_internal_list = std::vector<option_t>();
}
void option_list::add(const option_t &opt) { internal_list.push_back(opt); }
void option_list::parse(int argc, char **argv)
void option_list::add(const option_t& opt) { d_internal_list.push_back(opt); }
void option_list::parse(int argc, char** argv)
{
for (int arg_number = 0; arg_number < argc; ++arg_number)
{
for (std::vector<option_t>::iterator this_option = internal_list.begin();
this_option != internal_list.end();
for (std::vector<option_t>::iterator this_option = d_internal_list.begin();
this_option != d_internal_list.end();
this_option++)
{
int int_val = INT_MIN;
if (this_option->longform == std::string(argv[arg_number]) ||
this_option->shortform == std::string(argv[arg_number]))
{
if (d_present_options.count(this_option->longform) == 0)
{
d_present_options.insert(
std::pair<std::string, int>(this_option->longform, 1));
}
else
{
d_present_options[this_option->longform] += 1;
}
switch (this_option->option_type)
{
case VOID_CALLBACK:
@ -87,54 +135,94 @@ void option_list::parse(int argc, char **argv)
case INT_CALLBACK:
try
{
int int_val = std::stoi(argv[++arg_number]);
int_val = atoi(argv[++arg_number]);
((void (*)(int))this_option->callback)(int_val);
}
catch (std::exception &exc)
catch (std::exception& exc)
{
std::cout << "An int option can only receive a number\n";
std::cout << "An int option can only receive a number"
<< std::endl;
throw std::exception();
};
break;
case FLOAT_CALLBACK:
try
{
int int_val = std::stof(argv[++arg_number]);
((void (*)(float))this_option->callback)(int_val);
double double_val = atof(argv[++arg_number]);
((void (*)(float))this_option->callback)(double_val);
}
catch (std::exception &exc)
catch (std::exception& exc)
{
std::cout << "A float option can only receive a number\n";
std::cout << "A float option can only receive a number"
<< std::endl;
throw std::exception();
};
break;
case BOOL_CALLBACK:
try
{
bool int_val = (bool)std::stoi(argv[++arg_number]);
if (arg_number == (argc - 1))
{ // this is the last arg
int_val = 1;
}
else
{ // sneak a look at the next arg since it's present
char* next_arg = argv[arg_number + 1];
if ((strncmp(next_arg, "-", 1) == 0) ||
(strncmp(next_arg, "--", 2) == 0))
{
// the next arg is actually an arg, the bool is just
// present, set to true
int_val = 1;
}
else if (strncmp(next_arg, "true", 4) == 0)
{
int_val = 1;
}
else if (strncmp(next_arg, "false", 5) == 0)
{
int_val = 0;
}
else
{
// we got a number or a string.
// convert it to a number and depend on the catch to
// report an error condition
int_val = (bool)atoi(argv[++arg_number]);
}
}
}
catch (std::exception& e)
{
int_val = INT_MIN;
};
if (int_val == INT_MIN)
{
std::cout
<< "option: '" << argv[arg_number - 1]
<< "' -> received an unknown value. Boolean "
"options should receive one of '0', '1', 'true', 'false'."
<< std::endl;
throw std::exception();
}
else if (int_val)
{
((void (*)(bool))this_option->callback)(int_val);
}
catch (std::exception &exc)
{
std::cout << "A bool option can only receive 0 or 1\n";
throw std::exception();
};
break;
case STRING_CALLBACK:
try
{
((void (*)(std::string))this_option->callback)(argv[++arg_number]);
((void (*)(std::string))this_option->callback)(
argv[++arg_number]);
}
catch (std::exception &exc)
catch (std::exception& exc)
{
throw std::exception();
};
break;
case STRING:
std::cout << this_option->printval << '\n';
break;
default:
this_option->callback();
std::cout << this_option->printval << std::endl;
break;
}
}
@ -142,17 +230,31 @@ void option_list::parse(int argc, char **argv)
if (std::string("--help") == std::string(argv[arg_number]) ||
std::string("-h") == std::string(argv[arg_number]))
{
d_present_options.insert(std::pair<std::string, int>("--help", 1));
help();
}
}
}
bool option_list::present(std::string option_name)
{
if (d_present_options.count("--" + option_name))
{
return true;
}
else
{
return false;
}
}
void option_list::help()
{
std::cout << program_name << '\n';
std::cout << " -h [ --help ] \t\tDisplay this help message\n";
for (std::vector<option_t>::iterator this_option = internal_list.begin();
this_option != internal_list.end();
std::cout << d_program_name << std::endl;
std::cout << " -h [ --help ] \t\tdisplay this help message" << std::endl;
for (std::vector<option_t>::iterator this_option = d_internal_list.begin();
this_option != d_internal_list.end();
this_option++)
{
std::string help_line(" ");
@ -165,24 +267,11 @@ void option_list::help()
help_line += this_option->shortform + " [ " + this_option->longform + " ]";
}
switch (help_line.size() / 8)
while (help_line.size() < 32)
{
case 0:
help_line += "\t\t\t\t";
break;
case 1:
help_line += "\t\t\t";
break;
case 2:
help_line += "\t\t";
break;
case 3:
help_line += "\t";
break;
default:
break;
help_line += " ";
}
help_line += this_option->msg;
std::cout << help_line << '\n';
std::cout << help_line << std::endl;
}
}

View File

@ -29,12 +29,30 @@ typedef enum
class option_t
{
public:
option_t(std::string longform, std::string shortform, std::string msg, void (*callback)());
option_t(std::string longform, std::string shortform, std::string msg, void (*callback)(int));
option_t(std::string longform, std::string shortform, std::string msg, void (*callback)(float));
option_t(std::string longform, std::string shortform, std::string msg, void (*callback)(bool));
option_t(std::string longform, std::string shortform, std::string msg, void (*callback)(std::string));
option_t(std::string longform, std::string shortform, std::string msg, std::string printval);
option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
void (*t_callback)());
option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
void (*t_callback)(int));
option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
void (*t_callback)(float));
option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
void (*t_callback)(bool));
option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
void (*t_callback)(std::string));
option_t(std::string t_longform,
std::string t_shortform,
std::string t_msg,
std::string t_printval);
std::string longform;
std::string shortform;
@ -48,6 +66,7 @@ class option_list
{
public:
explicit option_list(std::string program_name);
bool present(std::string option_name);
void add(const option_t &opt);
@ -56,8 +75,9 @@ public:
void help();
private:
std::string program_name;
std::vector<option_t> internal_list;
std::string d_program_name;
std::vector<option_t> d_internal_list;
std::map<std::string, int> d_present_options;
};

View File

@ -47,7 +47,7 @@ void set_benchmark(bool val) { test_params.set_benchmark(val); }
void set_tolerance(float val) { test_params.set_tol(val); }
void set_vlen(int val) { test_params.set_vlen((unsigned int)val); }
void set_iter(int val) { test_params.set_iter((unsigned int)val); }
void set_substr(std::string val) { test_params.set_regex(val); }
void set_substr(std::string val) { test_params.set_regex(std::move(val)); }
bool update_mode = false;
void set_update(bool val) { update_mode = val; }
bool dry_run = false;
@ -81,8 +81,7 @@ int main(int argc, char *argv[])
for (int arg_number = 0; arg_number < argc; ++arg_number)
{
if (std::string("--help") == std::string(argv[arg_number]) ||
std::string("-h") == std::string(argv[arg_number]))
if (profile_options.present("help"))
{
return 0;
}
@ -169,7 +168,7 @@ int main(int argc, char *argv[])
if (!dry_run)
{
if (config_file != "")
write_results(&results, false, config_file);
write_results(&results, false, std::move(config_file));
else
write_results(&results, false);
}
@ -232,7 +231,7 @@ void read_results(std::vector<volk_gnsssdr_test_results_t> *results, std::string
if (single_kernel_result.size() == 3)
{
volk_gnsssdr_test_results_t kernel_result;
volk_gnsssdr_test_results_t kernel_result{};
kernel_result.name = std::string(single_kernel_result[0]);
kernel_result.config_name = std::string(single_kernel_result[0]);
kernel_result.best_arch_u = std::string(single_kernel_result[1]);

View File

@ -253,9 +253,9 @@ endif()
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C++ compiler during Address Sanitized builds." FORCE)
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C compiler during Address Sanitized builds." FORCE)
mark_as_advanced(
CMAKE_CXX_FLAGS_ASAN

View File

@ -22,7 +22,6 @@
#include <random> // for random_device, default_random_engine, uniform_real_distribution
#include <vector> // for vector
template <typename T>
void random_values(T *buf, unsigned int n, std::default_random_engine &e1)
{
@ -946,14 +945,14 @@ bool run_volk_gnsssdr_tests(volk_gnsssdr_func_desc_t desc,
if (puppet_master_name == "NULL")
{
results->back().config_name = name;
results->back().config_name = std::move(name);
}
else
{
results->back().config_name = puppet_master_name;
results->back().config_name = std::move(puppet_master_name);
}
results->back().best_arch_a = best_arch_a;
results->back().best_arch_u = best_arch_u;
results->back().best_arch_a = std::move(best_arch_a);
results->back().best_arch_u = std::move(best_arch_u);
return fail_global;
}

View File

@ -19,6 +19,7 @@
#include <cstdlib> // for NULL
#include <map> // for map
#include <string> // for string, basic_string
#include <utility> // for move
#include <vector> // for vector
@ -69,14 +70,14 @@ private:
public:
// ctor
volk_gnsssdr_test_params_t(float tol, lv_32fc_t scalar, unsigned int vlen, unsigned int iter,
bool benchmark_mode, std::string kernel_regex) : _tol(tol), _scalar(scalar), _vlen(vlen), _iter(iter), _benchmark_mode(benchmark_mode), _kernel_regex(kernel_regex){};
bool benchmark_mode, std::string kernel_regex) : _tol(tol), _scalar(scalar), _vlen(vlen), _iter(iter), _benchmark_mode(benchmark_mode), _kernel_regex(std::move(kernel_regex)){};
// setters
void set_tol(float tol) { _tol = tol; };
void set_scalar(lv_32fc_t scalar) { _scalar = scalar; };
void set_vlen(unsigned int vlen) { _vlen = vlen; };
void set_iter(unsigned int iter) { _iter = iter; };
void set_benchmark(bool benchmark) { _benchmark_mode = benchmark; };
void set_regex(std::string regex) { _kernel_regex = regex; };
void set_regex(std::string regex) { _kernel_regex = std::move(regex); };
// getters
float tol() { return _tol; };
lv_32fc_t scalar() { return _scalar; };
@ -103,10 +104,10 @@ public:
volk_gnsssdr_test_params_t test_parameters() { return _test_parameters; };
// normal ctor
volk_gnsssdr_test_case_t(volk_gnsssdr_func_desc_t desc, void (*kernel_ptr)(), std::string name,
volk_gnsssdr_test_params_t test_parameters) : _desc(desc), _kernel_ptr(kernel_ptr), _name(name), _test_parameters(test_parameters), _puppet_master_name("NULL"){};
volk_gnsssdr_test_params_t test_parameters) : _desc(desc), _kernel_ptr(kernel_ptr), _name(std::move(name)), _test_parameters(std::move(test_parameters)), _puppet_master_name("NULL"){};
// ctor for puppets
volk_gnsssdr_test_case_t(volk_gnsssdr_func_desc_t desc, void (*kernel_ptr)(), std::string name,
std::string puppet_master_name, volk_gnsssdr_test_params_t test_parameters) : _desc(desc), _kernel_ptr(kernel_ptr), _name(name), _test_parameters(test_parameters), _puppet_master_name(puppet_master_name){};
std::string puppet_master_name, volk_gnsssdr_test_params_t test_parameters) : _desc(desc), _kernel_ptr(kernel_ptr), _name(std::move(name)), _test_parameters(std::move(test_parameters)), _puppet_master_name(std::move(puppet_master_name)){};
};
/************************************************

View File

@ -33,8 +33,8 @@ int main(int argc, char* argv[])
std::string def_kernel_regex = "";
volk_gnsssdr_test_params_t test_params(def_tol, def_scalar, def_vlen, def_iter,
def_benchmark_mode, def_kernel_regex);
std::vector<volk_gnsssdr_test_case_t> test_cases = init_test_list(test_params);
def_benchmark_mode, std::move(def_kernel_regex));
std::vector<volk_gnsssdr_test_case_t> test_cases = init_test_list(std::move(test_params));
std::vector<volk_gnsssdr_test_results_t> results;
if (argc > 1)
{
@ -94,7 +94,7 @@ int main(int argc, char* argv[])
}
// Generate XML results
print_qa_xml(results, qa_failures.size());
print_qa_xml(std::move(results), qa_failures.size());
// Summarize QA results
std::cerr << "Kernel QA finished: " << qa_failures.size() << " failures out of "

View File

@ -113,7 +113,7 @@ hybrid_observables_gs::hybrid_observables_gs(const Obs_Conf &conf_)
{
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
d_dump_filename = dump_filename_;
d_dump_filename = std::move(dump_filename_);
}
else
{
@ -768,7 +768,7 @@ int hybrid_observables_gs::general_work(int noutput_items __attribute__((unused)
{
n_valid++;
}
epoch_data[n] = interpolated_gnss_synchro;
epoch_data[n] = std::move(interpolated_gnss_synchro);
}
if (d_T_rx_TOW_set)
{

View File

@ -171,7 +171,7 @@ void FileSourceBase::connect(gr::top_block_sptr top_block)
// VALVE
if (valve())
{
top_block->connect(input, 0, valve(), 0);
top_block->connect(std::move(input), 0, valve(), 0);
DLOG(INFO) << "connected source to valve";
output = valve();
@ -186,11 +186,11 @@ void FileSourceBase::connect(gr::top_block_sptr top_block)
// DUMP
if (sink())
{
top_block->connect(output, 0, sink(), 0);
top_block->connect(std::move(output), 0, sink(), 0);
DLOG(INFO) << "connected output to file sink";
}
post_connect_hook(top_block);
post_connect_hook(std::move(top_block));
}
@ -219,7 +219,7 @@ void FileSourceBase::disconnect(gr::top_block_sptr top_block)
// VALVE
if (valve())
{
top_block->disconnect(input, 0, valve(), 0);
top_block->disconnect(std::move(input), 0, valve(), 0);
DLOG(INFO) << "disconnected source to valve";
output = valve();
@ -234,11 +234,11 @@ void FileSourceBase::disconnect(gr::top_block_sptr top_block)
// DUMP
if (sink())
{
top_block->disconnect(output, 0, sink(), 0);
top_block->disconnect(std::move(output), 0, sink(), 0);
DLOG(INFO) << "disconnected output to file sink";
}
post_disconnect_hook(top_block);
post_disconnect_hook(std::move(top_block));
}

View File

@ -70,7 +70,7 @@ void GenSignalSource::disconnect(gr::top_block_sptr top_block)
filter_->get_left_block(), 0);
signal_generator_->disconnect(top_block);
filter_->disconnect(top_block);
filter_->disconnect(std::move(top_block));
connected_ = false;
}

View File

@ -164,6 +164,7 @@ bool Gr_Complex_Ip_Packet_Source::start()
// open the ethernet device
if (open() == true)
{
gr::thread::scoped_lock guard(d_setlock);
// start pcap capture thread
d_pcap_thread = new boost::thread(
#if HAS_GENERIC_LAMBDA
@ -181,6 +182,7 @@ bool Gr_Complex_Ip_Packet_Source::start()
bool Gr_Complex_Ip_Packet_Source::stop()
{
std::cout << "gr_complex_ip_packet_source STOP\n";
gr::thread::scoped_lock guard(d_setlock);
if (descr != nullptr)
{
pcap_breakloop(descr);
@ -258,6 +260,7 @@ void Gr_Complex_Ip_Packet_Source::pcap_callback(__attribute__((unused)) u_char *
// eth frame parameters
// **** UDP RAW PACKET DECODER ****
gr::thread::scoped_lock guard(d_setlock);
if ((packet[12] == 0x08) & (packet[13] == 0x00)) // IP FRAME
{
// retrieve the position of the ip header
@ -298,7 +301,6 @@ void Gr_Complex_Ip_Packet_Source::pcap_callback(__attribute__((unused)) u_char *
if (aligned_write_items >= payload_length_bytes)
{
// write all in a single memcpy
gr::thread::scoped_lock guard(d_setlock);
memcpy(&fifo_buff[fifo_write_ptr], &udp_payload[0], payload_length_bytes); // size in bytes
fifo_write_ptr += payload_length_bytes;
if (fifo_write_ptr == FIFO_SIZE)
@ -310,7 +312,6 @@ void Gr_Complex_Ip_Packet_Source::pcap_callback(__attribute__((unused)) u_char *
else
{
// two step wrap write
gr::thread::scoped_lock guard(d_setlock);
memcpy(&fifo_buff[fifo_write_ptr], &udp_payload[0], aligned_write_items); // size in bytes
fifo_write_ptr = payload_length_bytes - aligned_write_items;
memcpy(&fifo_buff[0], &udp_payload[aligned_write_items], fifo_write_ptr); // size in bytes

View File

@ -36,6 +36,7 @@
#include <iomanip> // for setprecision
#include <iostream> // for cout
#include <memory> // for shared_ptr, make_shared
#include <utility> // for std::move
#define CRC_ERROR_LIMIT 8
@ -702,8 +703,8 @@ int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute_
}
}
// 3. Make the output (copy the object contents to the GNURadio reserved memory)
*out[0] = current_symbol;
// 3. Make the output (move the object contents to the GNURadio reserved memory)
*out[0] = std::move(current_symbol);
return 1;
}
return 0;

View File

@ -35,6 +35,7 @@
#include <iomanip> // for setprecision
#include <iostream> // for cout
#include <memory> // for shared_ptr, make_shared
#include <utility> // for std::move
#define CRC_ERROR_LIMIT 8
@ -726,8 +727,8 @@ int beidou_b3i_telemetry_decoder_gs::general_work(
}
}
// 3. Make the output (copy the object contents to the GNURadio reserved memory)
*out[0] = current_symbol;
// 3. Make the output (move the object contents to the GNURadio reserved memory)
*out[0] = std::move(current_symbol);
return 1;
}
return 0;

View File

@ -401,7 +401,7 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
if (page_part_bits[0] == 1)
{
// DECODE COMPLETE WORD (even + odd) and TEST CRC
d_inav_nav.split_page(page_String, d_flag_even_word_arrived);
d_inav_nav.split_page(std::move(page_String), d_flag_even_word_arrived);
if (d_inav_nav.get_flag_CRC_test() == true)
{
if (d_band == '1')
@ -429,7 +429,7 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
else
{
// STORE HALF WORD (even page)
d_inav_nav.split_page(page_String, d_flag_even_word_arrived);
d_inav_nav.split_page(std::move(page_String), d_flag_even_word_arrived);
d_flag_even_word_arrived = 1;
}
@ -867,6 +867,22 @@ void galileo_telemetry_decoder_gs::set_channel(int32_t channel)
}
void galileo_telemetry_decoder_gs::check_tlm_separation()
{
gr::thread::scoped_lock lock(d_setlock);
if (d_sent_tlm_failed_msg == false)
{
if ((d_symbol_counter - d_last_valid_preamble) > d_max_symbols_without_valid_frame)
{
const int message = 1; // bad telemetry
DLOG(INFO) << "Wrong tlm sync in sat " << this->d_satellite;
this->message_port_pub(pmt::mp("telemetry_to_trk"), pmt::make_any(message));
d_sent_tlm_failed_msg = true;
}
}
}
int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
@ -930,16 +946,7 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
d_flag_preamble = false;
// check if there is a problem with the telemetry of the current satellite
if (d_sent_tlm_failed_msg == false)
{
if ((d_symbol_counter - d_last_valid_preamble) > d_max_symbols_without_valid_frame)
{
const int message = 1; // bad telemetry
DLOG(INFO) << "sent msg sat " << this->d_satellite;
this->message_port_pub(pmt::mp("telemetry_to_trk"), pmt::make_any(message));
d_sent_tlm_failed_msg = true;
}
}
check_tlm_separation();
// ******* frame sync ******************
int32_t corr_value = 0;
@ -1413,8 +1420,8 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
LOG(WARNING) << "Exception writing navigation data dump file " << e.what();
}
}
// 3. Make the output (copy the object contents to the GNURadio reserved memory)
*out[0] = current_symbol;
// 3. Make the output (move the object contents to the GNURadio reserved memory)
*out[0] = std::move(current_symbol);
return 1;
}
return 0;

View File

@ -80,6 +80,7 @@ private:
galileo_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf, int frame_type);
void check_tlm_separation();
void msg_handler_read_galileo_tow_map(const pmt::pmt_t &msg);
void deinterleaver(int32_t rows, int32_t cols, const float *in, float *out);
void decode_INAV_word(float *page_part_symbols, int32_t frame_length, double cn0);

View File

@ -33,6 +33,7 @@
#include <iomanip> // for std::setprecision
#include <iostream> // for cout
#include <memory> // for shared_ptr, make_shared
#include <utility> // for std::move
#define CRC_ERROR_LIMIT 6
@ -525,8 +526,8 @@ int glonass_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu
}
}
// 3. Make the output (copy the object contents to the GNURadio reserved memory)
*out[0] = current_symbol;
// 3. Make the output (move the object contents to the GNURadio reserved memory)
*out[0] = std::move(current_symbol);
return 1;
}

View File

@ -33,6 +33,7 @@
#include <iomanip> // for std::setprecision
#include <iostream> // for cout
#include <memory> // for shared_ptr, make_shared
#include <utility> // for std::move
#define CRC_ERROR_LIMIT 6
@ -528,8 +529,8 @@ int glonass_l2_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu
}
}
// 3. Make the output (copy the object contents to the GNURadio reserved memory)
*out[0] = current_symbol;
// 3. Make the output (move the object contents to the GNURadio reserved memory)
*out[0] = std::move(current_symbol);
return 1;
}

View File

@ -36,6 +36,7 @@
#include <iomanip> // for setprecision
#include <iostream> // for cout
#include <memory> // for shared_ptr
#include <utility> // for std::move
#include <vector>
#ifdef COMPILER_HAS_ROTL
@ -427,40 +428,9 @@ void gps_l1_ca_telemetry_decoder_gs::reset()
}
int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
void gps_l1_ca_telemetry_decoder_gs::check_tlm_separation()
{
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
const auto **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
Gnss_Synchro current_symbol{};
// 1. Copy the current tracking output
current_symbol = in[0][0];
if (d_symbol_history.empty())
{
// Tracking synchronizes the tlm bit boundaries by acquiring the preamble
// inserting the preamble to the new tracked satellite (history empty) before the first synchronized symbol
// may speed up the tlm decoding by not discarding the first received frame
for (int32_t i = 0; i < GPS_CA_PREAMBLE_LENGTH_BITS; i++)
{
if (current_symbol.Flag_PLL_180_deg_phase_locked == true)
{
d_symbol_history.push_back(static_cast<float>(-d_preamble_samples[i]));
}
else
{
d_symbol_history.push_back(static_cast<float>(d_preamble_samples[i]));
}
d_sample_counter++;
}
}
// add new symbol to the symbol queue
d_symbol_history.push_back(current_symbol.Prompt_I);
d_sample_counter++; // count for the processed symbols
consume_each(1);
d_flag_preamble = false;
// check if there is a problem with the telemetry of the current satellite
gr::thread::scoped_lock lock(d_setlock);
if (d_stat < 2 && d_sent_tlm_failed_msg == false)
{
if ((d_sample_counter - d_last_valid_preamble) > d_max_symbols_without_valid_frame)
@ -470,8 +440,12 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
d_sent_tlm_failed_msg = true;
}
}
}
// ******* frame sync ******************
void gps_l1_ca_telemetry_decoder_gs::frame_synchronization(const Gnss_Synchro &current_gs)
{
gr::thread::scoped_lock lock(d_setlock);
switch (d_stat)
{
case 0: // no preamble information
@ -506,11 +480,10 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
}
DLOG(INFO) << "Preamble detection for GPS L1 satellite " << this->d_satellite;
d_prev_GPS_frame_4bytes = 0;
if (decode_subframe(current_symbol.CN0_dB_hz, d_flag_PLL_180_deg_phase_locked))
if (decode_subframe(current_gs.CN0_dB_hz, d_flag_PLL_180_deg_phase_locked))
{
d_CRC_error_counter = 0;
d_flag_preamble = true; // valid preamble indicator (initialized to false every work())
gr::thread::scoped_lock lock(d_setlock);
d_last_valid_preamble = d_sample_counter;
if (!d_flag_frame_sync)
{
@ -532,11 +505,10 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
// 0. fetch the symbols into an array
d_preamble_index = d_sample_counter; // record the preamble sample stamp (t_P)
if (decode_subframe(current_symbol.CN0_dB_hz, d_flag_PLL_180_deg_phase_locked))
if (decode_subframe(current_gs.CN0_dB_hz, d_flag_PLL_180_deg_phase_locked))
{
d_CRC_error_counter = 0;
d_flag_preamble = true; // valid preamble indicator (initialized to false every work())
gr::thread::scoped_lock lock(d_setlock);
d_last_valid_preamble = d_sample_counter;
if (!d_flag_frame_sync)
{
@ -562,6 +534,55 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
break;
}
}
}
bool gps_l1_ca_telemetry_decoder_gs::is_PLL_180_deg_phase_locked()
{
gr::thread::scoped_lock lock(d_setlock);
return d_flag_PLL_180_deg_phase_locked;
}
int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
const auto **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
Gnss_Synchro current_symbol{};
// 1. Copy the current tracking output
current_symbol = in[0][0];
if (d_symbol_history.empty())
{
// Tracking synchronizes the tlm bit boundaries by acquiring the preamble
// inserting the preamble to the new tracked satellite (history empty) before the first synchronized symbol
// may speed up the tlm decoding by not discarding the first received frame
for (int32_t i = 0; i < GPS_CA_PREAMBLE_LENGTH_BITS; i++)
{
if (current_symbol.Flag_PLL_180_deg_phase_locked == true)
{
d_symbol_history.push_back(static_cast<float>(-d_preamble_samples[i]));
}
else
{
d_symbol_history.push_back(static_cast<float>(d_preamble_samples[i]));
}
d_sample_counter++;
}
}
// add new symbol to the symbol queue
d_symbol_history.push_back(current_symbol.Prompt_I);
d_sample_counter++; // count for the processed symbols
consume_each(1);
d_flag_preamble = false;
// check if there is a problem with the telemetry of the current satellite
check_tlm_separation();
// frame sync
frame_synchronization(current_symbol);
// 2. Add the telemetry decoder information
if (d_flag_preamble == true)
@ -599,7 +620,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
d_nav_msg_packet.nav_message = "";
}
if (d_flag_PLL_180_deg_phase_locked == true)
if (is_PLL_180_deg_phase_locked())
{
// correct the accumulated phase for the Costas loop phase shift, if required
current_symbol.Carrier_phase_rads += GNSS_PI;
@ -659,8 +680,8 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
}
}
// 3. Make the output (copy the object contents to the GNU Radio reserved memory)
*out[0] = current_symbol;
// 3. Make the output (move the object contents to the GNU Radio reserved memory)
*out[0] = std::move(current_symbol);
return 1;
}

View File

@ -73,6 +73,9 @@ private:
gps_l1_ca_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf);
void check_tlm_separation();
void frame_synchronization(const Gnss_Synchro &current_gs);
bool is_PLL_180_deg_phase_locked();
bool gps_word_parityCheck(uint32_t gpsword);
bool decode_subframe(double cn0, bool flag_invert);

View File

@ -35,6 +35,7 @@
#include <iomanip> // for setprecision
#include <iostream> // for cout
#include <memory> // for shared_ptr, make_shared
#include <utility> // for std::move
gps_l2c_telemetry_decoder_gs_sptr
@ -368,6 +369,6 @@ int gps_l2c_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
}
// 3. Make the output (copy the object contents to the GNURadio reserved memory)
out[0] = current_synchro_data;
out[0] = std::move(current_synchro_data);
return 1;
}

View File

@ -33,6 +33,7 @@
#include <exception> // for std::exception
#include <iomanip> // for std::setprecision
#include <iostream> // for std::cout
#include <utility> // for std::move
gps_l5_telemetry_decoder_gs_sptr
gps_l5_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf)
@ -383,8 +384,8 @@ int gps_l5_telemetry_decoder_gs::general_work(int noutput_items __attribute__((u
}
}
// 3. Make the output (copy the object contents to the GNURadio reserved memory)
out[0] = current_synchro_data;
// 3. Make the output (move the object contents to the GNURadio reserved memory)
out[0] = std::move(current_synchro_data);
return 1;
}
return 0;

View File

@ -25,6 +25,7 @@
#include <cmath> // for abs
#include <exception> // for exception
#include <iomanip> // for operator<<, setw
#include <utility> // for std::move
// logging levels
#define EVENT 2 // logs important events which don't occur every block
@ -470,7 +471,7 @@ int sbas_l1_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
// UPDATE GNSS SYNCHRO DATA
// actually the SBAS telemetry decoder doesn't support ranging
current_symbol.Flag_valid_word = false; // indicate to observable block that this synchro object isn't valid for pseudorange computation
out[0] = current_symbol;
out[0] = std::move(current_symbol);
consume_each(1); // tell scheduler input items consumed
return 1; // tell scheduler output items produced
}

View File

@ -44,7 +44,7 @@ bool Tlm_CRC_Stats::set_channel(int32_t channel)
{
std::string dump_filename_ = d_dump_crc_stats_filename.substr(d_dump_crc_stats_filename.find_last_of('/') + 1);
dump_path = d_dump_crc_stats_filename.substr(0, d_dump_crc_stats_filename.find_last_of('/'));
d_dump_crc_stats_filename = dump_filename_;
d_dump_crc_stats_filename = std::move(dump_filename_);
}
else
{

View File

@ -574,7 +574,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_)
{
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
d_dump_filename = dump_filename_;
d_dump_filename = std::move(dump_filename_);
}
else
{
@ -1572,7 +1572,7 @@ int32_t dll_pll_veml_tracking::save_matfile() const
// WRITE MAT FILE
mat_t *matfp;
matvar_t *matvar;
std::string filename = dump_filename_;
std::string filename = std::move(dump_filename_);
filename.erase(filename.length() - 4, 4);
filename.append(".mat");
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
@ -2066,7 +2066,6 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
current_synchro_data.Tracking_sample_counter = this->nitems_read(0);
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
current_synchro_data.Flag_PLL_180_deg_phase_locked = d_Flag_PLL_180_deg_phase_locked;
*out[0] = current_synchro_data;
// generate new tag associated with gnss-synchro object
@ -2088,6 +2087,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
d_timetag_waiting = false;
}
*out[0] = std::move(current_synchro_data);
return 1;
}
return 0;

View File

@ -1209,7 +1209,7 @@ int32_t dll_pll_veml_tracking_fpga::save_matfile() const
// WRITE MAT FILE
mat_t *matfp;
matvar_t *matvar;
std::string filename = dump_filename_;
std::string filename = std::move(dump_filename_);
filename.erase(filename.length() - 4, 4);
filename.append(".mat");
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
@ -2015,7 +2015,7 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
current_synchro_data.Tracking_sample_counter = d_sample_counter_next; // d_sample_counter;
current_synchro_data.Flag_valid_symbol_output = !loss_of_lock;
current_synchro_data.Flag_PLL_180_deg_phase_locked = d_Flag_PLL_180_deg_phase_locked;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
return 1;
}
return 0;

View File

@ -291,7 +291,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset);
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
d_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset); // count for the processed samples
d_pull_in = false;
consume_each(samples_offset); // shift input to perform alignment with local replica
@ -438,7 +438,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
current_synchro_data.Signal[2] = '\0';
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
if (d_dump)
{

View File

@ -575,7 +575,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_cycles * TWO_PI;
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
consume_each(samples_offset); // shift input to perform alignment with local replica
return 1;
}
@ -811,7 +811,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
}
// assign the GNU Radio block output data
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
if (d_dump)
{
// MULTIPLEXED FILE RECORDING - Record results to file

View File

@ -578,7 +578,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_cycles * TWO_PI;
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
consume_each(samples_offset); // shift input to perform alignment with local replica
return 1;
}
@ -813,7 +813,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(d_correlation_length_samples);
}
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
if (d_dump)
{
// MULTIPLEXED FILE RECORDING - Record results to file

View File

@ -518,7 +518,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
current_synchro_data.fs = d_fs_in;
current_synchro_data.correlation_length_ms = 1;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
consume_each(samples_offset); // shift input to perform alignment with local replica
return 1;
}
@ -637,7 +637,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
// assign the GNU Radio block output data
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
if (d_dump)
{
// MULTIPLEXED FILE RECORDING - Record results to file

View File

@ -574,7 +574,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_cycles * TWO_PI;
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
consume_each(samples_offset); // shift input to perform alignment with local replica
return 1;
}
@ -806,7 +806,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
}
// assign the GNU Radio block output data
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
if (d_dump)
{
// MULTIPLEXED FILE RECORDING - Record results to file

View File

@ -575,7 +575,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_cycles * TWO_PI;
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
consume_each(samples_offset); // shift input to perform alignment with local replica
return 1;
}
@ -810,7 +810,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(d_correlation_length_samples);
}
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
if (d_dump)
{
// MULTIPLEXED FILE RECORDING - Record results to file

View File

@ -520,7 +520,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
current_synchro_data.fs = d_fs_in;
current_synchro_data.correlation_length_ms = 1;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
consume_each(samples_offset); // shift input to perform alignment with local replica
return 1;
}
@ -639,7 +639,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
// assign the GNU Radio block output data
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
if (d_dump)
{
// MULTIPLEXED FILE RECORDING - Record results to file

View File

@ -30,6 +30,7 @@
#include <iostream>
#include <memory>
#include <sstream>
#include <utility>
gps_l1_ca_dll_pll_tracking_gpu_cc_sptr
@ -344,7 +345,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset);
current_synchro_data.fs = d_fs_in;
current_synchro_data.correlation_length_ms = 1;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
d_sample_counter += static_cast<uint64_t>(samples_offset); // count for the processed samples
d_pull_in = false;
consume_each(samples_offset); // shift input to perform alignment with local replica
@ -479,7 +480,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
// assign the GNU Radio block output data
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
if (d_dump)
{

View File

@ -634,7 +634,7 @@ int Gps_L1_Ca_Gaussian_Tracking_cc::general_work(int noutput_items __attribute__
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
current_synchro_data.fs = d_fs_in;
current_synchro_data.correlation_length_ms = 1;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
// Kalman filter initialization reset
kf_P_x = kf_P_x_ini;
// Update Kalman states based on acquisition information
@ -811,7 +811,7 @@ int Gps_L1_Ca_Gaussian_Tracking_cc::general_work(int noutput_items __attribute__
// assign the GNU Radio block output data
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
if (d_dump)
{

View File

@ -319,7 +319,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset);
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
d_sample_counter_seconds = d_sample_counter_seconds + (static_cast<double>(samples_offset) / static_cast<double>(d_fs_in));
d_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset); // count for the processed samples
d_pull_in = false;
@ -468,7 +468,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
current_synchro_data.Signal[2] = '\0';
current_synchro_data.fs = d_fs_in;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
if (d_dump)
{

View File

@ -564,7 +564,7 @@ kf_tracking::kf_tracking(const Kf_Conf &conf_)
{
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
d_dump_filename = dump_filename_;
d_dump_filename = std::move(dump_filename_);
}
else
{
@ -911,7 +911,7 @@ void kf_tracking::update_kf_narrow_integration_time()
Qnew += d_F * d_Q * d_F.t();
d_Q = d_F * d_Q * d_F.t();
}
d_Q = Qnew;
d_Q = std::move(Qnew);
// state vector: code_phase_chips, carrier_phase_rads, carrier_freq_hz, carrier_freq_rate_hz
d_F = {{1.0, 0.0, d_beta * Ti, d_beta * TiTi / 2.0},
@ -1629,7 +1629,7 @@ int32_t kf_tracking::save_matfile() const
// WRITE MAT FILE
mat_t *matfp;
matvar_t *matvar;
std::string filename = dump_filename_;
std::string filename = std::move(dump_filename_);
filename.erase(filename.length() - 4, 4);
filename.append(".mat");
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
@ -2075,7 +2075,7 @@ int kf_tracking::general_work(int noutput_items __attribute__((unused)), gr_vect
{
current_synchro_data.fs = static_cast<int64_t>(d_trk_parameters.fs_in);
current_synchro_data.Tracking_sample_counter = d_sample_counter;
*out[0] = current_synchro_data;
*out[0] = std::move(current_synchro_data);
return 1;
}
return 0;

View File

@ -29,7 +29,7 @@
*/
#include "bayesian_estimation.h"
#include <utility>
Bayesian_estimator::Bayesian_estimator()
: kappa_prior(0),
@ -122,10 +122,10 @@ void Bayesian_estimator::update_sequential(const arma::vec& data)
Psi_est = Psi_posterior / (nu_posterior + ny + 1);
}
mu_prior = mu_posterior;
mu_prior = std::move(mu_posterior);
kappa_prior = kappa_posterior;
nu_prior = nu_posterior;
Psi_prior = Psi_posterior;
Psi_prior = std::move(Psi_posterior);
}
@ -161,10 +161,10 @@ void Bayesian_estimator::update_sequential(const arma::vec& data, const arma::ve
Psi_est = Psi_posterior / (nu_posterior + ny + 1);
}
mu_prior = mu_posterior;
mu_prior = std::move(mu_posterior);
kappa_prior = kappa_posterior;
nu_prior = nu_posterior;
Psi_prior = Psi_posterior;
Psi_prior = std::move(Psi_posterior);
}

View File

@ -27,6 +27,7 @@
*/
#include "nonlinear_tracking.h"
#include <utility>
/***************** CUBATURE KALMAN FILTER *****************/
@ -104,8 +105,8 @@ void CubatureFilter::predict_sequential(const arma::vec& x_post, const arma::mat
P_x_pred = P_x_pred / static_cast<float>(np) - x_pred * x_pred.t() + noise_covariance;
// Store predicted mean and error covariance
x_pred_out = x_pred;
P_x_pred_out = P_x_pred;
x_pred_out = std::move(x_pred);
P_x_pred_out = std::move(P_x_pred);
}
@ -270,8 +271,8 @@ void UnscentedFilter::predict_sequential(const arma::vec& x_post, const arma::ma
P_x_pred = P_x_pred + noise_covariance;
// Store predicted mean and error covariance
x_pred_out = x_pred;
P_x_pred_out = P_x_pred;
x_pred_out = std::move(x_pred);
P_x_pred_out = std::move(P_x_pred);
}

View File

@ -49,7 +49,7 @@ public:
virtual gr::basic_block_sptr get_right_block_acq() = 0;
virtual gr::basic_block_sptr get_left_block() = 0;
virtual gr::basic_block_sptr get_right_block() = 0;
virtual Gnss_Signal get_signal() const = 0;
virtual Gnss_Signal get_signal() = 0;
virtual void start_acquisition() = 0;
virtual void assist_acquisition_doppler(double Carrier_Doppler_hz) = 0;
virtual void stop_channel() = 0;

View File

@ -73,7 +73,7 @@ public:
{
observables.Clear();
std::string data;
for (auto gs : vgs)
for (const auto& gs : vgs)
{
gnss_sdr::GnssSynchro* obs = observables.add_observable();
char c = gs.System;

View File

@ -84,7 +84,7 @@ bool FileConfiguration::property(std::string property_name, bool default_value)
return overrided_->property(property_name, default_value);
}
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
@ -95,7 +95,7 @@ int64_t FileConfiguration::property(std::string property_name, int64_t default_v
return overrided_->property(property_name, default_value);
}
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
@ -106,7 +106,7 @@ uint64_t FileConfiguration::property(std::string property_name, uint64_t default
return overrided_->property(property_name, default_value);
}
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
@ -117,7 +117,7 @@ int FileConfiguration::property(std::string property_name, int default_value) co
return overrided_->property(property_name, default_value);
}
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
@ -128,7 +128,7 @@ unsigned int FileConfiguration::property(std::string property_name, unsigned int
return overrided_->property(property_name, default_value);
}
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
@ -139,7 +139,7 @@ uint16_t FileConfiguration::property(std::string property_name, uint16_t default
return overrided_->property(property_name, default_value);
}
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
@ -150,7 +150,7 @@ int16_t FileConfiguration::property(std::string property_name, int16_t default_v
return overrided_->property(property_name, default_value);
}
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
@ -161,7 +161,7 @@ float FileConfiguration::property(std::string property_name, float default_value
return overrided_->property(property_name, default_value);
}
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
@ -172,13 +172,13 @@ double FileConfiguration::property(std::string property_name, double default_val
return overrided_->property(property_name, default_value);
}
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
void FileConfiguration::set_property(std::string property_name, std::string value)
{
overrided_->set_property(property_name, value);
overrided_->set_property(std::move(property_name), std::move(value));
}

View File

@ -192,16 +192,16 @@ auto const item_prop = ".item_type"s; // "item_type" property
template <typename To, typename From>
std::unique_ptr<To> dynamic_unique_cast(std::unique_ptr<From>&& p)
{
std::unique_ptr<To> result;
if (To* cast = dynamic_cast<To*>(p.get()))
{
result.reset(cast);
std::unique_ptr<To> result(cast);
p.release(); // NOLINT(bugprone-unused-return-value)
return result;
}
return result;
return std::unique_ptr<To>(nullptr);
}
auto findRole(ConfigurationInterface const* configuration, std::string const& base, int ID) -> std::string
{
auto role = base + std::to_string(ID);

View File

@ -513,6 +513,7 @@ int GNSSFlowgraph::connect_desktop_flowgraph()
}
// Activate acquisition in enabled channels
std::lock_guard<std::mutex> lock(signal_list_mutex_);
for (int i = 0; i < channels_count_; i++)
{
LOG(INFO) << "Channel " << i << " assigned to " << channels_.at(i)->get_signal();
@ -2255,7 +2256,7 @@ void GNSSFlowgraph::set_signals_list()
if (!tmp_set.empty())
{
available_galileo_prn = tmp_set;
available_galileo_prn = std::move(tmp_set);
}
}
@ -2295,7 +2296,7 @@ void GNSSFlowgraph::set_signals_list()
if (!tmp_set.empty())
{
available_gps_prn = tmp_set;
available_gps_prn = std::move(tmp_set);
}
}
@ -2335,7 +2336,7 @@ void GNSSFlowgraph::set_signals_list()
if (!tmp_set.empty())
{
available_sbas_prn = tmp_set;
available_sbas_prn = std::move(tmp_set);
}
}
@ -2375,7 +2376,7 @@ void GNSSFlowgraph::set_signals_list()
if (!tmp_set.empty())
{
available_glonass_prn = tmp_set;
available_glonass_prn = std::move(tmp_set);
}
}
@ -2415,7 +2416,7 @@ void GNSSFlowgraph::set_signals_list()
if (!tmp_set.empty())
{
available_beidou_prn = tmp_set;
available_beidou_prn = std::move(tmp_set);
}
}

View File

@ -47,63 +47,63 @@ std::string InMemoryConfiguration::property(std::string property_name, std::stri
bool InMemoryConfiguration::property(std::string property_name, bool default_value) const
{
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
int64_t InMemoryConfiguration::property(std::string property_name, int64_t default_value) const
{
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
uint64_t InMemoryConfiguration::property(std::string property_name, uint64_t default_value) const
{
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
int32_t InMemoryConfiguration::property(std::string property_name, int32_t default_value) const
{
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
uint32_t InMemoryConfiguration::property(std::string property_name, uint32_t default_value) const
{
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
uint16_t InMemoryConfiguration::property(std::string property_name, uint16_t default_value) const
{
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
int16_t InMemoryConfiguration::property(std::string property_name, int16_t default_value) const
{
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
float InMemoryConfiguration::property(std::string property_name, float default_value) const
{
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}
double InMemoryConfiguration::property(std::string property_name, double default_value) const
{
const std::string empty;
return converter_->convert(property(property_name, empty), default_value);
return converter_->convert(property(std::move(property_name), empty), default_value);
}

Some files were not shown because too many files have changed in this diff Show More