class GoToAction
class GoToAction extends MissionAction
Package: dji.sdk.mission.timeline.actions Inherits From: MissionAction
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:
method GoToAction
GoToAction(LocationCoordinate2D coordinate)
Package: dji.sdk.mission.timeline.actions
Description:
Go to the specified coordinate from the current aircraft position. The actionType of this object is set to GoToActionType.COORDINATE.
method GoToAction
GoToAction(float altitude)
Package: dji.sdk.mission.timeline.actions
Description:
Go to the specified altitude (in meters) from the current aircraft position. The actionType of this object is set to GoToActionType.ALTITUDE.
float altitude Target altitude in meters.
method GoToAction
GoToAction(LocationCoordinate2D coordinate, float altitude)
Package: dji.sdk.mission.timeline.actions
Description:
Go to the specified coordinate and altitude (in meters) from the current aircraft position. The actionType of this object is set to GoToActionType.COORDINATE_AND_ALTITUDE.
method setFlightSpeed
void setFlightSpeed (float flightSpeed)
Package: dji.sdk.mission.timeline.actions
Description:
Flight speed of the aircraft when going to the target location. Default is 8 m/s.
float flightSpeed A float value of the flight speed.
method getFlightSpeed
Package: dji.sdk.mission.timeline.actions
Description:
Flight speed of the aircraft when going to the target location. Default is 8 m/s.
Return:
float A float value of flight speed.
GoToAction
Inherited Methods:
dji.sdk.mission.timeline.actions.MissionAction
method
method isRunning
Package: dji.sdk.mission.timeline.actions
Description:
true
if the action is running.
Return:
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:
method setTriggers
void setTriggers (List<Trigger> triggers)
Package: dji.sdk.mission.timeline
Description:
Set the triggers array list to the timeline.
method 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:
boolean true
if the element can be paused.
method 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:
method willRun
Package: dji.sdk.mission.timeline
Description:
If Implemented, this is called by Mission Control right before running the element.
method run
Package: dji.sdk.mission.timeline
Description:
Starts execution of Timeline element. Missions adopting this behavior are being run with their respective operators.
method pause
Package: dji.sdk.mission.timeline
Description:
Pauses the execution of the element. Must be implemented if isPausable
returns true
.
method resume
Package: dji.sdk.mission.timeline
Description:
Resumes the execution of the element. Must be implemented if isPausable
returns true
.
method stop
Package: dji.sdk.mission.timeline
Description:
Stops execution of the element.
method didRun
Package: dji.sdk.mission.timeline
Description:
Called after element execution, regardless of whether or not it was successful.
method setDelayTime
void setDelayTime (long delayTime)
Package: dji.sdk.mission.timeline
Description:
Sets the time you want to delay before element execution which is used for asynchronous processing scenarios. For example, if you want to execute GimbalAttitudeAction
after ShootPhotoAction
, you should set delay time in GimbalAttitudeAction
. Because it takes 1 to 2 seconds to take a photo, the gimbal's commands will not be responded during this period, so we need to delay 2 seconds before turning the gimbal to ensure that the gimbal movement is executed correctly.
long delayTime The time you want to delay before element execution, unit:second.
method getDelayTime
Package: dji.sdk.mission.timeline
Description:
Gets the time you want to delay before element execution.
Return:
long The time you set to delay before element execution.