pathfinder-for-autonomous-navigation / psim

Six DOF flight simulator and related GNC implementations.
MIT License
4 stars 6 forks source link

Magnetometer & Sun Vector Attitude Filter Implementation #194

Closed kylekrol closed 4 years ago

kylekrol commented 4 years ago

Magnetometer & Sun Vector Attitude Filter Implementation

Fixes #190.

Summary of changes

On the surface, the attitude filter seems to work. It's difficult to write good test cases using just PIO because numerical precision, at least so far, has been as issue. For example, the Frobenius norm of the update state covariance matrix is only accurate to two significant digits. Also, we currently only have a single testcase.

There are multiple tickets open to track the work on the attitude filter going forward: #187, #188, #189, #191, #193, and #197. This work includes:

Ptest Effects

NA

Testing

See the added unit test cases and tickets listed above for further testing improvements to come.

Constants

Constant Location
gnc::constant::ukf_sigma_v src/gnc_attitude_estimator.cpp
gnc::constant::ukf_sigma_u sr/gnc_attitude_estimator.cpp
gnc::constant::ukf_sigma_b src/gnc_attitude_estimator.cpp
gnc::constant::ukf_sigma_s src/gnc_attitude_estimator.cpp
dt_thresh (local scope) src/gnc_attitude_estimator.cpp
q_factor (local scope) src/gnc_attitude_estimator.cpp
var_q (local scope) src/gnc_attitude_estimator.cpp
var_g (local scope) src/gnc_attitude_estimator.cpp
init_state (local scope) src/gnc_attitude_estimator.cpp

Documentation Evidence

See inline documentation and the paper mentioned in the file documentation in include/gnc/attitude_estimator.hpp.