GNSS-SDR  0.0.13
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  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
9  *
10  * GNSS-SDR is a software defined Global Navigation
11  * Satellite Systems receiver
12  *
13  * This file is part of GNSS-SDR.
14  *
15  * SPDX-License-Identifier: GPL-3.0-or-later
16  *
17  * -----------------------------------------------------------------------------
18  */
19 
20 #ifndef GNSS_SDR_SPIRENT_MOTION_CSV_DUMP_READER_H
21 #define GNSS_SDR_SPIRENT_MOTION_CSV_DUMP_READER_H
22 
23 #include <cstdint>
24 #include <fstream>
25 #include <string>
26 #include <vector>
27 
29 {
30 public:
33  bool read_csv_obs();
34  bool restart();
35  int64_t num_epochs();
36  bool open_obs_file(std::string out_file);
37  void close_obs_file();
38 
39  int header_lines;
40  // dump variables
41  double TOW_ms;
42  double Pos_X;
43  double Pos_Y;
44  double Pos_Z;
45  double Vel_X;
46  double Vel_Y;
47  double Vel_Z;
48  double Acc_X;
49  double Acc_Y;
50  double Acc_Z;
51  double Jerk_X;
52  double Jerk_Y;
53  double Jerk_Z;
54  double Lat;
55  double Long;
56  double Height;
57  double Heading;
58  double Elevation;
59  double Bank;
60  double Ang_vel_X;
61  double Ang_vel_Y;
62  double Ang_vel_Z;
63  double Ang_acc_X;
64  double Ang_acc_Y;
65  double Ang_acc_Z;
66  double Ant1_Pos_X;
67  double Ant1_Pos_Y;
68  double Ant1_Pos_Z;
69  double Ant1_Vel_X;
70  double Ant1_Vel_Y;
71  double Ant1_Vel_Z;
72  double Ant1_Acc_X;
73  double Ant1_Acc_Y;
74  double Ant1_Acc_Z;
75  double Ant1_Lat;
76  double Ant1_Long;
77  double Ant1_Height;
78  double Ant1_DOP;
79 
80 private:
81  std::string d_dump_filename;
82  std::ifstream d_dump_file;
83  bool parse_vector(std::vector<double> &vec);
84 };
85 
86 #endif // GNSS_SDR_SPIRENT_MOTION_CSV_DUMP_READER_H