DJI Mobile SDK Documentation

      class GimbalAttitudeAction

      class GimbalAttitudeAction extends MissionAction
      Package:dji.sdk.mission.timeline.actions
      Inherits From:MissionAction
      Description:

      This class represents a gimbal movement 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 camera's gimbal will move to the specified attitude when the Timeline reaches the action. Please be notified that the PitchRangeExtensionEnabled of Gimbal is set to true by default if the pitch value in user specified attitude is bigger than 0.

      Class Members:
      Constructor
      method
      method GimbalAttitudeAction
      GimbalAttitudeAction(Attitude attitude)
      Package:dji.sdk.mission.timeline.actions
      Description:

      Initialize instance with gimbal target attitude. The value of GimbalMode is UNKNOWN.

      Input Parameters:
      Attitude attitudeGimbal target attitude.
      Gimbal Index
      method
      method setGimbalIndex
      void setGimbalIndex(int index)
      Package:dji.sdk.mission.timeline.actions
      Description:

      Set the expected action gimbal index. For example there are two gimbals in M210, if you want to run action on Gimbal I, you can either set the index as 0 or do nothing because of the default index is 0; if you want to run action on Gimbal II, you need set the index as 1. Default index is 0 if user does not call this method to specify the index.

      Input Parameters:
      int indexIndex of the gimbal on which the action is expected to run.
      method setCompletionTime
      void setCompletionTime(double completionTime)
      Package:dji.sdk.mission.timeline.actions
      Description:

      Completion time, in seconds, for the gimbal to go to the target attitude from current attitude. Default is 1 second.

      Input Parameters:
      double completionTimeA double value of completion time.
      method getCompletionTime
      double getCompletionTime()
      Package:dji.sdk.mission.timeline.actions
      Description:

      Completion time, in seconds, for the gimbal to go to the target attitude from current attitude. Default is 1 second.

      Return:
      doubleTime in seconds.
      Gimbal Mode
      method
      method getGimbalMode
      GimbalMode getGimbalMode()
      Package:dji.sdk.mission.timeline.actions
      Description:

      Current gimbal working mode.

      Return:
      GimbalModeGimbal Mode.
      method setGimbalMode
      void setGimbalMode(GimbalMode mode)
      Package:dji.sdk.mission.timeline.actions
      Description:

      For the GimbalAttitudeAction, either FREE or YAW_FOLLOW mode is recommended. If the gimbal mode is not set, the default mode is YAW_FOLLOW. Check the details on the description of each work mode in GimbalMode enum definition.

      Input Parameters:
      GimbalMode modeOne of the work mode in GimbalMode.
      Attitude
      method
      method getTargetAttitude
      Attitude getTargetAttitude()
      Package:dji.sdk.mission.timeline.actions
      Description:

      Target gimbal attitude.

      Return:
      AttitudeA Attitude object.
      Inherited Methods:
      dji.sdk.mission.timeline.actions.MissionAction
      method
      method isRunning
      boolean isRunning()
      Package:dji.sdk.mission.timeline.actions
      Description:

      true if the action is running.

      Return:
      booleanA boolean value.
      Inherited Methods:
      dji.sdk.mission.timeline.TimelineElement
      method
      method getTriggers
      List<Trigger> getTriggers()
      Package:dji.sdk.mission.timeline
      Description:

      If implemented, Mission Control loads and activates the triggers for the duration that the Timeline element is executing.

      Return:
      List<Trigger>A List of Trigger object.
      method setTriggers
      void setTriggers(List<Trigger> triggers)
      Package:dji.sdk.mission.timeline
      Description:

      Set the triggers array list to the timeline.

      Input Parameters:
      List<Trigger> triggersA list of Trigger objects.
      method isPausable
      boolean isPausable()
      Package:dji.sdk.mission.timeline
      Description:

      true if the element can be paused. If false, then when the Timeline is asked to pause when this element is running, nothing will happen.

      Return:
      booleantrue if the element can be paused.
      method checkValidity
      DJIError checkValidity()
      Package:dji.sdk.mission.timeline
      Description:

      Returns an error if there is a configuration or parameter error in the element. Returns null if there is no issue.

      Return:
      DJIErrorA DJIError object.
      method
      method willRun
      void willRun()
      Package:dji.sdk.mission.timeline
      Description:

      If Implemented, this is called by Mission Control right before running the element.

      method
      method run
      void run()
      Package:dji.sdk.mission.timeline
      Description:

      Starts execution of Timeline element. Missions adopting this behavior are being run with their respective operators.

      method
      method pause
      void pause()
      Package:dji.sdk.mission.timeline
      Description:

      Pauses the execution of the element. Must be implemented if isPausable returns true.

      method
      method resume
      void resume()
      Package:dji.sdk.mission.timeline
      Description:

      Resumes the execution of the element. Must be implemented if isPausable returns true.

      method
      method stop
      void stop()
      Package:dji.sdk.mission.timeline
      Description:

      Stops execution of the element.

      method
      method didRun
      void didRun()
      Package:dji.sdk.mission.timeline
      Description:

      Called after element execution, regardless of whether or not it was successful.