How to change measurement units in PrimaryFlightDisplayWidget to metric?

Completed

Comments

7 comments

  • DJI Developer Support
    You need to change by yourself. By checking the open source code, the velocity x, y, z are directly read from DJI Key. It may be not in m/s, you can convert by yourself.
    0
    Comment actions Permalink
  • Elias Asikainen

    For future msdk users: This is not the easiest way to do it. The units displayed are just dependent on the language settings of the device.

    0
    Comment actions Permalink
  • DJI Developer Support
    I will raise a feature ticket for this. But it will be low priority because we have limited workforces for UXSDK, that is why we open source it, you can edit as you wish.
    0
    Comment actions Permalink
  • Elias Asikainen

    Thank you

    0
    Comment actions Permalink
  • Antonioli Flavio

    I see in the code of PrimaryFlightDisplayWidget that it used the dji.v5.common.utils.UnitUtils class for convert units. The problem is that UnitUtils.isMetricUnits() return always false (imperial) and I don't know how to set to metric value. 

    It 's a documentation for the UnitUtils class?

    0
    Comment actions Permalink
  • DJI Developer Support
    There is no doc for it as it is an internal tool package. You can call UnitUtils.metricToImperialByLength or imperialToMetricByLength method to convert the unit.
    0
    Comment actions Permalink
  • Elias Asikainen

    The UnitUtils depend on the language Setting, or at least did in my case. When I switched the language from English(USA) to English(Country that doesn't use Imperial units) the Problem was resolved.

    0
    Comment actions Permalink

Please sign in to leave a comment.