ManualCopterPilotingItf

@objc(GSManualCopterPilotingItf)
public protocol ManualCopterPilotingItf : ActivablePilotingItf, PilotingItf

Manual copter piloting interface. Used to pilot manually a copter.

This piloting interface is the default one. This means that if you explicitly deactivate another piloting interface, this one will be automatically activated. It also means that you can’t explicitly deactivate this piloting interface. To deactivate it, you have to activate another piloting interface.

This piloting interface can be retrieved by:

drone.getPilotingItf(PilotingItfs.manualCopter)
  • Maximum roll and pitch angle in degrees.

    This value defines the range used by set:pitch and set:roll functions, 100 correspond to an angle of maxPitchRoll value.

    Declaration

    Swift

    var maxPitchRoll: DoubleSetting { get }
  • Maximum roll and pitch velocity in degrees/second.

    This value sets the drone dynamic by changing the speed the drone will move to the requested roll/pitch.

    nil if not supported by the drone.

    Declaration

    Swift

    var maxPitchRollVelocity: DoubleSetting? { get }
  • Maximum vertical speed in meters/second.

    This value defines the range used by set:verticalSpeed, 100 correspond to a vertical speed of maxVerticalSpeed value.

    Declaration

    Swift

    var maxVerticalSpeed: DoubleSetting { get }
  • Maximum yaw angular speed in degrees/second.

    This value define the range used by set:yawRotationSpeed, 100 correspond to a yaw angular speed of maxYawRotationSpeed value.

    Declaration

    Swift

    var maxYawRotationSpeed: DoubleSetting { get }
  • Banked-turn mode.

    When enabled, the drone will use yaw values from the piloting command to infer with roll and pitch when the horizontal speed is not null.

    nil if not supported by the drone.

    Declaration

    Swift

    var bankedTurnMode: BoolSetting? { get }
  • Thrown take off settings. nil if not supported by the drone.

    Declaration

    Swift

    var thrownTakeOffSettings: BoolSetting? { get }
  • Whether the drone is ready to takeoff.

    Declaration

    Swift

    var canTakeOff: Bool { get }
  • Whether the drone is ready to land.

    Declaration

    Swift

    var canLand: Bool { get }
  • Activates this piloting interface.

    If successful, it deactivates the current piloting interface and activate this one.

    Declaration

    Swift

    func activate() -> Bool

    Return Value

    true on success, false if the piloting interface can’t be activated

  • 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 yaw rotation speed value.

    Expressed as a signed percentage of the max yaw rotation speed setting (maxYawRotationSpeed), in range [-100, 100].

    • -100 corresponds to a counter-clockwise rotation of max yaw rotation speed
    • 100 corresponds to a clockwise rotation of max yaw rotation speed

    Declaration

    Swift

    @objc(setYawRotationSpeed:)
    func set(yawRotationSpeed: Int)

    Parameters

    yawRotationSpeed

    the new yaw rotation speed 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

  • Requests the drone to hover.

    Put pitch and roll to 0.

    Declaration

    Swift

    func hover()
  • Requests the drone to take off.

    Declaration

    Swift

    func takeOff()
  • Requests the copter to get prepared for a thrown take off.

    Note

    Will only request it if thrownTakeOffSettings is available.

    Declaration

    Swift

    func thrownTakeOff()
  • Requests the copter to take off, to get prepared for a thrown take off, to cancel a thrown take off or to land, depending on its state and on the thrown take off setting.

    See smartTakeOffLandAction and thrownTakeOffSettings.

    Declaration

    Swift

    func smartTakeOffLand()
  • Action that will be performed if smartTakeOffLand() is called.

    Declaration

    Swift

    var smartTakeOffLandAction: SmartTakeOffLandAction { get }
  • Requests the drone to land.

    Declaration

    Swift

    func land()
  • Emergency motor cut out.

    Note

    Watch out, this will cut the motor immediately. If the drone was flying it will fall off.

    Declaration

    Swift

    func emergencyCutOut()