refactor start of gps into separate function

This commit is contained in:
kamilritz
2020-08-06 14:41:35 +02:00
committed by Mathieu Bresciani
parent 7eb2b08eed
commit 310b989c9a
3 changed files with 16 additions and 12 deletions
+1 -10
View File
@@ -514,16 +514,7 @@ void Ekf::controlGpsFusion()
// If the heading is valid start using gps aiding
if (_control_status.flags.yaw_align) {
resetHorizontalPositionToGps();
// when adding with optical flow,
// velocity reset is not necessary
if (!_control_status.flags.opt_flow) {
resetVelocityToGps();
}
ECL_INFO_TIMESTAMPED("starting GPS fusion");
_control_status.flags.gps = true;
startGpsFusion();
}
}