How to change measurement units in PrimaryFlightDisplayWidget to metric?

已完成

评论

7 条评论

  • 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
    评论操作 固定链接
  • 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
    评论操作 固定链接
  • 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
    评论操作 固定链接
  • Elias Asikainen

    Thank you

    0
    评论操作 固定链接
  • 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
    评论操作 固定链接
  • 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
    评论操作 固定链接
  • 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
    评论操作 固定链接

请先登录再写评论。