Sensors , Units and formulas

Light sensor

  • Sensor.TYPE_LIGHT
  • values[0] = ambient light level in SI lux units
  • SensorManager’s constants
    • LIGHT_CLOUDY: 100
    • LIGHT_FULLMOON: 0.25
    • LIGHT_NO_MOON: 0.001
    • LIGHT_OVERCAST: 10000.0 (cloudy)
    • LIGHT_SHADE: 20000.0
    • LIGHT_SUNLIGHT: 110000.0
    • LIGHT_SUNLIGHT_MAX: 120000.0
    • LIGHT_SUNRISE: 400.0

Proximity sensor

  • Sensor.TYPE_PROXIMITY
  • values[0]: Proximity sensor distance measured in centimeters (sometimes binary near-far)

Temperature sensor

  • Sensor.TYPE_TEMPERATURE
  • values[0] = temperature

Pressure sensor

  • Sensor.TYPE_PRESSURE
  • values[0] = pressure
  • no constants

Position sensors

Magnetic sensor

  • Sensor.TYPE_MAGNETIC_FIELD
  • values[3] = in micro-Tesla (uT), magnetic fieldin the X, Y and Z axis
  • SensorManager’s constants
    • MAGNETIC_FIELD_EARTH_MAX: 60.0
    • MAGNETIC_FIELD_EARTH_MIN: 30.0

Accelerometer sensor

  • TYPE_ACCELEROMETER
  • Values[3] = m/s^2, measure the accelerationapplied to the phone minus the force ofgravity (x, y, z)
    • GRAVITY_EARTH, GRAVITY_JUPITER,
    • GRAVITY_MARS, GRAVITY_MERCURY,
    • GRAVITY_MOON, GRAVITY_NEPTUNE

Orientation sensor

  • TYPE_ORIENTATION
  • Deprecated
    • (use getOrientation (float[] R, float[] result))
  • Values[3] – (Azimuth, Pitch, Roll) – angles 0-360
    • azimuth, rotation around the Z axis
    • pitch, rotation around the X axis
    • roll, rotation around the Y axis
  • Different from plane yaw, pitch, roll
  • (different axes and clockwise-ness)

Gyroscope sensor

  • TYPE_GYROSCOPE
  • Measure the orientation of a device
  • Detect all rotations, but only few phones have it
  • Values[] – iPhone gives radians/sec., and makes it possible to get the rotation matrix
It's only fair to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInEmail this to someoneBuffer this pageDigg thisFlattr the authorShare on StumbleUponPin on PinterestShare on YummlyShare on VKShare on RedditPrint this pageShare on Tumblr
Related Posts

7 Comments

  1. more info here May 24, 2015 Reply

Add a Comment

Your email address will not be published. Required fields are marked *