Please select Into the mobile phone version | Continue to access the computer ver.
How to get GPS fix type (2D, or 3D fixed) in MSDK?
105 2 3-22 19:18
Uploading and Loding Picture ...(0/1)
o(^-^)o
Trong Luan Tran
lvl.1
Australia
Offline

Hi,

I'm working with DJI Mobile SDK, and I would like to get the current GPS fix type (no fix, 2D or 3D fix) on a Mavic Pro 2. I am able to get the GPS signal level in FlightControllerState.getGpsSignalLevel, is it poissble to interprete the values to GPS fix type? Otherwise, is there a class or method in the DJI mobile SDK which can retrieve the GPS fix type. I went through the DJI Mobile SDK documentation, but I couldn't find one except for RTKState.getPositioningSolution; however, I think this is for RTK drones only, because when I tried to get the Rtk instance from the FlightController, it returns null. Any help would be appreciated. Thank you.
3-22 19:18
Use props
Mats Bohlinsson
lvl.4
Flight distance : 1558228 ft
Sweden
Offline

public LocationCoordinate3D getAircraftLocation() {
        double la = (double) KeyManager.getInstance().getValue(FlightControllerKey.create(FlightControllerKey.AIRCRAFT_LOCATION_LATITUDE));
        double lo = (double) KeyManager.getInstance().getValue(FlightControllerKey.create(FlightControllerKey.AIRCRAFT_LOCATION_LONGITUDE));
        float altitude = (float) KeyManager.getInstance().getValue(FlightControllerKey.create(FlightControllerKey.ALTITUDE));
        return new LocationCoordinate3D(la, lo, altitude);
    }
3-22 22:35
Use props
Trong Luan Tran
lvl.1
Australia
Offline

Mats Bohlinsson Posted at 3-22 22:35
public LocationCoordinate3D getAircraftLocation() {
        double la = (double) KeyManager.getInstance().getValue(FlightControllerKey.create(FlightControllerKey.AIRCRAFT_LOCATION_LATITUDE));
        double lo = (double) KeyManager.getInstance().getValue(FlightControllerKey.create(FlightControllerKey.AIRCRAFT_LOCATION_LONGITUDE));

Thanks, Mats

3-30 16:26
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules