Main Content

moveforward

Move Parrot drone forward

Description

example

moveforward(parrotObj) moves the Parrot® drone, represented by parrotObj, forward.

example

moveforward(parrotObj,duration) moves the Parrot drone, represented by parrotObj, forward for the specified time.

example

moveforward(parrotObj,duration,tilt) moves the Parrot drone, represented by parrotObj, forward for the specified time at a specified angle.

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 forward for the default duration of 0.5 seconds.

moveforward(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 forward for 5 seconds.

moveforward(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 forward for 5 seconds at an angle of 0.7854 radians.

moveforward(parrotObj,5,deg2rad(45));

Input Arguments

collapse all

Parrot drone connection object, specified as a parrot object.

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

Data Types: double

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

Data Types: double

Version History

Introduced in R2019a

See Also

| | |