I am trying to get the drone absolute 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 I should use?