INSTINCT Code Coverage Report


Directory: src/
File: NodeData/GNSS/EmlidObs.hpp
Date: 2025-02-07 16:54:41
Exec Total Coverage
Lines: 5 6 83.3%
Functions: 2 3 66.7%
Branches: 4 8 50.0%

Line Branch Exec Source
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 EmlidObs.hpp
10 /// @brief Emlid Observation Class
11 /// @author T. Topp (topp@ins.uni-stuttgart.de)
12 /// @date 2020-06-23
13
14 #pragma once
15
16 #include "NodeData/NodeData.hpp"
17
18 #include <variant>
19
20 #include "util/Vendor/Emlid/EmlidTypes.hpp"
21
22 namespace NAV
23 {
24 /// Emlid Observation Class
25 class EmlidObs : public NodeData
26 {
27 public:
28 /// @brief Returns the type of the data class
29 /// @return The data type
30 581618 [[nodiscard]] static std::string type()
31 {
32
1/2
✓ Branch 1 taken 581618 times.
✗ Branch 2 not taken.
1163236 return "EmlidObs";
33 }
34
35 /// @brief Returns the type of the data class
36 /// @return The data type
37 [[nodiscard]] std::string getType() const override { return type(); }
38
39 /// @brief Returns the parent types of the data class
40 /// @return The parent data types
41 112 [[nodiscard]] static std::vector<std::string> parentTypes()
42 {
43
3/6
✓ Branch 1 taken 112 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 112 times.
✓ Branch 4 taken 112 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
336 return { NodeData::type() };
44 112 }
45
46 /// Erb Message ID
47 uint8_t msgId = 0;
48 /// Payload length in bytes
49 uint16_t payloadLength = 0;
50
51 /// Decoded data
52 std::variant<
53 vendor::emlid::ErbVer, // VER: Version of protocol
54 vendor::emlid::ErbPos, // POS: Geodetic position solution
55 vendor::emlid::ErbStat, // STAT: Receiver navigation status
56 vendor::emlid::ErbDops, // DOPS: Dilution of precision
57 vendor::emlid::ErbVel, // VEL: Velocity solution in NED
58 vendor::emlid::ErbSvi, // SVI: Space vehicle information
59 vendor::emlid::ErbRtk // RTK: RTK information
60 >
61 data;
62 };
63
64 } // namespace NAV
65