GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
observables_dump_reader.h
Go to the documentation of this file.
1 /*!
2  * \file observables_dump_reader.h
3  * \brief Helper file for unit testing
4  * \author Javier Arribas, 2017. jarribas(at)cttc.es
5  *
6  * -----------------------------------------------------------------------------
7  *
8  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
9  * This file is part of GNSS-SDR.
10  *
11  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
12  * SPDX-License-Identifier: GPL-3.0-or-later
13  *
14  * -----------------------------------------------------------------------------
15  */
16 
17 #ifndef GNSS_SDR_OBSERVABLES_DUMP_READER_H
18 #define GNSS_SDR_OBSERVABLES_DUMP_READER_H
19 
20 #include <cstdint>
21 #include <fstream>
22 #include <string>
23 #include <vector>
24 
26 {
27 public:
28  explicit Observables_Dump_Reader(int n_channels);
30  bool read_binary_obs();
31  bool restart();
32  int64_t num_epochs();
33  bool open_obs_file(std::string out_file);
34  void close_obs_file();
35 
36  // dump variables
37  std::vector<double> RX_time;
38  std::vector<double> TOW_at_current_symbol_s;
39  std::vector<double> Carrier_Doppler_hz;
40  std::vector<double> Acc_carrier_phase_hz;
41  std::vector<double> Pseudorange_m;
42  std::vector<double> PRN;
43  std::vector<double> valid;
44 
45 private:
46  int n_channels;
47  std::string d_dump_filename;
48  std::ifstream d_dump_file;
49 };
50 
51 #endif // GNSS_SDR_OBSERVABLES_DUMP_READER_H