Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
EKF: Allow EKF to start without using mag data when not using earth f…
Browse files Browse the repository at this point in the history
…rame data
  • Loading branch information
priseborough committed Nov 14, 2018
1 parent 572710e commit c49ab76
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions EKF/ekf_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,10 @@ bool Ekf::resetMagHeading(Vector3f &mag_init)
// the angle of the projection onto the horizontal gives the yaw angle
euler321(2) = -atan2f(mag_earth_pred(1), mag_earth_pred(0)) + _mag_declination;

} else if (_params.mag_fusion_type == MAG_FUSE_TYPE_INDOOR && _mag_use_inhibit) {
// we are operating without knowing the earth frame yaw angle
return true;

} else {
// there is no yaw observation
return false;
Expand Down Expand Up @@ -649,6 +653,10 @@ bool Ekf::resetMagHeading(Vector3f &mag_init)
// the angle of the projection onto the horizontal gives the yaw angle
euler312(0) = -atan2f(mag_earth_pred(1), mag_earth_pred(0)) + _mag_declination;

} else if (_params.mag_fusion_type == MAG_FUSE_TYPE_INDOOR && _mag_use_inhibit) {
// we are operating without knowing the earth frame yaw angle
return true;

} else {
// there is no yaw observation
return false;
Expand Down

0 comments on commit c49ab76

Please sign in to comment.