Main Content

moveright

Move Parrot drone right

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

Description

moveright(parrotObj) moves the Parrot® drone, represented by parrotObj, to the right.

example

moveright(parrotObj,duration) moves the Parrot drone, represented by parrotObj, to the right for the specified time.

example

moveright(parrotObj,duration,tilt) moves the Parrot drone, represented by parrotObj, to the right 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 to the right for the default duration of 0.5 seconds.

moveright(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 to the right for 5 seconds.

moveright(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 to the right for 5 seconds at an angle of 0.0873 radians.

moveright(parrotObj,5,deg2rad(5));

Input Arguments

collapse all

Parrot drone connection object, specified as a parrot object.

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

Data Types: double

The angle at which the Parrot drone moves to the right, specified in radians.

Data Types: double

Version History

Introduced in R2019a

See Also

| | |