mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-20 22:17:03 +00:00
Apply clang-tidy fix readability-non-const-parameter
This commit is contained in:
parent
27b7a93181
commit
38858dece6
@ -1,3 +1,3 @@
|
||||
---
|
||||
Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,llvm-header-guard,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-using,performance-faster-string-find,performance-inefficient-algorithm,performance-move-const-arg,performance-type-promotion-in-math-fn,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-container-size-empty,readability-named-parameter,readability-string-compare'
|
||||
Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,llvm-header-guard,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-using,performance-faster-string-find,performance-inefficient-algorithm,performance-move-const-arg,performance-type-promotion-in-math-fn,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-container-size-empty,readability-named-parameter,readability-non-const-parameter,readability-string-compare'
|
||||
HeaderFilterRegex: '.*'
|
||||
|
@ -68,7 +68,7 @@ void galileo_e1_code_gen_int(int* _dest, char _Signal[3], int32_t _prn)
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1_sinboc_11_gen_int(int* _dest, int* _prn, uint32_t _length_out)
|
||||
void galileo_e1_sinboc_11_gen_int(int* _dest, const int* _prn, uint32_t _length_out)
|
||||
{
|
||||
const uint32_t _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
auto _period = static_cast<uint32_t>(_length_out / _length_in);
|
||||
@ -86,7 +86,7 @@ void galileo_e1_sinboc_11_gen_int(int* _dest, int* _prn, uint32_t _length_out)
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1_sinboc_61_gen_int(int* _dest, int* _prn, uint32_t _length_out)
|
||||
void galileo_e1_sinboc_61_gen_int(int* _dest, const int* _prn, uint32_t _length_out)
|
||||
{
|
||||
const uint32_t _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
auto _period = static_cast<uint32_t>(_length_out / _length_in);
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
|
||||
|
||||
void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _prn, char _Signal[3])
|
||||
void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _prn, const char _Signal[3])
|
||||
{
|
||||
uint32_t prn = _prn - 1;
|
||||
uint32_t index = 0;
|
||||
|
@ -42,7 +42,7 @@
|
||||
* \brief Generates Galileo E5a code at 1 sample/chip
|
||||
* bool _pilot generates E5aQ code if true and E5aI (data signal) if false.
|
||||
*/
|
||||
void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _prn, char _Signal[3]);
|
||||
void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _prn, const char _Signal[3]);
|
||||
|
||||
void galileo_e5_a_code_gen_tiered(std::complex<float>* _dest, std::complex<float>* _primary, uint32_t _prn, char _Signal[3]);
|
||||
|
||||
|
@ -146,7 +146,7 @@ int addpeph(nav_t *nav, peph_t *peph)
|
||||
|
||||
|
||||
/* read sp3 body -------------------------------------------------------------*/
|
||||
void readsp3b(FILE *fp, char type, int *sats __attribute__((unused)), int ns, double *bfact,
|
||||
void readsp3b(FILE *fp, char type, int *sats __attribute__((unused)), int ns, const double *bfact,
|
||||
char *tsys, int index, int opt, nav_t *nav)
|
||||
{
|
||||
peph_t peph;
|
||||
|
@ -75,7 +75,7 @@ int code2sys(char code);
|
||||
int readsp3h(FILE *fp, gtime_t *time, char *type, int *sats,
|
||||
double *bfact, char *tsys);
|
||||
int addpeph(nav_t *nav, peph_t *peph);
|
||||
void readsp3b(FILE *fp, char type, int *sats, int ns, double *bfact,
|
||||
void readsp3b(FILE *fp, char type, int *sats, int ns, const double *bfact,
|
||||
char *tsys, int index, int opt, nav_t *nav);
|
||||
int cmppeph(const void *p1, const void *p2);
|
||||
void combpeph(nav_t *nav, int opt);
|
||||
|
@ -541,7 +541,7 @@ void initx_rtk(rtk_t *rtk, double xi, double var, int i)
|
||||
|
||||
|
||||
/* select common satellites between rover and reference station --------------*/
|
||||
int selsat(const obsd_t *obs, double *azel, int nu, int nr,
|
||||
int selsat(const obsd_t *obs, const double *azel, int nu, int nr,
|
||||
const prcopt_t *opt, int *sat, int *iu, int *ir)
|
||||
{
|
||||
int i, j, k = 0;
|
||||
@ -1155,7 +1155,7 @@ int zdres(int base, const obsd_t *obs, int n, const double *rs,
|
||||
|
||||
|
||||
/* test valid observation data -----------------------------------------------*/
|
||||
int validobs(int i, int j, int f, int nf, double *y)
|
||||
int validobs(int i, int j, int f, int nf, const double *y)
|
||||
{
|
||||
/* if no phase observable, psudorange is also unusable */
|
||||
return y[f + i * nf * 2] != 0.0 && y[f + j * nf * 2] != 0.0 &&
|
||||
@ -1302,7 +1302,7 @@ int test_sys(int sys, int m)
|
||||
|
||||
/* double-differenced phase/code residuals -----------------------------------*/
|
||||
int ddres(rtk_t *rtk, const nav_t *nav, double dt, const double *x,
|
||||
const double *P, const int *sat, double *y, double *e,
|
||||
const double *P, const int *sat, double *y, const double *e,
|
||||
double *azel, const int *iu, const int *ir, int ns, double *v,
|
||||
double *H, double *R, int *vflg)
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ double baseline(const double *ru, const double *rb, double *dr);
|
||||
|
||||
void initx_rtk(rtk_t *rtk, double xi, double var, int i);
|
||||
|
||||
int selsat(const obsd_t *obs, double *azel, int nu, int nr,
|
||||
int selsat(const obsd_t *obs, const double *azel, int nu, int nr,
|
||||
const prcopt_t *opt, int *sat, int *iu, int *ir);
|
||||
|
||||
void udpos(rtk_t *rtk, double tt);
|
||||
@ -144,7 +144,7 @@ int zdres(int base, const obsd_t *obs, int n, const double *rs,
|
||||
const double *rr, const prcopt_t *opt, int index, double *y,
|
||||
double *e, double *azel);
|
||||
|
||||
int validobs(int i, int j, int f, int nf, double *y);
|
||||
int validobs(int i, int j, int f, int nf, const double *y);
|
||||
|
||||
void ddcov(const int *nb, int n, const double *Ri, const double *Rj,
|
||||
int nv, double *R);
|
||||
@ -162,7 +162,7 @@ double gloicbcorr(int sat1, int sat2, const prcopt_t *opt, double lam1,
|
||||
int test_sys(int sys, int m);
|
||||
|
||||
int ddres(rtk_t *rtk, const nav_t *nav, double dt, const double *x,
|
||||
const double *P, const int *sat, double *y, double *e,
|
||||
const double *P, const int *sat, double *y, const double *e,
|
||||
double *azel, const int *iu, const int *ir, int ns, double *v,
|
||||
double *H, double *R, int *vflg);
|
||||
|
||||
|
@ -730,7 +730,7 @@ void rtksvrunlock(rtksvr_t *svr) { rtk_unlock(&svr->lock); }
|
||||
* return : status (1:ok 0:error)
|
||||
*-----------------------------------------------------------------------------*/
|
||||
int rtksvrstart(rtksvr_t *svr, int cycle, int buffsize, int *strs,
|
||||
char **paths, int *formats, int navsel, char **cmds,
|
||||
char **paths, const int *formats, int navsel, char **cmds,
|
||||
char **rcvopts, int nmeacycle, int nmeareq,
|
||||
const double *nmeapos, prcopt_t *prcopt,
|
||||
solopt_t *solopt, stream_t *moni)
|
||||
|
@ -116,7 +116,7 @@ void rtksvrlock(rtksvr_t *svr);
|
||||
void rtksvrunlock(rtksvr_t *svr);
|
||||
|
||||
int rtksvrstart(rtksvr_t *svr, int cycle, int buffsize, int *strs,
|
||||
char **paths, int *formats, int navsel, char **cmds,
|
||||
char **paths, const int *formats, int navsel, char **cmds,
|
||||
char **rcvopts, int nmeacycle, int nmeareq,
|
||||
const double *nmeapos, prcopt_t *prcopt,
|
||||
solopt_t *solopt, stream_t *moni);
|
||||
|
@ -60,7 +60,7 @@ void galileo_telemetry_decoder_cc::viterbi_decoder(double *page_part_symbols, in
|
||||
}
|
||||
|
||||
|
||||
void galileo_telemetry_decoder_cc::deinterleaver(int32_t rows, int32_t cols, double *in, double *out)
|
||||
void galileo_telemetry_decoder_cc::deinterleaver(int32_t rows, int32_t cols, const double *in, double *out)
|
||||
{
|
||||
for (int32_t r = 0; r < rows; r++)
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ private:
|
||||
|
||||
void viterbi_decoder(double *page_part_symbols, int32_t *page_part_bits);
|
||||
|
||||
void deinterleaver(int32_t rows, int32_t cols, double *in, double *out);
|
||||
void deinterleaver(int32_t rows, int32_t cols, const double *in, double *out);
|
||||
|
||||
void decode_INAV_word(double *symbols, int32_t frame_length);
|
||||
void decode_FNAV_word(double *page_symbols, int32_t frame_length);
|
||||
|
@ -124,7 +124,7 @@ glonass_l1_ca_telemetry_decoder_cc::~glonass_l1_ca_telemetry_decoder_cc()
|
||||
}
|
||||
|
||||
|
||||
void glonass_l1_ca_telemetry_decoder_cc::decode_string(double *frame_symbols, int32_t frame_length)
|
||||
void glonass_l1_ca_telemetry_decoder_cc::decode_string(const double *frame_symbols, int32_t frame_length)
|
||||
{
|
||||
double chip_acc = 0.0;
|
||||
int32_t chip_acc_counter = 0;
|
||||
|
@ -76,7 +76,7 @@ private:
|
||||
glonass_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);
|
||||
glonass_l1_ca_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);
|
||||
|
||||
void decode_string(double *symbols, int32_t frame_length);
|
||||
void decode_string(const double *symbols, int32_t frame_length);
|
||||
|
||||
//!< Help with coherent tracking
|
||||
double d_preamble_time_samples;
|
||||
|
@ -124,7 +124,7 @@ glonass_l2_ca_telemetry_decoder_cc::~glonass_l2_ca_telemetry_decoder_cc()
|
||||
}
|
||||
|
||||
|
||||
void glonass_l2_ca_telemetry_decoder_cc::decode_string(double *frame_symbols, int32_t frame_length)
|
||||
void glonass_l2_ca_telemetry_decoder_cc::decode_string(const double *frame_symbols, int32_t frame_length)
|
||||
{
|
||||
double chip_acc = 0.0;
|
||||
int32_t chip_acc_counter = 0;
|
||||
|
@ -74,7 +74,7 @@ private:
|
||||
glonass_l2_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);
|
||||
glonass_l2_ca_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);
|
||||
|
||||
void decode_string(double *symbols, int32_t frame_length);
|
||||
void decode_string(const double *symbols, int32_t frame_length);
|
||||
|
||||
//!< Help with coherent tracking
|
||||
double d_preamble_time_samples;
|
||||
|
@ -354,7 +354,7 @@ int Viterbi_Decoder::do_tb_and_decode(int traceback_length, int requested_decodi
|
||||
nn The length of the received vector
|
||||
|
||||
This function is used by siso() */
|
||||
float Viterbi_Decoder::gamma(float rec_array[], int symbol, int nn)
|
||||
float Viterbi_Decoder::gamma(const float rec_array[], int symbol, int nn)
|
||||
{
|
||||
float rm = 0;
|
||||
int i;
|
||||
|
@ -116,7 +116,7 @@ private:
|
||||
int do_tb_and_decode(int traceback_length, int requested_decoding_length, int state, int bits[], float& indicator_metric);
|
||||
|
||||
// branch metric function
|
||||
float gamma(float rec_array[], int symbol, int nn);
|
||||
float gamma(const float rec_array[], int symbol, int nn);
|
||||
|
||||
// trellis generation
|
||||
void nsc_transit(int output_p[], int trans_p[], int input, const int g[], int KK, int nn);
|
||||
|
Loading…
Reference in New Issue
Block a user