Mobile-SDK-Android-V5 icon indicating copy to clipboard operation
Mobile-SDK-Android-V5 copied to clipboard

Where is the file named `WW15MGH.DAC` ?

Open GitNiko opened this issue 5 months ago • 3 comments

Drone: Mavic3M & RC Pro

Where is the file named WW15MGH.DAC ? Do I have to provide it on my own?

import dji.sdk.wpmz.jni.JNIWPMZManager;
import dji.sdk.wpmz.value.mission.Wayline;
import dji.sdk.wpmz.value.mission.WaylineCheckErrorMsg;
import dji.sdk.wpmz.value.mission.WaylineExecuteMissionConfig;
import dji.sdk.wpmz.value.mission.WaylineMission;
import dji.sdk.wpmz.value.mission.WaylineMissionConfig;
import dji.sdk.wpmz.value.mission.WaylineTemplate;

/**
 * @author feel.feng
 * @time 2023/06/21 5:20 下午
 * @description:
 */
public class WPMZManager implements IWPMZManager {

    private final String TAG = "WPMZManager";

    private Context context;

    private WPMZManager() {

    }

    public  void init(Context context) {
        this.context = context;
        KMLUtil.setContext(context);
        String dirPath = FileUtils.getDJIDirPath(context);
        FileUtils.createFile(dirPath + "/CACHE");
        FileUtils.copyAssetsDirToSDCard(context ,"geoid_data/WW15MGH.DAC" ,dirPath );<==========here
        GeoidManager.getInstance().openGeoid96M150(dirPath + "/WW15MGH.DAC"); 
    }

GitNiko avatar Jul 01 '25 06:07 GitNiko

Agent comment from YIGUI LIU in Zendesk ticket #147925:

Dear Developer,

After the initialization of GeoidManager.getInstance().init(this) is completed, a DAC file will be generated in the local path of the APP. The DAC file is a terrain file, which is essential for converting WGS 84 height to EGM96.

Could you please confirm whether the DAC file has been generated in the local path? The directory on the remote controller is: \RC Pro\Internal shared storage\Android\data\com.dji.sampleV5.aircraft\files\DJI\DATA\WW15MGHMSDK.DAC

After we tried running the MSDK sample code, we were able to find the WW15MGHMSDK.DAC file in the local directory of the sample app.

We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team

°°°

dji-dev avatar Jul 01 '25 08:07 dji-dev

Yes, I confirm that the file /storage/emulated/0/Android/data/com.eactative.flyarg2/files/DJI/DATA/WW15MGHMSDK.DAC exist, but in WPMZManager.init it still returns openGeoid96M150 error: /storage/emulated/0/DJI/com.eactative.flyarg2/WW15MGH.DAC: open failed: ENOENT (No such file or directory). It seems like the file path is incorrect. Do I need to manually copy the file to the expected location or is there a way to configure the path in the code?

GitNiko avatar Jul 02 '25 02:07 GitNiko

Agent comment from YIGUI LIU in Zendesk ticket #147925:

Dear Developer,

You can give it a try. Normally, there's no need to manually modify the file location. You may refer to the implementation in the sample code: DJIAircraftMainActivity.kt. All you need to do is call GeoidManager.getInstance().init.

The WPMZManager.java file you're modifying appears to be an internal class within the WPMZ SDK. This typically doesn't require manual intervention, as demonstrated in the sample code.

Best Regards, DJI Innovations SDK Technical Support Team

°°°

dji-dev avatar Jul 02 '25 10:07 dji-dev