PointOfInterestPilotingItf

@objc(GSPointOfInterestPilotingItf)
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 .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 }
  • 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

    @objc(setPitch:)
    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

    @objc(setRoll:)
    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

    @objc(setVerticalSpeed:)
    func set(verticalSpeed: Int)

    Parameters

    verticalSpeed

    the new vertical speed value to set