1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-10-05 18:30:51 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next

This commit is contained in:
Carles Fernandez 2018-08-10 21:17:03 +02:00
commit 0fce0e3a5f
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
42 changed files with 98 additions and 94 deletions

View File

@ -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())
{

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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.";

View File

@ -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.";

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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)
{

View File

@ -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.";

View File

@ -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)
{

View File

@ -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);
}

View File

@ -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.";

View File

@ -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)

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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)

View File

@ -102,7 +102,7 @@ bool acquisition_dump_reader::read_binary_acq()
Mat_VarFree(var2_);
var2_ = Mat_VarRead(matfile, "sample_counter");
sample_counter = *static_cast<long unsigned int*>(var2_->data);
sample_counter = *static_cast<uint64_t*>(var2_->data);
Mat_VarFree(var2_);
var2_ = Mat_VarRead(matfile, "d_positive_acq");

View File

@ -32,6 +32,7 @@
#ifndef GNSS_SDR_ACQUISITION_DUMP_READER_H
#define GNSS_SDR_ACQUISITION_DUMP_READER_H
#include <cstdint>
#include <string>
#include <vector>
@ -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;

View File

@ -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

View File

@ -31,6 +31,7 @@
#ifndef GNSS_SDR_OBSERVABLES_DUMP_READER_H
#define GNSS_SDR_OBSERVABLES_DUMP_READER_H
#include <cstdint>
#include <fstream>
#include <string>
#include <vector>
@ -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();

View File

@ -36,7 +36,7 @@ bool tlm_dump_reader::read_binary_obs()
try
{
d_dump_file.read(reinterpret_cast<char *>(&TOW_at_current_symbol), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&Tracking_sample_counter), sizeof(unsigned long int));
d_dump_file.read(reinterpret_cast<char *>(&Tracking_sample_counter), sizeof(uint64_t));
d_dump_file.read(reinterpret_cast<char *>(&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

View File

@ -31,6 +31,7 @@
#ifndef GNSS_SDR_TLM_DUMP_READER_H
#define GNSS_SDR_TLM_DUMP_READER_H
#include <cstdint>
#include <fstream>
#include <string>
#include <vector>
@ -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:

View File

@ -42,7 +42,7 @@ bool tracking_dump_reader::read_binary_obs()
d_dump_file.read(reinterpret_cast<char *>(&abs_VL), sizeof(float));
d_dump_file.read(reinterpret_cast<char *>(&prompt_I), sizeof(float));
d_dump_file.read(reinterpret_cast<char *>(&prompt_Q), sizeof(float));
d_dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count), sizeof(unsigned long int));
d_dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count), sizeof(uint64_t));
d_dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad), sizeof(float));
d_dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz), sizeof(float));
d_dump_file.read(reinterpret_cast<char *>(&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

View File

@ -31,6 +31,7 @@
#ifndef GNSS_SDR_TRACKING_DUMP_READER_H
#define GNSS_SDR_TRACKING_DUMP_READER_H
#include <cstdint>
#include <fstream>
#include <string>
#include <vector>
@ -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;

View File

@ -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

View File

@ -31,6 +31,7 @@
#ifndef GNSS_SDR_TRACKING_TRUE_OBS_READER_H
#define GNSS_SDR_TRACKING_TRUE_OBS_READER_H
#include <cstdint>
#include <fstream>
#include <string>
#include <vector>
@ -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;

View File

@ -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

View File

@ -31,6 +31,7 @@
#ifndef GNSS_SDR_TRUE_OBSERVABLES_READER_H
#define GNSS_SDR_TRUE_OBSERVABLES_READER_H
#include <cstdint>
#include <fstream>
#include <string>
#include <vector>
@ -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];

View File

@ -44,6 +44,7 @@
#include <gpstk/Rinex3ObsData.hpp>
#include <gpstk/Rinex3ObsHeader.hpp>
#include <gpstk/Rinex3ObsStream.hpp>
#include <matio.h>
#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 <matio.h>
#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<double>& x, std::vector<doub
filename.append(".mat");
std::cout << "save_mat_xy write " << filename << std::endl;
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT5);
if (reinterpret_cast<long*>(matfp) != NULL)
if (reinterpret_cast<int64_t*>(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<arma::mat>(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<arma::mat> measured_obs_vec;
std::vector<long int> epoch_counters_vec;
std::vector<int64_t> epoch_counters_vec;
for (unsigned int n = 0; n < tracking_ch_vec.size(); n++)
{
measured_obs_vec.push_back(arma::zeros<arma::mat>(nepoch, 5));

View File

@ -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<unsigned char>(n * 16) + static_cast<unsigned char>(n2);

View File

@ -103,8 +103,8 @@ TEST(RtcmTest, HexToInt)
auto rtcm = std::make_shared<Rtcm>();
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<Rtcm>();
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<Rtcm>();
std::bitset<4> test1(5);
long int test1_int = static_cast<long int>(rtcm->bin_to_double(test1.to_string()));
long int expected1 = 5;
int64_t test1_int = static_cast<int64_t>(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<Rtcm>();
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<Rtcm>();
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);

View File

@ -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;

View File

@ -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)

View File

@ -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)

View File

@ -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<double> timestamp_s;
std::vector<double> 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<double>& 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<long*>(matfp) != NULL)
if (reinterpret_cast<int64_t*>(matfp) != NULL)
{
size_t dims[2] = {1, x.size()};
matvar = Mat_VarCreate("x", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, &x[0], 0);

View File

@ -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;

View File

@ -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)

View File

@ -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<int, double> doppler_measurements_map;
std::map<int, double> code_delay_measurements_map;
std::map<int, unsigned long int> acq_samplestamp_map;
std::map<int, uint64_t> 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<double> promptQ;
std::vector<double> CN0_dBHz;
std::vector<double> Doppler;
long int epoch_counter = 0;
int64_t epoch_counter = 0;
while (trk_dump.read_binary_obs())
{
trk_timestamp_s(epoch_counter) = static_cast<double>(trk_dump.PRN_start_sample_count) / static_cast<double>(baseband_sampling_freq);

View File

@ -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;
}