Main Content

angvellog

Return logged angular velocity data from iOS sensor

Description

example

[log,timestamp] = angvellog(m)returns the angular velocity log, wheremis the name of themobiledevobject that acquires the sensor data,logis anm3矩阵containing angular velocity data points, andtimestampis anm1的向量of timestamps.

Examples

collapse all

This example assumes that you have already installed and set upMATLAB®Mobile™on your iOS device and connected it to your computer running MATLAB. If you have not, seeInstall MATLAB Mobile on Your Apple iOS Device.

StartMATLAB Mobileon your iOS device.

On the森sorsscreen, tap theAngular Velocitysensor.

Place the device where you want to get the sensor data.

On your computer, create amobiledevobject,m, in MATLAB.

m = mobiledev

Begin logging data by enabling theLoggingproperty.

m.Logging = 1

This action starts the transmitting of data from all selected sensors. You can also start transmission by tapping theStartbutton inMATLAB Mobile.

Get the logged angular velocity data.

[av, t] = angvellog(m)

This returns the angular velocity log, whereavcontains the three data points inX,Y, andZrotations, in radians per second.

SeeDevice Orientationfor a diagram showing theX,Y, andZaxes relative to the device.

Output Arguments

collapse all

Name of variable for angular velocity log data, returned as anm3矩阵of data points from the Angular Velocity sensor on the iOS device. The three data points are the angular velocity reading inX,Y, andZrotations, in radians per second.

Angular velocity is defined in relation to theX,YandZaxes and in standard right-hand rotational vector notation. If you place the device face-up on a table, the positive X-axis extends out of the right side of the device, positive Y-axis extends out of the top side, and the positive Z-axis extends out of the front face of the device. This is independent of the orientation of the device.

Name of variable for timestamp, returned as anm1的向量of timestamps from the Angular Velocity sensor on the iOS device. Time is in seconds, relative to theInitialTimestampproperty.

Version History

Introduced in R2015a