PointOfInterestPilotingItf
public protocol PointOfInterestPilotingItf : ActivablePilotingItf, PilotingItf
Point Of Interest piloting interface.
During a piloted Point Of Interest, the drone always points towards the given Point Of Interest but can be piloted normally. However, yaw value is not settable.
There are two variants of piloted Point Of Interest:
- In
.lockedGimbal
mode, the gimbal always looks at the Point Of Interest. Gimbal control command is ignored by the drone. - In
.lockedOnceGimbal
mode, the gimbal looks once at the Point Of Interest, and is then freely controllable by the gimbal command. - In
.freeGimbal
mode, the gimbal initially looks at the Point Of Interest, and is then freely controllable by the gimbal command.
This piloting interface can be retrieved by:
drone.getPilotingItf(PilotingItfs.poi)
-
Current targeted Point Of Interest.
nil
if there’s no piloted Point Of Interest in progress.Declaration
Swift
var currentPointOfInterest: PointOfInterest? { get }
-
Tells why this piloting interface may currently be unavailable.
The set of reasons that preclude this piloting interface from being available at present.
Declaration
Swift
var availabilityIssues: Set<POIIssue>? { get }
-
Starts a piloted Point Of Interest in locked gimbal mode.
This is equivalent to calling:
start(latitude, longitude, altitude, .lockedGimbal)
Declaration
Swift
func start(latitude: Double, longitude: Double, altitude: Double)
Parameters
latitude
latitude of the location (in degrees) to look at
longitude
longitude of the location (in degrees) to look at
altitude
altitude above take off point (in meters) to look at
-
Starts a piloted Point Of Interest.
Declaration
Swift
func start(latitude: Double, longitude: Double, altitude: Double, mode: PointOfInterestMode)
Parameters
latitude
latitude of the location (in degrees) to look at
longitude
longitude of the location (in degrees) to look at
altitude
altitude above take off point (in meters) to look at
mode
point of interest mode
-
Sets the current pitch value.
Expressed as a signed percentage of the max pitch/roll setting (
maxPitchRoll
), in range [-100, 100].- -100 corresponds to a pitch angle of max pitch/roll towards ground (copter will fly forward)
100 corresponds to a pitch angle of max pitch/roll towards sky (copter will fly backward)
Note
This value may be clamped if necessary, in order to respect the maximum supported physical tilt of the copter.
Declaration
Swift
func set(pitch: Int)
Parameters
pitch
the new pitch value to set
-
Sets the current roll value.
Expressed as a signed percentage of the max pitch/roll setting (
maxPitchRoll
), in range [-100, 100].- -100 corresponds to a roll angle of max pitch/roll to the left (copter will fly left)
100 corresponds to a roll angle of max pitch/roll to the right (copter will fly right)
Note
This value may be clamped if necessary, in order to respect the maximum supported physical tilt of the copter.
Declaration
Swift
func set(roll: Int)
Parameters
roll
the new roll value to set
-
Sets the current vertical speed value.
Expressed as a signed percentage of the max vertical speed setting (
maxVerticalSpeed
), in range [-100, 100].- -100 corresponds to max vertical speed towards ground
100 corresponds to max vertical speed towards sky
Declaration
Swift
func set(verticalSpeed: Int)
Parameters
verticalSpeed
the new vertical speed value to set