From 2b65c1b5506689cd0e20b8dd7d73ceff4704ddd8 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 10 Aug 2018 21:16:10 +0200 Subject: [PATCH] Replace unsigned long int by uint64_t and long int by int64_t in tests --- .../acquisition/acq_performance_test.cc | 6 +++--- ...8ms_ambiguous_acquisition_gsoc2013_test.cc | 2 +- ...cps_ambiguous_acquisition_gsoc2013_test.cc | 2 +- ...e1_pcps_ambiguous_acquisition_gsoc_test.cc | 4 ++-- ...ileo_e1_pcps_ambiguous_acquisition_test.cc | 4 ++-- ...wsr_ambiguous_acquisition_gsoc2013_test.cc | 2 +- ...ync_ambiguous_acquisition_gsoc2014_test.cc | 2 +- ...ong_ambiguous_acquisition_gsoc2013_test.cc | 2 +- ...cps_acquisition_gsoc2014_gensource_test.cc | 2 +- ...ss_l1_ca_pcps_acquisition_gsoc2017_test.cc | 6 +++--- .../glonass_l1_ca_pcps_acquisition_test.cc | 4 ++-- .../glonass_l2_ca_pcps_acquisition_test.cc | 6 +++--- ...ps_l1_ca_pcps_acquisition_gsoc2013_test.cc | 2 +- .../gps_l1_ca_pcps_acquisition_test.cc | 4 ++-- .../gps_l1_ca_pcps_acquisition_test_fpga.cc | 2 +- ...a_pcps_opencl_acquisition_gsoc2013_test.cc | 2 +- ...cps_quicksync_acquisition_gsoc2014_test.cc | 2 +- ..._ca_pcps_tong_acquisition_gsoc2013_test.cc | 2 +- .../gps_l2_m_pcps_acquisition_test.cc | 2 +- .../libs/acquisition_dump_reader.cc | 2 +- .../libs/acquisition_dump_reader.h | 3 ++- .../libs/observables_dump_reader.cc | 4 ++-- .../libs/observables_dump_reader.h | 3 ++- .../libs/tlm_dump_reader.cc | 8 ++++---- .../libs/tlm_dump_reader.h | 5 +++-- .../libs/tracking_dump_reader.cc | 8 ++++---- .../libs/tracking_dump_reader.h | 5 +++-- .../libs/tracking_true_obs_reader.cc | 4 ++-- .../libs/tracking_true_obs_reader.h | 3 ++- .../libs/true_observables_reader.cc | 4 ++-- .../libs/true_observables_reader.h | 3 ++- .../observables/hybrid_observables_test.cc | 14 ++++++------- .../pvt/rtcm_printer_test.cc | 2 +- .../signal-processing-blocks/pvt/rtcm_test.cc | 20 +++++++++---------- .../gps_l1_ca_telemetry_decoder_test.cc | 8 ++++---- ...onass_l1_ca_dll_pll_c_aid_tracking_test.cc | 2 +- .../glonass_l1_ca_dll_pll_tracking_test.cc | 2 +- .../gps_l1_ca_dll_pll_tracking_test.cc | 12 +++++------ .../gps_l1_ca_dll_pll_tracking_test_fpga.cc | 6 +++--- .../gps_l2_m_dll_pll_tracking_test.cc | 2 +- .../tracking/tracking_pull-in_test.cc | 12 +++++------ src/utils/front-end-cal/main.cc | 2 +- 42 files changed, 98 insertions(+), 94 deletions(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc index 0852f66c3..3099d950e 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc @@ -112,7 +112,7 @@ void AcqPerfTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } @@ -876,14 +876,14 @@ TEST_F(AcquisitionPerformanceTest, ROC) true_trk_data.open_obs_file(true_trk_file); // load the true values - long int n_true_epochs = true_trk_data.num_epochs(); + int64_t n_true_epochs = true_trk_data.num_epochs(); arma::vec true_timestamp_s = arma::zeros(n_true_epochs, 1); arma::vec true_acc_carrier_phase_cycles = arma::zeros(n_true_epochs, 1); arma::vec true_Doppler_Hz = arma::zeros(n_true_epochs, 1); arma::vec true_prn_delay_chips = arma::zeros(n_true_epochs, 1); arma::vec true_tow_s = arma::zeros(n_true_epochs, 1); - long int epoch_counter = 0; + int64_t epoch_counter = 0; int num_clean_executions = 0; while (true_trk_data.read_binary_obs()) { diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_8ms_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_8ms_ambiguous_acquisition_gsoc2013_test.cc index b2784c69f..6cf6b2928 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_8ms_ambiguous_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_8ms_ambiguous_acquisition_gsoc2013_test.cc @@ -80,7 +80,7 @@ void GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx::msg_handler_events { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc index 18ef7b8dc..1e6c5c328 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc @@ -81,7 +81,7 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx::msg_handler_events(pm { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc index df03b85b7..8bf13b0a7 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc @@ -89,7 +89,7 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoCTest_msg_rx::msg_handler_events(pmt::p { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } @@ -306,7 +306,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ValidationOfResults) stop_queue(); - unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples; + uint64_t nsamples = gnss_synchro.Acq_samplestamp_samples; std::cout << "Acquired " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl; EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 0=ACQ STOP."; diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc index 49ddff306..6d56fd5ad 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc @@ -83,7 +83,7 @@ void GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx::msg_handler_events(pmt::pmt_t { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast& e) @@ -339,7 +339,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ValidationOfResults) elapsed_seconds = end - start; }) << "Failure running the top_block."; - unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples; + uint64_t nsamples = gnss_synchro.Acq_samplestamp_samples; std::cout << "Acquired " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl; ASSERT_EQ(1, msg_rx->rx_message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS."; diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc index a2489cfe1..25cbe9854 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc @@ -81,7 +81,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx::msg_handler_events(pmt: { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc index a8177c1a6..a52ce784f 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc @@ -89,7 +89,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx::msg_handler_ { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc index 326b44f48..531823eea 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc @@ -83,7 +83,7 @@ void GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx::msg_handler_event { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc index 2423257b6..741bb0d7e 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc @@ -80,7 +80,7 @@ void GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx::msg_handler_events(p { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc index e5a588cff..425c085bc 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc @@ -85,7 +85,7 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test_msg_rx::msg_handler_events(pmt::pmt_ { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } @@ -359,8 +359,8 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::start_queue() void GlonassL1CaPcpsAcquisitionGSoC2017Test::wait_message() { struct timeval tv; - long long int begin = 0; - long long int end = 0; + int64_t begin = 0; + int64_t end = 0; while (!stop) { diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc index 928bef457..9c6574d6e 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc @@ -80,7 +80,7 @@ void GlonassL1CaPcpsAcquisitionTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast& e) @@ -269,7 +269,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ValidationOfResults) elapsed_seconds = end - begin; }) << "Failure running the top_block."; - unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples; + uint64_t nsamples = gnss_synchro.Acq_samplestamp_samples; std::cout << "Acquired " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl; ASSERT_EQ(1, msg_rx->rx_message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS."; diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l2_ca_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l2_ca_pcps_acquisition_test.cc index c02f40558..d59e7992e 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l2_ca_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l2_ca_pcps_acquisition_test.cc @@ -84,7 +84,7 @@ void GlonassL2CaPcpsAcquisitionTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } @@ -354,8 +354,8 @@ void GlonassL2CaPcpsAcquisitionTest::start_queue() void GlonassL2CaPcpsAcquisitionTest::wait_message() { struct timeval tv; - long long int begin = 0; - long long int end = 0; + int64_t begin = 0; + int64_t end = 0; while (!stop) { diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc index 419538dcd..e323a9ad5 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc @@ -85,7 +85,7 @@ void GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx::msg_handler_events(pmt::pmt_t ms { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc index caae8882e..d5bfafeac 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc @@ -84,7 +84,7 @@ void GpsL1CaPcpsAcquisitionTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast &e) @@ -340,7 +340,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTest, ValidationOfResults) elapsed_seconds = end - start; }) << "Failure running the top_block."; - unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples; + uint64_t nsamples = gnss_synchro.Acq_samplestamp_samples; std::cout << "Acquired " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl; ASSERT_EQ(1, msg_rx->rx_message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS."; diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc index 050d6df2a..7db3c6d52 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc @@ -200,7 +200,7 @@ void GpsL1CaPcpsAcquisitionTestFpga_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast &e) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc index f2ee949dc..48d1ed090 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc @@ -82,7 +82,7 @@ void GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx::msg_handler_events(pmt::pm { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc index faf3f433f..e48d9384a 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc @@ -87,7 +87,7 @@ void GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test_msg_rx::msg_handler_events(pmt: { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc index d5383e16c..68e23ac91 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc @@ -83,7 +83,7 @@ void GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx::msg_handler_events(pmt::pmt_ { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc index 5fa9a4890..b83802008 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc @@ -83,7 +83,7 @@ void GpsL2MPcpsAcquisitionTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast &e) diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc index d65649f10..4cb401ab2 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc @@ -102,7 +102,7 @@ bool acquisition_dump_reader::read_binary_acq() Mat_VarFree(var2_); var2_ = Mat_VarRead(matfile, "sample_counter"); - sample_counter = *static_cast(var2_->data); + sample_counter = *static_cast(var2_->data); Mat_VarFree(var2_); var2_ = Mat_VarRead(matfile, "d_positive_acq"); diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.h index bb6e7cc53..be5779f38 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.h @@ -32,6 +32,7 @@ #ifndef GNSS_SDR_ACQUISITION_DUMP_READER_H #define GNSS_SDR_ACQUISITION_DUMP_READER_H +#include #include #include @@ -65,7 +66,7 @@ public: int positive_acq; unsigned int PRN; unsigned int num_dwells; - long unsigned int sample_counter; + uint64_t sample_counter; private: std::string d_basename; diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc index eb0cb8fac..08f891810 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc @@ -69,7 +69,7 @@ bool observables_dump_reader::restart() } -long int observables_dump_reader::num_epochs() +int64_t observables_dump_reader::num_epochs() { std::ifstream::pos_type size; int number_of_vars_in_epoch = n_channels * 7; @@ -78,7 +78,7 @@ long int observables_dump_reader::num_epochs() if (tmpfile.is_open()) { size = tmpfile.tellg(); - long int nepoch = size / epoch_size_bytes; + int64_t nepoch = size / epoch_size_bytes; return nepoch; } else diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h index c87062eaf..9548829ac 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h @@ -31,6 +31,7 @@ #ifndef GNSS_SDR_OBSERVABLES_DUMP_READER_H #define GNSS_SDR_OBSERVABLES_DUMP_READER_H +#include #include #include #include @@ -42,7 +43,7 @@ public: ~observables_dump_reader(); bool read_binary_obs(); bool restart(); - long int num_epochs(); + int64_t num_epochs(); bool open_obs_file(std::string out_file); void close_obs_file(); diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc index 228a2edbe..64508e56e 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc @@ -36,7 +36,7 @@ bool tlm_dump_reader::read_binary_obs() try { d_dump_file.read(reinterpret_cast(&TOW_at_current_symbol), sizeof(double)); - d_dump_file.read(reinterpret_cast(&Tracking_sample_counter), sizeof(unsigned long int)); + d_dump_file.read(reinterpret_cast(&Tracking_sample_counter), sizeof(uint64_t)); d_dump_file.read(reinterpret_cast(&d_TOW_at_Preamble), sizeof(double)); } catch (const std::ifstream::failure &e) @@ -62,16 +62,16 @@ bool tlm_dump_reader::restart() } -long int tlm_dump_reader::num_epochs() +int64_t tlm_dump_reader::num_epochs() { std::ifstream::pos_type size; int number_of_vars_in_epoch = 2; - int epoch_size_bytes = sizeof(double) * number_of_vars_in_epoch + sizeof(unsigned long int); + int epoch_size_bytes = sizeof(double) * number_of_vars_in_epoch + sizeof(uint64_t); std::ifstream tmpfile(d_dump_filename.c_str(), std::ios::binary | std::ios::ate); if (tmpfile.is_open()) { size = tmpfile.tellg(); - long int nepoch = size / epoch_size_bytes; + int64_t nepoch = size / epoch_size_bytes; return nepoch; } else diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h index 1f8a1419f..43178bdc6 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h @@ -31,6 +31,7 @@ #ifndef GNSS_SDR_TLM_DUMP_READER_H #define GNSS_SDR_TLM_DUMP_READER_H +#include #include #include #include @@ -41,12 +42,12 @@ public: ~tlm_dump_reader(); bool read_binary_obs(); bool restart(); - long int num_epochs(); + int64_t num_epochs(); bool open_obs_file(std::string out_file); //telemetry decoder dump variables double TOW_at_current_symbol; - unsigned long int Tracking_sample_counter; + uint64_t Tracking_sample_counter; double d_TOW_at_Preamble; private: diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc index ff82a6a01..0fdb3d7f9 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc @@ -42,7 +42,7 @@ bool tracking_dump_reader::read_binary_obs() d_dump_file.read(reinterpret_cast(&abs_VL), sizeof(float)); d_dump_file.read(reinterpret_cast(&prompt_I), sizeof(float)); d_dump_file.read(reinterpret_cast(&prompt_Q), sizeof(float)); - d_dump_file.read(reinterpret_cast(&PRN_start_sample_count), sizeof(unsigned long int)); + d_dump_file.read(reinterpret_cast(&PRN_start_sample_count), sizeof(uint64_t)); d_dump_file.read(reinterpret_cast(&acc_carrier_phase_rad), sizeof(float)); d_dump_file.read(reinterpret_cast(&carrier_doppler_hz), sizeof(float)); d_dump_file.read(reinterpret_cast(&code_freq_chips), sizeof(float)); @@ -79,18 +79,18 @@ bool tracking_dump_reader::restart() } -long int tracking_dump_reader::num_epochs() +int64_t tracking_dump_reader::num_epochs() { std::ifstream::pos_type size; int number_of_double_vars = 1; int number_of_float_vars = 17; - int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars + + int epoch_size_bytes = sizeof(uint64_t) + sizeof(double) * number_of_double_vars + sizeof(float) * number_of_float_vars + sizeof(unsigned int); std::ifstream tmpfile(d_dump_filename.c_str(), std::ios::binary | std::ios::ate); if (tmpfile.is_open()) { size = tmpfile.tellg(); - long int nepoch = size / epoch_size_bytes; + int64_t nepoch = size / epoch_size_bytes; return nepoch; } else diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h index 106a7efdc..437390c95 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h @@ -31,6 +31,7 @@ #ifndef GNSS_SDR_TRACKING_DUMP_READER_H #define GNSS_SDR_TRACKING_DUMP_READER_H +#include #include #include #include @@ -41,7 +42,7 @@ public: ~tracking_dump_reader(); bool read_binary_obs(); bool restart(); - long int num_epochs(); + int64_t num_epochs(); bool open_obs_file(std::string out_file); //tracking dump variables @@ -55,7 +56,7 @@ public: float prompt_I; float prompt_Q; // PRN start sample stamp - unsigned long int PRN_start_sample_count; + uint64_t PRN_start_sample_count; // accumulated carrier phase float acc_carrier_phase_rad; diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc index b2e00a1e8..2c03737cd 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc @@ -64,7 +64,7 @@ bool tracking_true_obs_reader::restart() } -long int tracking_true_obs_reader::num_epochs() +int64_t tracking_true_obs_reader::num_epochs() { std::ifstream::pos_type size; int number_of_vars_in_epoch = 5; @@ -73,7 +73,7 @@ long int tracking_true_obs_reader::num_epochs() if (tmpfile.is_open()) { size = tmpfile.tellg(); - long int nepoch = size / epoch_size_bytes; + int64_t nepoch = size / epoch_size_bytes; return nepoch; } else diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h index 84bd2d7b0..5b8990325 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h @@ -31,6 +31,7 @@ #ifndef GNSS_SDR_TRACKING_TRUE_OBS_READER_H #define GNSS_SDR_TRACKING_TRUE_OBS_READER_H +#include #include #include #include @@ -41,7 +42,7 @@ public: ~tracking_true_obs_reader(); bool read_binary_obs(); bool restart(); - long int num_epochs(); + int64_t num_epochs(); bool open_obs_file(std::string out_file); void close_obs_file(); bool d_dump; diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc index 4e670c5d8..f662f76dc 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc @@ -69,7 +69,7 @@ bool true_observables_reader::restart() } -long int true_observables_reader::num_epochs() +int64_t true_observables_reader::num_epochs() { std::ifstream::pos_type size; int number_of_vars_in_epoch = 6 * 12; @@ -78,7 +78,7 @@ long int true_observables_reader::num_epochs() if (tmpfile.is_open()) { size = tmpfile.tellg(); - long int nepoch = size / epoch_size_bytes; + int64_t nepoch = size / epoch_size_bytes; return nepoch; } else diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h index 41c04002a..86e1c868d 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h @@ -31,6 +31,7 @@ #ifndef GNSS_SDR_TRUE_OBSERVABLES_READER_H #define GNSS_SDR_TRUE_OBSERVABLES_READER_H +#include #include #include #include @@ -41,7 +42,7 @@ public: ~true_observables_reader(); bool read_binary_obs(); bool restart(); - long int num_epochs(); + int64_t num_epochs(); bool open_obs_file(std::string out_file); double gps_time_sec[12]; diff --git a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc index e9a853aa2..e3f915b90 100644 --- a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc @@ -44,6 +44,7 @@ #include #include #include +#include #include "GPS_L1_CA.h" #include "gnss_satellite.h" #include "gnss_block_factory.h" @@ -62,7 +63,6 @@ #include "hybrid_observables.h" #include "signal_generator_flags.h" #include "gnss_sdr_sample_counter.h" -#include #include "test_flags.h" #include "tracking_tests_flags.h" #include "observable_tests_flags.h" @@ -97,7 +97,7 @@ void HybridObservablesTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast& e) @@ -150,7 +150,7 @@ void HybridObservablesTest_tlm_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast& e) @@ -983,7 +983,7 @@ bool HybridObservablesTest::save_mat_xy(std::vector& x, std::vector(matfp) != NULL) + if (reinterpret_cast(matfp) != NULL) { size_t dims[2] = {1, x.size()}; matvar = Mat_VarCreate("x", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, &x[0], 0); @@ -1363,8 +1363,6 @@ TEST_F(HybridObservablesTest, ValidationOfResults) default: tlm_ch_vec.back()->set_satellite(Gnss_Satellite(std::string("GPS"), gnss_synchro_vec.at(n).PRN)); } - - }) << "Failure setting gnss_synchro."; ASSERT_NO_THROW({ @@ -1454,7 +1452,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults) std::cout << "True observation epochs = " << nepoch << std::endl; true_observables.restart(); - long int epoch_counter = 0; + int64_t epoch_counter = 0; for (unsigned int n = 0; n < tracking_ch_vec.size(); n++) { true_obs_vec.push_back(arma::zeros(nepoch, 4)); @@ -1499,7 +1497,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults) // Matrices for storing columnwise measured RX_time, TOW, Doppler, Carrier phase and Pseudorange std::vector measured_obs_vec; - std::vector epoch_counters_vec; + std::vector epoch_counters_vec; for (unsigned int n = 0; n < tracking_ch_vec.size(); n++) { measured_obs_vec.push_back(arma::zeros(nepoch, 5)); diff --git a/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc b/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc index 24544f380..edc349e91 100644 --- a/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc @@ -63,7 +63,7 @@ TEST(RtcmPrinterTest, Run) unsigned char c[1]; for (unsigned int i = 0; i < reference_msg.length(); i = i + 2) { - unsigned long int n, n2; + uint64_t n, n2; std::istringstream(reference_msg.substr(i, 1)) >> std::hex >> n; std::istringstream(reference_msg.substr(i + 1, 1)) >> std::hex >> n2; c[0] = static_cast(n * 16) + static_cast(n2); diff --git a/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_test.cc b/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_test.cc index 6ec85e562..30b6b327a 100644 --- a/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/pvt/rtcm_test.cc @@ -103,8 +103,8 @@ TEST(RtcmTest, HexToInt) auto rtcm = std::make_shared(); std::string test1 = "2A"; - long int test1_int = rtcm->hex_to_int(test1); - long int expected1 = 42; + int64_t test1_int = rtcm->hex_to_int(test1); + int64_t expected1 = 42; EXPECT_EQ(expected1, test1_int); } @@ -112,7 +112,7 @@ TEST(RtcmTest, HexToInt) TEST(RtcmTest, HexToUint) { auto rtcm = std::make_shared(); - long unsigned int expected1 = 42; + uint64_t expected1 = 42; EXPECT_EQ(expected1, rtcm->hex_to_uint(rtcm->bin_to_hex("00101010"))); } @@ -122,8 +122,8 @@ TEST(RtcmTest, BinToDouble) auto rtcm = std::make_shared(); std::bitset<4> test1(5); - long int test1_int = static_cast(rtcm->bin_to_double(test1.to_string())); - long int expected1 = 5; + int64_t test1_int = static_cast(rtcm->bin_to_double(test1.to_string())); + int64_t expected1 = 5; EXPECT_EQ(expected1, test1_int); std::bitset<4> test2(-5); @@ -137,9 +137,9 @@ TEST(RtcmTest, BinToDouble) TEST(RtcmTest, BinToUint) { auto rtcm = std::make_shared(); - long unsigned int expected1 = 42; + uint64_t expected1 = 42; EXPECT_EQ(expected1, rtcm->bin_to_uint("00101010")); - long unsigned int expected2 = 214; + uint64_t expected2 = 214; EXPECT_EQ(expected2, rtcm->bin_to_uint("11010110")); } @@ -147,9 +147,9 @@ TEST(RtcmTest, BinToUint) TEST(RtcmTest, BinToInt) { auto rtcm = std::make_shared(); - long int expected1 = 42; + int64_t expected1 = 42; EXPECT_EQ(expected1, rtcm->bin_to_int("00101010")); - long int expected2 = -42; + int64_t expected2 = -42; EXPECT_EQ(expected2, rtcm->bin_to_int("11010110")); } @@ -620,7 +620,7 @@ TEST(RtcmTest, InstantiateServer) std::string test6 = "0011"; std::string test6_hex = rtcm->bin_to_hex(test6); EXPECT_EQ(0, test6_hex.compare("3")); - long unsigned int expected1 = 42; + uint64_t expected1 = 42; EXPECT_EQ(expected1, rtcm->bin_to_uint("00101010")); rtcm->run_server(); std::string test4_bin = rtcm->hex_to_bin(test3); diff --git a/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc b/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc index fb502d71b..5f35d6014 100644 --- a/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc @@ -87,7 +87,7 @@ void GpsL1CADllPllTelemetryDecoderTest_msg_rx::msg_handler_events(pmt::pmt_t msg { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast& e) @@ -140,7 +140,7 @@ void GpsL1CADllPllTelemetryDecoderTest_tlm_msg_rx::msg_handler_events(pmt::pmt_t { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast& e) @@ -418,7 +418,7 @@ TEST_F(GpsL1CATelemetryDecoderTest, ValidationOfResults) //check results //load the true values - long int nepoch = true_obs_data.num_epochs(); + int64_t nepoch = true_obs_data.num_epochs(); std::cout << "True observation epochs=" << nepoch << std::endl; arma::vec true_timestamp_s = arma::zeros(nepoch, 1); @@ -427,7 +427,7 @@ TEST_F(GpsL1CATelemetryDecoderTest, ValidationOfResults) arma::vec true_prn_delay_chips = arma::zeros(nepoch, 1); arma::vec true_tow_s = arma::zeros(nepoch, 1); - long int epoch_counter = 0; + int64_t epoch_counter = 0; while (true_obs_data.read_binary_obs()) { true_timestamp_s(epoch_counter) = true_obs_data.signal_timestamp_s; diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_c_aid_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_c_aid_tracking_test.cc index a8210f19a..34ca29f51 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_c_aid_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_c_aid_tracking_test.cc @@ -77,7 +77,7 @@ void GlonassL1CaDllPllCAidTrackingTest_msg_rx::msg_handler_events(pmt::pmt_t msg { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast& e) diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc index bd1ec45f0..2afd0d444 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc @@ -77,7 +77,7 @@ void GlonassL1CaDllPllTrackingTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast& e) diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc index fc414de2d..fa897a5cf 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc @@ -86,7 +86,7 @@ void GpsL1CADllPllTrackingTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; //3 -> loss of lock //std::cout << "Received trk message: " << rx_message << std::endl; } @@ -647,7 +647,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) ASSERT_EQ(trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")), true) << "Failure opening tracking dump file"; - long int n_measured_epochs = trk_dump.num_epochs(); + int64_t n_measured_epochs = trk_dump.num_epochs(); //std::cout << "Measured observation epochs=" << n_measured_epochs << std::endl; arma::vec trk_timestamp_s = arma::zeros(n_measured_epochs, 1); @@ -655,7 +655,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) arma::vec trk_Doppler_Hz = arma::zeros(n_measured_epochs, 1); arma::vec trk_prn_delay_chips = arma::zeros(n_measured_epochs, 1); - long int epoch_counter = 0; + int64_t epoch_counter = 0; std::vector timestamp_s; std::vector prompt; @@ -704,7 +704,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) try { // load the true values - long int n_true_epochs = true_obs_data.num_epochs(); + int64_t n_true_epochs = true_obs_data.num_epochs(); //std::cout << "True observation epochs=" << n_true_epochs << std::endl; arma::vec true_timestamp_s = arma::zeros(n_true_epochs, 1); @@ -713,7 +713,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) arma::vec true_prn_delay_chips = arma::zeros(n_true_epochs, 1); arma::vec true_tow_s = arma::zeros(n_true_epochs, 1); - long int epoch_counter = 0; + int64_t epoch_counter = 0; while (true_obs_data.read_binary_obs()) { true_timestamp_s(epoch_counter) = true_obs_data.signal_timestamp_s; @@ -1163,7 +1163,7 @@ bool GpsL1CADllPllTrackingTest::save_mat_xy(std::vector& x, std::vector< filename.erase(filename.length() - 4, 4); filename.append(".mat"); matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73); - if (reinterpret_cast(matfp) != NULL) + if (reinterpret_cast(matfp) != NULL) { size_t dims[2] = {1, x.size()}; matvar = Mat_VarCreate("x", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, &x[0], 0); diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc index 328068dd1..d62956e30 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc @@ -177,7 +177,7 @@ void GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast &e) @@ -545,7 +545,7 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga) //check results //load the true values - long int nepoch = true_obs_data.num_epochs(); + int64_t nepoch = true_obs_data.num_epochs(); std::cout << "True observation epochs=" << nepoch << std::endl; arma::vec true_timestamp_s = arma::zeros(nepoch, 1); @@ -554,7 +554,7 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga) arma::vec true_prn_delay_chips = arma::zeros(nepoch, 1); arma::vec true_tow_s = arma::zeros(nepoch, 1); - long int epoch_counter = 0; + int64_t epoch_counter = 0; while (true_obs_data.read_binary_obs()) { true_timestamp_s(epoch_counter) = true_obs_data.signal_timestamp_s; diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc index bfd715260..5c9c035f9 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc @@ -79,7 +79,7 @@ void GpsL2MDllPllTrackingTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast& e) diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc index 87e2b2dc3..9818d8977 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc @@ -92,7 +92,7 @@ void Acquisition_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; top_block->stop(); //stop the flowgraph } @@ -143,7 +143,7 @@ void TrackingPullInTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - long int message = pmt::to_long(msg); + int64_t message = pmt::to_long(msg); rx_message = message; //3 -> loss of lock //std::cout << "Received trk message: " << rx_message << std::endl; } @@ -189,7 +189,7 @@ public: std::map doppler_measurements_map; std::map code_delay_measurements_map; - std::map acq_samplestamp_map; + std::map acq_samplestamp_map; int configure_generator(double CN0_dBHz, int file_idx); int generate_signal(); @@ -677,7 +677,7 @@ TEST_F(TrackingPullInTest, ValidationOfResults) int test_satellite_PRN = 0; double true_acq_doppler_hz = 0.0; double true_acq_delay_samples = 0.0; - unsigned long int acq_samplestamp_samples = 0; + uint64_t acq_samplestamp_samples = 0; tracking_true_obs_reader true_obs_data; if (!FLAGS_enable_external_signal_file) @@ -795,7 +795,7 @@ TEST_F(TrackingPullInTest, ValidationOfResults) ASSERT_EQ(trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")), true) << "Failure opening tracking dump file"; - long int n_measured_epochs = trk_dump.num_epochs(); + int64_t n_measured_epochs = trk_dump.num_epochs(); //todo: use vectors instead arma::vec trk_timestamp_s = arma::zeros(n_measured_epochs, 1); arma::vec trk_acc_carrier_phase_cycles = arma::zeros(n_measured_epochs, 1); @@ -811,7 +811,7 @@ TEST_F(TrackingPullInTest, ValidationOfResults) std::vector promptQ; std::vector CN0_dBHz; std::vector Doppler; - long int epoch_counter = 0; + int64_t epoch_counter = 0; while (trk_dump.read_binary_obs()) { trk_timestamp_s(epoch_counter) = static_cast(trk_dump.PRN_start_sample_count) / static_cast(baseband_sampling_freq); diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc index 2b4bc4007..5b06dcd21 100644 --- a/src/utils/front-end-cal/main.cc +++ b/src/utils/front-end-cal/main.cc @@ -485,7 +485,7 @@ int main(int argc, char** argv) fprintf(stdout, "Reference Time:\n"); fprintf(stdout, " GPS Week: %d\n", Eph_map.begin()->second.i_GPS_week); - fprintf(stdout, " GPS TOW: %ld %lf\n", (int64_t)current_TOW, (int64_t)current_TOW * 0.08); + fprintf(stdout, " GPS TOW: %lld %lf\n", (int64_t)current_TOW, (int64_t)current_TOW * 0.08); fprintf(stdout, " ~ UTC: %s", ctime(&t)); std::cout << "Current TOW obtained from SUPL assistance = " << current_TOW << std::endl; }