Simplify calling so that it is only called in two ways:
1) Immediately before 3-axis mag fusion if not called since the last earth field covariance reset so that the earth field declination information can be formed.
2) Immediately after 3-axis mag fusion otherwise.
master
Paul Riseborough6 years agocommitted byDaniel Agar
float_last_static_yaw{0.0f};///< last yaw angle recorded when on ground motion checks were passing (rad)
bool_vehicle_at_rest_prev{false};///< true when the vehicle was at rest the previous time the status was checked
bool_mag_yaw_reset_req{false};///< true when a reset of the yaw using the magnetomer data has been requested
bool_mag_decl_cov_reset{false};///< true after the fuseDeclination() function has been used to modify the earth field covariances after a magnetic field reset event.
floatP[_k_num_states][_k_num_states]{};///< state covariance matrix