mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 06:36:45 +08:00
ekf2: simplify global position publication validity check
This commit is contained in:
@@ -728,7 +728,7 @@ void EKF2::PublishEventFlags(const hrt_abstime ×tamp)
|
||||
|
||||
void EKF2::PublishGlobalPosition(const hrt_abstime ×tamp)
|
||||
{
|
||||
if (_ekf.global_position_is_valid() && !_preflt_checker.hasFailed()) {
|
||||
if (_ekf.global_position_is_valid()) {
|
||||
const Vector3f position{_ekf.getPosition()};
|
||||
|
||||
// generate and publish global position data
|
||||
|
||||
Reference in New Issue
Block a user