mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 14:03:33 +08:00
refactor start of gps into separate function
This commit is contained in:
committed by
Mathieu Bresciani
parent
7eb2b08eed
commit
310b989c9a
@@ -1530,6 +1530,20 @@ void Ekf::loadMagCovData()
|
||||
P.slice<2, 2>(16, 16) = _saved_mag_ef_covmat;
|
||||
}
|
||||
|
||||
void Ekf::startGpsFusion()
|
||||
{
|
||||
resetHorizontalPositionToGps();
|
||||
|
||||
// when using 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;
|
||||
}
|
||||
|
||||
void Ekf::stopGpsFusion()
|
||||
{
|
||||
stopGpsPosFusion();
|
||||
|
||||
Reference in New Issue
Block a user