Main Content

readHeight

Read current height of Ryze drone relative to the takeoff surface

Since R2020a

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

Description

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

example

Examples

collapse all

Connect to a Ryze Tello drone.

droneObj = ryze()
droneObj = 
          ryze with properties:

                    Name: "Tello"
                      ID: "TELLO-D2B07B"
               IPAddress: "192.168.10.1"
                   State: "landed"
            BatteryLevel: 50%
             StationMode: 0
        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.0000
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.

Version History

Introduced in R2020a