Skip to content

Commit

Permalink
AP_NavEKF3: document provenance of tilt error variance equations
Browse files Browse the repository at this point in the history
This is also from the older version of the generator.

Note that as documented, some of the equations have been removed and
rearranged slightly as it is assumed their terms are zero. Additionally,
the result is taken as the sum of the diagonal entries of the matrix.
  • Loading branch information
tpwrules authored and tridge committed Sep 30, 2024
1 parent 34fba4d commit f9fa256
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libraries/AP_NavEKF3/AP_NavEKF3_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ void NavEKF3_core::calcTiltErrorVariance()
const ftype &q2 = stateStruct.quat[2];
const ftype &q3 = stateStruct.quat[3];

// equations generated by quaternion_error_propagation(): in AP_NavEKF3/derivation/main.py
// equations generated by quaternion_error_propagation(): in derivation/generate_2.py
// only diagonals have been used
// dq0 ... dq3 terms have been zeroed
const ftype PS1 = q0*q1 + q2*q3;
Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_NavEKF3/derivation/generate_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ def generate_code():


# derive autocode for other methods
print('Computing tilt error covariance matrix ...')
quaternion_error_propagation()
# print('Computing tilt error covariance matrix ...')
# quaternion_error_propagation()
# print('Generating heading observation code ...')
# yaw_observation(P,state,R_to_earth)
print('Generating gps heading observation code ...')
Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_NavEKF3/derivation/generate_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,8 @@ def generate_code():


# derive autocode for other methods
# print('Computing tilt error covariance matrix ...')
# quaternion_error_propagation()
print('Computing tilt error covariance matrix ...')
quaternion_error_propagation()
print('Generating heading observation code ...')
yaw_observation(P,state,R_to_earth)
# print('Generating gps heading observation code ...')
Expand Down

0 comments on commit f9fa256

Please sign in to comment.