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 WiFiObs.hpp | ||
10 | /// @brief Espressif Observation Class | ||
11 | /// @author R. Lintz (r-lintz@gmx.de) (master thesis) | ||
12 | /// @date 2024-01-08 | ||
13 | |||
14 | #pragma once | ||
15 | |||
16 | #include "NodeData/NodeData.hpp" | ||
17 | #include "util/Vendor/VectorNav/BinaryOutputs/TimeOutputs.hpp" | ||
18 | |||
19 | namespace NAV | ||
20 | { | ||
21 | /// Espressif Observation Class | ||
22 | class WiFiObs : public NodeData | ||
23 | { | ||
24 | public: | ||
25 | /// @brief Returns the type of the data class | ||
26 | /// @return The data type | ||
27 | 582066 | [[nodiscard]] static std::string type() | |
28 | { | ||
29 |
1/2✓ Branch 1 taken 582066 times.
✗ Branch 2 not taken.
|
1164132 | return "WiFiObs"; |
30 | } | ||
31 | |||
32 | /// @brief Returns the type of the data class | ||
33 | /// @return The data type | ||
34 | ✗ | [[nodiscard]] std::string getType() const override { return type(); } | |
35 | |||
36 | /// @brief Returns the parent types of the data class | ||
37 | /// @return The parent data types | ||
38 | 112 | [[nodiscard]] static std::vector<std::string> parentTypes() | |
39 | { | ||
40 |
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() }; |
41 | 112 | } | |
42 | |||
43 | /// MAC address of the device | ||
44 | std::string macAddress; | ||
45 | /// Distance to the device | ||
46 | double distance = 0; | ||
47 | /// Standard deviation of the distance | ||
48 | double distanceStd = 0; | ||
49 | /// Struct for time sync | ||
50 | struct TimeSyncInput | ||
51 | { | ||
52 | /// @brief Time since last SyncIn trigger. | ||
53 | /// | ||
54 | /// The time since the last SyncIn event trigger expressed in nano seconds. | ||
55 | uint64_t timeSyncIn{}; | ||
56 | /// @brief SyncIn trigger count. | ||
57 | /// | ||
58 | /// The number of SyncIn trigger events that have occurred. | ||
59 | uint32_t syncInCnt{}; | ||
60 | }; | ||
61 | /// Time of observation | ||
62 | TimeSyncInput timeOutputs; | ||
63 | }; | ||
64 | |||
65 | } // namespace NAV | ||
66 |