Main Content

readSpeed

Read speed of Parrot drone

Description

[speed,time] = readSpeed(parrotObj) returns the speed of the Parrot® drone along with the time stamp. The function returns the speed only after the drone has taken off. For a Parrot Mambo drone, before takeoff, the function returns a zero.

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, read the speed of the drone.

[speed,time] = readSpeed(parrotObj)
speed = 
        0.8600  -0.0240  0.0015 
 time =  
        datetime
          15-Mar-2019 14:07:19

Input Arguments

collapse all

Parrot drone connection object, specified as a parrot object.

Output Arguments

collapse all

The speed of the drone in m/s along the x-, y-, and z- directions with respect to the inertial NED frame. The NED frame is calculated at drone startup.

Data Types: double

The time at which the drone sends the speed of the Parrot drone, specified as a datetime.

Data Types: datetime

Version History

Introduced in R2019a