PointAndFlyPilotingItf
public protocol PointAndFlyPilotingItf : ActivablePilotingItf, PilotingItf
Point'n'fly piloting interface.
This interface used is to request the drone to point at or to move to a given location.
This piloting interface can be retrieved by:
drone.getPilotingItf(PilotingItfs.pointAndFly)
-
Set of reasons why this piloting interface is unavailable.
Empty when state is
.idle
or.active
.Declaration
Swift
var unavailabilityReasons: Set<PointAndFlyIssue> { get }
-
Current point'n'fly directive if any one is executing,
nil
otherwise.It can be either a
PointDirective
or aFlyDirective
.Declaration
Swift
var currentDirective: PointAndFlyDirective? { get }
-
Point or fly execution status.
This property is transient: it will change back to
nil
immediately after the status is notified.Declaration
Swift
var executionStatus: PointAndFlyExecutionStatus? { get }
-
Executes the given point or fly directive.
This interface will change to
active
when the execution starts, and then toidle
when the drone reaches its destination (fly directive).If this method is called while the previous execution is active, it will be stopped immediately and the new directive is executed.
In case of drone disconnection, the execution is interrupted.
Declaration
Swift
func execute(directive: PointAndFlyDirective)
Parameters
directive
point'n'fly directive
-
Sets the current pitch value.
Note
This method is supposed to be used during a point execution. If a fly is executing, calling this method will abort it immediately.Declaration
Swift
func set(pitch: Int)
Parameters
pitch
the new pitch value to set
-
Sets the current roll value.
Note
This method is supposed to be used during a point execution. If a fly is executing, calling this method will abort it immediately.Declaration
Swift
func set(roll: Int)
Parameters
roll
the new roll value to set
-
Sets the current vertical speed value during a point execution.
Note
This method is supposed to be used during a point execution. If a fly is executing, calling this method will abort it immediately.Declaration
Swift
func set(verticalSpeed: Int)
Parameters
verticalSpeed
the new vertical speed value to set