diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index 65230c0a1..0a0cefbd3 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -2104,17 +2104,24 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item * 30 | Galileo E1B + GLONASS L2 C/A * 31 | GPS L2C + GLONASS L2 C/A * 32 | GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a - * 50 | Beidou B1I - * 51 | Beidou B1I + GPS L1 C/A - * 52 | Beidou B1I + Galileo E1B - * 53 | Beidou B1I + GLONASS L1 C/A - * 54 | Beidou B1I + GPS L1 C/A + Galileo E1B - * 55 | Beidou B1I + GPS L1 C/A + GLONASS L1 C/A + Galileo E1B - * 56 | Beidou B1I + Beidou B3I - * 60 | Beidou B3I - * 61 | Beidou B3I + GPS L2C - * 62 | Beidou B3I + GLONASS L2 C/A - * 63 | Beidou B3I + GPS L2C + GLONASS L2 C/A + * 500 | BeiDou B1I + * 501 | BeiDou B1I + GPS L1 C/A + * 502 | BeiDou B1I + Galileo E1B + * 503 | BeiDou B1I + GLONASS L1 C/A + * 504 | BeiDou B1I + GPS L1 C/A + Galileo E1B + * 505 | BeiDou B1I + GPS L1 C/A + GLONASS L1 C/A + Galileo E1B + * 506 | BeiDou B1I + Beidou B3I + * 600 | BeiDou B3I + * 601 | BeiDou B3I + GPS L2C + * 602 | BeiDou B3I + GLONASS L2 C/A + * 603 | BeiDou B3I + GPS L2C + GLONASS L2 C/A + * 604 | BeiDou B3I + GPS L1 C/A + * 605 | BeiDou B3I + Galileo E1B + * 606 | BeiDou B3I + GLONASS L1 C/A + * 607 | BeiDou B3I + GPS L1 C/A + Galileo E1B + * 608 | BeiDou B3I + GPS L1 C/A + Galileo E1B + BeiDou B1I + * 609 | BeiDou B3I + GPS L1 C/A + Galileo E1B + GLONASS L1 C/A + * 610 | BeiDou B3I + GPS L1 C/A + Galileo E1B + GLONASS L1 C/A + BeiDou B1I */ // ####################### RINEX FILES ################# diff --git a/src/algorithms/libs/rtklib/rtklib_preceph.cc b/src/algorithms/libs/rtklib/rtklib_preceph.cc index aa67898fe..38dbab200 100644 --- a/src/algorithms/libs/rtklib/rtklib_preceph.cc +++ b/src/algorithms/libs/rtklib/rtklib_preceph.cc @@ -481,8 +481,8 @@ void readsp3(const char *file, nav_t *nav, int opt) *-----------------------------------------------------------------------------*/ int readsap(const char *file, gtime_t time, nav_t *nav) { - pcvs_t pcvs = {0, 0, (pcv_t *){nullptr}}; - pcv_t pcv0 = {0, {}, {}, {0, 0}, {0, 0}, {{}, {}}, {{}, {}}}; + pcvs_t pcvs{}; + pcv_t pcv0{}; pcv_t *pcv; int i; diff --git a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc index 63ba80c56..9c31c05de 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc @@ -479,25 +479,8 @@ void decodefile(rtksvr_t *svr, int index) { glo_fcn[i] = '0'; } - pcv_t pcvt0[MAXSAT] = {{0, {'0'}, {'0'}, {0, 0.0}, {0, 0.0}, {{0.0}, {0.0}}, {{0.0}, {0.0}}}}; - sbsfcorr_t sbsfcorr0 = {{0, 0.0}, 0.0, 0.0, 0.0, 0, 0, 0}; - sbslcorr_t sbslcorr0 = {{0, 0.0}, 0, {0.0}, {0.0}, 0.0, 0.0}; - sbssat_t sbssat0 = {0, 0, 0, {{0, sbsfcorr0, sbslcorr0}}}; - sbsigp_t sbsigp0[MAXNIGP] = {{{0, 0.0}, 0, 0, 0, 0.0}}; - sbsion_t sbsion0[MAXBAND + 1] = {{0, 0, {*sbsigp0}}}; - dgps_t dgps0[MAXSAT] = {{{0, 0.0}, 0.0, 0.0, 0, 0.0}}; - ssr_t ssr0[MAXSAT] = {{{{0, 0.0}}, {0.0}, {0}, 0, 0, 0, 0, {0.0}, {0.0}, {0.0}, 0.0, {0.0}, {0.0}, {0.0}, 0.0, 0.0, '0'}}; - lexeph_t lexeph0[MAXSAT] = {{{0, 0.0}, {0, 0.0}, 0, 0, 0, {0.0}, {0.0}, {0.0}, {0.0}, 0.0, 0.0, 0.0, {0.0}}}; - stec_t stec0[MAXSTA] = {{{0, 0.0}, 0, 0.0, 0.0, {0.0}, 0}}; - trop_t trop0[MAXSTA] = {{{0, 0.0}, {0.0}, {0.0}}}; - pppcorr_t pppcorr0 = {0, {{0}, {0}}, {{0.0}, {0.0}}, {0}, {0}, {0}, {0}, {stec0}, {trop0}}; - - nav_t nav = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, - {0, 0, (erpd_t *){nullptr}}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, {0.0}, - {0.0}, {0.0}, {0.0}, {0.0}, 0, {{0.0}, {0.0}}, {{0.0}, {0.0}}, {{{0.0}}, {{0.0}}, {{0.0}}}, - {0.0}, {0.0}, {*glo_fcn}, {*pcvt0}, sbssat0, {*sbsion0}, {*dgps0}, {*ssr0}, {*lexeph0}, - {{0, 0.0}, 0.0, {0.0}, {{0.0}, {0.0}}}, pppcorr0}; + nav_t nav{}; char file[1024]; int nb; diff --git a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc index d34b8e499..fd716a921 100644 --- a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc +++ b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc @@ -144,8 +144,7 @@ void signal_generator_c::init() } } } - std::default_random_engine e1(r()); - std::default_random_engine e2(r()); + std::uniform_int_distribution uniform_dist(0, RAND_MAX); } @@ -277,6 +276,8 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)), work_counter_++; + std::default_random_engine e1(r()); + std::default_random_engine e2(r()); unsigned int out_idx = 0; unsigned int i = 0; unsigned int k = 0; diff --git a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h index 71270a10a..44104ecc5 100644 --- a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h +++ b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h @@ -150,8 +150,6 @@ private: std::vector complex_phase_; unsigned int work_counter_{}; std::random_device r; - std::default_random_engine e1; - std::default_random_engine e2; std::uniform_int_distribution uniform_dist; std::normal_distribution normal_dist; }; diff --git a/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.cc b/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.cc index 7d6ba7a55..415899394 100644 --- a/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.cc +++ b/src/algorithms/signal_source/gnuradio_blocks/labsat23_source.cc @@ -38,6 +38,7 @@ #include #include #include +#include labsat23_source_sptr labsat23_make_source_sptr(const char *signal_file_basename, int channel_selector, std::shared_ptr> queue) @@ -428,9 +429,9 @@ int labsat23_source::general_work(int noutput_items, int n_int16_to_read = noutput_items / 8; if (n_int16_to_read > 0) { - int16_t memblock[n_int16_to_read]; - binary_input_file->read(reinterpret_cast(memblock), n_int16_to_read * 2); - n_int16_to_read = binary_input_file->gcount() / 2; //from bytes to int16 + std::vector memblock(n_int16_to_read); + binary_input_file->read(reinterpret_cast(memblock.data()), n_int16_to_read * 2); + n_int16_to_read = binary_input_file->gcount() / 2; // from bytes to int16 if (n_int16_to_read > 0) { int output_pointer = 0; @@ -486,8 +487,8 @@ int labsat23_source::general_work(int noutput_items, int n_int16_to_read = noutput_items / 4; if (n_int16_to_read > 0) { - int16_t memblock[n_int16_to_read]; - binary_input_file->read(reinterpret_cast(memblock), n_int16_to_read * 2); + std::vector memblock(n_int16_to_read); + binary_input_file->read(reinterpret_cast(memblock.data()), n_int16_to_read * 2); n_int16_to_read = binary_input_file->gcount() / 2; // from bytes to int16 if (n_int16_to_read > 0) { diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc index 38f6574a8..33e0367e5 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc @@ -72,7 +72,7 @@ TEST(CpuMulticorrelatorRealCodesTest, MeasureExecutionTime) std::chrono::duration elapsed_seconds(0); int max_threads = FLAGS_cpu_multicorrelator_real_codes_max_threads_test; std::vector thread_pool; - Cpu_Multicorrelator_Real_Codes* correlator_pool[max_threads]; + std::vector correlator_pool(max_threads); unsigned int correlation_sizes[3] = {2048, 4096, 8192}; double execution_times[3]; diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc index 545610526..f68e58ac0 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc @@ -69,7 +69,7 @@ TEST(CpuMulticorrelatorTest, MeasureExecutionTime) std::chrono::duration elapsed_seconds(0); int max_threads = FLAGS_cpu_multicorrelator_max_threads_test; std::vector thread_pool; - Cpu_Multicorrelator* correlator_pool[max_threads]; + std::vector correlator_pool(max_threads); unsigned int correlation_sizes[3] = {2048, 4096, 8192}; double execution_times[3];