mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 20:53:34 +08:00
EKF2: add validity flags to global pos message (#23787)
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
This commit is contained in:
co-authored by
Mathieu Bresciani
parent
808153b049
commit
0c451552c7
@@ -220,13 +220,17 @@ public:
|
||||
// return true if the global position estimate is valid
|
||||
// return true if the origin is set we are not doing unconstrained free inertial navigation
|
||||
// and have not started using synthetic position observations to constrain drift
|
||||
bool global_position_is_valid() const
|
||||
bool isGlobalHorizontalPositionValid() const
|
||||
{
|
||||
return (_pos_ref.isInitialized() && local_position_is_valid());
|
||||
return _pos_ref.isInitialized() && isLocalHorizontalPositionValid();
|
||||
}
|
||||
|
||||
// return true if the local position estimate is valid
|
||||
bool local_position_is_valid() const
|
||||
bool isGlobalVerticalPositionValid() const
|
||||
{
|
||||
return _pos_ref.isInitialized() && isLocalVerticalPositionValid();
|
||||
}
|
||||
|
||||
bool isLocalHorizontalPositionValid() const
|
||||
{
|
||||
return !_horizontal_deadreckon_time_exceeded;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user