Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent reporting of health data #94

Closed
zulufoxtrot opened this issue Jul 20, 2019 · 0 comments · Fixed by mavlink/MAVSDK#807
Closed

Inconsistent reporting of health data #94

zulufoxtrot opened this issue Jul 20, 2019 · 0 comments · Fixed by mavlink/MAVSDK#807
Assignees
Labels

Comments

@zulufoxtrot
Copy link

zulufoxtrot commented Jul 20, 2019

I’m trying to simulate a loss of GPS lock in SITL, using gpssim stop as suggested by the documentation. While QGC correctly reports the loss, the SDK’s Health query still returns is_local_position_ok: True, is_global_position_ok: True, is_home_position_ok: True.

Steps to reproduce

  1. Launch an instance of PX4 in SITL and wait for EKF to get a position.

  2. Launch your piece of code.

async for health in vehicle.telemetry.health():  
    print(str(health))

Make sure the parameters mentioned above return True.

  1. run gpssim stop in the PX4 console.
pxh> gpssim stop
INFO  [gpssim] exiting
pxh> WARN  [ecl/EKF] EKF GPS data stopped
WARN  [ecl/EKF] EKF stopping navigation

Check EKF status with ekf2 status:

pxh> ekf2 status
INFO  [ekf2] local position: invalid
INFO  [ekf2] global position: invalid
INFO  [ekf2] time slip: 0 us

The parameters still return True. They should be returning False.

Observations

I have noticed 2 different behaviors depending on the order the steps are done:

  • stop GPS, then start SDK: is_global_position_ok is correctly reported as False. Then start GPS again, and is_global_position_ok correctly (and immediately) switches to True.
  • start SDK, then stop GPS: is_global_position incorrectly stays True indefinitely.

System info

PX4: 1.9.0

MAVSDK-Python: 0.1.0 (pypi)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants