简体   繁体   English

大疆MSDK与经纬M300无人机如何获取绝对高度值(ASL)

[英]How can I obtain Absolute Altitude Value (ASL) using DJI MSDK and M300 drone

I am trying to get the drone absolute altitude value (ASL) in real time (before taking off)我正在尝试实时获取无人机绝对高度值(ASL)(起飞前)

I have 2 drones, Mavic 2 enterprise advanced & M300.我有 2 架无人机,Mavic 2 enterprise advanced 和 M300。

When using the below code in mavic2, I was able to obtain the ASL, however the same code returns NULL value when using with M300:在 mavic2 中使用以下代码时,我能够获得 ASL,但是在与 M300 一起使用时,相同的代码返回 NULL 值:

Object heightAboveSeaLevel = KeyManager.getInstance().getValue(FlightControllerKey.create(FlightControllerKey.ABSOLUTE_GPS_ALTITUDE));

Also tried with no luck the below:也没有运气尝试以下:

DJIKey GPSKey = FlightControllerKey.create(FlightControllerKey.ABSOLUTE_GPS_ALTITUDE);
DJISDKManager.getInstance().getKeyManager().getValue(GPSKey, new GetCallback() {
    @Override public void onSuccess(@NonNull Object value) {
        
    }
    @Override public void onFailure(@NonNull DJIError error) {
        
    }
});

On a side note, when using the M300, the ASL value is shown in the DJI Pilot app.附带说明一下,使用经纬 M300 时,ASL 值会显示在 DJI Pilot 应用程序中。 dji pilot 应用程序中的 M300 Fpv 视图

Anyone has accomplish the above or has any ideas to what I should use?任何人都完成了上述工作或对我应该使用什么有任何想法?

This is from DJI:这是大疆的:

This KEY does not currently support the M300.此 KEY 目前不支持 M300。 Do you know how to use MSDK V5, which provides the KEY for obtaining real-time altitude: KeyRTKAbsoluteAltitude?你知道如何使用MSDK V5,它提供了获取实时高度的KEY:KeyRTKAbsoluteAltitude吗? MSDK V5:https://developer.dji.com/doc/mobile-sdk-tutorial/cn/ MSDK V5:https://developer.dji.com/doc/mobile-sdk-tutorial/cn/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM