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 | #include "ErrorEquations.hpp" | ||
10 | |||
11 | #include "Navigation/Constants.hpp" | ||
12 | #include "Navigation/Math/Math.hpp" | ||
13 | |||
14 | namespace NAV | ||
15 | { | ||
16 | |||
17 | 12888 | Eigen::Matrix3d e_F_dpsi_dpsi(double omega_ie) | |
18 | { | ||
19 | // Math: \mathbf{F}_{11}^e = -\mathbf{\Omega}_{ie}^e | ||
20 | 12888 | Eigen::Matrix3d e_F_11; | |
21 | // clang-format off | ||
22 |
3/6✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12888 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12888 times.
✗ Branch 8 not taken.
|
12888 | e_F_11 << 0 , omega_ie, 0, |
23 |
3/6✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12888 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12888 times.
✗ Branch 8 not taken.
|
12888 | -omega_ie, 0 , 0, |
24 |
3/6✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12888 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12888 times.
✗ Branch 8 not taken.
|
12888 | 0 , 0 , 0; |
25 | // clang-format on | ||
26 | 12888 | return e_F_11; | |
27 | } | ||
28 | |||
29 | 12888 | Eigen::Matrix3d e_F_dpsi_dw(const Eigen::Matrix3d& e_Dcm_b) | |
30 | { | ||
31 | 12888 | return e_Dcm_b; | |
32 | } | ||
33 | |||
34 | 12888 | Eigen::Matrix3d e_F_dv_dpsi(const Eigen::Vector3d& e_force_ib) | |
35 | { | ||
36 | // Math: \mathbf{F}_{21}^e = \begin{bmatrix} (\mathbf{C}_{b}^e \hat{f}_{ib}^b) \land \end{bmatrix} | ||
37 | 12888 | Eigen::Matrix3d e_F_21; | |
38 | // clang-format off | ||
39 |
5/10✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12888 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12888 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12888 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 12888 times.
✗ Branch 14 not taken.
|
12888 | e_F_21 << 0 , e_force_ib.z(), -e_force_ib.y(), |
40 |
5/10✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12888 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12888 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12888 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 12888 times.
✗ Branch 14 not taken.
|
12888 | -e_force_ib.z(), 0 , e_force_ib.x(), |
41 |
5/10✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12888 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12888 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12888 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 12888 times.
✗ Branch 14 not taken.
|
12888 | e_force_ib.y(), -e_force_ib.x(), 0 ; |
42 | // clang-format on | ||
43 | 12888 | return e_F_21; | |
44 | } | ||
45 | |||
46 | 12888 | Eigen::Matrix3d e_F_dv_dv(double omega_ie) | |
47 | { | ||
48 | // Math: \mathbf{F}_{22}^e = -2\mathbf{\Omega}_{ie}^e | ||
49 | 12888 | Eigen::Matrix3d e_F_22; | |
50 | // clang-format off | ||
51 |
3/6✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12888 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12888 times.
✗ Branch 8 not taken.
|
12888 | e_F_22 << 0 , 2 * omega_ie, 0, |
52 |
3/6✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12888 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12888 times.
✗ Branch 8 not taken.
|
12888 | -2 * omega_ie, 0 , 0, |
53 |
3/6✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12888 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12888 times.
✗ Branch 8 not taken.
|
12888 | 0 , 0 , 0; |
54 | // clang-format on | ||
55 | 12888 | return e_F_22; | |
56 | } | ||
57 | |||
58 | 12888 | Eigen::Matrix3d e_F_dv_dr(const Eigen::Vector3d& e_position, const Eigen::Vector3d& e_gravitation, double r_eS_e, const Eigen::Vector3d& e_omega_ie) | |
59 | { | ||
60 |
1/2✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
|
12888 | Eigen::Matrix3d e_Omega_ie = math::skewSymmetricMatrix(e_omega_ie); |
61 | |||
62 | // Math: \mathbf{F}_{23}^e = -\left( \dfrac{2 \boldsymbol{\gamma}_{ib}^e}{r_{eS}^e} \dfrac{{\mathbf{r}_{eb}^e}^T}{\left| \mathbf{r}_{eb}^e \right|} + \boldsymbol{\Omega}_{ie}^e \boldsymbol{\Omega}_{ie}^e \right) | ||
63 |
9/18✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12888 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12888 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12888 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 12888 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 12888 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 12888 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 12888 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 12888 times.
✗ Branch 26 not taken.
|
12888 | Eigen::Matrix3d e_F_23 = -((2 * e_gravitation * e_position.transpose()) / (r_eS_e * e_position.norm()) + e_Omega_ie * e_Omega_ie); |
64 | |||
65 | 25776 | return e_F_23; | |
66 | } | ||
67 | |||
68 | 12888 | Eigen::Matrix3d e_F_dv_df(const Eigen::Matrix3d& e_Dcm_b) | |
69 | { | ||
70 | 12888 | return e_Dcm_b; | |
71 | } | ||
72 | |||
73 | 12888 | Eigen::Matrix3d e_F_dr_dv() | |
74 | { | ||
75 |
2/4✓ Branch 1 taken 12888 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12888 times.
✗ Branch 5 not taken.
|
12888 | return Eigen::Matrix3d::Identity(); |
76 | } | ||
77 | |||
78 | 6444 | Eigen::Matrix3d e_F_df_df(const Eigen::Vector3d& beta_a) | |
79 | { | ||
80 | // Math: \mathbf{F}_{a} = - \begin{bmatrix} \beta_{a,1} & 0 & 0 \\ 0 & \beta_{a,2} & 0 \\ 0 & 0 & \beta_{a,2} \end{bmatrix} \quad \text{T. Hobiger}\,(6.3) | ||
81 |
3/6✓ Branch 1 taken 6444 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 6444 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 6444 times.
✗ Branch 8 not taken.
|
6444 | return -1.0 * beta_a.asDiagonal(); |
82 | } | ||
83 | |||
84 | 6444 | Eigen::Matrix3d e_F_dw_dw(const Eigen::Vector3d& beta_omega) | |
85 | { | ||
86 | // Math: \mathbf{F}_{\omega} = - \begin{bmatrix} \beta_{\omega,1} & 0 & 0 \\ 0 & \beta_{\omega,2} & 0 \\ 0 & 0 & \beta_{\omega,2} \end{bmatrix} \quad \text{T. Hobiger}\,(6.3) | ||
87 |
3/6✓ Branch 1 taken 6444 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 6444 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 6444 times.
✗ Branch 8 not taken.
|
6444 | return -1.0 * beta_omega.asDiagonal(); |
88 | } | ||
89 | |||
90 | } // namespace NAV | ||
91 |