{"id":56,"date":"2014-08-25T22:47:45","date_gmt":"2014-08-26T05:47:45","guid":{"rendered":"http:\/\/isaacsapple.littlebytesofpi.com\/Resources\/?page_id=56"},"modified":"2015-06-14T10:31:41","modified_gmt":"2015-06-14T17:31:41","slug":"understanding-sensor-measurements","status":"publish","type":"page","link":"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/understanding-sensor-measurements\/","title":{"rendered":"Understanding Sensor Measurements"},"content":{"rendered":"<p><a name=\"measurementAxes\"><\/a><\/p>\n<h1>Measurement Axes<\/h1>\n<p>Many\u00a0devices, such as smart\u00a0phones and the Broadcom WICED Sense,\u00a0\u00a0have embedded\u00a0sensors that can measure acceleration, rotation, magnetic field, light, and other physical properties. Sensor measurements are given in a 3D coordinate system relative to the front, side, and top of the device. Both the iOS and the Android device use the same coordinate system: \u00a0the x,y axes are defined by the screen bottom and side, and the z axis comes directly out of the screen.<\/p>\n<figure id=\"attachment_84\" aria-describedby=\"caption-attachment-84\" style=\"width: 242px\" class=\"wp-caption alignnone\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-84 size-medium\" src=\"http:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/acceleration_axes_2x-242x300.png\" alt=\"acceleration_axes_2x\" width=\"242\" height=\"300\" srcset=\"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/acceleration_axes_2x-242x300.png 242w, https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/acceleration_axes_2x.png 619w\" sizes=\"auto, (max-width: 242px) 100vw, 242px\" \/><figcaption id=\"caption-attachment-84\" class=\"wp-caption-text\">iOS Measurement Axes<\/figcaption><\/figure>\n<figure id=\"attachment_83\" aria-describedby=\"caption-attachment-83\" style=\"width: 225px\" class=\"wp-caption alignnone\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-83 size-full\" src=\"http:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/axis_device.png\" alt=\"axis_device\" width=\"225\" height=\"269\" \/><figcaption id=\"caption-attachment-83\" class=\"wp-caption-text\">Android Measurement Axes<\/figcaption><\/figure>\n<p><a name=\"rangeResolution\"><\/a><\/p>\n<h1>Range and Resolution<\/h1>\n<p>A measuring device has a range and a resolution defining its capabilities and performance. \u00a0For example, if you had a yard stick with inch marks, the range of your measurements would be 3 feet, and the resolution would be one inch. This is useful for measuring longer objects, but is not very precise. \u00a0If you had a 30 cm ruler with millimeter marks, the range would be 300 mm, and the resolution would be 1 mm. This would be useful for measuring smaller things more precisely.<\/p>\n<p>The range and resolution of the sensors on your Android device is visible on the main screen of the Isaac\u2019s Apple Android application. \u00a0The range and resolution values are specified in the measurement units for that particular sensor.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-86\" src=\"http:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/rangeResolution-200x300.png\" alt=\"rangeResolution\" width=\"200\" height=\"300\" srcset=\"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/rangeResolution-200x300.png 200w, https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/rangeResolution.png 320w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/>\u00a0 \u00a0 \u00a0<a href=\"http:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/rangeResolution2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-87\" src=\"http:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/rangeResolution2-180x300.png\" alt=\"rangeResolution2\" width=\"180\" height=\"300\" srcset=\"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/rangeResolution2-180x300.png 180w, https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/rangeResolution2.png 480w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><\/a><\/p>\n<p>Consider the two accelerometers above. \u00a0The first sensor has a smaller resolution number. It is three times more precise than the accelerometer on the right. \u00a0The second accelerometer\u00a0has a larger range, it can measure plus or minus 4g while the accelerometer on the left can only measure plus or minus 2g.<br \/>\n<a name=\"typesSensors\"><\/a><\/p>\n<h1>Types of Android Sensors<\/h1>\n<p>The Isaac\u2019s Apple Android application can use any of the built in measurement sensors. \u00a0The main page of the Android application shows which sensors are built into your device.<\/p>\n<p>An Android device can have any of the following sensors.<\/p>\n<h2>Accelerometer<\/h2>\n<p>Measures the acceleration force applied to the device , in meters per second per second (m\/s2). \u00a0This measurement includes the force of gravity which is always acting on the device. \u00a0For example, when the device is resting on a table, the accelerometer will be measuring 9.81 m\/s2, which is the Earth\u2019s gravitational pull.<\/p>\n<h2>Gravity<\/h2>\n<p>Measures the force of gravity along the device axes in meters per second per second (m\/s2). \u00a0When the device is at rest, the gravity sensor will show the same measurement as the accelerometer.<\/p>\n<h2>Linear Acceleration<\/h2>\n<p>Measures the acceleration force applied to the device, minus the force of gravity, in meters per second per second (m\/s2). \u00a0The linear acceleration measurement should be equivalent to the accelerometer measurement minus the gravity measurement. \u00a0The linear acceleration measurement is usually calculated by the device software, although it can be a unique hardware sensor in some high end Android devices.<\/p>\n<h2>Gyroscope<\/h2>\n<p>Measures the rate of rotation around each of the axes in radians\/second (rad\/s). Rotation is positive in the counterclockwise direction.<\/p>\n<h2>Orientation Sensor<\/h2>\n<p>Measures the orientation of the device in a familiar reference frame. The orientation sensor measurements values are:<\/p>\n<ul>\n<li>X is Azimuth. This is the heading of the device relative to magnetic north. \u00a0This value is between 0 and 360, where 0 would be facing toward the magnetic north pole, and 180 would be facing south.<\/li>\n<li>Y is Pitch. \u00a0This is the rotation around the device X axis. \u00a0This value is between &#8211; 180 and 180, where 0 would be with the device screen pointing to the sky, and 180 would be with the device screen pointing to the ground.<\/li>\n<li>Z is Roll. \u00a0This is the rotation about the device Y axis. \u00a0This value is between -90 and 90, where 0 would be with the device screen pointing to the sky, and 90 would be with the device screen pointing to the left.<\/li>\n<\/ul>\n<h2>Rotation Vector<\/h2>\n<p>Similar to the orientation sensor, the rotation vector measures the orientation of the device relative to north, east, and up. \u00a0The rotation vector measurement provides orientation values in a format used by many graphics and navigation applications. The orientation of a device is measured as a combination of an angle and an axis, in which the device has rotated through an angle \u03b8 around an axis &lt;x, y, z&gt;. \u00a0The rotation vector measurements are:<\/p>\n<ul>\n<li>X value is: \u00a0x * sin(\u03b8\/2)<\/li>\n<li>Y value is: \u00a0y * sin(\u03b8\/2)<\/li>\n<li>Z value is: \u00a0z * sin(\u03b8\/2)<\/li>\n<li>A value is: cos (\u03b8\/2)<\/li>\n<\/ul>\n<p><i>Note: the A value is not plotted in the Sir Isaac\u2019s Apple graphs, you must convert the experiment file to .CSV if you wish to process rotation vector measurements<\/i><\/p>\n<p>Where the axes are defined as:<\/p>\n<ul>\n<li>Y axis points towards north<\/li>\n<li>X axis points east<\/li>\n<li>Z axis points to the sky (is perpendicular to the ground).<\/li>\n<\/ul>\n<p><a href=\"http:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/axis_globe.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-88\" src=\"http:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-content\/uploads\/2014\/08\/axis_globe.png\" alt=\"axis_globe\" width=\"246\" height=\"235\" \/><\/a><\/p>\n<h2>Magnetic Field<\/h2>\n<p>Measures the magnetic field around the device in micro-Tesla (uT). \u00a0This measurement will always include the effects of the Earth\u2019s magnetic field.<\/p>\n<h2>Light<\/h2>\n<p>Measures the ambient light level in lux (lx). \u00a0The Android device light sensor provides only a single value, therefore this sensor reports only an X value, and the Y and Z values are not used.<\/p>\n<h2>Proximity<\/h2>\n<p>This sensor is derived from the light sensor. It provides a value of 1 to 7 as an estimate of distance to a close by object. \u00a0This measurement is one dimensional, so there is only an X value.<\/p>\n<h2>Temperature<\/h2>\n<p>Measures the ambient room temperature in degrees Celsius (C). \u00a0This measurement is one dimensional, so there is only an X value.<\/p>\n<h2>Pressure<\/h2>\n<p>Measures the ambient air temperature in hectopascals (hPa). \u00a0This measurement is one dimensional, so there is only an X value.<\/p>\n<h2>Relative Humidity<\/h2>\n<p>Measures the ambient relative humidity in percent. \u00a0This measurement is one dimensional, so there is only an X value.<\/p>\n<h1>Types of iOS Sensors<\/h1>\n<h2>Accelerometer<\/h2>\n<p>Measures the acceleration force applied to the device , in units of standard gravity (g). \u00a0One g = 9.81 m\/s^2. \u00a0This measurement includes the force of gravity which is always acting on the device.<\/p>\n<h2>Gyroscope<\/h2>\n<p>Measures the rate of rotation around each of the axes in radians\/second (rad\/s). Rotation is positive in the counterclockwise direction.<\/p>\n<h2>Magnetic Field<\/h2>\n<p>Measures the magnetic field around the device in micro-Tesla (uT). \u00a0This measurement will always include the effects of the Earth\u2019s magnetic field.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Measurement Axes Many\u00a0devices, such as smart\u00a0phones and the Broadcom WICED Sense,\u00a0\u00a0have embedded\u00a0sensors that can measure acceleration, rotation, magnetic field, light, and other physical properties. Sensor measurements are given in a 3D coordinate system relative to the front, side, and top of the device. Both the iOS and the Android device use the same coordinate system: &hellip; <a href=\"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/understanding-sensor-measurements\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Understanding Sensor Measurements<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"nf_dc_page":"","footnotes":""},"class_list":["post-56","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-json\/wp\/v2\/pages\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-json\/wp\/v2\/comments?post=56"}],"version-history":[{"count":9,"href":"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-json\/wp\/v2\/pages\/56\/revisions"}],"predecessor-version":[{"id":135,"href":"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-json\/wp\/v2\/pages\/56\/revisions\/135"}],"wp:attachment":[{"href":"https:\/\/isaacsapple.littlebytesofpi.com\/Resources\/wp-json\/wp\/v2\/media?parent=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}