Getting altitude above sea level

已完成

评论

7 条评论

  • DJI Developer Support
    Could you provide us with a photo to indicate which value of the app you would like to obtain? Please note that the altitude obtained by the aircraft in GPS mode may have some errors. Only when RTK is enabled can you obtain accurate altitude.
    0
    评论操作 固定链接
  • Shay Lavi

    You can find the image with the indication here: https://ibb.co/2qmCxm5

    I want to obtain the altitude above sea level and not the altitude above takeoff location.
    How inaccurate is the normal gps altitude data?

    0
    评论操作 固定链接
  • DJI Developer Support
    You can consider using the `RtkMobileStationKey.KeyRTKTakeoffAltitudeInfo` to obtain the altitude of the takeoff point. By adding it to the relative takeoff altitude of the aircraft(KeyAircraftLocation3D), you can calculate the approximate absolute altitude.: How inaccurate is the normal gps altitude data? --I cannot provide you with accurate information because the altitude is obtained by combining latitude, longitude, and barometric pressure readings.
    0
    评论操作 固定链接
  • Shay Lavi

    To get the altitude of the aircraft using the RTK station data should I use:

    RtkMobileStationKey.KeyRTKAbsoluteAltitude

    or should I just use the:

    FlightControllerKey.KeyAircraftLocation3D

    The MSDK v5 docs don't have any information about the RTK key

    0
    评论操作 固定链接
  • DJI Developer Support
    To obtain the altitude information of RTK, it is recommended to use addRTKLocationInfoListener.(https://developer.dji.com/api-reference-v5/android-api/Components/IRTKCenter/IRTKCenter.html#irtkcenter_addrtklocationinfolistener_inline) This is our packaged interface, which will be more stable.
    0
    评论操作 固定链接
  • Alexboyko426

    Shay Lavi to get take off alt above sea level, use key 

    KeyRTKTakeoffAltitudeInfo

    then calculate aircraft alt same as it is in sample app:

    aslAltitude =
    GpsUtils.egm96Altitude(
    rtkTakeOffLocation + aircraftLocation!!.altitude,
    aircraftLocation.latitude,
    aircraftLocation.longitude
    )

    before using GpsUtils class, you need to call 

    GeoidManager.getInstance().init(context)

    Spend some time on it, hope it helps. Cheers

    1
    评论操作 固定链接
  • DJI Developer Support
    Thank you for the addition, Alexboyko426. You are correct. If you need to use egm96Altitude, it is necessary to call the method GeoidManager.getInstance().init(context), otherwise all interfaces will be invalid.
    0
    评论操作 固定链接

请先登录再写评论。