SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
SENSORS AND
LOCATION BASED SERVICES
  ChinmayVS @ B.A.(U).G

       14 JAN 2012
Sensors & location based services
• Compass
  - Bearing

• Gyroscope, Accelerometer
  - Detect motion.

• Barometer
  - Calculate Altitude.

• nGPS
  http://goo.gl/RWEKL (Experimental.)

                          SENSORS AND LOCATION BASED SERVICES   2
cvs@BA(U)G$ who am i

• Android >2yrs. Remember                   anyone?


•            - sensors development. 10million+ units sold.



• Presently working @

                                 PathPartnerTech.com




                        SENSORS AND LOCATION BASED SERVICES   3
“Sense-ors” on Android
     A sensor (also called detector) is a device that measures
a physical quantity and converts it into a signal which can be read by
                  an observer or by an instrument.

                                    1.    ACCELEROMETER
                                    2.    GYROSCOPE
                                    3.    MAGNETIC_FIELD
               REAL
                                    4.    LIGHT
                                    5.    PRESSURE
                                    6.    AMBIENT_TEMP
                                    7.    RELATIVE_HUMIDITY

                                    8.    PROXIMITY
             VIRTUAL                9.    LINEAR_ACCELERATION
                                    10.   GRAVITY
                                    11.   ROTATION_VECTOR


            DEPRECEATED
                                    12. TEMPERATURE
                                    13. ORIENTATION


                      Sensors and location based services                4
“Sense-ors” on Android
     A sensor (also called detector) is a device that measures
a physical quantity and converts it into a signal which can be read by
                  an observer or by an instrument.

                                   1.    ACCELEROMETER
                                   2.    GRAVITY
            MOTION
                                   3.    LINEAR_ACCELERATION
                                   4.    GYROSCOPE

                                   5.    MAGNETIC FIELD
           POSITION                6.    ORIENTATION
                                   7.    PROXIMITY
                                   8.    ROTATION VECTOR

                                   9.    LIGHT
                                   10.   BAROMETER
        ENVIRONMENT                11.   AMBIENT TEMPERATURE
                                   12.   RELATIVE HUMIDITY
                                   13.   TEMPERATURE


                     Sensors and location based services                 5
Sensors in Android applications


  • Use-cases of sensors in apps:
  1.   Active-Input
  2.   Passive-Input           Application developer
  3.   Active-Passive
  4.   Auto-Rotate             Android window manager




               Sensors and location based services      6
Sensors in Android applications (1/4)

• Active input




                  Sensors and location based services   7
Sensors in Android applications (2/4)

• Passive input




                  Sensors and location based services   8
Sensors in Android applications (3/4)

• Active-passive




                   Sensors and location based services   9
Sensors in Android applications (4/4)

• Auto-rotate




                 Sensors and location based services   10
Compass : Bearing (Azimuth)




                                                90o
                                         180o




       Sensors and location based services            11
Compass : Bearing

• iPad as in-flight navigator. Android?

• Magnetic north != Geographic North

• WiFi / Network provider + Compass = GPS?

      POSITION (LAT, LONG) + BEARING




                     Sensors and location based services   12
Compass : Magnetic Declination




        Sensors and location based services   13
Accelerometer, Gyroscope : Motion

• |Accelerometer| != 9.8  Motion

• Initial bearing + rotation of device,

     POSITION (LAT, LONG) + BEARING + SPEED




                  Sensors and location based services   14
Barometer : Altitude
• 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
nGPS : World Geomagnetic model




         Sensors and location based services   16
Using Sensors in your app




SensorEvent           http://goo.gl/hWOQu

SensorManager         http://goo.gl/1DRUv


Examples :
http://goo.gl/AVBDV
http://goo.gl/eKq6a



                              Sensors and location based services   17
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.java
   Android/frameworks/base/core/java/android/view/WindowOrientationListener.java

 When to register/unregister SensorEventListener
 When to acquire/release Wakelocks


                               Sensors and location based services                 18
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
App-dev Tips and tricks



                                      register
                                sensorEventListener
                                  acquire wakelock


                                  release wakelock

                                    unregister
                                sensorEventListener




     Sensors and location based services              20
Thank You!!

         Questions?

android-porting             android-developers

android-kernel              android-platform




             CONTACT ME




      Sensors and location based services        21

Mais conteúdo relacionado

Mais procurados

Automatic Altitude Control of Quadroto3
Automatic Altitude Control of Quadroto3Automatic Altitude Control of Quadroto3
Automatic Altitude Control of Quadroto3
isaac chang
 
motion sensing technology
motion sensing technologymotion sensing technology
motion sensing technology
Santosh Kumar
 

Mais procurados (20)

Android Sensor and Framework - AWARE
Android Sensor and  Framework - AWAREAndroid Sensor and  Framework - AWARE
Android Sensor and Framework - AWARE
 
Generic sensors for the Web
Generic sensors for the WebGeneric sensors for the Web
Generic sensors for the Web
 
Design of Arduino based fire fighting Robot
Design of Arduino based fire fighting RobotDesign of Arduino based fire fighting Robot
Design of Arduino based fire fighting Robot
 
Fire fighting robot using 8051 microcontroller
Fire fighting robot using 8051 microcontrollerFire fighting robot using 8051 microcontroller
Fire fighting robot using 8051 microcontroller
 
Motion sensing and detection
Motion sensing and detectionMotion sensing and detection
Motion sensing and detection
 
Human presence detection based room light controller using pir2.pptx [repaired]
Human presence detection based room light controller using pir2.pptx [repaired]Human presence detection based room light controller using pir2.pptx [repaired]
Human presence detection based room light controller using pir2.pptx [repaired]
 
Automatic Altitude Control of Quadroto3
Automatic Altitude Control of Quadroto3Automatic Altitude Control of Quadroto3
Automatic Altitude Control of Quadroto3
 
motion sensing technology
motion sensing technologymotion sensing technology
motion sensing technology
 
fire fighting robot
fire fighting robotfire fighting robot
fire fighting robot
 
Fire Fighting Robot
Fire Fighting RobotFire Fighting Robot
Fire Fighting Robot
 
Automatic fire fighting robot
Automatic fire fighting robotAutomatic fire fighting robot
Automatic fire fighting robot
 
Mebin progress
Mebin progressMebin progress
Mebin progress
 
IRJET- Fire Fighting Robot using Arduino
IRJET- Fire Fighting Robot using ArduinoIRJET- Fire Fighting Robot using Arduino
IRJET- Fire Fighting Robot using Arduino
 
IRJET-Android Controlled Firefighting Robot using Arduino
IRJET-Android Controlled Firefighting Robot using ArduinoIRJET-Android Controlled Firefighting Robot using Arduino
IRJET-Android Controlled Firefighting Robot using Arduino
 
Fire Fighting Robot by saurabh
Fire Fighting Robot by saurabhFire Fighting Robot by saurabh
Fire Fighting Robot by saurabh
 
Human Detection Robot
Human Detection RobotHuman Detection Robot
Human Detection Robot
 
Sensors by khaleel
Sensors by khaleelSensors by khaleel
Sensors by khaleel
 
Fire fighting robot ppt
Fire fighting robot pptFire fighting robot ppt
Fire fighting robot ppt
 
Sensors and its type by ss
Sensors and its type by ssSensors and its type by ss
Sensors and its type by ss
 
Fire fighting robot
Fire fighting robot Fire fighting robot
Fire fighting robot
 

Semelhante a Sensors and location based services

First fare 2011 sensors for frc robots
First fare 2011 sensors for frc robotsFirst fare 2011 sensors for frc robots
First fare 2011 sensors for frc robots
Oregon FIRST Robotics
 
Personal radar ppt 1
Personal radar ppt 1Personal radar ppt 1
Personal radar ppt 1
Ronak Vyas
 
Android location and sensors API
Android location and sensors APIAndroid location and sensors API
Android location and sensors API
eleksdev
 
MBCPS 425_163_2122_22_26062022_679.pdf
MBCPS 425_163_2122_22_26062022_679.pdfMBCPS 425_163_2122_22_26062022_679.pdf
MBCPS 425_163_2122_22_26062022_679.pdf
JosephDanquah6
 

Semelhante a Sensors and location based services (20)

Semantics and Sensors
Semantics and SensorsSemantics and Sensors
Semantics and Sensors
 
Track o-shoes
Track o-shoes Track o-shoes
Track o-shoes
 
Mobile sensing kolkata lab tac_tics2014
Mobile sensing  kolkata lab tac_tics2014Mobile sensing  kolkata lab tac_tics2014
Mobile sensing kolkata lab tac_tics2014
 
Lidar and sensing
Lidar and sensingLidar and sensing
Lidar and sensing
 
Android gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir SinghAndroid gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir Singh
 
Sensor and different types of sensor .pdf
Sensor and different types of sensor  .pdfSensor and different types of sensor  .pdf
Sensor and different types of sensor .pdf
 
First fare 2011 sensors for frc robots
First fare 2011 sensors for frc robotsFirst fare 2011 sensors for frc robots
First fare 2011 sensors for frc robots
 
Making sense
Making senseMaking sense
Making sense
 
Motion recognition with Android devices
Motion recognition with Android devicesMotion recognition with Android devices
Motion recognition with Android devices
 
Personal radar ppt 1
Personal radar ppt 1Personal radar ppt 1
Personal radar ppt 1
 
Surveying Innovations in Quarrying
Surveying Innovations in QuarryingSurveying Innovations in Quarrying
Surveying Innovations in Quarrying
 
Sensor Observation Service Client for Android Mobile Phones
Sensor Observation Service Client for Android Mobile PhonesSensor Observation Service Client for Android Mobile Phones
Sensor Observation Service Client for Android Mobile Phones
 
Unit III - Solved Question Bank- Robotics Engineering -
Unit III - Solved Question Bank-  Robotics Engineering -Unit III - Solved Question Bank-  Robotics Engineering -
Unit III - Solved Question Bank- Robotics Engineering -
 
LIDAR
LIDARLIDAR
LIDAR
 
Android location and sensors API
Android location and sensors APIAndroid location and sensors API
Android location and sensors API
 
MBCPS 425_163_2122_22_26062022_679.pdf
MBCPS 425_163_2122_22_26062022_679.pdfMBCPS 425_163_2122_22_26062022_679.pdf
MBCPS 425_163_2122_22_26062022_679.pdf
 
3 Sensing and Sensors.ppt
3 Sensing and Sensors.ppt3 Sensing and Sensors.ppt
3 Sensing and Sensors.ppt
 
Smart Phone Sensor
Smart Phone SensorSmart Phone Sensor
Smart Phone Sensor
 
Final presentation today
Final presentation todayFinal presentation today
Final presentation today
 
Week12.pdf
Week12.pdfWeek12.pdf
Week12.pdf
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Sensors and location based services

  • 1. SENSORS AND LOCATION BASED SERVICES ChinmayVS @ B.A.(U).G 14 JAN 2012
  • 2. Sensors & location based services • Compass - Bearing • Gyroscope, Accelerometer - Detect motion. • Barometer - Calculate Altitude. • nGPS http://goo.gl/RWEKL (Experimental.) SENSORS AND LOCATION BASED SERVICES 2
  • 3. cvs@BA(U)G$ who am i • Android >2yrs. Remember anyone? • - sensors development. 10million+ units sold. • Presently working @ PathPartnerTech.com SENSORS AND LOCATION BASED SERVICES 3
  • 4. “Sense-ors” on Android A sensor (also called detector) is a device that measures a physical quantity and converts it into a signal which can be read by an observer or by an instrument. 1. ACCELEROMETER 2. GYROSCOPE 3. MAGNETIC_FIELD REAL 4. LIGHT 5. PRESSURE 6. AMBIENT_TEMP 7. RELATIVE_HUMIDITY 8. PROXIMITY VIRTUAL 9. LINEAR_ACCELERATION 10. GRAVITY 11. ROTATION_VECTOR DEPRECEATED 12. TEMPERATURE 13. ORIENTATION Sensors and location based services 4
  • 5. “Sense-ors” on Android A sensor (also called detector) is a device that measures a physical quantity and converts it into a signal which can be read by an observer or by an instrument. 1. ACCELEROMETER 2. GRAVITY MOTION 3. LINEAR_ACCELERATION 4. GYROSCOPE 5. MAGNETIC FIELD POSITION 6. ORIENTATION 7. PROXIMITY 8. ROTATION VECTOR 9. LIGHT 10. BAROMETER ENVIRONMENT 11. AMBIENT TEMPERATURE 12. RELATIVE HUMIDITY 13. TEMPERATURE Sensors and location based services 5
  • 6. Sensors in Android applications • Use-cases of sensors in apps: 1. Active-Input 2. Passive-Input Application developer 3. Active-Passive 4. Auto-Rotate Android window manager Sensors and location based services 6
  • 7. Sensors in Android applications (1/4) • Active input Sensors and location based services 7
  • 8. Sensors in Android applications (2/4) • Passive input Sensors and location based services 8
  • 9. Sensors in Android applications (3/4) • Active-passive Sensors and location based services 9
  • 10. Sensors in Android applications (4/4) • Auto-rotate Sensors and location based services 10
  • 11. Compass : Bearing (Azimuth) 90o 180o Sensors and location based services 11
  • 12. Compass : Bearing • iPad as in-flight navigator. Android? • Magnetic north != Geographic North • WiFi / Network provider + Compass = GPS? POSITION (LAT, LONG) + BEARING Sensors and location based services 12
  • 13. Compass : Magnetic Declination Sensors and location based services 13
  • 14. Accelerometer, Gyroscope : Motion • |Accelerometer| != 9.8  Motion • Initial bearing + rotation of device, POSITION (LAT, LONG) + BEARING + SPEED Sensors and location based services 14
  • 15. Barometer : Altitude • 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
  • 16. nGPS : World Geomagnetic model Sensors and location based services 16
  • 17. Using Sensors in your app SensorEvent http://goo.gl/hWOQu SensorManager http://goo.gl/1DRUv Examples : http://goo.gl/AVBDV http://goo.gl/eKq6a Sensors and location based services 17
  • 18. 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.java Android/frameworks/base/core/java/android/view/WindowOrientationListener.java  When to register/unregister SensorEventListener  When to acquire/release Wakelocks Sensors and location based services 18
  • 19. 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
  • 20. App-dev Tips and tricks register sensorEventListener acquire wakelock release wakelock unregister sensorEventListener Sensors and location based services 20
  • 21. Thank You!! Questions? android-porting android-developers android-kernel android-platform CONTACT ME Sensors and location based services 21