Interface ManualCopterPilotingItf

    • Method Detail

      • activate

        boolean activate()
        Activates this piloting interface.

        If successful, the currently active piloting interface (if any) is deactivated and this one is activated.

        Returns:
        true on success, false in case the piloting interface cannot be activated at this point
      • setPitch

        void setPitch​(int value)
        Sets the current pitch value.

        value is expressed as a signed percentage of the max pitch/roll setting, 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: value may be clamped if necessary, in order to respect the maximum supported physical tilt of the copter.

        Parameters:
        value - the new pitch value to set
        See Also:
        getMaxPitchRoll()
      • setRoll

        void setRoll​(int value)
        Sets the current roll value.

        value is expressed as a signed percentage of the max pitch/roll setting, 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: value may be clamped if necessary, in order to respect the maximum supported physical tilt of the copter.

        Parameters:
        value - the new pitch roll to set
        See Also:
        getMaxPitchRoll()
      • setYawRotationSpeed

        void setYawRotationSpeed​(int value)
        Set the current yaw rotation speed value.

        value is expressed as as a signed percentage of the max yaw rotation speed setting, 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.

        Parameters:
        value - the new yaw rotation speed value to set
        See Also:
        getMaxYawRotationSpeed()
      • setVerticalSpeed

        void setVerticalSpeed​(int value)
        Set the current vertical speed value.

        value is expressed as as a signed percentage of the max vertical speed setting, in range [-100, 100].
        -100 corresponds to max vertical speed towards ground,100 corresponds to max vertical speed towards sky.

        Parameters:
        value - the new vertical speed value to set
        See Also:
        getMaxVerticalSpeed()
      • hover

        void hover()
        Requests the copter to hover.

        Puts pitch and roll to 0.

      • canTakeOff

        boolean canTakeOff()
        Tells whether the copter can take off.
        Returns:
        true if the copter can take off, otherwise false
      • canLand

        boolean canLand()
        Tells whether the copter can land.
        Returns:
        true if the copter can land, otherwise false
      • takeOff

        void takeOff()
        Requests the copter to take off.
      • thrownTakeOff

        void thrownTakeOff()
        Requests the copter to get prepared for a thrown take-off.
      • smartTakeOffLand

        void smartTakeOffLand()
        Requests the copter to either take off, or get prepared for a thrown take-off, or cancel a thrown take-off, or land, depending on its state and on the thrown take-off setting.
        See Also:
        getSmartTakeOffLandAction(), getThrownTakeOffMode()
      • land

        void land()
        Requests the copter to land.
      • emergencyCutOut

        void emergencyCutOut()
        Requests emergency motor cut out.
      • getMaxPitchRoll

        @NonNull
        DoubleSetting getMaxPitchRoll()
        Gets the maximum roll and pitch angle setting, in degrees.

        Defines the range used by setPitch(int) and setRoll(int) methods. For instance, setting pitch to 100 corresponds to an angle of getMaxPitchRoll().getValue() degrees.

        Returns:
        the maximum roll/pitch setting
      • getMaxPitchRollVelocity

        @NonNull
        OptionalDoubleSetting getMaxPitchRollVelocity()
        Gets the maximum roll and pitch velocity setting, in degrees/second.

        Defines the copter dynamic by changing the speed by which the copter will move to the requested roll/pitch angle.

        Returns:
        the maximum roll/pitch velocity setting
      • getMaxVerticalSpeed

        @NonNull
        DoubleSetting getMaxVerticalSpeed()
        Gets the maximum vertical speed setting, in meters/second.

        Defines the range used by setVerticalSpeed(int) method. For instance, setting vertical speed to 100 corresponds to a vertical speed of getMaxVerticalSpeed().getValue() meters/second.

        Returns:
        the maximum vertical speed setting
      • getMaxYawRotationSpeed

        @NonNull
        DoubleSetting getMaxYawRotationSpeed()
        Gets the maximum yaw rotation speed setting in degrees/second.

        Defines the range used by setYawRotationSpeed(int). For instance, setting yaw rotation speed to 100 corresponds to a yaw rotation speed of getMaxYawRotationSpeed().getValue() degrees/second.

        Returns:
        the maximum yaw rotation speed setting
      • getBankedTurnMode

        @NonNull
        OptionalBooleanSetting getBankedTurnMode()
        Gets the current banked-turn mode.

        If available, banked-turn mode can either be enabled or disabled.
        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.

        Returns:
        the banked-turn mode setting
      • getThrownTakeOffMode

        @NonNull
        OptionalBooleanSetting getThrownTakeOffMode()
        Gets the current thrown take-off mode.

        If available, thrown take-off mode can either be enabled or disabled.
        When enabled, a call to smartTakeOffLand() may send a request to copter to get prepared for a thrown take-off, depending on copter's state.

        Returns:
        the thrown take-off mode setting