-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
247 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
src/modules/ekf2/EKF/python/ekf_derivation/generated/compute_ev_body_vel_hx.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// ----------------------------------------------------------------------------- | ||
// This file was autogenerated by symforce from template: | ||
// function/FUNCTION.h.jinja | ||
// Do NOT modify by hand. | ||
// ----------------------------------------------------------------------------- | ||
|
||
#pragma once | ||
|
||
#include <matrix/math.hpp> | ||
|
||
namespace sym { | ||
|
||
/** | ||
* This function was autogenerated from a symbolic function. Do not modify by hand. | ||
* | ||
* Symbolic function: compute_ev_body_vel_hx | ||
* | ||
* Args: | ||
* state: Matrix24_1 | ||
* | ||
* Outputs: | ||
* H: Matrix23_1 | ||
*/ | ||
template <typename Scalar> | ||
void ComputeEvBodyVelHx(const matrix::Matrix<Scalar, 24, 1>& state, | ||
matrix::Matrix<Scalar, 23, 1>* const H = nullptr) { | ||
// Total ops: 60 | ||
|
||
// Input arrays | ||
|
||
// Intermediate terms (13) | ||
const Scalar _tmp0 = 2 * state(5, 0); | ||
const Scalar _tmp1 = 2 * state(6, 0); | ||
const Scalar _tmp2 = _tmp0 * state(3, 0) - _tmp1 * state(2, 0); | ||
const Scalar _tmp3 = (Scalar(1) / Scalar(2)) * state(1, 0); | ||
const Scalar _tmp4 = | ||
(Scalar(1) / Scalar(2)) * _tmp0 * state(2, 0) + (Scalar(1) / Scalar(2)) * _tmp1 * state(3, 0); | ||
const Scalar _tmp5 = 4 * state(4, 0); | ||
const Scalar _tmp6 = 2 * state(1, 0); | ||
const Scalar _tmp7 = _tmp0 * state(0, 0) - _tmp5 * state(3, 0) + _tmp6 * state(6, 0); | ||
const Scalar _tmp8 = (Scalar(1) / Scalar(2)) * _tmp7; | ||
const Scalar _tmp9 = 2 * state(0, 0); | ||
const Scalar _tmp10 = _tmp0 * state(1, 0) - _tmp5 * state(2, 0) - _tmp9 * state(6, 0); | ||
const Scalar _tmp11 = (Scalar(1) / Scalar(2)) * _tmp10; | ||
const Scalar _tmp12 = (Scalar(1) / Scalar(2)) * _tmp2; | ||
|
||
// Output terms (1) | ||
if (H != nullptr) { | ||
matrix::Matrix<Scalar, 23, 1>& _h = (*H); | ||
|
||
_h.setZero(); | ||
|
||
_h(0, 0) = -_tmp11 * state(3, 0) - _tmp2 * _tmp3 + _tmp4 * state(0, 0) + _tmp8 * state(2, 0); | ||
_h(1, 0) = _tmp11 * state(0, 0) - _tmp12 * state(2, 0) - _tmp3 * _tmp7 + _tmp4 * state(3, 0); | ||
_h(2, 0) = _tmp10 * _tmp3 - _tmp12 * state(3, 0) - _tmp4 * state(2, 0) + _tmp8 * state(0, 0); | ||
_h(3, 0) = -2 * std::pow(state(2, 0), Scalar(2)) - 2 * std::pow(state(3, 0), Scalar(2)) + 1; | ||
_h(4, 0) = _tmp6 * state(2, 0) + _tmp9 * state(3, 0); | ||
_h(5, 0) = _tmp6 * state(3, 0) - _tmp9 * state(2, 0); | ||
} | ||
} // NOLINT(readability/fn_size) | ||
|
||
// NOLINTNEXTLINE(readability/fn_size) | ||
} // namespace sym |
67 changes: 67 additions & 0 deletions
67
src/modules/ekf2/EKF/python/ekf_derivation/generated/compute_ev_body_vel_hy.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// ----------------------------------------------------------------------------- | ||
// This file was autogenerated by symforce from template: | ||
// function/FUNCTION.h.jinja | ||
// Do NOT modify by hand. | ||
// ----------------------------------------------------------------------------- | ||
|
||
#pragma once | ||
|
||
#include <matrix/math.hpp> | ||
|
||
namespace sym { | ||
|
||
/** | ||
* This function was autogenerated from a symbolic function. Do not modify by hand. | ||
* | ||
* Symbolic function: compute_ev_body_vel_hy | ||
* | ||
* Args: | ||
* state: Matrix24_1 | ||
* | ||
* Outputs: | ||
* H: Matrix23_1 | ||
*/ | ||
template <typename Scalar> | ||
void ComputeEvBodyVelHy(const matrix::Matrix<Scalar, 24, 1>& state, | ||
matrix::Matrix<Scalar, 23, 1>* const H = nullptr) { | ||
// Total ops: 64 | ||
|
||
// Input arrays | ||
|
||
// Intermediate terms (9) | ||
const Scalar _tmp0 = 2 * state(4, 0); | ||
const Scalar _tmp1 = 2 * state(1, 0); | ||
const Scalar _tmp2 = | ||
-Scalar(1) / Scalar(2) * _tmp0 * state(3, 0) + (Scalar(1) / Scalar(2)) * _tmp1 * state(6, 0); | ||
const Scalar _tmp3 = 2 * state(3, 0); | ||
const Scalar _tmp4 = | ||
(Scalar(1) / Scalar(2)) * _tmp0 * state(1, 0) + (Scalar(1) / Scalar(2)) * _tmp3 * state(6, 0); | ||
const Scalar _tmp5 = 4 * state(5, 0); | ||
const Scalar _tmp6 = 2 * state(6, 0); | ||
const Scalar _tmp7 = -Scalar(1) / Scalar(2) * _tmp0 * state(0, 0) - | ||
Scalar(1) / Scalar(2) * _tmp5 * state(3, 0) + | ||
(Scalar(1) / Scalar(2)) * _tmp6 * state(2, 0); | ||
const Scalar _tmp8 = (Scalar(1) / Scalar(2)) * _tmp0 * state(2, 0) - | ||
Scalar(1) / Scalar(2) * _tmp5 * state(1, 0) + | ||
(Scalar(1) / Scalar(2)) * _tmp6 * state(0, 0); | ||
|
||
// Output terms (1) | ||
if (H != nullptr) { | ||
matrix::Matrix<Scalar, 23, 1>& _h = (*H); | ||
|
||
_h.setZero(); | ||
|
||
_h(0, 0) = | ||
-_tmp2 * state(1, 0) - _tmp4 * state(3, 0) + _tmp7 * state(2, 0) + _tmp8 * state(0, 0); | ||
_h(1, 0) = | ||
-_tmp2 * state(2, 0) + _tmp4 * state(0, 0) - _tmp7 * state(1, 0) + _tmp8 * state(3, 0); | ||
_h(2, 0) = | ||
-_tmp2 * state(3, 0) + _tmp4 * state(1, 0) + _tmp7 * state(0, 0) - _tmp8 * state(2, 0); | ||
_h(3, 0) = _tmp1 * state(2, 0) - _tmp3 * state(0, 0); | ||
_h(4, 0) = -2 * std::pow(state(1, 0), Scalar(2)) - 2 * std::pow(state(3, 0), Scalar(2)) + 1; | ||
_h(5, 0) = _tmp1 * state(0, 0) + _tmp3 * state(2, 0); | ||
} | ||
} // NOLINT(readability/fn_size) | ||
|
||
// NOLINTNEXTLINE(readability/fn_size) | ||
} // namespace sym |
63 changes: 63 additions & 0 deletions
63
src/modules/ekf2/EKF/python/ekf_derivation/generated/compute_ev_body_vel_hz.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// ----------------------------------------------------------------------------- | ||
// This file was autogenerated by symforce from template: | ||
// function/FUNCTION.h.jinja | ||
// Do NOT modify by hand. | ||
// ----------------------------------------------------------------------------- | ||
|
||
#pragma once | ||
|
||
#include <matrix/math.hpp> | ||
|
||
namespace sym { | ||
|
||
/** | ||
* This function was autogenerated from a symbolic function. Do not modify by hand. | ||
* | ||
* Symbolic function: compute_ev_body_vel_hz | ||
* | ||
* Args: | ||
* state: Matrix24_1 | ||
* | ||
* Outputs: | ||
* H: Matrix23_1 | ||
*/ | ||
template <typename Scalar> | ||
void ComputeEvBodyVelHz(const matrix::Matrix<Scalar, 24, 1>& state, | ||
matrix::Matrix<Scalar, 23, 1>* const H = nullptr) { | ||
// Total ops: 60 | ||
|
||
// Input arrays | ||
|
||
// Intermediate terms (13) | ||
const Scalar _tmp0 = 2 * state(4, 0); | ||
const Scalar _tmp1 = 2 * state(5, 0); | ||
const Scalar _tmp2 = | ||
(Scalar(1) / Scalar(2)) * _tmp0 * state(1, 0) + (Scalar(1) / Scalar(2)) * _tmp1 * state(2, 0); | ||
const Scalar _tmp3 = _tmp0 * state(2, 0) - _tmp1 * state(1, 0); | ||
const Scalar _tmp4 = (Scalar(1) / Scalar(2)) * _tmp3; | ||
const Scalar _tmp5 = 4 * state(6, 0); | ||
const Scalar _tmp6 = _tmp0 * state(3, 0) - _tmp1 * state(0, 0) - _tmp5 * state(1, 0); | ||
const Scalar _tmp7 = (Scalar(1) / Scalar(2)) * _tmp6; | ||
const Scalar _tmp8 = _tmp0 * state(0, 0) + _tmp1 * state(3, 0) - _tmp5 * state(2, 0); | ||
const Scalar _tmp9 = (Scalar(1) / Scalar(2)) * state(3, 0); | ||
const Scalar _tmp10 = (Scalar(1) / Scalar(2)) * _tmp8; | ||
const Scalar _tmp11 = 2 * state(2, 0); | ||
const Scalar _tmp12 = 2 * state(1, 0); | ||
|
||
// Output terms (1) | ||
if (H != nullptr) { | ||
matrix::Matrix<Scalar, 23, 1>& _h = (*H); | ||
|
||
_h.setZero(); | ||
|
||
_h(0, 0) = _tmp2 * state(2, 0) - _tmp4 * state(1, 0) + _tmp7 * state(0, 0) - _tmp8 * _tmp9; | ||
_h(1, 0) = _tmp10 * state(0, 0) - _tmp2 * state(1, 0) - _tmp4 * state(2, 0) + _tmp6 * _tmp9; | ||
_h(2, 0) = _tmp10 * state(1, 0) + _tmp2 * state(0, 0) - _tmp3 * _tmp9 - _tmp7 * state(2, 0); | ||
_h(3, 0) = _tmp11 * state(0, 0) + _tmp12 * state(3, 0); | ||
_h(4, 0) = _tmp11 * state(3, 0) - _tmp12 * state(0, 0); | ||
_h(5, 0) = -2 * std::pow(state(1, 0), Scalar(2)) - 2 * std::pow(state(2, 0), Scalar(2)) + 1; | ||
} | ||
} // NOLINT(readability/fn_size) | ||
|
||
// NOLINTNEXTLINE(readability/fn_size) | ||
} // namespace sym |
Oops, something went wrong.