DJIFlightControllerKeyprovides a set of methods to set and get the flight controller parameters and behavior. Flight controller is a micro computer. It is receiving the control data from pilots and sensor data from transducers and combine 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.
staticfinal DJIKeyInfo<LocationCoordinate3D> KeyAircraftLocation3D = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftLocation3D", new DJIValueConverter<>(LocationCoordinate3D.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
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")
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.
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")
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Value_Common_Struct_Velocity3D
Current flight speed of the aircraft using NED coordinate system.
staticfinal DJIKeyInfo<Boolean> KeyIsLandingConfirmationNeeded = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsLandingConfirmationNeeded", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Boolean
true means that when the aircraft landed to 0.5 meters above the ground, the forced landing command KeyConfirmLanding shoulde be sent to continue the landing process.
staticfinal DJIKeyInfo<Integer> KeyGPSSatelliteCount = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GPSSatelliteCount", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("SatelliteCount")
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Integer
To get the number of GPS satellites. Usually the number can reach to more than 12 when flying at high altitude. When the period is good, the number can reach 18~19.
staticfinal 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)
staticfinal DJIKeyInfo<Boolean> KeyCompassHasError = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CompassHasError", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
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.
staticfinal 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)
Package:
dji.sdk.keyvalue.key
Description:
To start compass calibration. Make sure there are not no magnets or metal objects near the aircraft. Calibration status can be obtained through 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")
staticfinal 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)
Package:
dji.sdk.keyvalue.key
Description:
To start IMU calibration. For aircraft with multiple IMUs, this method will calibrate all IMUs. Keep the aircraft still and level during the calibration process, which will take 5 to 10 minutes. Execution status of IMU calibration can be got through Key_FlightController_IMUState. Calling KeyRebootDevice to restart the device after IMU calibration is suggested.
staticfinal DJIKeyInfo<Boolean> KeyIsUltrasonicUsed = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsUltrasonicUsed", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Boolean
true means ultrasound distance measuring is used. Usually when the distance between aircraft and ground is lower than 8 meters, the ultrasound sensor will start to work.
staticfinal DJIKeyInfo<Integer> KeyUltrasonicHeight = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"UltrasonicHeight", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Integer
To get the height of ultrasound distance measuring. The accuracy of height is 0.1 meters. The maximum measurable distance is 25.5 meters. The data can be used only when KeyIsUltrasonicUsed returns true and KeyUltrasonicHasError returns false.
staticfinal DJIKeyInfo<Boolean> KeyIsVisionSensorUsed = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsVisionSensorUsed", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Boolean
true means vision sensor distance measuring is used. Usually when the aircraft is less than 3 meters above the ground and the ground has enough texture, the vision sensor will start to work.
staticfinal 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)
staticfinal 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)
staticfinal DJIKeyInfo<Boolean> KeyMultipleFlightModeEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"MultipleFlightModeEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Boolean
true means that flight mode switch is allowed. Flight mode can be set to T - tripod, A - attitude, P - position, S - sport mode by flipping the three-segment selector switch on the remote control. false means the flight mode will maintain P - position mode and can not be changed. The current flight mode of the aircraft can be obtained through KeyCurrentRCFlightMode.
staticfinal DJIKeyInfo<RemoteControllerFlightModeMsg> KeyCurrentRCFlightMode = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CurrentRCFlightMode", new DJIValueConverter<>(RemoteControllerFlightModeMsg.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
staticfinal 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)
To set and get out-of-control behaviour. When the remote controller loses connection with the aircraft, the aircraft will perform according to the set out-of-control behavior.
staticfinal DJIKeyInfo<Integer> KeyLowBatteryWarningThreshold = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LowBatteryWarningThreshold", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Integer
To set and get the threshold for battery low power worning. The threshold is percentage and the range is [15,50. When the battery power is lower than the threshold, the aircraft will make a low battery alarm.
staticfinal DJIKeyInfo<Integer> KeySeriousLowBatteryWarningThreshold = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"SeriousLowBatteryWarningThreshold", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
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.
staticfinal DJIKeyInfo<LEDsSettings> KeyLEDsSettings = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LEDsSettings", new DJIValueConverter<>(LEDsSettings.class)).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
staticfinal DJIKeyInfo<Boolean> KeyESCBeepEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"ESCBeepEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
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.
staticfinal DJIKeyInfo<Boolean> KeyCoordinatedTurnEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CoordinatedTurnEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Boolean
true means the coordinated turn function is opened. When the aircraft turns, the node follws the flight direction. There is no sideflip flight, and the resistance of flight is smaller.
staticfinal 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)
To set the GNSS used. The GNSS is only supported when the RTK locationing 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 locationing function is opened, the aircraft will use GPS, GLONASS, Galileo and Beidou GNSS.
staticfinal 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)
Package:
dji.sdk.keyvalue.key
Description:
To start the autonomously 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.
staticfinal DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyPrecisionStartTakeoff = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"PrecisionStartTakeoff", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
To start autonomous and accurate take-off of the aircraft. The aircraft will take off vertically above 7 meters, and automatically collect information around the take-off points. If sufficient information is collected, the aircraft will land precisely at the take-off point when returning home. Please call Key_FlightAssistant_PrecisionLandingEnabled for precise autonomous landing.
staticfinal 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)
Package:
dji.sdk.keyvalue.key
Description:
To stop the autonomous take-off of the aircraft. If this interface is called before autonomous take-off is finished, the aircraft will stop taking off and hover at current altitude.
staticfinal 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)
Package:
dji.sdk.keyvalue.key
Description:
To stop the autonomuous landing of the aircraft. If this interface is called during the autonomous landing process, the aircraft will stop landing and hover at current altitude.
staticfinal 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)
Package:
dji.sdk.keyvalue.key
Description:
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.
staticfinal DJIKeyInfo<IntMinMax> KeyHeightLimitRange = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"HeightLimitRange", new DJIValueConverter<>(IntMinMax.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Value_Common_Struct_IntValueConfig
To get the height limit setting range. Unit: meter.
staticfinal DJIKeyInfo<Boolean> KeyDistanceLimitEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"DistanceLimitEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Boolean
true means distance limitation switch is opened. After this switch is opened, KeyDistanceLimit can be used to set maximum flight distance of the aircraft.
staticfinal DJIKeyInfo<IntMinMax> KeyDistanceLimitRange = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"DistanceLimitRange", new DJIValueConverter<>(IntMinMax.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Value_Common_Struct_IntValueConfig
To get diatance limitation setting range. Unit: meter.
staticfinal DJIKeyInfo<Integer> KeyDistanceLimit = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"DistanceLimit", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Integer
To set 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.
staticfinal DJIKeyInfo<Boolean> KeyIsHomeLocationSet = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsHomeLocationSet", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Boolean
true means home point has been set. When GPS signal is good, aircraft will automatically set current position as home point. KeyIsHomeLocationSet will return true.
staticfinal DJIKeyInfo<LocationCoordinate2D> KeyHomeLocation = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"HomeLocation", new DJIValueConverter<>(LocationCoordinate2D.class)).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
To set and get current home point location. 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.
staticfinal DJIKeyInfo<Integer> KeyGoHomeHeight = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GoHomeHeight", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
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 no work properly, the aircraft will climb to the set altitude and return.
staticfinal DJIKeyInfo<IntMinMax> KeyGoHomeHeightRange = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GoHomeHeightRange", new DJIValueConverter<>(IntMinMax.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Value_Common_Struct_IntValueConfig
To get the setting range of the return-to-home altitude. Unit: meter.
final KeyHomeLocationUsingCurrentRemoteControllerLocation
staticfinal DJIActionKeyInfo<LocationCoordinate2D,EmptyMsg> KeyHomeLocationUsingCurrentRemoteControllerLocation = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"HomeLocationUsingCurrentRemoteControllerLocation", new DJIValueConverter<>(LocationCoordinate2D.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
staticfinal 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)
Package:
dji.sdk.keyvalue.key
Description:
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 samrt 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, user can regain control of the aircraft after exiting 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.
static final DJIKeyInfo<GoHomeState> KeyGoHomeStatus = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GoHomeStatus", new SingleValueConverter<>(GoHomeState.class,FCGoHomeStateMsg.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("GoHomeState")
staticfinal DJIKeyInfo<Boolean> KeyLowBatteryRTHEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LowBatteryRTHEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(false).canPerformAction(false).setIsEvent(false).setInnerIdentifier("SmartBatteryRTHEnabled")
Package:
dji.sdk.keyvalue.key
Description:
Parameter: Boolean
true means intelligent low battery return-to-home function is opened. To avoid unneccsary 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 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 the 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.
static final DJIKeyInfo<LowBatteryRTHInfo> KeyLowBatteryRTHInfo = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LowBatteryRTHInfo", new DJIValueConverter<>(LowBatteryRTHInfo.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("GoHomeAssessment")