Top Banner
SENSORS AND LOCATION BASED SERVICES ChinmayVS @ B.A.(U).G 14 JAN 2012
21

Sensors and location based services

May 19, 2015

Download

Technology

Chinmay V S

nGPS (NO GPS) is a way of obtaining a location fix without using any GPS, AGPS, Wi-Fi Positioning and cell-site triangulation technologies.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Sensors and location based services

SENSORS AND

LOCATION BASED SERVICES

ChinmayVS @ B.A.(U).G

14 JAN 2012

Page 2: Sensors and location based services

Sensors & location based services

• Compass- Bearing

• Gyroscope, Accelerometer- Detect motion.

• Barometer- Calculate Altitude.

• nGPShttp://goo.gl/RWEKL (Experimental.)

2SENSORS AND LOCATION BASED SERVICES

Page 3: Sensors and location based services

3SENSORS AND LOCATION BASED SERVICES

cvs@BA(U)G$ who am i

• Android >2yrs. Remember anyone?

• - sensors development. 10million+ units sold.

• Presently working @

PathPartnerTech.com

Page 4: Sensors and location based services

“Sense-ors” on Android

1. ACCELEROMETER

2. GYROSCOPE

3. MAGNETIC_FIELD

4. LIGHT

5. PRESSURE

6. AMBIENT_TEMP

7. RELATIVE_HUMIDITY

8. PROXIMITY

9. LINEAR_ACCELERATION

10. GRAVITY

11. ROTATION_VECTOR

12. TEMPERATURE

13. ORIENTATION

Sensors and location based services 4

REAL

DEPRECEATED

A sensor (also called detector) is a device that measuresa physical quantity and converts it into a signal which can be read by

an observer or by an instrument.

VIRTUAL

Page 5: Sensors and location based services

“Sense-ors” on Android

1. ACCELEROMETER

2. GRAVITY

3. LINEAR_ACCELERATION

4. GYROSCOPE

5. MAGNETIC FIELD

6. ORIENTATION

7. PROXIMITY

8. ROTATION VECTOR

9. LIGHT

10. BAROMETER

11. AMBIENT TEMPERATURE

12. RELATIVE HUMIDITY

13. TEMPERATURE

Sensors and location based services 5

MOTION

A sensor (also called detector) is a device that measuresa physical quantity and converts it into a signal which can be read by

an observer or by an instrument.

POSITION

ENVIRONMENT

Page 6: Sensors and location based services

Sensors in Android applications

• Use-cases of sensors in apps:1. Active-Input

2. Passive-Input

3. Active-Passive

4. Auto-Rotate

Sensors and location based services 6

Application developer

Android window manager

Page 7: Sensors and location based services

Sensors in Android applications (1/4)

Sensors and location based services 7

• Active input

Page 8: Sensors and location based services

Sensors in Android applications (2/4)

• Passive input

Sensors and location based services 8

Page 9: Sensors and location based services

Sensors in Android applications (3/4)

• Active-passive

Sensors and location based services 9

Page 10: Sensors and location based services

Sensors in Android applications (4/4)

• Auto-rotate

Sensors and location based services 10

Page 11: Sensors and location based services

Compass : Bearing (Azimuth)

Sensors and location based services 11

90o

180o

Page 12: Sensors and location based services

Compass : Bearing

Sensors and location based services 12

• iPad as in-flight navigator. Android?

• Magnetic north != Geographic North

• WiFi / Network provider + Compass = GPS?

POSITION (LAT, LONG) + BEARING

Page 13: Sensors and location based services

Compass : Magnetic Declination

Sensors and location based services 13

Page 14: Sensors and location based services

Accelerometer, Gyroscope : Motion

• |Accelerometer| != 9.8 Motion

• Initial bearing + rotation of device,

POSITION (LAT, LONG) + BEARING + SPEED

Sensors and location based services 14

Page 15: Sensors and location based services

• Remember this ?“ WiFi / Network provider + Compass = GPS”

now how about,

“ WiFi / Network provider + Compass + Barometer ”

POSITION (LAT, LONG) + BEARING + SPEED + ALTITUDE > GPS

Sensors and location based services 15

Barometer : Altitude

Page 16: Sensors and location based services

nGPS : World Geomagnetic model

Sensors and location based services 16

Page 17: Sensors and location based services

Using Sensors in your app

Sensors and location based services 17

http://goo.gl/hWOQuSensorEvent

http://goo.gl/1DRUvSensorManager

http://goo.gl/AVBDV

http://goo.gl/eKq6a

Examples :

Page 18: Sensors and location based services

Sensor app-dev Tips and tricks

Sensor calibration. 1. one-turn deserves another (axes-calib) 2. zero-calib

Polling rate fastest/game/ui/normal?

Sensor fusion Hard-way

Easy-way (Invensense ) http://goo.gl/bHmDe

Lessons from WindowOrientationListener.javaAndroid/frameworks/base/core/java/android/view/WindowOrientationListener.java

When to register/unregister SensorEventListener

When to acquire/release Wakelocks

Sensors and location based services 18

Page 19: Sensors and location based services

WindowOrientationListener.java

Low-pass filter the tilt and orientation angles to avoid "twitchy" behaviour.

When the orientation angle reaches a certain threshold, transition

These thresholds have some hysteresis built-in to avoid oscillation.

Use the magnitude to judge the accuracy of the data. Under ideal conditions, the magnitude should equal to that of gravity.

When it differs significantly, we know the device is under external acceleration

Use the tilt angle to judge the accuracy of orientation data. When the tilt angle is high in magnitude, we distrust the orientation data.

When the device is flat, small physical motion = large changes in orientation angle.

Sensors and location based services 19

Page 20: Sensors and location based services

App-dev Tips and tricks

Sensors and location based services 20

register sensorEventListener

unregister sensorEventListener

acquire wakelock

release wakelock

Page 21: Sensors and location based services

Thank You!!

Questions?

Sensors and location based services 21

CONTACT ME

android-porting android-developers

android-kernel android-platform