Main Content

readOrientation

Read current orientation of Ryze drone in terms of Euler angles

Since R2020a

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

Description

example

[angles,time] = readOrientation(droneObj) reads the orientation of Ryze drone in terms of the Euler angles represented as [azimuth, Pitch, Roll], along with the time stamp.

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 orientation.

[angles,time]= readOrientation(droneObj)
     angles = 
            0.7850  0.3010  -0.2070  
       time = 
            datetime
             15-Aug-2019 14:07:19

Input Arguments

collapse all

Ryze drone connection object, specified as a droneObj.

Output Arguments

collapse all

Euler rotation angles in radians, returned as an 1-by-3 array of Euler rotation angles. The axis is along ZYX axes. This represents the rotation of the drone from the NED frame to the estimated body frame.

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

Version History

Introduced in R2020a