Is_level_calibration_ok - What is it telling me when it returns True?

In telemetry.py in the class called Health it says in the comments:

" is_ level_calibration_ok: bool
True if the vehicle has a valid level calibration"

  1. What is done so that it knows it is valid?
  2. Can I trust it?
  3. If it isn’t reliable what is the best way to verify a valid calibration?

I am needing a simple and reliable way to verify a calibration using MAVSDK.

That’s a good question. Unfortunately, the answer is less good.

Check the implementation here:

You can see that the idea is too look at the param SENS_BOARD_X_OFF as an indicator if that param has been determined or is at the deafult of 0.
However, this was never actually used or tested and is right now just hard-coded to true, more as a placeholder for the API. Sorry about that! It’s not how it should have been done.

If we activated the current way using this param to check the calibration, this would give us an indication if the level calibration has been done but it does not tell us if the calibration is valid/correct.

However, thinking more about this, I’m not sure how to assess the validity of a level calibration in the first place. Basically, the autopilot has no idea if the current level calibration is correct or not unless it knows that it stands on a horizontal surface, so basically the calibration needs calibration conditions to verify it. Once set, you sort of have to trust it.

Good to know. Thanks for the prompt response. I have an idea on how to achieve what I need to for our application. Thanks again

1 Like