Absolute Altitude Value (ASL)
1360 2 2022-7-29
Uploading and Loding Picture ...(0/1)
o(^-^)o
MrDroneCoder
lvl.2
Flight distance : 42799 ft
Israel
Offline

Hi,
I am trying to get the drone absoulte altitude value (ASL) in real time (before taking off)

I have 2 drones, 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:

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.


Anyone has accomplish the above or has any ideas to what should i use?
Thank you all.
Ron



2022-7-29
Use props
MauroL
lvl.2
Spain
Offline

Thanks for the code examples. I think for M300 you need to use the RTK (Real Time Kinematics) module. Take a look at https://developer.dji.com/api-re ... ipsoidheight_inline
2022-12-19
Use props
MauroL
lvl.2
Spain
Offline

Is there a way to get the ASL in a Mavic Air 2?
2022-12-19
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules