mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Fix bug reading tracking dump file
This commit is contained in:
parent
367d65a536
commit
a298013a23
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user