DJIFlightControllerCurrentState

@interface DJIFlightControllerCurrentState : NSObject

This class contains the current state of the flight controller.

  • GPS satellite count.

    Declaration

    Objective-C

    @property (readonly, nonatomic) int satelliteCount;
  • Home location of the aircraft as a coordinate.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CLLocationCoordinate2D homeLocation;
  • Current location of the aircraft as a coordinate.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CLLocationCoordinate2D aircraftLocation;
  • Current speed of the aircraft in the x direction in meters per second using the N-E-D (North-East-Down) coordinate system.

    Declaration

    Objective-C

    @property (readonly, nonatomic) float velocityX;
  • Current speed of the aircraft in the y direction in meters per second using the N-E-D (North-East-Down) coordinate system.

    Declaration

    Objective-C

    @property (readonly, nonatomic) float velocityY;
  • Current speed of the aircraft in the z direction in meters per second using the N-E-D (North-East-Down) coordinate system.

    Declaration

    Objective-C

    @property (readonly, nonatomic) float velocityZ;
  • Relative altitude of the aircraft relative to take off location, measured by the barometer, in meters.

    Declaration

    Objective-C

    @property (readonly, nonatomic) float altitude;
  • Attitude of the aircraft where the pitch, roll, and yaw values will be in the range of [-180, 180]. If the values of the pitch, roll, and yaw are 0, the aircraft will be hovering level with a True North heading.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DJIAttitude attitude;
  • Recommended action based on remaining battery life.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        DJIAircraftRemainingBatteryState remainingBattery;
  • YES if aircraft is flying.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isFlying;
  • The accumulated flight time in seconds since the aircraft was powered on.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSUInteger flightTime;
  • Aircraft’s current flight mode.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DJIFlightControllerFlightMode flightMode;
  • Aircraft’s current no fly status.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DJIFlightControllerNoFlyStatus noFlyStatus;
  • No fly zone’s center coordinate.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CLLocationCoordinate2D noFlyZoneCenter;
  • No fly zone’s radius in meters.

    Declaration

    Objective-C

    @property (readonly, nonatomic) int noFlyZoneRadius;
  • Aircraft’s smart go home data. If smart go home is enabled, all the smart go home data will be available in DJIFlightControllerSmartGoHomeStatus.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        DJIFlightControllerSmartGoHomeStatus smartGoHomeStatus;
  • The current status of the executing go-home status.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        DJIFlightControllerGoHomeExecutionStatus goHomeExecutionStatus;
  • Aircraft’s current orientation mode.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DJIFlightOrientationMode orientationMode;
  • Aircraft’s current GPS signal quality.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DJIGPSSignalStatus gpsSignalStatus;
  • YES if the signal lost between remote controller and aircraft fail safe is enabled.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isFailsafe;
  • YES if IMU is preheating.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isIMUPreheating;
  • YES if the ultrasonic sensor is being used. Variables that can impact the quality of the ultrasound 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.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isUltrasonicBeingUsed;
  • Height of aircraft measured by the ultrasonic sensor in meters. The data will only be available if isUltrasonicBeingUsed returns YES. Height has a precision of 0.1m.

    Declaration

    Objective-C

    @property (readonly, nonatomic) float ultrasonicHeight;
  • YES if a 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.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isVisionSensorBeingUsed;
  • YES if motors are on.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL areMotorsOn;
  • Returns the flight mode as a string. For example, P-GPS or P-Atti.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull flightModeString;
  • YES 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 confirmLandingWithCompletion in DJIFlightController to continue the landing.

    It is supported by flight controller firmware 3.2.0.0 or above.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isLandingConfirmationNeeded;