1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-04 17:16:26 +00:00

Fix bug reading tracking dump file

This commit is contained in:
Carles Fernandez 2017-07-12 21:24:47 +02:00
parent 367d65a536
commit a298013a23

View File

@ -76,15 +76,15 @@ bool tracking_dump_reader::restart()
}
}
long int tracking_dump_reader::num_epochs()
{
std::ifstream::pos_type size;
int number_of_double_vars = 11;
int number_of_float_vars = 5;
int epoch_size_bytes=sizeof(unsigned long int) +
sizeof(double) * number_of_double_vars +
sizeof(float) * number_of_float_vars;
std::ifstream tmpfile( d_dump_filename.c_str(), std::ios::binary | std::ios::ate);
int epoch_size_bytes = sizeof(unsigned long int) + 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();
@ -97,6 +97,7 @@ long int tracking_dump_reader::num_epochs()
}
}
bool tracking_dump_reader::open_obs_file(std::string out_file)
{
if (d_dump_file.is_open() == false)