1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Emit mat file generation message only if there is data to save

This commit is contained in:
Carles Fernandez 2019-04-26 09:02:03 +02:00
parent 03dc09ab75
commit 31f9a87ee4
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -148,7 +148,6 @@ bool Rtklib_Solver::save_matfile()
sizeof(uint8_t) * number_of_uint8_vars +
sizeof(float) * number_of_float_vars;
std::ifstream dump_file;
std::cout << "Generating .mat file for " << dump_filename << std::endl;
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
try
{
@ -163,6 +162,7 @@ bool Rtklib_Solver::save_matfile()
int64_t num_epoch = 0LL;
if (dump_file.is_open())
{
std::cout << "Generating .mat file for " << dump_filename << std::endl;
size = dump_file.tellg();
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
dump_file.seekg(0, std::ios::beg);