Main Content

moveback

Move Parrot drone backwards

Add-On Required: This feature requires the MATLAB Support Package for Parrot Drones add-on.

Description

moveback(parrotObj) moves the Parrot® drone backwards.

example

moveback(parrotObj,duration) moves the Parrot drone backwards for the specified time.

example

moveback(parrotObj,duration,tilt) moves the Parrot drone backwards for the specified time at a specified angle.

example

Examples

collapse all

Connect to a Parrot drone.

parrotObj = parrot('Mambo')
parrotObj = 
          parrot with properties:

                    Name: "Mambo"
                      ID: "Mambo_564853"
                   State: "landed"
            BatteryLevel: 50%
        AvailableCameras: ["FPV"]

Use the parrot object to initiate takeoff of the Parrot drone.

takeoff(parrotObj)

While the Parrot drone is in flight, move the drone backwards for the default duration of 0.5 seconds.

moveback(parrotObj);

Connect to a Parrot drone.

parrotObj = parrot('Mambo')
parrotObj = 
          parrot with properties:

                    Name: "Mambo"
                      ID: "Mambo_564853"
                   State: "landed"
            BatteryLevel: 50%
        AvailableCameras: ["FPV"]

Use the parrot object to initiate takeoff of the Parrot drone.

takeoff(parrotObj)

While the Parrot drone is in flight, move the drone backwards for 5 seconds.

moveback(parrotObj,5);

Connect to a Parrot drone.

parrotObj = parrot('Mambo')
parrotObj = 
          parrot with properties:

                    Name: "Mambo"
                      ID: "Mambo_564853"
                   State: "landed"
            BatteryLevel: 50%
        AvailableCameras: ["FPV"]

Use the parrot object to initiate takeoff of the Parrot drone.

takeoff(parrotObj)

While the Parrot drone is in flight, move the drone backwards for 5 seconds at an angle of 0.5236 radians.

moveback(parrotObj,5,deg2rad(30));

Input Arguments

collapse all

Parrot drone connection object, specified as a parrot object.

The time for which the Parrot drone moves back, specified in seconds.

Data Types: double

The absolute value of the pitch angle at which the Parrot drone moves, measured in radians.

Data Types: double

Version History

Introduced in R2019a