DJI Mobile SDK Documentation

      class DJIGoToAction

      @interface DJIGoToAction : DJIMissionAction
      Header:DJIGoToAction.h
      Inherits From:DJIMissionAction
      Description:

      This class represents a go-to action used as an element in a Timeline mission. By creating an object of this class and adding it to Mission Control's Timeline, the aircraft will go to a specified location when the Timeline reaches the action.

      Class Members:
      Constructor
      method
      method initWithCoordinate
      - (instancetype _Nullable)initWithCoordinate:(CLLocationCoordinate2D)coordinate
      Header:DJIGoToAction.h
      Description:

      Go to the specified coordinate from the current aircraft position.

      Input Parameters:
      CLLocationCoordinate2D coordinateTarget coordinate.
      Return:
      instancetype _NullableAn instance of DJIGoToAction.
      method initWithAltitude
      - (instancetype _Nullable)initWithAltitude:(CLLocationDistance)altitude
      Header:DJIGoToAction.h
      Description:

      Go to the specified altitude (in meters) from the current aircraft position.

      Input Parameters:
      CLLocationDistance altitudeTarget altitude in meters.
      Return:
      instancetype _NullableAn instance of DJIGoToAction.
      method initWithCoordinate:altitude
      - (instancetype _Nullable)initWithCoordinate:(CLLocationCoordinate2D)coordinate altitude:(CLLocationDistance)altitude
      Header:DJIGoToAction.h
      Description:

      Go to the specified coordinate and altitude (in meters) from the current aircraft position.

      Input Parameters:
      CLLocationCoordinate2D coordinateTarget coordinate.
      CLLocationDistance altitudeTarget altitude in meters.
      Return:
      instancetype _NullableAn instance of DJIGoToAction.
      Flight Speed
      property
      property flightSpeed
      @property(nonatomic, assign) float flightSpeed
      Header:DJIGoToAction.h
      Description:

      Flight speed of the aircraft when going to the target location. Default is 8 m/s.

      Coordinate
      property
      property coordinate
      @property (readonly) CLLocationCoordinate2D coordinate
      Header:DJIGoToAction.h
      Description:

      The target coordinate of the go-to action.

      Altitude
      property
      property altitude
      @property (readonly) CLLocationDistance altitude
      Header:DJIGoToAction.h
      Description:

      The target altitude in meters.

      const DJIGoToActionErrorDomain
      extern const NSErrorDomain DJIGoToActionErrorDomain
      Header:DJIGoToAction.h
      Description:

      The error domain for errors specific to the DJIGoToAction.


      GoToAction

      enum DJIGoToActionError
      typedef NS_ENUM(NSInteger, DJIGoToActionError)
      Header:DJIGoToAction.h
      Description:

      The error codes for the DJIGoToAction.

      Enum Members:
      DJIGoToActionErrorUnknownDefault placeholder error.
      DJIGoToActionErrorInvalidAltitudeAltitude value is invalid.
      DJIGoToActionErrorInvalidCoordinatesGPS Coordinates of the GoToAction Waypoint is not valid. Latitude value should be in the range [-90f, 90f] and longitude value should be in the range [-180f, 180f].
      DJIGoToActionErrorInvalidFlightSpeedFlight speed of the GoToAction Waypoint is not valid. Value should be in range [2, 15] m/s.