GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
spirent_motion_csv_dump_reader.h
Go to the documentation of this file.
1 /*!
2  * \file spirent_motion_csv_dump_reader.h
3  * \brief Helper file for unit testing
4  * \author Javier Arribas, 2018. 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_SPIRENT_MOTION_CSV_DUMP_READER_H
18 #define GNSS_SDR_SPIRENT_MOTION_CSV_DUMP_READER_H
19 
20 #include <cstdint>
21 #include <fstream>
22 #include <string>
23 #include <vector>
24 
26 {
27 public:
30  bool read_csv_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  int header_lines;
37  // dump variables
38  double TOW_ms;
39  double Pos_X;
40  double Pos_Y;
41  double Pos_Z;
42  double Vel_X;
43  double Vel_Y;
44  double Vel_Z;
45  double Acc_X;
46  double Acc_Y;
47  double Acc_Z;
48  double Jerk_X;
49  double Jerk_Y;
50  double Jerk_Z;
51  double Lat;
52  double Long;
53  double Height;
54  double Heading;
55  double Elevation;
56  double Bank;
57  double Ang_vel_X;
58  double Ang_vel_Y;
59  double Ang_vel_Z;
60  double Ang_acc_X;
61  double Ang_acc_Y;
62  double Ang_acc_Z;
63  double Ant1_Pos_X;
64  double Ant1_Pos_Y;
65  double Ant1_Pos_Z;
66  double Ant1_Vel_X;
67  double Ant1_Vel_Y;
68  double Ant1_Vel_Z;
69  double Ant1_Acc_X;
70  double Ant1_Acc_Y;
71  double Ant1_Acc_Z;
72  double Ant1_Lat;
73  double Ant1_Long;
74  double Ant1_Height;
75  double Ant1_DOP;
76 
77 private:
78  std::string d_dump_filename;
79  std::ifstream d_dump_file;
80  bool parse_vector(std::vector<double> &vec);
81 };
82 
83 #endif // GNSS_SDR_SPIRENT_MOTION_CSV_DUMP_READER_H