0.4.1
Loading...
Searching...
No Matches
RtklibPosFile.hpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9/// @file RtklibPosFile.hpp
10/// @brief File Reader for RTKLIB Pos files
11/// @author T. Topp (topp@ins.uni-stuttgart.de)
12/// @date 2020-06-02
13
14#pragma once
15
18
19namespace NAV
20{
21/// File Reader for RTKLIB pos log files
22class RtklibPosFile : public Node, public FileReader
23{
24 public:
25 /// @brief Default constructor
27 /// @brief Destructor
28 ~RtklibPosFile() override;
29 /// @brief Copy constructor
30 RtklibPosFile(const RtklibPosFile&) = delete;
31 /// @brief Move constructor
33 /// @brief Copy assignment operator
35 /// @brief Move assignment operator
37
38 /// @brief String representation of the Class Type
39 [[nodiscard]] static std::string typeStatic();
40
41 /// @brief String representation of the Class Type
42 [[nodiscard]] std::string type() const override;
43
44 /// @brief String representation of the Class Category
45 [[nodiscard]] static std::string category();
46
47 /// @brief ImGui config window which is shown on double click
48 /// @attention Don't forget to set _hasConfig to true in the constructor of the node
49 void guiConfig() override;
50
51 /// @brief Saves the node into a json object
52 [[nodiscard]] json save() const override;
53
54 /// @brief Restores the node from a json object
55 /// @param[in] j Json object with the node state
56 void restore(const json& j) override;
57
58 /// @brief Resets the node. Moves the read cursor to the start
59 bool resetNode() override;
60
61 private:
62 constexpr static size_t OUTPUT_PORT_INDEX_RTKLIB_POS_OBS = 0; ///< @brief Flow (RtklibPosObs)
63
64 /// @brief Initialize the node
65 bool initialize() override;
66
67 /// @brief Deinitialize the node
68 void deinitialize() override;
69
70 /// @brief Polls data from the file
71 /// @return The read observation
72 [[nodiscard]] std::shared_ptr<const NodeData> pollData();
73
74 /// @brief Determines the type of the file
75 /// @return The File Type
76 [[nodiscard]] FileType determineFileType() override;
77
78 /// @brief Read the Header of the file
79 void readHeader() override;
80};
81
82} // namespace NAV
Abstract File Reader class.
nlohmann::json json
json namespace
Node Class.
FileType
File Type Enumeration.
FileReader(const FileReader &)=delete
Copy constructor.
Node(std::string name)
Constructor.
Definition Node.cpp:30
RtklibPosFile()
Default constructor.
void readHeader() override
Read the Header of the file.
static constexpr size_t OUTPUT_PORT_INDEX_RTKLIB_POS_OBS
Flow (RtklibPosObs)
static std::string typeStatic()
String representation of the Class Type.
bool initialize() override
Initialize the node.
std::shared_ptr< const NodeData > pollData()
Polls data from the file.
FileType determineFileType() override
Determines the type of the file.
bool resetNode() override
Resets the node. Moves the read cursor to the start.
json save() const override
Saves the node into a json object.
static std::string category()
String representation of the Class Category.
void deinitialize() override
Deinitialize the node.
~RtklibPosFile() override
Destructor.
std::string type() const override
String representation of the Class Type.
RtklibPosFile(const RtklibPosFile &)=delete
Copy constructor.
void restore(const json &j) override
Restores the node from a json object.
RtklibPosFile(RtklibPosFile &&)=delete
Move constructor.
void guiConfig() override
ImGui config window which is shown on double click.
RtklibPosFile & operator=(const RtklibPosFile &)=delete
Copy assignment operator.
RtklibPosFile & operator=(RtklibPosFile &&)=delete
Move assignment operator.