13
13
14
14
#include " ../base/component.hpp"
15
15
16
+ /* *
17
+ * @enum ErrorFrame
18
+ * @brief Error definition frame
19
+ */
20
+ enum class ErrorFrame {
21
+ kInertial , // !< Inertial frame
22
+ kRtn , // !< RTN frame
23
+ };
24
+
16
25
/*
17
26
* @class OrbitObserver
18
27
* @brief Ideal component which can observe orbit
@@ -24,9 +33,12 @@ class OrbitObserver : public Component, public ILoggable {
24
33
* @brief Constructor without power port
25
34
* @param [in] prescaler: Frequency scale factor for update
26
35
* @param [in] clock_generator: Clock generator
36
+ * @param [in] error_frame: Error frame definition
37
+ * @param [in] error_standard_deviation: Position and Velocity standard deviation noise [m, m/s]
27
38
* @param [in] orbit: Orbit information
28
39
*/
29
- OrbitObserver (const int prescaler, ClockGenerator* clock_generator, const Orbit& orbit);
40
+ OrbitObserver (const int prescaler, ClockGenerator* clock_generator, const ErrorFrame error_frame, const libra::Vector<6 > error_standard_deviation,
41
+ const const Orbit& orbit);
30
42
31
43
/* *
32
44
* @fn ~AttitudeObserver
@@ -66,11 +78,19 @@ class OrbitObserver : public Component, public ILoggable {
66
78
inline const libra::Vector<3 > GetVelocity_i_m_s () const { return observed_velocity_i_m_s_; };
67
79
68
80
protected:
69
- libra::Vector<3 > observed_position_i_m_{0.0 }; // !< Observed position @ inertial frame [m]
70
- libra::Vector<3 > observed_velocity_i_m_s_{0.0 }; // !< Observed velocity @ inertial frame [m/s]
81
+ libra::Vector<3 > observed_position_i_m_{0.0 }; // !< Observed position @ inertial frame [m]
82
+ libra::Vector<3 > observed_velocity_i_m_s_{0.0 }; // !< Observed velocity @ inertial frame [m/s]
83
+ libra::Vector<3 > observed_position_rtn_m_{0.0 }; // !< Observed position @ RTN frame [m]
84
+ libra::Vector<3 > observed_velocity_rtn_m_s_{0.0 }; // !< Observed velocity @ RTN frame [m/s]
85
+
86
+ ErrorFrame error_frame_; // !< Error definition frame
87
+ libra::NormalRand normal_random_noise_[6 ]; // !< Position and Velocity noise [m, m/s]
71
88
72
89
// Observed variables
73
90
const Orbit& orbit_; // !< Orbit information
91
+
92
+ libra::Vector<3 > AddPositionNoise (const libra::Vector<3 > position_m);
93
+ libra::Vector<3 > AddVelocityNoise (const libra::Vector<3 > velocity_m_s);
74
94
};
75
95
76
96
/* *
0 commit comments