| 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 Receiver.hpp | ||
| 10 | /// @brief Receiver information | ||
| 11 | /// @author T. Topp (topp@ins.uni-stuttgart.de) | ||
| 12 | /// @date 2023-12-21 | ||
| 13 | |||
| 14 | #pragma once | ||
| 15 | |||
| 16 | #include <functional> | ||
| 17 | #include <memory> | ||
| 18 | #include <optional> | ||
| 19 | |||
| 20 | #include "Navigation/GNSS/Core/Frequency.hpp" | ||
| 21 | #include "Navigation/GNSS/Positioning/ReceiverClock.hpp" | ||
| 22 | #include "Navigation/Transformations/Antenna.hpp" | ||
| 23 | |||
| 24 | #include "NodeData/GNSS/GnssObs.hpp" | ||
| 25 | |||
| 26 | #include "util/Container/UncertainValue.hpp" | ||
| 27 | |||
| 28 | namespace NAV | ||
| 29 | { | ||
| 30 | |||
| 31 | /// @brief Receiver information | ||
| 32 | template<typename ReceiverType> | ||
| 33 | struct Receiver | ||
| 34 | { | ||
| 35 | /// @brief Constructor | ||
| 36 | /// @param type Receiver enum type | ||
| 37 | /// @param satelliteSystems Satellite systems to use | ||
| 38 | 736 | explicit Receiver(ReceiverType type, const std::vector<SatelliteSystem>& satelliteSystems) | |
| 39 |
8/16✓ Branch 1 taken 500 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 500 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 500 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 500 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 500 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 500 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 500 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 500 times.
✗ Branch 23 not taken.
|
736 | : type(type), recvClk(satelliteSystems) {} |
| 40 | |||
| 41 | /// Receiver Type | ||
| 42 | ReceiverType type; | ||
| 43 | /// Marker Position in ECEF frame [m] | ||
| 44 | Eigen::Vector3d e_posMarker = Eigen::Vector3d::Zero(); | ||
| 45 | /// Marker Position in LLA frame [rad, rad, m] | ||
| 46 | Eigen::Vector3d lla_posMarker = Eigen::Vector3d::Zero(); | ||
| 47 | /// Velocity in ECEF frame [m/s] | ||
| 48 | Eigen::Vector3d e_vel = Eigen::Vector3d::Zero(); | ||
| 49 | /// Estimated receiver clock parameters | ||
| 50 | ReceiverClock recvClk; | ||
| 51 | /// Inter frequency biases [s] | ||
| 52 | std::unordered_map<Frequency, UncertainValue<double>> interFrequencyBias; | ||
| 53 | /// Latest GNSS observation | ||
| 54 | std::shared_ptr<const GnssObs> gnssObs = nullptr; | ||
| 55 | |||
| 56 | /// @brief Antenna Reference Point position in ECEF frame [m] (Marker + antennaDeltaNEU) | ||
| 57 | /// @param[in] hen_delta Additional height, east, north in [m] | ||
| 58 | [[nodiscard]] Eigen::Vector3d e_calcPosARP(const Eigen::Vector3d& hen_delta = Eigen::Vector3d::Zero()) const | ||
| 59 | { | ||
| 60 | return trafo::e_posMarker2ARP(e_posMarker, gnssObs, hen_delta); | ||
| 61 | } | ||
| 62 | |||
| 63 | /// @brief Antenna Reference Point position in LLA frame [rad, rad, m] (Marker + antennaDeltaNEU) | ||
| 64 | /// @param[in] hen_delta Additional height, east, north in [m] | ||
| 65 | [[nodiscard]] Eigen::Vector3d lla_calcPosARP(const Eigen::Vector3d& hen_delta = Eigen::Vector3d::Zero()) const | ||
| 66 | { | ||
| 67 | return trafo::lla_posMarker2ARP(lla_posMarker, gnssObs, hen_delta); | ||
| 68 | } | ||
| 69 | |||
| 70 | /// @brief Marker position in ECEF frame [m] (ARP + antenna phase center) | ||
| 71 | /// @param[in] freq Frequency of the observation | ||
| 72 | /// @param[in] antennaType Antenna type | ||
| 73 | /// @param[in] nameId NameId of the calling node for Log output | ||
| 74 | /// @param[in] hen_delta Additional height, east, north in [m] | ||
| 75 | [[nodiscard]] Eigen::Vector3d e_calcPosAPC(Frequency freq, | ||
| 76 | const std::string& antennaType, | ||
| 77 | const std::string& nameId, | ||
| 78 | const Eigen::Vector3d& hen_delta = Eigen::Vector3d::Zero()) const | ||
| 79 | { | ||
| 80 | return trafo::e_posARP2APC(e_calcPosARP(hen_delta), gnssObs, freq, antennaType, nameId); | ||
| 81 | } | ||
| 82 | |||
| 83 | /// @brief Marker position in LLA frame [rad, rad, m] (ARP + antenna phase center) | ||
| 84 | /// @param[in] freq Frequency of the observation | ||
| 85 | /// @param[in] antennaType Antenna type | ||
| 86 | /// @param[in] nameId NameId of the calling node for Log output | ||
| 87 | /// @param[in] hen_delta Additional height, east, north in [m] | ||
| 88 | [[nodiscard]] Eigen::Vector3d lla_calcPosAPC(Frequency freq, | ||
| 89 | const std::string& antennaType, | ||
| 90 | const std::string& nameId, | ||
| 91 | const Eigen::Vector3d& hen_delta = Eigen::Vector3d::Zero()) const | ||
| 92 | { | ||
| 93 | return trafo::lla_posARP2APC(lla_calcPosARP(hen_delta), gnssObs, freq, antennaType, nameId); | ||
| 94 | } | ||
| 95 | }; | ||
| 96 | |||
| 97 | } // namespace NAV | ||
| 98 |