mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-06 07:20:34 +00:00
Apply and add clang-tidy ckecks readability-make-member-function-const and readability-qualified-auto
This commit is contained in:
parent
7308745f05
commit
21352a80d1
118
.clang-tidy
118
.clang-tidy
@ -106,8 +106,10 @@ Checks: '-*,
|
||||
readability-identifier-naming,
|
||||
readability-inconsistent-declaration-parameter-name,
|
||||
readability-isolate-declaration,
|
||||
readability-make-member-function-const,
|
||||
readability-named-parameter,
|
||||
readability-non-const-parameter,
|
||||
readability-qualified-auto,
|
||||
readability-redundant-control-flow,
|
||||
readability-redundant-member-init,
|
||||
readability-string-compare,
|
||||
@ -117,12 +119,28 @@ HeaderFilterRegex: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
FormatStyle: 'file'
|
||||
CheckOptions:
|
||||
- key: bugprone-argument-comment.CommentBoolLiterals
|
||||
value: '0'
|
||||
- key: bugprone-argument-comment.CommentCharacterLiterals
|
||||
value: '0'
|
||||
- key: bugprone-argument-comment.CommentFloatLiterals
|
||||
value: '0'
|
||||
- key: bugprone-argument-comment.CommentIntegerLiterals
|
||||
value: '0'
|
||||
- key: bugprone-argument-comment.CommentNullPtrs
|
||||
value: '0'
|
||||
- key: bugprone-argument-comment.CommentStringLiterals
|
||||
value: '0'
|
||||
- key: bugprone-argument-comment.CommentUserDefinedLiterals
|
||||
value: '0'
|
||||
- key: bugprone-argument-comment.IgnoreSingleArgument
|
||||
value: '0'
|
||||
- key: bugprone-argument-comment.StrictMode
|
||||
value: '0'
|
||||
- key: bugprone-assert-side-effect.AssertMacros
|
||||
value: assert
|
||||
- key: bugprone-assert-side-effect.CheckFunctionCalls
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: bugprone-dangling-handle.HandleClasses
|
||||
value: 'std::basic_string_view;std::experimental::basic_string_view'
|
||||
- key: bugprone-exception-escape.FunctionsThatShouldNotThrow
|
||||
@ -130,21 +148,21 @@ CheckOptions:
|
||||
- key: bugprone-exception-escape.IgnoredExceptions
|
||||
value: ''
|
||||
- key: bugprone-misplaced-widening-cast.CheckImplicitCasts
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfCompareToConstant
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfConstant
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfThis
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: bugprone-string-constructor.LargeLengthThreshold
|
||||
value: '8388608'
|
||||
- key: bugprone-string-constructor.WarnOnLargeLength
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: bugprone-suspicious-enum-usage.StrictMode
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: bugprone-suspicious-missing-comma.MaxConcatenatedTokens
|
||||
value: '5'
|
||||
- key: bugprone-suspicious-missing-comma.RatioThreshold
|
||||
@ -154,21 +172,31 @@ CheckOptions:
|
||||
- key: bugprone-suspicious-string-compare.StringCompareLikeFunctions
|
||||
value: ''
|
||||
- key: bugprone-suspicious-string-compare.WarnOnImplicitComparison
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: bugprone-too-small-loop-variable.MagnitudeBitsUpperLimit
|
||||
value: '16'
|
||||
- key: bugprone-unused-return-value.CheckedFunctions
|
||||
value: '::std::async;::std::launder;::std::remove;::std::remove_if;::std::unique;::std::unique_ptr::release;::std::basic_string::empty;::std::vector::empty'
|
||||
- key: cert-dcl16-c.NewSuffixes
|
||||
value: 'L;LL;LU;LLU'
|
||||
- key: cert-msc51-cpp.DisallowedSeedTypes
|
||||
value: 'time_t,std::time_t'
|
||||
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
|
||||
value: '0'
|
||||
- key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons
|
||||
value: '0'
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
|
||||
value: '1'
|
||||
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
|
||||
value: '1'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctionsWhenCopyIsDeleted
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: google-build-namespaces.HeaderFileExtensions
|
||||
value: ',h'
|
||||
- key: google-global-names-in-headers.HeaderFileExtensions
|
||||
@ -187,8 +215,20 @@ CheckOptions:
|
||||
value: _t
|
||||
- key: google-runtime-int.UnsignedTypePrefix
|
||||
value: uint
|
||||
- key: llvm-else-after-return.WarnOnConditionVariables
|
||||
value: '0'
|
||||
- key: llvm-else-after-return.WarnOnUnfixable
|
||||
value: '0'
|
||||
- key: llvm-qualified-auto.AddConstToQualified
|
||||
value: '0'
|
||||
- key: misc-throw-by-value-catch-by-reference.CheckThrowTemporaries
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: misc-throw-by-value-catch-by-reference.MaxSize
|
||||
value: '-1'
|
||||
- key: misc-throw-by-value-catch-by-reference.WarnOnLargeObjects
|
||||
value: 'false'
|
||||
- key: modernize-avoid-bind.PermissiveParameterList
|
||||
value: 'false'
|
||||
- key: modernize-loop-convert.MaxCopySize
|
||||
value: '16'
|
||||
- key: modernize-loop-convert.MinConfidence
|
||||
@ -197,20 +237,26 @@ CheckOptions:
|
||||
value: CamelCase
|
||||
- key: modernize-pass-by-value.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-raw-string-literal.DelimiterStem
|
||||
value: lit
|
||||
- key: modernize-raw-string-literal.ReplaceShorterLiterals
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: modernize-replace-auto-ptr.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-auto.MinTypeNameLength
|
||||
value: '5'
|
||||
- key: modernize-use-auto.RemoveStars
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: modernize-use-bool-literals.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: modernize-use-default-member-init.IgnoreMacros
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: modernize-use-default-member-init.UseAssignment
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: modernize-use-emplace.ContainersWithPushBack
|
||||
value: '::std::vector;::std::list;::std::deque'
|
||||
- key: modernize-use-emplace.IgnoreImplicitConstructors
|
||||
value: 'false'
|
||||
- key: modernize-use-emplace.SmartPointers
|
||||
value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
|
||||
- key: modernize-use-emplace.TupleMakeFunctions
|
||||
@ -218,27 +264,37 @@ CheckOptions:
|
||||
- key: modernize-use-emplace.TupleTypes
|
||||
value: '::std::pair;::std::tuple'
|
||||
- key: modernize-use-equals-default.IgnoreMacros
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: modernize-use-equals-delete.IgnoreMacros
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: modernize-use-noexcept.ReplacementString
|
||||
value: ''
|
||||
- key: modernize-use-noexcept.UseNoexceptFalse
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: modernize-use-nullptr.NullMacros
|
||||
value: 'NULL'
|
||||
- key: modernize-use-override.AllowOverrideAndFinal
|
||||
value: 'false'
|
||||
- key: modernize-use-override.FinalSpelling
|
||||
value: final
|
||||
- key: modernize-use-override.IgnoreDestructors
|
||||
value: 'false'
|
||||
- key: modernize-use-override.OverrideSpelling
|
||||
value: override
|
||||
- key: performance-faster-string-find.StringLikeClasses
|
||||
value: 'std::basic_string'
|
||||
- key: performance-for-range-copy.AllowedTypes
|
||||
value: ''
|
||||
- key: performance-for-range-copy.WarnOnAllAutoCopies
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: performance-inefficient-string-concatenation.StrictMode
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: performance-inefficient-vector-operation.EnableProto
|
||||
value: 'false'
|
||||
- key: performance-inefficient-vector-operation.VectorLikeClasses
|
||||
value: '::std::vector'
|
||||
- key: performance-move-const-arg.CheckTriviallyCopyableMove
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: performance-move-constructor-init.IncludeStyle
|
||||
value: llvm
|
||||
- key: performance-type-promotion-in-math-fn.IncludeStyle
|
||||
@ -257,6 +313,8 @@ CheckOptions:
|
||||
value: ''
|
||||
- key: readability-identifier-naming.AbstractClassSuffix
|
||||
value: ''
|
||||
- key: readability-identifier-naming.AggressiveDependentMemberLookup
|
||||
value: 'false'
|
||||
- key: readability-identifier-naming.ClassCase
|
||||
value: Camel_Snake_Case
|
||||
- key: readability-identifier-naming.ClassPrefix
|
||||
@ -270,7 +328,9 @@ CheckOptions:
|
||||
- key: readability-identifier-naming.GlobalConstantSuffix
|
||||
value: ''
|
||||
- key: readability-identifier-naming.IgnoreFailedSplit
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: readability-identifier-naming.IgnoreMainLikeFunctions
|
||||
value: 'false'
|
||||
- key: readability-identifier-naming.StructCase
|
||||
value: aNy_CasE
|
||||
- key: readability-identifier-naming.StructPrefix
|
||||
@ -278,11 +338,15 @@ CheckOptions:
|
||||
- key: readability-identifier-naming.StructSuffix
|
||||
value: ''
|
||||
- key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: readability-inconsistent-declaration-parameter-name.Strict
|
||||
value: '0'
|
||||
value: 'false'
|
||||
- key: readability-qualified-auto.AddConstToQualified
|
||||
value: 'true'
|
||||
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
|
||||
value: 'false'
|
||||
- key: readability-uppercase-literal-suffix.IgnoreMacros
|
||||
value: '1'
|
||||
value: 'true'
|
||||
- key: readability-uppercase-literal-suffix.NewSuffixes
|
||||
value: ''
|
||||
...
|
||||
|
@ -366,7 +366,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(d_xml_base_path))
|
||||
for (const auto& folder : fs::path(d_xml_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
@ -1506,7 +1506,7 @@ void rtklib_pvt_gs::clear_ephemeris()
|
||||
}
|
||||
|
||||
|
||||
bool rtklib_pvt_gs::send_sys_v_ttff_msg(d_ttff_msgbuf ttff)
|
||||
bool rtklib_pvt_gs::send_sys_v_ttff_msg(d_ttff_msgbuf ttff) const
|
||||
{
|
||||
if (d_sysv_msqid != -1)
|
||||
{
|
||||
@ -2162,7 +2162,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
}
|
||||
std::streamsize ss = std::cout.precision(); // save current precision
|
||||
std::cout.setf(std::ios::fixed, std::ios::floatfield);
|
||||
auto facet = new boost::posix_time::time_facet("%Y-%b-%d %H:%M:%S.%f %z");
|
||||
auto *facet = new boost::posix_time::time_facet("%Y-%b-%d %H:%M:%S.%f %z");
|
||||
std::cout.imbue(std::locale(std::cout.getloc(), facet));
|
||||
std::cout
|
||||
<< TEXT_BOLD_GREEN
|
||||
|
@ -153,7 +153,7 @@ private:
|
||||
long mtype; // NOLINT(google-runtime-int) required by SysV queue messaging
|
||||
double ttff;
|
||||
} d_ttff_msgbuf;
|
||||
bool send_sys_v_ttff_msg(d_ttff_msgbuf ttff);
|
||||
bool send_sys_v_ttff_msg(d_ttff_msgbuf ttff) const;
|
||||
|
||||
bool save_gnss_synchro_map_xml(const std::string& file_name); // debug helper function
|
||||
bool load_gnss_synchro_map_xml(const std::string& file_name); // debug helper function
|
||||
|
@ -56,7 +56,7 @@ GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path)
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(geojson_base_path))
|
||||
for (const auto& folder : fs::path(geojson_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
|
@ -58,7 +58,7 @@ Gpx_Printer::Gpx_Printer(const std::string& base_path)
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(gpx_base_path))
|
||||
for (const auto& folder : fs::path(gpx_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
|
@ -60,7 +60,7 @@ Kml_Printer::Kml_Printer(const std::string& base_path)
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(kml_base_path))
|
||||
for (const auto& folder : fs::path(kml_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
|
@ -64,7 +64,7 @@ Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_fi
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(nmea_base_path))
|
||||
for (const auto& folder : fs::path(nmea_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
@ -198,7 +198,7 @@ int Nmea_Printer::init_serial(const std::string& serial_device)
|
||||
}
|
||||
|
||||
|
||||
void Nmea_Printer::close_serial()
|
||||
void Nmea_Printer::close_serial() const
|
||||
{
|
||||
if (nmea_dev_descriptor != -1)
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
|
||||
private:
|
||||
int init_serial(const std::string& serial_device); // serial port control
|
||||
void close_serial();
|
||||
void close_serial() const;
|
||||
std::string get_GPGGA() const; // fix data
|
||||
std::string get_GPGSV() const; // satellite data
|
||||
std::string get_GPGSA() const; // overall satellite reception data
|
||||
|
@ -87,7 +87,7 @@ Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path,
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(base_rinex_path))
|
||||
for (const auto& folder : fs::path(base_rinex_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
|
@ -1590,7 +1590,7 @@ std::string Rtcm::print_MT1019(const Gps_Ephemeris& gps_eph)
|
||||
}
|
||||
|
||||
|
||||
int32_t Rtcm::read_MT1019(const std::string& message, Gps_Ephemeris& gps_eph)
|
||||
int32_t Rtcm::read_MT1019(const std::string& message, Gps_Ephemeris& gps_eph) const
|
||||
{
|
||||
// Convert message to binary
|
||||
const std::string message_bin = Rtcm::binary_data_to_bin(message);
|
||||
@ -1821,7 +1821,7 @@ std::string Rtcm::print_MT1020(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, c
|
||||
}
|
||||
|
||||
|
||||
int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& glonass_gnav_eph, Glonass_Gnav_Utc_Model& glonass_gnav_utc_model)
|
||||
int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& glonass_gnav_eph, Glonass_Gnav_Utc_Model& glonass_gnav_utc_model) const
|
||||
{
|
||||
// Convert message to binary
|
||||
const std::string message_bin = Rtcm::binary_data_to_bin(message);
|
||||
@ -2127,7 +2127,7 @@ std::string Rtcm::print_MT1045(const Galileo_Ephemeris& gal_eph)
|
||||
}
|
||||
|
||||
|
||||
int32_t Rtcm::read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph)
|
||||
int32_t Rtcm::read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph) const
|
||||
{
|
||||
// Convert message to binary
|
||||
const std::string message_bin = Rtcm::binary_data_to_bin(message);
|
||||
|
@ -188,7 +188,7 @@ public:
|
||||
/*!
|
||||
* \brief Verifies and reads messages of type 1019 (GPS Ephemeris). Returns 1 if anything goes wrong, 0 otherwise.
|
||||
*/
|
||||
int32_t read_MT1019(const std::string& message, Gps_Ephemeris& gps_eph);
|
||||
int32_t read_MT1019(const std::string& message, Gps_Ephemeris& gps_eph) const;
|
||||
|
||||
/*!
|
||||
* \brief Prints message type 1020 (GLONASS Ephemeris).
|
||||
@ -207,7 +207,7 @@ public:
|
||||
* \param glonass_gnav_utc_model GLONASS GNAV Clock Information
|
||||
* \return Returns 1 if anything goes wrong, 0 otherwise.
|
||||
*/
|
||||
int32_t read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& glonass_gnav_eph, Glonass_Gnav_Utc_Model& glonass_gnav_utc_model);
|
||||
int32_t read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& glonass_gnav_eph, Glonass_Gnav_Utc_Model& glonass_gnav_utc_model) const;
|
||||
|
||||
/*!
|
||||
* \brief Prints message type 1029 (Unicode Text String)
|
||||
@ -222,7 +222,7 @@ public:
|
||||
/*!
|
||||
* \brief Verifies and reads messages of type 1045 (Galileo Ephemeris). Returns 1 if anything goes wrong, 0 otherwise.
|
||||
*/
|
||||
int32_t read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph);
|
||||
int32_t read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph) const;
|
||||
|
||||
/*!
|
||||
* \brief Prints messages of type MSM1 (Compact GNSS observables)
|
||||
|
@ -71,7 +71,7 @@ Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump
|
||||
if (!fs::exists(p))
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(rtcm_base_path))
|
||||
for (const auto& folder : fs::path(rtcm_base_path))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
@ -1651,7 +1651,7 @@ int Rtcm_Printer::init_serial(const std::string& serial_device)
|
||||
}
|
||||
|
||||
|
||||
void Rtcm_Printer::close_serial()
|
||||
void Rtcm_Printer::close_serial() const
|
||||
{
|
||||
if (rtcm_dev_descriptor != -1)
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ private:
|
||||
bool more_messages);
|
||||
|
||||
int32_t init_serial(const std::string& serial_device); // serial port control
|
||||
void close_serial();
|
||||
void close_serial() const;
|
||||
bool Print_Message(const std::string& message);
|
||||
|
||||
std::unique_ptr<Rtcm> rtcm;
|
||||
|
@ -235,7 +235,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::reset()
|
||||
}
|
||||
|
||||
|
||||
float GalileoE1Pcps8msAmbiguousAcquisition::calculate_threshold(float pfa)
|
||||
float GalileoE1Pcps8msAmbiguousAcquisition::calculate_threshold(float pfa) const
|
||||
{
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += static_cast<int>(doppler_step_))
|
||||
|
@ -142,7 +142,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
float calculate_threshold(float pfa);
|
||||
float calculate_threshold(float pfa) const;
|
||||
|
||||
const ConfigurationInterface* configuration_;
|
||||
galileo_pcps_8ms_acquisition_cc_sptr acquisition_cc_;
|
||||
|
@ -279,7 +279,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_state(int state)
|
||||
}
|
||||
|
||||
|
||||
float GalileoE1PcpsQuickSyncAmbiguousAcquisition::calculate_threshold(float pfa)
|
||||
float GalileoE1PcpsQuickSyncAmbiguousAcquisition::calculate_threshold(float pfa) const
|
||||
{
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += static_cast<int>(doppler_step_))
|
||||
|
@ -144,7 +144,7 @@ public:
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
float calculate_threshold(float pfa);
|
||||
float calculate_threshold(float pfa) const;
|
||||
|
||||
const ConfigurationInterface* configuration_;
|
||||
pcps_quicksync_acquisition_cc_sptr acquisition_cc_;
|
||||
|
@ -245,7 +245,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_state(int state)
|
||||
}
|
||||
|
||||
|
||||
float GalileoE1PcpsTongAmbiguousAcquisition::calculate_threshold(float pfa)
|
||||
float GalileoE1PcpsTongAmbiguousAcquisition::calculate_threshold(float pfa) const
|
||||
{
|
||||
unsigned int frequency_bins = 0;
|
||||
for (int doppler = static_cast<int>(-doppler_max_); doppler <= static_cast<int>(doppler_max_); doppler += static_cast<int>(doppler_step_))
|
||||
|
@ -144,7 +144,7 @@ public:
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
float calculate_threshold(float pfa);
|
||||
float calculate_threshold(float pfa) const;
|
||||
const ConfigurationInterface* configuration_;
|
||||
pcps_tong_acquisition_cc_sptr acquisition_cc_;
|
||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||
|
@ -271,7 +271,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::reset()
|
||||
}
|
||||
|
||||
|
||||
float GalileoE5aNoncoherentIQAcquisitionCaf::calculate_threshold(float pfa)
|
||||
float GalileoE5aNoncoherentIQAcquisitionCaf::calculate_threshold(float pfa) const
|
||||
{
|
||||
// Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
|
@ -147,7 +147,7 @@ public:
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
float calculate_threshold(float pfa);
|
||||
float calculate_threshold(float pfa) const;
|
||||
|
||||
const ConfigurationInterface* configuration_;
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr acquisition_cc_;
|
||||
|
@ -261,7 +261,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_state(int state)
|
||||
}
|
||||
|
||||
|
||||
float GpsL1CaPcpsQuickSyncAcquisition::calculate_threshold(float pfa)
|
||||
float GpsL1CaPcpsQuickSyncAcquisition::calculate_threshold(float pfa) const
|
||||
{
|
||||
// Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
|
@ -147,7 +147,7 @@ public:
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
float calculate_threshold(float pfa);
|
||||
float calculate_threshold(float pfa) const;
|
||||
|
||||
const ConfigurationInterface* configuration_;
|
||||
pcps_quicksync_acquisition_cc_sptr acquisition_cc_;
|
||||
|
@ -223,7 +223,7 @@ void GpsL1CaPcpsTongAcquisition::set_state(int state)
|
||||
}
|
||||
|
||||
|
||||
float GpsL1CaPcpsTongAcquisition::calculate_threshold(float pfa)
|
||||
float GpsL1CaPcpsTongAcquisition::calculate_threshold(float pfa) const
|
||||
{
|
||||
// Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
|
@ -145,7 +145,7 @@ public:
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
float calculate_threshold(float pfa);
|
||||
float calculate_threshold(float pfa) const;
|
||||
|
||||
const ConfigurationInterface* configuration_;
|
||||
pcps_tong_acquisition_cc_sptr acquisition_cc_;
|
||||
|
@ -256,7 +256,7 @@ bool pcps_acquisition::is_fdma()
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition::update_local_carrier(own::span<gr_complex> carrier_vector, float freq)
|
||||
void pcps_acquisition::update_local_carrier(own::span<gr_complex> carrier_vector, float freq) const
|
||||
{
|
||||
float phase_step_rad;
|
||||
if (d_acq_parameters.use_automatic_resampler)
|
||||
|
@ -218,7 +218,7 @@ private:
|
||||
friend pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_);
|
||||
explicit pcps_acquisition(const Acq_Conf& conf_);
|
||||
|
||||
void update_local_carrier(own::span<gr_complex> carrier_vector, float freq);
|
||||
void update_local_carrier(own::span<gr_complex> carrier_vector, float freq) const;
|
||||
void update_grid_doppler_wipeoffs();
|
||||
void update_grid_doppler_wipeoffs_step2();
|
||||
void acquisition_core(uint64_t samp_count);
|
||||
@ -255,6 +255,7 @@ private:
|
||||
arma::fmat d_grid;
|
||||
arma::fmat d_narrow_grid;
|
||||
|
||||
std::queue<Gnss_Synchro> d_monitor_queue;
|
||||
std::string d_dump_filename;
|
||||
|
||||
int64_t d_dump_number;
|
||||
@ -287,8 +288,6 @@ private:
|
||||
bool d_step_two;
|
||||
bool d_use_CFAR_algorithm_flag;
|
||||
bool d_dump;
|
||||
|
||||
std::queue<Gnss_Synchro> d_monitor_queue;
|
||||
};
|
||||
|
||||
|
||||
|
@ -283,7 +283,7 @@ float pcps_assisted_acquisition_cc::search_maximum()
|
||||
}
|
||||
|
||||
|
||||
float pcps_assisted_acquisition_cc::estimate_input_power(gr_vector_const_void_star &input_items)
|
||||
float pcps_assisted_acquisition_cc::estimate_input_power(gr_vector_const_void_star &input_items) const
|
||||
{
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); // Get the input samples pointer
|
||||
// 1- Compute the input signal power estimation
|
||||
|
@ -191,7 +191,7 @@ private:
|
||||
int32_t doppler_offset);
|
||||
|
||||
int32_t compute_and_accumulate_grid(gr_vector_const_void_star& input_items);
|
||||
float estimate_input_power(gr_vector_const_void_star& input_items);
|
||||
float estimate_input_power(gr_vector_const_void_star& input_items) const;
|
||||
float search_maximum();
|
||||
void get_assistance();
|
||||
void reset_grid();
|
||||
|
@ -188,7 +188,7 @@ void FirFilter::init()
|
||||
// those bands, and the weight given to the error in those bands.
|
||||
const std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
|
||||
taps_.reserve(taps_d.size());
|
||||
for (auto& it : taps_d)
|
||||
for (const auto& it : taps_d)
|
||||
{
|
||||
taps_.push_back(static_cast<float>(it));
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(const ConfigurationInterface* configu
|
||||
const int grid_density = configuration->property(role_ + ".grid_density", default_grid_density);
|
||||
const std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
|
||||
taps_.reserve(taps_d.size());
|
||||
for (auto& it : taps_d)
|
||||
for (const auto& it : taps_d)
|
||||
{
|
||||
taps_.push_back(static_cast<float>(it));
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ namespace errorlib = boost::system;
|
||||
bool gnss_sdr_create_directory(const std::string& foldername)
|
||||
{
|
||||
std::string new_folder;
|
||||
for (auto& folder : fs::path(foldername))
|
||||
for (const auto& folder : fs::path(foldername))
|
||||
{
|
||||
new_folder += folder.string();
|
||||
errorlib::error_code ec;
|
||||
|
@ -304,8 +304,8 @@ void readsp3b(FILE *fp, char type, int *sats __attribute__((unused)), int ns, co
|
||||
/* compare precise ephemeris -------------------------------------------------*/
|
||||
int cmppeph(const void *p1, const void *p2)
|
||||
{
|
||||
auto *q1 = static_cast<const peph_t *>(p1);
|
||||
auto *q2 = static_cast<const peph_t *>(p2);
|
||||
const auto *q1 = static_cast<const peph_t *>(p1);
|
||||
const auto *q2 = static_cast<const peph_t *>(p2);
|
||||
double tt = timediff(q1->time, q2->time);
|
||||
return tt < -1e-9 ? -1 : (tt > 1e-9 ? 1 : q1->index - q2->index);
|
||||
}
|
||||
|
@ -3309,8 +3309,8 @@ int geterp(const erp_t *erp, gtime_t time, double *erpv)
|
||||
/* compare ephemeris ---------------------------------------------------------*/
|
||||
int cmpeph(const void *p1, const void *p2)
|
||||
{
|
||||
auto *q1 = static_cast<const eph_t *>(p1);
|
||||
auto *q2 = static_cast<const eph_t *>(p2);
|
||||
const auto *q1 = static_cast<const eph_t *>(p1);
|
||||
const auto *q2 = static_cast<const eph_t *>(p2);
|
||||
return q1->ttr.time != q2->ttr.time ? static_cast<int>(q1->ttr.time - q2->ttr.time) : (q1->toe.time != q2->toe.time ? static_cast<int>(q1->toe.time - q2->toe.time) : q1->sat - q2->sat);
|
||||
}
|
||||
|
||||
@ -3359,8 +3359,8 @@ void uniqeph(nav_t *nav)
|
||||
/* compare glonass ephemeris -------------------------------------------------*/
|
||||
int cmpgeph(const void *p1, const void *p2)
|
||||
{
|
||||
auto *q1 = static_cast<const geph_t *>(p1);
|
||||
auto *q2 = static_cast<const geph_t *>(p2);
|
||||
const auto *q1 = static_cast<const geph_t *>(p1);
|
||||
const auto *q2 = static_cast<const geph_t *>(p2);
|
||||
return q1->tof.time != q2->tof.time ? static_cast<int>(q1->tof.time - q2->tof.time) : (q1->toe.time != q2->toe.time ? static_cast<int>(q1->toe.time - q2->toe.time) : q1->sat - q2->sat);
|
||||
}
|
||||
|
||||
@ -3410,8 +3410,8 @@ void uniqgeph(nav_t *nav)
|
||||
/* compare sbas ephemeris ----------------------------------------------------*/
|
||||
int cmpseph(const void *p1, const void *p2)
|
||||
{
|
||||
auto *q1 = static_cast<const seph_t *>(p1);
|
||||
auto *q2 = static_cast<const seph_t *>(p2);
|
||||
const auto *q1 = static_cast<const seph_t *>(p1);
|
||||
const auto *q2 = static_cast<const seph_t *>(p2);
|
||||
return q1->tof.time != q2->tof.time ? static_cast<int>(q1->tof.time - q2->tof.time) : (q1->t0.time != q2->t0.time ? static_cast<int>(q1->t0.time - q2->t0.time) : q1->sat - q2->sat);
|
||||
}
|
||||
|
||||
@ -3488,8 +3488,8 @@ void uniqnav(nav_t *nav)
|
||||
/* compare observation data -------------------------------------------------*/
|
||||
int cmpobs(const void *p1, const void *p2)
|
||||
{
|
||||
auto *q1 = static_cast<const obsd_t *>(p1);
|
||||
auto *q2 = static_cast<const obsd_t *>(p2);
|
||||
const auto *q1 = static_cast<const obsd_t *>(p1);
|
||||
const auto *q2 = static_cast<const obsd_t *>(p2);
|
||||
double tt = timediff(q1->time, q2->time);
|
||||
if (fabs(tt) > DTTOL)
|
||||
{
|
||||
|
@ -730,8 +730,8 @@ void readmsgs(const char *file, int sel, gtime_t ts, gtime_t te,
|
||||
/* compare sbas messages -----------------------------------------------------*/
|
||||
int cmpmsgs(const void *p1, const void *p2)
|
||||
{
|
||||
auto *q1 = static_cast<const sbsmsg_t *>(p1);
|
||||
auto *q2 = static_cast<const sbsmsg_t *>(p2);
|
||||
const auto *q1 = static_cast<const sbsmsg_t *>(p1);
|
||||
const auto *q2 = static_cast<const sbsmsg_t *>(p2);
|
||||
return q1->week != q2->week ? q1->week - q2->week : (q1->tow < q2->tow ? -1 : (q1->tow > q2->tow ? 1 : q1->prn - q2->prn));
|
||||
}
|
||||
|
||||
|
@ -982,8 +982,8 @@ int readsoldata(FILE *fp, gtime_t ts, gtime_t te, double tint, int qflag,
|
||||
/* compare solution data -----------------------------------------------------*/
|
||||
int cmpsol(const void *p1, const void *p2)
|
||||
{
|
||||
auto *q1 = static_cast<const sol_t *>(p1);
|
||||
auto *q2 = static_cast<const sol_t *>(p2);
|
||||
const auto *q1 = static_cast<const sol_t *>(p1);
|
||||
const auto *q2 = static_cast<const sol_t *>(p2);
|
||||
double tt = timediff(q1->time, q2->time);
|
||||
return tt < -0.0 ? -1 : (tt > 0.0 ? 1 : 0);
|
||||
}
|
||||
@ -1211,8 +1211,8 @@ void freesolstatbuf(solstatbuf_t *solstatbuf)
|
||||
/* compare solution status ---------------------------------------------------*/
|
||||
int cmpsolstat(const void *p1, const void *p2)
|
||||
{
|
||||
auto *q1 = static_cast<const solstat_t *>(p1);
|
||||
auto *q2 = static_cast<const solstat_t *>(p2);
|
||||
const auto *q1 = static_cast<const solstat_t *>(p1);
|
||||
const auto *q2 = static_cast<const solstat_t *>(p2);
|
||||
double tt = timediff(q1->time, q2->time);
|
||||
return tt < -0.0 ? -1 : (tt > 0.0 ? 1 : 0);
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ void Gr_Complex_Ip_Packet_Source::demux_samples(const gr_vector_void_star &outpu
|
||||
switch (d_wire_sample_type)
|
||||
{
|
||||
case 1: // interleaved byte samples
|
||||
for (auto &output_item : output_items)
|
||||
for (const auto &output_item : output_items)
|
||||
{
|
||||
int8_t real;
|
||||
int8_t imag;
|
||||
@ -344,7 +344,7 @@ void Gr_Complex_Ip_Packet_Source::demux_samples(const gr_vector_void_star &outpu
|
||||
}
|
||||
break;
|
||||
case 2: // 4-bit samples
|
||||
for (auto &output_item : output_items)
|
||||
for (const auto &output_item : output_items)
|
||||
{
|
||||
int8_t real;
|
||||
int8_t imag;
|
||||
@ -379,7 +379,7 @@ void Gr_Complex_Ip_Packet_Source::demux_samples(const gr_vector_void_star &outpu
|
||||
}
|
||||
break;
|
||||
case 3: // interleaved float samples
|
||||
for (auto &output_item : output_items)
|
||||
for (const auto &output_item : output_items)
|
||||
{
|
||||
float real;
|
||||
float imag;
|
||||
|
@ -38,7 +38,7 @@ INIReader::INIReader(const std::string& filename)
|
||||
}
|
||||
|
||||
|
||||
int INIReader::ParseError()
|
||||
int INIReader::ParseError() const
|
||||
{
|
||||
return _error;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
explicit INIReader(const std::string& filename);
|
||||
|
||||
//! Return the result of ini_parse(), i.e., 0 on success, line number of first error on parse error, or -1 on file open error.
|
||||
int ParseError();
|
||||
int ParseError() const;
|
||||
|
||||
//! Get a string value from INI file, returning default_value if not found.
|
||||
std::string Get(const std::string& section, const std::string& name,
|
||||
|
@ -937,7 +937,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
||||
<< "UTC, assuming RX position " << LLH[0] << " [deg], " << LLH[1] << " [deg], " << LLH[2] << " [m]\n";
|
||||
|
||||
const std::map<int, Gps_Ephemeris> gps_eph_map = pvt_ptr->get_gps_ephemeris();
|
||||
for (auto &it : gps_eph_map)
|
||||
for (const auto &it : gps_eph_map)
|
||||
{
|
||||
const eph_t rtklib_eph = eph_to_rtklib(it.second, pre_2009_file_);
|
||||
std::array<double, 3> r_sat{};
|
||||
@ -962,7 +962,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
||||
}
|
||||
|
||||
const std::map<int, Galileo_Ephemeris> gal_eph_map = pvt_ptr->get_galileo_ephemeris();
|
||||
for (auto &it : gal_eph_map)
|
||||
for (const auto &it : gal_eph_map)
|
||||
{
|
||||
const eph_t rtklib_eph = eph_to_rtklib(it.second);
|
||||
std::array<double, 3> r_sat{};
|
||||
@ -987,7 +987,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
||||
}
|
||||
|
||||
const std::map<int, Gps_Almanac> gps_alm_map = pvt_ptr->get_gps_almanac();
|
||||
for (auto &it : gps_alm_map)
|
||||
for (const auto &it : gps_alm_map)
|
||||
{
|
||||
const alm_t rtklib_alm = alm_to_rtklib(it.second);
|
||||
std::array<double, 3> r_sat{};
|
||||
@ -1017,7 +1017,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
||||
}
|
||||
|
||||
const std::map<int, Galileo_Almanac> gal_alm_map = pvt_ptr->get_galileo_almanac();
|
||||
for (auto &it : gal_alm_map)
|
||||
for (const auto &it : gal_alm_map)
|
||||
{
|
||||
const alm_t rtklib_alm = alm_to_rtklib(it.second);
|
||||
std::array<double, 3> r_sat{};
|
||||
@ -1056,7 +1056,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
||||
}
|
||||
|
||||
|
||||
void ControlThread::gps_acq_assist_data_collector()
|
||||
void ControlThread::gps_acq_assist_data_collector() const
|
||||
{
|
||||
// ############ 1.bis READ EPHEMERIS/UTC_MODE/IONO QUEUE ####################
|
||||
Gps_Acq_Assist gps_acq;
|
||||
|
@ -137,7 +137,7 @@ private:
|
||||
/*
|
||||
* Blocking function that reads the GPS assistance queue
|
||||
*/
|
||||
void gps_acq_assist_data_collector();
|
||||
void gps_acq_assist_data_collector() const;
|
||||
|
||||
/*
|
||||
* Compute elevations for the specified time and position for all the available satellites in ephemeris and almanac queues
|
||||
|
@ -1463,7 +1463,7 @@ void GNSSFlowgraph::priorize_satellites(const std::vector<std::pair<int, Gnss_Sa
|
||||
{
|
||||
size_t old_size;
|
||||
Gnss_Signal gs;
|
||||
for (auto& visible_satellite : visible_satellites)
|
||||
for (const auto& visible_satellite : visible_satellites)
|
||||
{
|
||||
if (visible_satellite.second.get_system() == "GPS")
|
||||
{
|
||||
|
@ -944,7 +944,7 @@ bool Beidou_Dnav_Navigation_Message::have_new_ephemeris() // Check if we have a
|
||||
}
|
||||
|
||||
|
||||
bool Beidou_Dnav_Navigation_Message::have_new_iono()
|
||||
bool Beidou_Dnav_Navigation_Message::have_new_iono() const
|
||||
{
|
||||
// the condition on flag_utc_model is added to have a time stamp for iono
|
||||
if (flag_iono_valid == true)
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
/*!
|
||||
* \brief Returns true if new Iono model has arrived. The flag is set to false when the function is executed
|
||||
*/
|
||||
bool have_new_iono();
|
||||
bool have_new_iono() const;
|
||||
|
||||
/*!
|
||||
* \brief Returns true if new UTC model has arrived. The flag is set to false when the function is executed
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "galileo_almanac_helper.h"
|
||||
|
||||
Galileo_Almanac Galileo_Almanac_Helper::get_almanac(int i)
|
||||
Galileo_Almanac Galileo_Almanac_Helper::get_almanac(int i) const
|
||||
{
|
||||
Galileo_Almanac galileo_almanac;
|
||||
switch (i)
|
||||
|
@ -36,7 +36,7 @@ class Galileo_Almanac_Helper
|
||||
public:
|
||||
Galileo_Almanac_Helper() = default; //!< Default constructor
|
||||
|
||||
Galileo_Almanac get_almanac(int i);
|
||||
Galileo_Almanac get_almanac(int i) const;
|
||||
|
||||
// Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number
|
||||
int32_t IOD_a_7{};
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <cmath>
|
||||
|
||||
|
||||
double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int32_t WN)
|
||||
double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int32_t WN) const
|
||||
{
|
||||
double t_Utc;
|
||||
double t_Utc_daytime;
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
Galileo_Utc_Model() = default;
|
||||
|
||||
// double TOW_6;
|
||||
double GST_to_UTC_time(double t_e, int32_t WN); //!< GST-UTC Conversion Algorithm and Parameters
|
||||
double GST_to_UTC_time(double t_e, int32_t WN) const; //!< GST-UTC Conversion Algorithm and Parameters
|
||||
|
||||
// Word type 6: GST-UTC conversion parameters
|
||||
double A0_6{};
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "glonass_gnav_utc_model.h"
|
||||
|
||||
double Glonass_Gnav_Utc_Model::utc_time(double glonass_time_corrected)
|
||||
double Glonass_Gnav_Utc_Model::utc_time(double glonass_time_corrected) const
|
||||
{
|
||||
// GLONASS Time is relative to UTC Moscow, so we simply add its time difference
|
||||
double t_utc = glonass_time_corrected + 3.0 * 3600.0 + d_tau_c;
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
* \brief Computes the Coordinated Universal Time (UTC) and
|
||||
* returns it in [s] (GLONASS ICD (Edition 5.1) Section 3.3.3 GLONASS Time)
|
||||
*/
|
||||
double utc_time(double glonass_time_corrected);
|
||||
double utc_time(double glonass_time_corrected) const;
|
||||
|
||||
template <class Archive>
|
||||
/*!
|
||||
|
@ -91,7 +91,7 @@ private:
|
||||
std::string filename_rinex_obs = FLAGS_filename_rinex_obs;
|
||||
std::string filename_raw_data = FLAGS_filename_raw_data;
|
||||
|
||||
void print_results(const arma::mat& R_eb_enu);
|
||||
void print_results(const arma::mat& R_eb_enu) const;
|
||||
std::shared_ptr<InMemoryConfiguration> config;
|
||||
std::shared_ptr<FileConfiguration> config_f;
|
||||
std::string generated_kml_file;
|
||||
@ -822,7 +822,7 @@ void PositionSystemTest::check_results()
|
||||
}
|
||||
|
||||
|
||||
void PositionSystemTest::print_results(const arma::mat& R_eb_enu)
|
||||
void PositionSystemTest::print_results(const arma::mat& R_eb_enu) const
|
||||
{
|
||||
const std::string gnuplot_executable(FLAGS_gnuplot_executable);
|
||||
if (gnuplot_executable.empty())
|
||||
|
@ -140,7 +140,7 @@ protected:
|
||||
~GpsL1CaPcpsAcquisitionTest() override = default;
|
||||
|
||||
void init();
|
||||
void plot_grid();
|
||||
void plot_grid() const;
|
||||
|
||||
gr::top_block_sptr top_block;
|
||||
std::shared_ptr<InMemoryConfiguration> config;
|
||||
@ -180,7 +180,7 @@ void GpsL1CaPcpsAcquisitionTest::init()
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionTest::plot_grid()
|
||||
void GpsL1CaPcpsAcquisitionTest::plot_grid() const
|
||||
{
|
||||
// load the measured values
|
||||
std::string basename = "./tmp-acq-gps1/acquisition_G_1C";
|
||||
|
@ -39,12 +39,12 @@ class DataTypeAdapter : public ::testing::Test
|
||||
public:
|
||||
DataTypeAdapter();
|
||||
~DataTypeAdapter() override;
|
||||
int run_byte_to_short_block();
|
||||
int run_ibyte_to_cbyte_block();
|
||||
int run_ibyte_to_complex_block();
|
||||
int run_ibyte_to_cshort_block();
|
||||
int run_ishort_to_complex_block();
|
||||
int run_ishort_to_cshort_block();
|
||||
int run_byte_to_short_block() const;
|
||||
int run_ibyte_to_cbyte_block() const;
|
||||
int run_ibyte_to_complex_block() const;
|
||||
int run_ibyte_to_cshort_block() const;
|
||||
int run_ishort_to_complex_block() const;
|
||||
int run_ishort_to_cshort_block() const;
|
||||
std::string file_name_input;
|
||||
std::string file_name_output;
|
||||
std::vector<int8_t> input_data_bytes;
|
||||
@ -70,7 +70,7 @@ DataTypeAdapter::DataTypeAdapter()
|
||||
DataTypeAdapter::~DataTypeAdapter() = default;
|
||||
|
||||
|
||||
int DataTypeAdapter::run_ishort_to_cshort_block()
|
||||
int DataTypeAdapter::run_ishort_to_cshort_block() const
|
||||
{
|
||||
std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>();
|
||||
config->set_property("Test.implementation", "Ishort_To_Cshort");
|
||||
@ -98,7 +98,7 @@ int DataTypeAdapter::run_ishort_to_cshort_block()
|
||||
}
|
||||
|
||||
|
||||
int DataTypeAdapter::run_ishort_to_complex_block()
|
||||
int DataTypeAdapter::run_ishort_to_complex_block() const
|
||||
{
|
||||
std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>();
|
||||
config->set_property("Test.implementation", "Ishort_To_Complex");
|
||||
@ -126,7 +126,7 @@ int DataTypeAdapter::run_ishort_to_complex_block()
|
||||
}
|
||||
|
||||
|
||||
int DataTypeAdapter::run_ibyte_to_cshort_block()
|
||||
int DataTypeAdapter::run_ibyte_to_cshort_block() const
|
||||
{
|
||||
std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>();
|
||||
config->set_property("Test.implementation", "Ibyte_To_Cshort");
|
||||
@ -154,7 +154,7 @@ int DataTypeAdapter::run_ibyte_to_cshort_block()
|
||||
}
|
||||
|
||||
|
||||
int DataTypeAdapter::run_ibyte_to_complex_block()
|
||||
int DataTypeAdapter::run_ibyte_to_complex_block() const
|
||||
{
|
||||
std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>();
|
||||
config->set_property("Test.implementation", "Ibyte_To_Complex");
|
||||
@ -182,7 +182,7 @@ int DataTypeAdapter::run_ibyte_to_complex_block()
|
||||
}
|
||||
|
||||
|
||||
int DataTypeAdapter::run_ibyte_to_cbyte_block()
|
||||
int DataTypeAdapter::run_ibyte_to_cbyte_block() const
|
||||
{
|
||||
std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>();
|
||||
config->set_property("Test.implementation", "Ibyte_To_Cbyte");
|
||||
@ -210,7 +210,7 @@ int DataTypeAdapter::run_ibyte_to_cbyte_block()
|
||||
}
|
||||
|
||||
|
||||
int DataTypeAdapter::run_byte_to_short_block()
|
||||
int DataTypeAdapter::run_byte_to_short_block() const
|
||||
{
|
||||
std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>();
|
||||
config->set_property("Test.implementation", "Byte_To_Short");
|
||||
|
@ -137,7 +137,7 @@ std::map<int, arma::mat> ReadRinexObs(const std::string& rinex_file, char system
|
||||
std::cout << "Reading RINEX OBS file " << rinex_file << " ...\n";
|
||||
while (r_base >> r_base_data)
|
||||
{
|
||||
for (auto& prn_it : PRN_set)
|
||||
for (const auto& prn_it : PRN_set)
|
||||
{
|
||||
prn.id = prn_it;
|
||||
gpstk::CommonTime time = r_base_data.time;
|
||||
@ -1552,7 +1552,7 @@ void RINEX_doublediff(bool remove_rx_clock_error)
|
||||
std::set<int> PRN_set = available_gps_prn;
|
||||
double min_range = std::numeric_limits<double>::max();
|
||||
int reference_sat_id = 1;
|
||||
for (auto& base_prn_it : PRN_set)
|
||||
for (const auto& base_prn_it : PRN_set)
|
||||
{
|
||||
if (base_obs.find(base_prn_it) != base_obs.end() and rover_obs.find(base_prn_it) != rover_obs.end())
|
||||
{
|
||||
@ -1568,7 +1568,7 @@ void RINEX_doublediff(bool remove_rx_clock_error)
|
||||
if (base_obs.find(reference_sat_id) != base_obs.end() and rover_obs.find(reference_sat_id) != rover_obs.end())
|
||||
{
|
||||
std::cout << "Using reference satellite SV " << reference_sat_id << " with minimum range of " << min_range << " [meters]\n";
|
||||
for (auto& current_sat_id : PRN_set)
|
||||
for (const auto& current_sat_id : PRN_set)
|
||||
{
|
||||
if (current_sat_id != reference_sat_id)
|
||||
{
|
||||
@ -1668,7 +1668,7 @@ void RINEX_singlediff()
|
||||
// compute single differences
|
||||
std::set<int> PRN_set = available_gps_prn;
|
||||
std::cout << "Computing Code Pseudorange rate vs. Carrier phase rate difference...\n";
|
||||
for (auto& current_sat_id : PRN_set)
|
||||
for (const auto& current_sat_id : PRN_set)
|
||||
{
|
||||
if (rover_obs.find(current_sat_id) != rover_obs.end())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user