public class

DJIFlightControllerCurrentState

extends Object
java.lang.Object
   ↳ dji.common.flightcontroller.DJIFlightControllerCurrentState

Class Overview

true if the clearance between the aircraft and the ground is less than 0.3m and confirmation from the user is needed to continue the landing. When the confirmation is needed, user can use confirmLanding in DJIFlightController to continue the landing. It is supported by flight controller firmware 3.2.0.0 or above.

Summary

Public Constructors
DJIFlightControllerCurrentState()
Public Methods
boolean areMotorsOn()
true if motors are on.
int getAircraftHeadDirection()
This method is deprecated. Use the DJICompass.getHeading() method instead.
DJILocationCoordinate3D getAircraftLocation()
Gets the current location of the aircraft as a coordinate.
DJIAttitude getAttitude()
Gets the attitude of the aircraft where the pitch, roll, and yaw values will be in the range of [-180, 180] degrees.
DJIFlightControllerFlightMode getFlightMode()
Gets the flight controller flight mode.
String getFlightModeString()
Gets the flight mode as a string.
int getFlightTime()
Returns the flight time.
int getGoHomeHeight()
Gets the height when the aircraft is going home in meters.
DJIGoHomeStatus getGoHomeStatus()
Return the DJIGoHomeStatus object.
DJIGPSSignalStatus getGpsSignalStatus()
Gets the aircraft's current GPS signal quality.
DJILocationCoordinate2D getHomeLocation()
Returns the home location of the aircraft as a coordinate.
float getHomePointAltitude()
This method is deprecated. Home point altitude is meaningless.
DJIFlightControllerNoFlyStatus getNoFlyStatus()
Returns the aircraft's current no fly status.
DJILocationCoordinate2D getNoFlyZoneCenter()
Returns no fly zone's center coordinate.
double getNoFlyZoneRadius()
Gets the no fly zone's radius.
DJIFlightOrientationMode getOrientaionMode()
Returns the orientation mode.
DJIAircraftRemainingBatteryState getRemainingBattery()
Recommended action based on remaining battery life.
double getSatelliteCount()
Returns the GPS satellite count.
DJIFlightControllerSmartGoHomeStatus getSmartGoHomeStatus()
Gets the aircraft's smart go home data.
float getUltrasonicHeight()
Height of aircraft measured by the ultrasonic sensor in meters.
float getVelocityX()
Current speed of the aircraft in the x direction in meters per second using North-East-Down coordinate system.
float getVelocityY()
Current speed of the aircraft in the y direction in meters per second using North-East-Down coordinate system.
float getVelocityZ()
Current speed of the aircraft in the z direction in meters per second using North-East-Down coordinate system.
boolean isFailsafe()
true if fail safe is enabled for when the signal is lost between remote controller and aircraft.
boolean isFlying()
true if aircraft is flying.
boolean isGoingHome()
true if the aircraft is going home.
boolean isHomePointSet()
true if the home point has been set.
boolean isIMUPreheating()
true if IMU is preheating.
boolean isLandingConfirmationNeeded()
true if the clearance between the aircraft and the ground is less than 0.3m and confirmation from the user is needed to continue the landing.
boolean isMultipModeOpen()
Determines whether multiple flight modes are open.
boolean isReachLimitedHeight()
true if the aircraft has reached the flight limit height.
boolean isReachLimitedRadius()
true if the aircraft has reached the flight limit radius.
boolean isUltrasonicBeingUsed()
true if the ultrasonic sensor is being used.
boolean isUltrasonicError()
This method is deprecated. Please refer to the DJIDiagnosis.
boolean isVisionSensorBeingUsed()
true if vision sensor is being used.
void setFlightTime(int time)
void setNeedConfirmLanding(boolean needForceLanding)
void setVelocityX(float pVelocityX)
Set the velocity X.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DJIFlightControllerCurrentState ()

Public Methods

public boolean areMotorsOn ()

true if motors are on.

public int getAircraftHeadDirection ()

This method is deprecated.
Use the DJICompass.getHeading() method instead.

Returns the heading direction of the aircraft.

public DJILocationCoordinate3D getAircraftLocation ()

Gets the current location of the aircraft as a coordinate. The altitude is relative to take off location, measured by the barometer, in meters.

Returns
  • The current location of the aircraft as a coordinate.

public DJIAttitude getAttitude ()

Gets the attitude of the aircraft where the pitch, roll, and yaw values will be in the range of [-180, 180] degrees. If the values of the pitch, roll, and yaw are 0, the aircraft will be hovering level with a True North heading.

Returns
  • The attitude of the aircraft.

public DJIFlightControllerFlightMode getFlightMode ()

Gets the flight controller flight mode. For more info, see http://wiki.dji.com/en/index.php/Phantom_3_Professional-Aircraft

Returns
  • The flight controller flight mode.

public String getFlightModeString ()

Gets the flight mode as a string.

Returns
  • The flight mode as a string. For example, "P-GPS" or "P-Atti".

public int getFlightTime ()

Returns the flight time.

public int getGoHomeHeight ()

Gets the height when the aircraft is going home in meters.

Returns
  • The height when the aircraft is going home.

public DJIGoHomeStatus getGoHomeStatus ()

Return the DJIGoHomeStatus object.

public DJIGPSSignalStatus getGpsSignalStatus ()

Gets the aircraft's current GPS signal quality.

Returns
  • The aircraft's current GPS signal quality.

public DJILocationCoordinate2D getHomeLocation ()

Returns the home location of the aircraft as a coordinate.

public float getHomePointAltitude ()

This method is deprecated.
Home point altitude is meaningless.

Returns the home point altitude. The home point altitude means the height of the recorded home point.

public DJIFlightControllerNoFlyStatus getNoFlyStatus ()

Returns the aircraft's current no fly status.

public DJILocationCoordinate2D getNoFlyZoneCenter ()

Returns no fly zone's center coordinate.

public double getNoFlyZoneRadius ()

Gets the no fly zone's radius.

public DJIFlightOrientationMode getOrientaionMode ()

Returns the orientation mode.

public DJIAircraftRemainingBatteryState getRemainingBattery ()

Recommended action based on remaining battery life.

public double getSatelliteCount ()

Returns the GPS satellite count.

Returns
  • The GPS satellite count.

public DJIFlightControllerSmartGoHomeStatus getSmartGoHomeStatus ()

Gets the aircraft's smart go home data. If smart go home is enabled, all the smart go home data will be available in DJIFlightControllerSmartGoHomeStatus.

Returns
  • The aircraft's smart go home data.

public float getUltrasonicHeight ()

Height of aircraft measured by the ultrasonic sensor in meters. The data will only be available if isUltrasonicBeingUsed returns true. Height has a precision of 0.1m.

Returns
  • The height of the aircraft measured by the ultrasonic sensor in meters.

public float getVelocityX ()

Current speed of the aircraft in the x direction in meters per second using North-East-Down coordinate system.

public float getVelocityY ()

Current speed of the aircraft in the y direction in meters per second using North-East-Down coordinate system.

public float getVelocityZ ()

Current speed of the aircraft in the z direction in meters per second using North-East-Down coordinate system.

public boolean isFailsafe ()

true if fail safe is enabled for when the signal is lost between remote controller and aircraft.

public boolean isFlying ()

true if aircraft is flying.

public boolean isGoingHome ()

true if the aircraft is going home.

public boolean isHomePointSet ()

true if the home point has been set.

public boolean isIMUPreheating ()

true if IMU is preheating.

public boolean isLandingConfirmationNeeded ()

true if the clearance between the aircraft and the ground is less than 0.3m and confirmation from the user is needed to continue the landing. When the confirmation is needed, user can use method, confirmLanding, in DJIFlightController to continue the landing. It is supported by flight controller firmware 3.2.0.0 or above.

public boolean isMultipModeOpen ()

Determines whether multiple flight modes are open. This will reflect whether the navigation mode (ground station) is enabled.

Returns
  • true if the navigation mode is enabled.

public boolean isReachLimitedHeight ()

true if the aircraft has reached the flight limit height.

public boolean isReachLimitedRadius ()

true if the aircraft has reached the flight limit radius.

public boolean isUltrasonicBeingUsed ()

true if the ultrasonic sensor is being used. Variables that can impact the quality of the ultrasonic measurement and whether it is used or not are height above ground and the type of ground (if it reflects sound waves well). Usually the ultrasonic sensor works when the aircraft is less than 8m above ground.

public boolean isUltrasonicError ()

This method is deprecated.
Please refer to the DJIDiagnosis.

Returns whether or not the ultrasonic is used.

public boolean isVisionSensorBeingUsed ()

true if vision sensor is being used. Variables that can impact the quality of the vision measurement and whether it is used or not are height above ground and the type of ground (if it has sufficiently rich texture). Usually the vision sensor works when the aircraft is less than 3m above ground.

public void setFlightTime (int time)

public void setNeedConfirmLanding (boolean needForceLanding)

public void setVelocityX (float pVelocityX)

Set the velocity X.

public String toString ()