Name: mobileSensorReading

Type: function

Syntax: mobileSensorReading(<sensor>, <detailed>)

Summary:
Returns the reading from the named sensor.

Introduced: 5.5

OS: ios, android

Platforms: mobile

Example:
get mobileSensorReading("heading",false)

Example:
put mobileSensorReading("location",true) into tDeviceLocation

Parameters:
sensor (enum):
The name of the sensor you wish to start using

-   "location": the location of the device
-   "heading": the heading of the device
-   "acceleration": the acceleration of the device
-   "rotation rate": the rotation of the device


detailed (enum):
How detailed the readings from sensors should be. The default value is
false 

-   "false": basic readings will be provided.
-   "true": additional readings will be provided.


Returns:
-   Location -  a comma separated list of the latitude, longitude and
altitude of the device. If any of these readings are not available, an
empty item will be returned in its place. If <detailed> is true an array
containing the keys latitude, longitude, altitude, timestamp, horizontal
accuracy and vertical accuracy is returned. Additionally, if values for
them exist, the keys speed and course are included in the returned array.
-   Heading - the heading of the
device in degrees. If <detailed> is true an array containing the keys
heading, magnetic heading, true heading, timestamp, x, y, z and accuracy
is returned. 
-   Acceleration - a comma separated list of the acceleration
in the x, y and z axes. If <detailed> is true an array containing the
keys x, y, z and timestamp is returned. 
-   Rotation Rate - a comma separated list of the rate of rotation 
around the x, y and z axes. If <detailed> is true an array containing 
the keys x, y, z and timestamp is returned. 

Description:
Use the <mobileSensorReading> function to fetch a reading from the named
device sensor.

The <mobileSensorReading> function returns a reading from the named
sensor. 

>*Note:* When speed is returned, the value is in meters per second.
To convert to miles per hour, multiply the value by 2.237. To convert
to kilometers per hour, multiply it by 3.6 instead.

References: mobileStopTrackingSensor (command),
mobileStartTrackingSensor (command), mobileCanTrackHeading (function),
mobileCanTrackLocation (function), mobileCurrentHeading (function),
mobileCurrentLocation (function), headingChanged (message),
accelerationChanged (message), locationChanged (message),
rotationRateChanged (message), trackingError (message)

