Skip to content

Commit

Permalink
EKF: remove un-used function
Browse files Browse the repository at this point in the history
  • Loading branch information
priseborough committed Feb 28, 2020
1 parent f7a95c6 commit 9300530
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
8 changes: 0 additions & 8 deletions EKF/ekf.h
Original file line number Diff line number Diff line change
Expand Up @@ -831,14 +831,6 @@ class Ekf : public EstimatorInterface

void setVelPosFaultStatus(const int index, const bool status);

// converts Tait-Bryan 312 sequence of rotations from frame 1 to frame 2
// to the corresponding rotation matrix that rotates from frame 2 to frame 1
// rot312(0) - First rotation is a RH rotation about the Z axis (rad)
// rot312(1) - Second rotation is a RH rotation about the X axis (rad)
// rot312(2) - Third rotation is a RH rotation about the Y axis (rad)
// See http://www.atacolorado.com/eulersequences.doc
Dcmf taitBryan312ToRotMat(Vector3f &rot312);

// Declarations used to control use of the EKF-GSF yaw estimator

int64_t _emergency_yaw_reset_time{0}; ///< timestamp of last emergency yaw reset (uSec)
Expand Down
28 changes: 2 additions & 26 deletions EKF/ekf_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1367,8 +1367,8 @@ void Ekf::fuse(float *K, float innovation)

void Ekf::uncorrelateQuatFromOtherStates()
{
P.slice<_k_num_states - 4, 4>(4, 0) = 0.f;
P.slice<4, _k_num_states - 4>(0, 4) = 0.f;
P.slice<_k_num_states - 4, 4>(4, 0) = 0.f;
P.slice<4, _k_num_states - 4>(0, 4) = 0.f;
}

bool Ekf::global_position_is_valid()
Expand Down Expand Up @@ -1934,30 +1934,6 @@ bool Ekf::getDataEKFGSF(float *yaw_composite, float *yaw_variance, float yaw[N_M
return yawEstimator.getLogData(yaw_composite,yaw_variance,yaw,innov_VN,innov_VE,weight);
}

Dcmf Ekf::taitBryan312ToRotMat(Vector3f &rot312)
{
// Calculate the frame2 to frame 1 rotation matrix from a 312 rotation sequence
const float c2 = cosf(rot312(2));
const float s2 = sinf(rot312(2));
const float s1 = sinf(rot312(1));
const float c1 = cosf(rot312(1));
const float s0 = sinf(rot312(0));
const float c0 = cosf(rot312(0));

Dcmf R;
R(0, 0) = c0 * c2 - s0 * s1 * s2;
R(1, 1) = c0 * c1;
R(2, 2) = c2 * c1;
R(0, 1) = -c1 * s0;
R(0, 2) = s2 * c0 + c2 * s1 * s0;
R(1, 0) = c2 * s0 + s2 * s1 * c0;
R(1, 2) = s0 * s2 - s1 * c0 * c2;
R(2, 0) = -s2 * c1;
R(2, 1) = s1;

return R;
}

void Ekf::runYawEKFGSF()
{
float TAS;
Expand Down

0 comments on commit 9300530

Please sign in to comment.