0.4.1
Loading...
Searching...
No Matches
Orbit.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 Orbit.hpp
10/// @brief Abstract satellite orbit information
11/// @author T. Topp (topp@ins.uni-stuttgart.de)
12/// @date 2022-12-02
13
14#pragma once
15
16#include <cstdint>
18#include "util/Eigen.hpp"
19
20namespace NAV
21{
22
23/// @brief Abstract satellite orbit information
24class Orbit
25{
26 public:
27 /// Satellite Position
28 struct Pos
29 {
30 Eigen::Vector3d e_pos; ///< The WGS84 ECEF position of the satellite at transmit time of the signal, in ECEF axes at the time of reception [m]
31 };
32 /// Satellite Position and Velocity
33 struct PosVel
34 {
35 Eigen::Vector3d e_pos; ///< The WGS84 ECEF position of the satellite at transmit time of the signal, in ECEF axes at the time of reception [m]
36 Eigen::Vector3d e_vel; ///< The WGS84 ECEF velocity of the satellite at transmit time of the signal, in ECEF axes at the time of reception [m]
37 };
38 /// Satellite Position, Velocity and Acceleration
40 {
41 Eigen::Vector3d e_pos; ///< The WGS84 ECEF position of the satellite at transmit time of the signal, in ECEF axes at the time of reception [m]
42 Eigen::Vector3d e_vel; ///< The WGS84 ECEF velocity of the satellite at transmit time of the signal, in ECEF axes at the time of reception [m]
43 Eigen::Vector3d e_accel; ///< The WGS84 ECEF acceleration of the satellite at transmit time of the signal, in ECEF axes at the time of reception [m]
44 };
45
46 /// @brief Default Constructor
47 Orbit() = default;
48 /// @brief Destructor
49 virtual ~Orbit() = default;
50 /// @brief Copy constructor
51 Orbit(const Orbit&) = default;
52 /// @brief Move constructor
53 Orbit(Orbit&&) = default;
54 /// @brief Copy assignment operator
55 Orbit& operator=(const Orbit&) = delete;
56 /// @brief Move assignment operator
57 Orbit& operator=(Orbit&&) = delete;
58
59 /// @brief Calculates position of the satellite at transmission time
60 /// @param[in] transTime Transmit time to calculate the satellite position for
61 [[nodiscard]] Pos calcSatellitePos(const InsTime& transTime) const;
62 /// @brief Calculates position and velocity of the satellite at transmission time
63 /// @param[in] transTime Transmit time to calculate the satellite position and velocity for
64 [[nodiscard]] PosVel calcSatellitePosVel(const InsTime& transTime) const;
65 /// @brief Calculates position, velocity and acceleration of the satellite at transmission time
66 /// @param[in] transTime Transmit time to calculate the satellite position, velocity and acceleration for
67 [[nodiscard]] PosVelAccel calcSatellitePosVelAccel(const InsTime& transTime) const;
68
69 /// @brief Calculates the Variance of the satellite position in [m^2]
70 [[nodiscard]] virtual double calcSatellitePositionVariance() const = 0;
71
72 protected:
73 /// @brief Calculation flags
74 enum Calc : uint8_t
75 {
76 Calc_None = 0b000, ///< None
77 Calc_Position = 0b001, ///< Position calculation flag
78 Calc_Velocity = 0b010, ///< Velocity calculation flag
79 Calc_Acceleration = 0b100, ///< Acceleration calculation flag
80 };
81
82 public:
85
86 protected:
87 /// @brief Calculates position, velocity and acceleration of the satellite at transmission time
88 /// @param[in] transTime Transmit time to calculate the satellite data for
89 /// @param[in] calc Flags which determine what should be calculated and returned
90 [[nodiscard]] virtual PosVelAccel calcSatelliteData(const InsTime& transTime, Calc calc) const = 0;
91};
92
93/// @brief Allows construction of Calc objects
94/// @param[in] lhs Left-hand side enum value.
95/// @param[in] rhs Right-hand side enum value.
96/// @return The binary ORed value.
97inline Orbit::Calc operator|(Orbit::Calc lhs, Orbit::Calc rhs) { return static_cast<Orbit::Calc>(static_cast<int>(lhs) | static_cast<int>(rhs)); }
98
99/// @brief Allows construction of Calc objects
100/// @param[in] lhs Left-hand side enum value.
101/// @param[in] rhs Right-hand side enum value.
102/// @return The binary ANDed value.
103inline Orbit::Calc operator&(Orbit::Calc lhs, Orbit::Calc rhs) { return static_cast<Orbit::Calc>(static_cast<int>(lhs) & static_cast<int>(rhs)); }
104
105} // namespace NAV
Vector space operations.
The class is responsible for all time-related tasks.
The class is responsible for all time-related tasks.
Definition InsTime.hpp:710
Orbit & operator=(const Orbit &)=delete
Copy assignment operator.
Orbit(Orbit &&)=default
Move constructor.
Orbit & operator=(Orbit &&)=delete
Move assignment operator.
PosVelAccel calcSatellitePosVelAccel(const InsTime &transTime) const
Calculates position, velocity and acceleration of the satellite at transmission time.
Definition Orbit.cpp:25
virtual ~Orbit()=default
Destructor.
virtual PosVelAccel calcSatelliteData(const InsTime &transTime, Calc calc) const =0
Calculates position, velocity and acceleration of the satellite at transmission time.
Orbit()=default
Default Constructor.
virtual double calcSatellitePositionVariance() const =0
Calculates the Variance of the satellite position in [m^2].
friend Orbit::Calc operator|(Orbit::Calc lhs, Orbit::Calc rhs)
Allows construction of Calc objects.
Definition Orbit.hpp:97
Orbit(const Orbit &)=default
Copy constructor.
Calc
Calculation flags.
Definition Orbit.hpp:75
@ Calc_Position
Position calculation flag.
Definition Orbit.hpp:77
@ Calc_None
None.
Definition Orbit.hpp:76
@ Calc_Velocity
Velocity calculation flag.
Definition Orbit.hpp:78
@ Calc_Acceleration
Acceleration calculation flag.
Definition Orbit.hpp:79
Pos calcSatellitePos(const InsTime &transTime) const
Calculates position of the satellite at transmission time.
Definition Orbit.cpp:13
PosVel calcSatellitePosVel(const InsTime &transTime) const
Calculates position and velocity of the satellite at transmission time.
Definition Orbit.cpp:19
friend Orbit::Calc operator&(Orbit::Calc lhs, Orbit::Calc rhs)
Allows construction of Calc objects.
Definition Orbit.hpp:103
Code operator&(const Code &lhs, const Code &rhs)
Definition Code.cpp:697
Code operator|(const Code &lhs, const Code &rhs)
Definition Code.cpp:673
Satellite Position, Velocity and Acceleration.
Definition Orbit.hpp:40
Eigen::Vector3d e_accel
The WGS84 ECEF acceleration of the satellite at transmit time of the signal, in ECEF axes at the time...
Definition Orbit.hpp:43
Eigen::Vector3d e_vel
The WGS84 ECEF velocity of the satellite at transmit time of the signal, in ECEF axes at the time of ...
Definition Orbit.hpp:42
Eigen::Vector3d e_pos
The WGS84 ECEF position of the satellite at transmit time of the signal, in ECEF axes at the time of ...
Definition Orbit.hpp:41
Satellite Position and Velocity.
Definition Orbit.hpp:34
Eigen::Vector3d e_vel
The WGS84 ECEF velocity of the satellite at transmit time of the signal, in ECEF axes at the time of ...
Definition Orbit.hpp:36
Eigen::Vector3d e_pos
The WGS84 ECEF position of the satellite at transmit time of the signal, in ECEF axes at the time of ...
Definition Orbit.hpp:35
Satellite Position.
Definition Orbit.hpp:29
Eigen::Vector3d e_pos
The WGS84 ECEF position of the satellite at transmit time of the signal, in ECEF axes at the time of ...
Definition Orbit.hpp:30