DJI Mobile SDK Documentation
      Package:dji.sdk.keyvalue.key
      Inherits From:DJIFlightControllerKey
      classSince MSDK 5.0

      FlightControllerKey

      FlightControllerKeyprovides a set of methods to set and get the flight controller parameters and behavior.

      Package dji.sdk.keyvalue.keyAndroid · Java / Kotlin

      FlightControllerKeyprovides a set of methods to set and get the flight controller parameters and behavior. The flight controller is a microcomputer. It is receiving the control data from aircraft and sensor data from transducers and combines them to adjust each blade power to fly. This class can get the aircraft attitude, aircraft state, flight mode, flight control settings, compass and IMU, etc.

      This class is supported since MSDK 5.0

      Members

      83 members

      Method

      83

      Basic Information

      Connection Status
      method

      KeyConnection

      static final DJIKeyInfo<Boolean> KeyConnection = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"Connection", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means flight controller is connected.

      Flight Status
      method

      KeyIsFlying

      static final DJIKeyInfo<Boolean> KeyIsFlying = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsFlying", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      true means aircraft is in flight.

      method

      KeyFlightTimeInSeconds

      static final DJIKeyInfo<Integer> KeyFlightTimeInSeconds = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"FlightTimeInSeconds", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Accumulated flight time since the aircraft motor started, unit: 0.1s. Reset after power on again.

      Total Flight Duration
      method

      KeyAircraftTotalFlightDuration

      static final DJIKeyInfo<Double> KeyAircraftTotalFlightDuration = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftTotalFlightDuration", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Total flight duration, unit: Second. It will not be reset after the aircraft is powered off.

      Total Flight Distance
      method

      KeyAircraftTotalFlightDistance

      static final DJIKeyInfo<Double> KeyAircraftTotalFlightDistance = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftTotalFlightDistance", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Total flight distance, unit: Meter. It will not be reset after the aircraft is powered off.

      Total Flight Times
      method

      KeyAircraftTotalFlightTimes

      static final DJIKeyInfo<Integer> KeyAircraftTotalFlightTimes = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftTotalFlightTimes", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Total number of takeoffs and landings. It will not be reset after the aircraft is powered off.

      Aircraft Location
      method

      KeyAircraftLocation3D

      static final DJIKeyInfo<LocationCoordinate3D> KeyAircraftLocation3D = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftLocation3D", new DJIValueConverter<>(LocationCoordinate3D.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      To get the position of the aircraft, including longitude, latitude and altitude.

      Aircraft Attitude Data
      method

      KeyAircraftAttitude

      static final DJIKeyInfo<Attitude> KeyAircraftAttitude = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftAttitude", new DJIValueConverter<>(Attitude.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("Attitude")

      Parameter: Attitude

      Current aircraft attitude data. The value range of pitch, roll and yaw are [-180,180]. if the value of pitch, roll and yaw are 0, it means that the aircraft will hover horizontally heading north.

      Aircraft Speed
      method

      KeyAircraftVelocity

      static final DJIKeyInfo<Velocity3D> KeyAircraftVelocity = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftVelocity", new DJIValueConverter<>(Velocity3D.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("Velocity")

      Parameter: Velocity3D

      Current flight speed of the aircraft using NED coordinate system.

      method

      KeyTakeoffLocationAltitude

      static final DJIKeyInfo<Double> KeyTakeoffLocationAltitude = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"TakeoffLocationAltitude", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Double

      The taking off altitude of aircraft. Unit:meter.

      method

      KeyIsLandingConfirmationNeeded

      static final DJIKeyInfo<Boolean> KeyIsLandingConfirmationNeeded = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsLandingConfirmationNeeded", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means that when the aircraft landed 0.5 meters above the ground, the forced landing command KeyConfirmLanding should be sent to continue the landing process.

      method

      KeyFlightLogIndex

      static final DJIKeyInfo<Integer> KeyFlightLogIndex = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"FlightLogIndex", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Integer

      To get the current index of the flight log, which is useful when one needs to find the corresponding flight log.

      Serial Number
      method

      KeySerialNumber

      static final DJIKeyInfo<String> KeySerialNumber = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"SerialNumber", SingleValueConverter.StringConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: String

      To get the serial number of flight controller.

      Firmware Version
      method

      KeyFirmwareVersion

      static final DJIKeyInfo<String> KeyFirmwareVersion = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"FirmwareVersion", SingleValueConverter.StringConverter).canGet(true).canSet(false).canListen(false).canPerformAction(false).setIsEvent(false)

      Parameter: String

      To get the firmware version of flight controller.


      Sensor

      method

      KeyGPSSatelliteCount

      static final DJIKeyInfo<Integer> KeyGPSSatelliteCount = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GPSSatelliteCount", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("SatelliteCount")

      Parameter: Integer

      To get the number of GPS satellites. Usually the number can reach more than 12 when flying at a high altitude. When the period is good, the number can reach 18~19.

      method

      KeyGPSSignalLevel

      static final DJIKeyInfo<GPSSignalLevel> KeyGPSSignalLevel = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GPSSignalLevel", new SingleValueConverter<>(GPSSignalLevel.class,FCGPSSignalLevelMsg.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: GPSSignalLevel

      To get the signal level of GPS.

      method

      KeyCompassCount

      static final DJIKeyInfo<Integer> KeyCompassCount = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CompassCount", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Integer

      To get the number of compass.

      method

      KeyCompassHeading

      static final DJIKeyInfo<Double> KeyCompassHeading = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CompassHeading", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Double

      To get the heading of the compass. Unit: degree. The north is 0 degrees, the east is 90 degrees. The value range is [-180,180].

      method

      KeyCompassHasError

      static final DJIKeyInfo<Boolean> KeyCompassHasError = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CompassHasError", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means that the compass data is wrong. When the aircraft is used in areas with strong interference or magnetic fields, compass data Key_Gimbal_RestoreFactorySettings might occur. KeyStartCompassCalibration should be called to calibrate compass.

      method

      KeyStartCompassCalibration

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStartCompassCalibration = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StartCompassCalibration", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To start compass calibration. Make sure there are not any magnets or metal objects near the aircraft and lift the aircraft to about 1.5m above the groud. Calibration status can be obtained through KeyCompassCalibrationStatus.
      The following is the operation process of compass calibration, taking M30 as an example:

    • 1. Call KeyStartCompassCalibration to start compass calibration, CompassCalibrationState will change to horizontal calibration stateHORIZONTAL, refer to the figure below to rotate the aircraft 360 degrees horizontally for horizontal calibration.
    • 2. After the horizontal calibration is successful, CompassCalibrationState will change to vertical calibration stateVERTICAL,refer to the figure below to rotate the aircraft 360 degrees vertically for vertical calibration.
    • 3. After the calibration is successful, CompassCalibrationState will change to success state SUCCEEDED.

    • note:
      Please do not start the compass calibration after the aircraft motor starts. call KeyAreMotorsOn to judge whether the aircraft motor starts.


      Supported since MSDK 5.0.0

      method

      KeyStopCompassCalibration

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStopCompassCalibration = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StopCompassCalibration", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To stop compass calibration.

      method

      KeyIsCompassCalibrating

      static final DJIKeyInfo<Boolean> KeyIsCompassCalibrating = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsCompassCalibrating", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means that the compass is calibrating.

      method

      KeyCompassCalibrationStatus

      static final DJIKeyInfo<CompassCalibrationState> KeyCompassCalibrationStatus = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CompassCalibrationStatus", new SingleValueConverter<>(CompassCalibrationState.class,FCCompassCalibrationStateMsg.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("CompassCalibrationState")

      Parameter: CompassCalibrationState

      To get compass calibration status.

      method

      KeyIMUCount

      static final DJIKeyInfo<Integer> KeyIMUCount = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IMUCount", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Integer

      To get the number of IMU.

      method

      KeyStartIMUCalibration

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStartIMUCalibration = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StartIMUCalibration", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To start IMU calibration. For aircraft with multiple IMUs, this method will calibrate all IMUs. Calling KeyRebootDevice to restart the device after IMU calibration is suggested.

      The following is the operation process of IMU calibration:

    • 1. Call KeyStartIMUCalibration to start IMU calibration, and listen KeyIMUCalibrationInfo to get the IMU calibration information. IMUCalibrationState change to CALIBRATING indicates that IMU calibration is successfully started.
    • 2. Call getOrientationsToCalibrate to get the aircraft orientations that have not been calibrated yet. Reference to the figure in IMUCalibrationOrientation, place the aircraft in turn for IMU calibration in each direction, and keep the aircraft stationary and level during the calibration process.
    • 3. Call getOrientationCalibrationState to get the IMU calibration state for each orientation, when the calibraion status changes to SUCCESSFUL then put the aircraft in the next direction.
    • 3. When the uncalibrated orientation list getOrientationsToCalibrate is empty, and the calibraion state getOrientationCalibrationState changes to SUCCESSFUL indicates that the IMU calibraion has been completed.

    • note:
      Please do not start the IMU calibration after the aircraft motor starts. call KeyAreMotorsOn to judge whether the aircraft motor starts.


      Supported since MSDK 5.0.0

      method

      KeyIMUCalibrationInfo

      static final DJIKeyInfo<IMUCalibrationInfo> KeyIMUCalibrationInfo = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IMUCalibrationInfo", new DJIValueConverter<>(IMUCalibrationInfo.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("IMUCalibrationHint")

      Parameter: IMUCalibrationInfo

      To get IMU calibration information. IMU calibration includes IMU calibration of multiple aircraft orientations. IMU calibration information includes the overall calibration status of IMU, the calibration status of each aircraft orientation, as well as the list of uncalibrated aircraft orientations and the list of calibrated aircraft orientations.

      method

      KeyUltrasonicHeight

      static final DJIKeyInfo<Integer> KeyUltrasonicHeight = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"UltrasonicHeight", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Integer

      To get the height of ultrasound distance measuring, unit:dm. The height is the distance measured from top to bottom after the aircraft takes off. Barometer altitude is often incorporated to make the data more accurate.
      note:

      1. The maximum measurable distance at this altitude is usually 25.5 meters, depending on the actual capabilities of the aircraft.
      2. If the aircraft is equipped with a downward-looking sensor, this height will also be integrated with the ranging height of the downward-looking sensor.
      3. If the aircraft is equipped with an infrared sensor, this altitude will also be combined with the infrared sensor ranging altitude.


        Supported since MSDK 5.0.0
      Wind Speed
      method

      KeyWindWarning

      static final DJIKeyInfo<WindWarning> KeyWindWarning = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"WindWarning", new SingleValueConverter<>(WindWarning.class,FCWindWarningMsg.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: WindWarning

      To get current wind speed level.

      method

      KeyWindSpeed

      static final DJIKeyInfo<Integer> KeyWindSpeed = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"WindSpeed", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Integer

      To get current wind speed, unit: dm/s.

      method

      KeyWindDirection

      static final DJIKeyInfo<WindDirection> KeyWindDirection = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"WindDirection", new SingleValueConverter<>(WindDirection.class,FCWindDirectionStatusMsg.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: WindDirection

      To get current wind direction and the world coordinate is used.


      Basic Setting

      method

      KeyMultipleFlightModeEnabled

      static final DJIKeyInfo<Boolean> KeyMultipleFlightModeEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"MultipleFlightModeEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means that flight mode switch is allowed. KeyFlightMode can be set to T - tripod, A - attitude, P(N) - position, S - sport mode by flipping the three-segment selector switch on the remote control. false means the flight mode will maintain P(N) - position mode and can not be changed.

      method

      KeyRemoteControllerFlightMode

      static final DJIKeyInfo<RemoteControllerFlightMode> KeyRemoteControllerFlightMode = new KeyRemoteControllerFlightMode().canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: RemoteControllerFlightMode

      To get the remote controller switch Mode.

      method

      KeyFlightMode

      static final DJIKeyInfo<FlightMode> KeyFlightMode = new KeyFlightMode().canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: FlightMode

      To get the flight Mode.

      Fail Safe
      method

      KeyIsFailSafe

      static final DJIKeyInfo<Boolean> KeyIsFailSafe = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsFailSafe", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means that the aircraft is out of control and is about to perform fail safe behavior.

      method

      KeyFailsafeAction

      static final DJIKeyInfo<FailsafeAction> KeyFailsafeAction = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"FailsafeAction", new SingleValueConverter<>(FailsafeAction.class,FCFailsafeActionMsg.class)).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: FailsafeAction

      To set and get fail safe behavior. When the remote controller loses connection with the aircraft, the aircraft will perform according to the set fail safe behavior.

      method

      KeyLowBatteryWarningThreshold

      static final DJIKeyInfo<Integer> KeyLowBatteryWarningThreshold = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LowBatteryWarningThreshold", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Integer

      To set and get the threshold for battery low power warning. The threshold is a percentage and the range is [15,50]. When the battery power is lower than the threshold, the aircraft will make a low battery alarm.

      method

      KeyIsLowBatteryWarning

      static final DJIKeyInfo<Boolean> KeyIsLowBatteryWarning = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsLowBatteryWarning", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means that the battery is in low power status.

      method

      KeySeriousLowBatteryWarningThreshold

      static final DJIKeyInfo<Integer> KeySeriousLowBatteryWarningThreshold = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"SeriousLowBatteryWarningThreshold", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Integer

      To get the threshold of severely low battery warning. The default threshold is 10%, and it can not be set for Matrice 30 Series. If the battery power is lower than the threshold, the aircraft will go back to home.

      method

      KeyIsSeriousLowBatteryWarning

      static final DJIKeyInfo<Boolean> KeyIsSeriousLowBatteryWarning = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsSeriousLowBatteryWarning", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means that the battery is in severely low status.

      method

      KeyLEDsSettings

      static final DJIKeyInfo<LEDsSettings> KeyLEDsSettings = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LEDsSettings", new DJIValueConverter<>(LEDsSettings.class)).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: LEDsSettings

      LED related settings. The settings for forearm lights, status indicators and night lights are supported.

      Supportd since MSDK 5.0

      Motor ESC
      method

      KeyAreMotorsOn

      static final DJIKeyInfo<Boolean> KeyAreMotorsOn = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AreMotorsOn", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means the motor starts.

      method

      KeyLockMotors

      static final DJIKeyInfo<Boolean> KeyLockMotors = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LockMotors", SingleValueConverter.BooleanConverter).canGet(false).canSet(true).canListen(false).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means that the motor is locked and will not turn when the remote controller stick is moved.

      method

      KeyESCBeepEnabled

      static final DJIKeyInfo<Boolean> KeyESCBeepEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"ESCBeepEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means the ESC beeping function is opened. When the aircraft loses contact by accident, this function can be turned on to identify the position of the aircraft by sound. If motors are running, Stop them and try again.

      Coordinated Turn
      method

      KeyCoordinatedTurnEnabled

      static final DJIKeyInfo<Boolean> KeyCoordinatedTurnEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CoordinatedTurnEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means the coordinated turn function is opened. When the aircraft turns, the node follows the flight direction. There is no sideslip flight, and the resistance of flight is smaller.

      method

      KeyNavigationSatelliteSystemSource

      static final DJIKeyInfo<NavigationSatelliteSystem> KeyNavigationSatelliteSystemSource = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"NavigationSatelliteSystemSource", new SingleValueConverter<>(NavigationSatelliteSystem.class,NavigationSatelliteSystemMsg.class)).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: NavigationSatelliteSystem

      To set the GNSS used. The GNSS is only supported when the RTK location function is closed, and can not be changed when the aircraft is in the air. After the GNSS is switched, do not take off until satellite signal strength reaches at least level 3. If RTK location function is opened, the aircraft will use GPS, GLONASS, Galileo and Beidou GNSS.


      Basic Operation

      method

      KeyStartTakeoff

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStartTakeoff = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StartTakeoff", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To start the automatic taking off of the aircraft. When the aircraft hovers at an altitude of 1.2 meters(4 feet) above the ground, taking off is completed. If the motor is already opened, this command can not be executed.

      method

      KeyStopTakeoff

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStopTakeoff = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StopTakeoff", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To stop the automatic take-off of the aircraft. If this interface is called before automatic take-off is finished, the aircraft will stop taking off and hover at the current altitude.

      method

      KeyStartAutoLanding

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStartAutoLanding = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StartAutoLanding", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To start the automatic landing of the aircraft.

      method

      KeyStopAutoLanding

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStopAutoLanding = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StopAutoLanding", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To stop the autonomuous landing of the aircraft. If this interface is called during the automatic landing process, the aircraft will stop landing and hover at the current altitude.

      method

      KeyConfirmLanding

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyConfirmLanding = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"ConfirmLanding", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To confirm continue landing. When the aircraft is at an altitude of less than 0.7 meters above the ground, the aircraft will stop landing and wait for confirmation. KeyIsLandingConfirmationNeeded can be used to check whether landing confirmation is needed.

      method

      KeyRebootDevice

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyRebootDevice = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"RebootDevice", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To restart the core device of the aircraft. It is suggested to call this method after IMU calibration.
      note:
      Please do not restart the core device of the aircraft after the aircraft motor starts. call KeyAreMotorsOn to judge whether the aircraft motor starts.

      LookAt
      method

      KeyLookAt

      static final DJIActionKeyInfo<LookAtInfo, EmptyMsg> KeyLookAt = new KeyLookAt().canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      Parameter: LookAtInfo

      The aircraft will look at the GPS point you set up.

      Maximum Altitude
      method

      KeyHeightLimitRange

      static final DJIKeyInfo<IntValueConfig> KeyHeightLimitRange = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"HeightLimitRange", new DJIValueConverter<>(IntValueConfig.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: IntValueConfig


      To get the height limit setting range. Unit: meter.

      method

      KeyHeightLimit

      static final DJIKeyInfo<Integer> KeyHeightLimit = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"HeightLimit", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Integer


      To set the maximum flight altitude of the aircraft. Unit: meter. KeyHeightLimitRange can be used to get setting range.

      method

      KeyIsNearHeightLimit

      static final DJIKeyInfo<Boolean> KeyIsNearHeightLimit = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsNearHeightLimit", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean


      true means the aircraft has reached the maximum flight altitude.

      Maximum Flight Distance
      method

      KeyDistanceLimitEnabled

      static final DJIKeyInfo<Boolean> KeyDistanceLimitEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"DistanceLimitEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean


      true means the distance limitation switch is opened. After this switch is opened, KeyDistanceLimit can be used to set the maximum flight distance of the aircraft.

      method

      KeyDistanceLimitRange

      static final DJIKeyInfo<IntValueConfig> KeyDistanceLimitRange = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"DistanceLimitRange", new DJIValueConverter<>(IntValueConfig.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: IntValueConfig


      To get diatance limitation setting range. Unit: meter.

      method

      KeyDistanceLimit

      static final DJIKeyInfo<Integer> KeyDistanceLimit = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"DistanceLimit", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Integer


      To set the maximum flight distance of the aircraft. Unit: meter. This value is the distance between aircraft and home point. KeyDistanceLimitRange can be used to get the setting range.

      method

      KeyIsNearDistanceLimit

      static final DJIKeyInfo<Boolean> KeyIsNearDistanceLimit = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsNearDistanceLimit", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean


      true means the aircraft has reached the maximum flight distance.

      Multi Gimbal Synchronization Control
      method

      KeyStartMultiGimbalSyncControl

      static final DJIActionKeyInfo<MultiGimbalSyncControlInfo,EmptyMsg> KeyStartMultiGimbalSyncControl = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StartMultiGimbalSyncControl", new DJIValueConverter<>(MultiGimbalSyncControlInfo.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      Parameter: MultiGimbalSyncControlInfo

      Enable multi-gimbal Synchronization control. Multiple gimbals can be controlled at the same time through one remote controller. Please make sure that the set gimbals have been mounted on the aircraft. This interface is suitable for aircraft that can mount multiple gimbals, such as M300 RTK and M350 RTK.

      method

      KeyStopMultiGimbalSyncControl

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStopMultiGimbalSyncControl = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StopMultiGimbalSyncControl", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      Disable multi-gimbal Synchronization control.

      method

      KeyMultiGimbalSyncStatus

      static final DJIKeyInfo<MultiGimbalSyncStatus> KeyMultiGimbalSyncStatus = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"MultiGimbalSyncStatus", new DJIValueConverter<>(MultiGimbalSyncStatus.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: MultiGimbalSyncStatus


      Gets multi-gimbal Synchronization control status.

      Basic Operation
      method

      KeyPropellerRotation

      static final DJIActionKeyInfo<PropellerRotationCommand,PropellerRotationCommandResult> KeyPropellerRotation = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"PropellerRotation", new SingleValueConverter<>(PropellerRotationCommand.class,PropellerRotationCommandMsg.class),new DJIValueConverter<>(PropellerRotationCommandResult.class)).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      Parameter: Boolean

      Aircraft slow propeller function.

      Note

      Currently, only the M400 model supports this interface, but it does not support LOW_SPEED_REVERSE_ROTATION. Therefore, the aircraft slow propeller currently supports rotation in only one direction.


      Return-to-Home Function

      Intelligent Return-to-Home
      method

      KeyIsHomeLocationSet

      static final DJIKeyInfo<Boolean> KeyIsHomeLocationSet = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsHomeLocationSet", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      true means home point has been set. When the GPS signal is good, the aircraft will automatically set the current position as home point. KeyIsHomeLocationSet will return true.

      method

      KeyHomeLocation

      static final DJIKeyInfo<LocationCoordinate2D> KeyHomeLocation = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"HomeLocation", new DJIValueConverter<>(LocationCoordinate2D.class)).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: LocationCoordinate2D


      To set and get current home point location, including longitude and latitude. When GPS signal is good, aircraft will automatically set current position as home point. This key can also be used to change home point location.

      method

      KeyGoHomeHeight

      static final DJIKeyInfo<Integer> KeyGoHomeHeight = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GoHomeHeight", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Integer


      To set and get relative altitude when returning home. Unit: meter. This value is related to the altitude when taking off. KeyGoHomeHeightRange can be used to get return-to-home height setting range.
      If the horizontal distance between aircraft and home point is within 50 meters, the aircraft will ignore the set return-to-home altitude and return at current altitude. If the forward vision system does not work properly, the aircraft will climb to the set altitude and return.

      method

      KeyGoHomeHeightRange

      static final DJIKeyInfo<IntValueConfig> KeyGoHomeHeightRange = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GoHomeHeightRange", new DJIValueConverter<>(IntValueConfig.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: IntValueConfig


      To get the setting range of the return-to-home altitude. Unit: meter.

      method

      KeyHomeLocationUsingCurrentAircraftLocation

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyHomeLocationUsingCurrentAircraftLocation = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"HomeLocationUsingCurrentAircraftLocation", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To set current aircraft location as home point location.

      method

      KeyStartGoHome

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStartGoHome = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StartGoHome", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To start intelligent return-to-home. When the GPS signal is not good, intelligent return-to-home can not be started. Intelligent return-to-home can also be started by the smart return-to-home button on the remote controller. During the return-to-home home process, the user can control the altitude of the aircraft with the throttle stick and control the speed of the aircraft with the pitch stick to avoid obstacles. During the return-to-home process, the user can regain control of the aircraft after exiting the intelligent return-to-home home via the intelligent return-to-home button or by calling KeyStopGoHome. KeyGoHomeStatus can be used to get intelligent return-to-home status.

      method

      KeyStopGoHome

      static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStopGoHome = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StopGoHome", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      To stop intelligent return-to-home.

      method

      KeyGoHomeStatus

      static final DJIKeyInfo<GoHomeState> KeyGoHomeStatus = new KeyGoHomeStatus().canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: GoHomeState

      To get intelligent return-to-home status.

      Return-to-Home Information
      method

      KeyGoHomeInfo

      static final DJIKeyInfo<GoHomeInfo> KeyGoHomeInfo = new KeyGoHomeInfo().canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: GoHomeInfo

      Get the information related to return-to-home. When the obtained getType status is NORMAL, you need to call the KeyGoHomeConfirm interface to confirm or cancel the return-to-home operation.

      Note

      KeyGoHomeInfocurrently only supports DJI_MATRICE_4_SERIES

      Return-to-Home Confirm
      method

      KeyGoHomeConfirm

      static final DJIActionKeyInfo<Boolean, EmptyMsg> KeyGoHomeConfirm = new KeyGoHomeConfirm().canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      Parameter: Boolean

      Confirm or cancel the return home operation. When the status of getType obtained by calling KeyGoHomeInfo is NORMAL, you need to call this interface to confirm or cancel the return-to-home operation. true means confirming the return-to-home. false means canceling the return-to-home.

      Note

      KeyGoHomeInfocurrently only supports DJI_MATRICE_4_SERIES

      Low Battery Return-to-Home
      method

      KeyLowBatteryRTHEnabled

      static final DJIKeyInfo<Boolean> KeyLowBatteryRTHEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LowBatteryRTHEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("SmartBatteryRTHEnabled")

      Parameter: Boolean

      true means intelligent low battery return-to-home function is opened. To avoid unnecessary dangers dangerous due to the low battery, aircraft will intelligently judge whether the current battery is sufficient according to the flight position information. If current battery power is only enough to complete the return-to-home process, MSDK will prompt whether operate the return-to-home process. If the user does not make a selection within 10s, MSDK will automatically return-to-home after 10s. During the returning process, you can short press the smart return-to-home button on the remote control to cancel the return-to-home process. Smart low battery return-to-home only occurs once during one flight. If the user cancels the low-battery return-to-home reminder and continues to fly, the aircraft may be forced to land due to insufficient power when returning, resulting in the aircraft being lost or crashed. For security reasons, it is not recommended to turn this function off.

      method

      KeyLowBatteryRTHInfo

      static final DJIKeyInfo<LowBatteryRTHInfo> KeyLowBatteryRTHInfo = new KeyLowBatteryRTHInfo().canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: LowBatteryRTHInfo

      To get related information of the intelligent low battery power. This function is only valid when KeyLowBatteryRTHEnabled is enabled.

      method

      KeyLowBatteryRTHConfirm

      static final DJIActionKeyInfo<Boolean, EmptyMsg> KeyLowBatteryRTHConfirm = new KeyLowBatteryRTHConfirm().canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)

      Parameter: Boolean

      Confirm or cancel the return home operation. When calling KeyLowBatteryRTHInfo and the status obtained is COUNTING_DOWN, you can call this interface to confirm or cancel the return operation. true indicates confirmation of return. false means to cancel the return flight.


      Security Code

      method

      KeyAccessLockerAllDeviceStatus

      static final DJIKeyInfo<List<AccessLockerDeviceStatus>> KeyAccessLockerAllDeviceStatus = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AccessLockerAllDeviceStatus", new SingleValueConverter<>((Class)List.class,AccessLockerV1AllDeviceStates.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("AccessLockerV1AllDeviceStates")

      Parameter: List<AccessLockerDeviceStatus>

      Get the security code status of the storage device. Through this interface, you can obtain whether the storage device on the aircraft supports the security code function, whether the security code function is enabled, and whether the security code needs to be verified.
      Security code is to keep your media data safe. After the security code is set, the MSDK App needs to perform password verification after connecting to the aircraft. After the verification is passed, it can take photos, record videos and read and write media data in the storage device.

    • getIsFeatureSupported is true, indicating that the storage device supports the security code function. You can call KeyAccessLockerSetSecurityCode to set the security code.
    • getIsFeatureEnabled is true, indicating that the security code function of the storage device is enabled. You can call KeyAccessLockerModifySecurityCode for security code modification. If you forget the security code, you can call KeyAccessLockerResetSecurityCode to reset the security code.
    • getIsFeatureNeedToBeVerified is true, indicating that the storage device needs to verify the security code. Please call KeyAccessLockerVerifySecurityCode for security code verification, otherwise, you will not be able to take photos and record videos, and you will not be able to read and write media data in the storage device. The security code is usually required to be verified when the aircraft is restarted or the storage device is inserted.
    • Security code is neither saved on device nor accessible by DJI.
    • It is not possible to reset security code. If security code is lost, format SD card to delete code.
    • Security code settings only available for Zenmuse H20, Matrice 30 series cameras and Mavic 3 Enterprise series cameras. Zenmuse P1, Zenmuse L1, and third-party payloads currently not supported.

      Supported since MSDK 5.1.0

    • method

      KeyAccessLockerSetSecurityCode

      static final DJIActionKeyInfo<AccessLockerSetSecurityCodeInfo,EmptyMsg> KeyAccessLockerSetSecurityCode = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"AccessLockerSetSecurityCode", new DJIValueConverter<>(AccessLockerSetSecurityCodeInfo.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false).setInnerIdentifier("AccessLockerV1SetupUserAccount")

      Parameter: AccessLockerSetSecurityCodeInfo

      Set a security code. The device and storage type can be selected for security code setting through this interface.

    • The storage device will be formatted after setting the security code, please make sure the media data has been backed up.
    • Please keep the security code in a safe place. If you lose it, you will not be able to retrieve it. You can only unlock the storage device by formatting it.
    • you should set a security code with a length of at least 4 characters. It is recommended that use numbers, uppercase and lowercase letters to form the security code.


    • Supported since MSDK 5.1.0
      method

      KeyAccessLockerVerifySecurityCode

      static final DJIActionKeyInfo<AccessLockerVerifySecurityCodeInfo,EmptyMsg> KeyAccessLockerVerifySecurityCode = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"AccessLockerVerifySecurityCode", new DJIValueConverter<>(AccessLockerVerifySecurityCodeInfo.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false).setInnerIdentifier("AccessLockerV1VerifyUserAccount")

      Parameter: AccessLockerVerifySecurityCodeInfo

      Verify the security code. The security code can be verified through this interface. After the verification is passed, you can take photos, record videos and read and write media data in the storage device.

      method

      KeyAccessLockerModifySecurityCode

      static final DJIActionKeyInfo<AccessLockerModifySecurityCodeInfo,EmptyMsg> KeyAccessLockerModifySecurityCode = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"AccessLockerModifySecurityCode", new DJIValueConverter<>(AccessLockerModifySecurityCodeInfo.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false).setInnerIdentifier("AccessLockerV1ModifyUserAccount")

      Parameter: AccessLockerModifySecurityCodeInfo

      Modify the security code.

      method

      KeyAccessLockerResetSecurityCode

      static final DJIActionKeyInfo<AccessLockerResetSecurityCodeInfo,EmptyMsg> KeyAccessLockerResetSecurityCode = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"AccessLockerResetSecurityCode", new DJIValueConverter<>(AccessLockerResetSecurityCodeInfo.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false).setInnerIdentifier("AccessLockerV1ResetUserAccount")

      Parameter: AccessLockerResetSecurityCodeInfo

      Reset the security code. Reset the security security code will format the storage device, please make sure the media data is backed up.


      AirSense

      method

      KeyAirSenseSystemSupported

      static final DJIKeyInfo<Boolean> KeyAirSenseSystemSupported = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AirSenseSystemSupported", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: Boolean

      Whether to support DJI AirSense system.

      method

      KeyAirSenseSystemInformation

      static final DJIKeyInfo<AirSenseSystemInformation> KeyAirSenseSystemInformation = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AirSenseSystemInformation", new DJIValueConverter<>(AirSenseSystemInformation.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)

      Parameter: AirSenseSystemInformation

      Gets information about the DJI AirSense system. Contains warning levels and detailed status of detected airplanes (Manned aircraft with AirSense system. For example, civil aircraft, helicopter and so on. It is referred to airplane.).
      DJI AirSense only sends out warnings of nearby airplanes under certain circumstances. It will NOT control DJI aircraft to avoid other airplanes automatically. Make sure to fly with your DJI aircraft within visual line of sight at all times, and always fly with caution. After receiving warnings, lower your DJI aircraft to a safe height. In addition, DJI AirSense has the following limitations:

    • DJI AirSense can only receive messages sent from airplane equipped with an ADS-B out device under 1090ES (RTCA DO-260) or UAT (RTCA Do-282) standards. For airplane without ADS-B outs or with malfunctioning ADS-B outs, DJI AirSense cannot receive related broadcasted messages or send out warnings.
    • When there are obstacles between the airplane and DJI aircraft, DJI AirSense will fail to receive ADS-B messages sent from airplane or warnings.
    • DJI AirSense may fail to receive ADS-B messages sent from airplane or send out warnings due to environmental changes and disturbances. It is highly recommended to fly with caution and stay aware of your surroundings during flight.
    • DJI AirSense cannot send out warnings when the DJI aircraft cannot accurately determine its location.
    • DJI AirSense cannot receive ADS-B messages sent from airplane or send out warnings when it is disabled or misconfigured.


    • Supported since MSDK 5.5.0

      On this page