0.2.0
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
13
14#pragma once
15
17#include "util/Eigen.hpp"
18
19namespace NAV
20{
21
23class Orbit
24{
25 public:
27 struct Pos
28 {
29 Eigen::Vector3d e_pos;
30 };
32 struct PosVel
33 {
34 Eigen::Vector3d e_pos;
35 Eigen::Vector3d e_vel;
36 };
39 {
40 Eigen::Vector3d e_pos;
41 Eigen::Vector3d e_vel;
42 Eigen::Vector3d e_accel;
43 };
44
46 Orbit() = default;
48 virtual ~Orbit() = default;
50 Orbit(const Orbit&) = default;
52 Orbit(Orbit&&) = default;
54 Orbit& operator=(const Orbit&) = delete;
56 Orbit& operator=(Orbit&&) = delete;
57
60 [[nodiscard]] Pos calcSatellitePos(const InsTime& transTime) const;
63 [[nodiscard]] PosVel calcSatellitePosVel(const InsTime& transTime) const;
66 [[nodiscard]] PosVelAccel calcSatellitePosVelAccel(const InsTime& transTime) const;
67
69 [[nodiscard]] virtual double calcSatellitePositionVariance() const = 0;
70
71 protected:
73 enum Calc
74 {
75 Calc_None = 0b000,
76 Calc_Position = 0b001,
77 Calc_Velocity = 0b010,
79 };
80
81 public:
84
85 protected:
89 [[nodiscard]] virtual PosVelAccel calcSatelliteData(const InsTime& transTime, Calc calc) const = 0;
90};
91
96inline Orbit::Calc operator|(Orbit::Calc lhs, Orbit::Calc rhs) { return static_cast<Orbit::Calc>(static_cast<int>(lhs) | static_cast<int>(rhs)); }
97
102inline Orbit::Calc operator&(Orbit::Calc lhs, Orbit::Calc rhs) { return static_cast<Orbit::Calc>(static_cast<int>(lhs) & static_cast<int>(rhs)); }
103
104} // namespace NAV
Code operator|(const Code::Enum &lhs, const Code::Enum &rhs)
Allows combining flags of the Code enum.
Code operator&(const Code::Enum &lhs, const Code::Enum &rhs)
Allows combining flags of the Code enum.
Vector space operations.
The class is responsible for all time-related tasks.
The class is responsible for all time-related tasks.
Definition InsTime.hpp:667
Abstract satellite orbit information.
Definition Orbit.hpp:24
PosVel calcSatellitePosVel(const InsTime &transTime) const
Calculates position and velocity of the satellite at transmission time.
PosVelAccel calcSatellitePosVelAccel(const InsTime &transTime) const
Calculates position, velocity and acceleration of the satellite at transmission time.
Orbit & operator=(const Orbit &)=delete
Copy assignment operator.
Calc
Calculation flags.
Definition Orbit.hpp:74
@ Calc_Position
Position calculation flag.
Definition Orbit.hpp:76
@ Calc_None
None.
Definition Orbit.hpp:75
@ Calc_Velocity
Velocity calculation flag.
Definition Orbit.hpp:77
@ Calc_Acceleration
Acceleration calculation flag.
Definition Orbit.hpp:78
Orbit(Orbit &&)=default
Move constructor.
Orbit & operator=(Orbit &&)=delete
Move assignment operator.
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.
Pos calcSatellitePos(const InsTime &transTime) const
Calculates position 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:96
Orbit(const Orbit &)=default
Copy constructor.
friend Orbit::Calc operator&(Orbit::Calc lhs, Orbit::Calc rhs)
Allows construction of Calc objects.
Definition Orbit.hpp:102
Satellite Position, Velocity and Acceleration.
Definition Orbit.hpp:39
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: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 ...
Definition Orbit.hpp: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 ...
Definition Orbit.hpp:40
Satellite Position and Velocity.
Definition Orbit.hpp:33
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: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 ...
Definition Orbit.hpp:34
Satellite Position.
Definition Orbit.hpp:28
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:29