Main Content

readHeight

Read current height of Ryze drone relative to the takeoff surface

Description

example

[height,time] = readHeight(droneObj) returns the current height relative to the takeoff surface in meters along with the system time, specified as a droneObj.

Examples

collapse all

Connect to a Ryze® Tello drone.

droneObj = ryze()
droneObj = 
          ryze tello with properties:

                    Name: "Tello"
                      ID: "TELLO-D2B07B"
                   State: "landed"
            BatteryLevel: 50%
        AvailableCameras: ["FPV"]

Use takeoff to initiate takeoff of the drone.

takeoff(droneObj)

While the Ryze Tello is in flight, read the height relative to the takeoff surface.

[height,time] = readHeight(droneObj)
height = 
        0.8600
time = 
       datetime
       15-Aug-2019 14:07:19

Input Arguments

collapse all

Ryze drone connection object, specified as a droneObj.

Output Arguments

collapse all

The current height of the drone relative to the takeoff surface, specified in meters.

The time at which the height data is received by MATLAB®, specified as a datetime.

Introduced in R2020a