SlideShare a Scribd company logo
1 of 24
Android Meetup
      @
Android Sensors
Android Sensors Overview

      
          Android Sensors:
–   Accelerometer
–   Gravity sensor
–   Linear Acceleration sensor
–   Magnetic Field sensor
–   Orientation sensor
–   Gyroscope
–   Light sensor
–   Proximity sensor
–   Temprature sensor
–   Pressure sensor
–   Other sensor
Accelerometer

    Provides the total force applied on the device.

  When device is stationary, this gives +1g (gravitational force) reading
in one axis and its components on other axes.

 Accelerometer values minus the gravity factor gives the induced
acceleration.

 Generally it is used to determine device orientation.


    The measurment unit is SI m/s2.
Accelerometer Coordinate System
Accelerometer and Gravity

 All forces acting on the device will be detected by the
accelerometers.

 F= ma

 If device is stationary we get the gravity value with zero
acceleration, which can be saperated by low pass filter.

 Can We calculate distance/speed ?
       –   D= ut + 1/2 at2

 How to seperate Gravity and linear accelereation ?

 Used in gaming to make it interactive.

 Pattern recognition. pedometer
Gravity Sensor and Linear Acceleration

    Gravity sensor is not a saparate hardware but t’s a virtual sensor
    based on the accelerometers, acceleration is removed from
    accelerometer data.

    Similarly Linear acceleration is not a saparate hardware but it is
    based on the accelerometer, gravity is removed from
    accelerometer data.
Magnetic field Sensor

    The magnetic field sensor measures the ambient magnetic field in
    the x, y, and z axes.

    The units of the magnetic field sensor are microteslas (uT). This

    sensor can detect the Earth’s magnetic field and therefore tell us
    where north is. This sensor is also referred to as the compass

    Magnetic field sensor is used in combination with accelerometer.

    The coordinate system
Orientation sensor

    Measures degrees of rotation that a device makes around all
    three physical axes (x, y, z). As of API level 3 you can obtain
    the inclination matrix and rotation matrix for a device by using
    the gravity sensor and the geomagnetic field sensor in
    conjunction with the getRotationMatrix() method.

    There is no hardware for orientation sensor but combination of
    two sensor detrmine the orientation of device.

    Form API level 8 is is been deprecated.
Gyroscope sensor

    Gyroscopes measure the rate of rotation around an axis. When the
    device is not rotating, the sensor values will be zeroes.

    It gives us 3 value.
        –    Pitch (around X
        –    Roll (around y)
        –    Azimuth (around z)
Gyroscope Continue...

    Unfortunately gyroscope is error prone over time. As time
    goes gyroscope introduce drift in result, but by sensor
    fusion(combine accelerometer and gyroscope) results can be
    corrected and path of movment of device can be obtain
    correctly.

    The measurment unit is SI m/s2.
"Angel of rotation using
        Gyroscope(GyroRaw.java)”


   Call backs PerSecond

   Observe the readings
  
     Highly Accurate initially

   Gyro drift

    Used to build responsive games.
Light Sensor

    Located at front of mobile near to front facing camera.

    gives a reading of the light level detected by the light sensor of the
    device. As the light level changes, the sensor readings change.

    The units of the data are in SI lux units

    Range is from 0 to maximum value for sensor.
Proximity Sensor

    The proximity sensor either measures the distance that some object
    is from the device (in centimeters) or represents a flag to say
    whether an object is close or far.

    Some proximity sensors will give a value ranging from 0.0 to the
    maximum in increments, while others return either 0.0 or he
    maximum value only.

    Interesting fact about proximity sensors : the proximity sensor is
    sometimes the same hardware as the light sensor. Android still
    treats them as logically separate sensors.
Temprature Sensor

    The old temperature sensor provided a temperature reading and
    also returned just a single value in values[0]. This sensor usually
    read an internal temperature, such as at the battery. Till API level 13

    From API level 14 it is replaced by
    TYPE_AMBIENT_TEMPERATURE.

    The new sensor tell us about the room temprature in degree
    Celsius.
Pressure sensor

    This sensor measures barometric pressure, which could
    detect altitude can be used for weather predictions.

    The unit of measurement for a pressure sensor is atmospheric
    pressure in hPa (millibar).
Other Sensor

    Rotation Vector
    
        The rotation vector represents the orientation of the device
        as a combination of an angle and an axis, in which the
        device has rotated through an angle θ around an axis (x, y,
        or z).

    Humidity sensor
    
        Measures the relative ambient humidity in percent (%).
Sensor fusion

    Sensor fusion is a technique to filter the data and obtain the result
    by combining two or more sensor's data.



    Well known algorithem for sensor fusion
    −   Kalman filter alogrithem
    −   Complimentary filter algorithem
Measures Device's Angle by Accelerometer

    Generally Accelerometer use for measure device rotation around
    axis(x, y, or z).

    By Combining of Accelerometer orientation sensor and magnetic
    field sensor correct device orientation can be obtain.

    Android sensor framwork provide methods like getRotationMatrix()
    and getOrientationMatrix() which tell us the device rotation reltive to
    ground on all axis.

    Earth Coordinate System
Sensor Framework

    Android has provided sensor Framework
    managed by following classes
    −   Sensor
    −   SensorManager
    −   SensorEvent
    −   SensorEventListener

    Framework has provided call back to obtain
    sensor data.
SensorFramework continue...

    SensorEventListener async       Your App               SensorManager

    call back                                  Register Callback


    Call back retrive data at
    different duration                          Sensor Event

                                                 Sensor Event
    −   Normal 20mS
    −   Game 20mS                                Sensor Event

    −   Fast 0mS

    Accuracy of rerieved data can
    be Low,Medium or High
Sensor example
public class SensorActivity extends Activity implements
                 SensorEventListener {

          private SensorManager mSensorManager;
                 private Sensor mLight;

                        @Override
 public final void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
              setContentView(R.layout.main);

              MSensorManager =(SensorManager)
       getSystemService(Context.SENSOR_SERVICE);

mLight = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT);
                            }
SensorEventListener call back
                           @Override
public final void onAccuracyChanged(Sensor sensor, int accuracy) {
          // Do something here if sensor accuracy changes.
                                }

                            @Override
      public final void onSensorChanged(SensorEvent event) {
            // The light sensor returns a single value.
        // Many sensors return 3 values, one for each axis.
                    float lux = event.values[0];
                                }
Good Habits for sensors
                @Override
        protected void onResume() {
              super.onResume();
mSensorManager.registerListener(this, mLight,
   SensorManager.SENSOR_DELAY_NORMAL);
                     }

                 @Override
        protected void onPause() {
              super.onPause();
  mSensorManager.unregisterListener(this);
                      }
                    }

More Related Content

What's hot

Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Ahsanul Karim
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-pptSrijib Roy
 
Android animation
Android animationAndroid animation
Android animationKrazy Koder
 
Android Programming Seminar
Android Programming SeminarAndroid Programming Seminar
Android Programming SeminarNhat Nguyen
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentAly Abdelkareem
 
Android terminologies
Android terminologiesAndroid terminologies
Android terminologiesjerry vasoya
 
OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]Daffodil International University
 
Android studio installation
Android studio installationAndroid studio installation
Android studio installationPoojaBele1
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android StudioSuyash Srijan
 
Android application-component
Android application-componentAndroid application-component
Android application-componentLy Haza
 
[Android] Widget Event Handling
[Android] Widget Event Handling[Android] Widget Event Handling
[Android] Widget Event HandlingNikmesoft Ltd
 

What's hot (20)

Android intents
Android intentsAndroid intents
Android intents
 
Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)
 
Mini Project PPT
Mini Project PPTMini Project PPT
Mini Project PPT
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-ppt
 
Android animation
Android animationAndroid animation
Android animation
 
Android Programming Seminar
Android Programming SeminarAndroid Programming Seminar
Android Programming Seminar
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Notification android
Notification androidNotification android
Notification android
 
Android terminologies
Android terminologiesAndroid terminologies
Android terminologies
 
Android - Android Intent Types
Android - Android Intent TypesAndroid - Android Intent Types
Android - Android Intent Types
 
android menus
android menusandroid menus
android menus
 
Android ppt
Android ppt Android ppt
Android ppt
 
Android - Graphics Animation in Android
Android - Graphics Animation in AndroidAndroid - Graphics Animation in Android
Android - Graphics Animation in Android
 
OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]
 
Android studio installation
Android studio installationAndroid studio installation
Android studio installation
 
Android Components
Android ComponentsAndroid Components
Android Components
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
Javascript
JavascriptJavascript
Javascript
 
Android application-component
Android application-componentAndroid application-component
Android application-component
 
[Android] Widget Event Handling
[Android] Widget Event Handling[Android] Widget Event Handling
[Android] Widget Event Handling
 

Viewers also liked

Smartphone sensor and gesture
Smartphone sensor and gestureSmartphone sensor and gesture
Smartphone sensor and gestureBhavya5800
 
Sensors on android
Sensors on androidSensors on android
Sensors on androidChinmay V S
 
Android - Sensor Manager
Android - Sensor ManagerAndroid - Sensor Manager
Android - Sensor ManagerYong Heui Cho
 
Sensors and their applications
Sensors and their applicationsSensors and their applications
Sensors and their applicationsnitigga92
 
Android Sensor and Framework - AWARE
Android Sensor and  Framework - AWAREAndroid Sensor and  Framework - AWARE
Android Sensor and Framework - AWAREDarrenJin
 
Sensors and location based services
Sensors and location based servicesSensors and location based services
Sensors and location based servicesChinmay V S
 
Magnetic field sensing
Magnetic field sensingMagnetic field sensing
Magnetic field sensingZaahir Salam
 
Top sensors inside the smartphone you want to know
Top sensors inside the smartphone you want to knowTop sensors inside the smartphone you want to know
Top sensors inside the smartphone you want to knowsoniyasag
 
Collaborative Sensor Rotation Programme Jacqueline Barr (IBI Group)
Collaborative Sensor Rotation Programme Jacqueline Barr (IBI Group)Collaborative Sensor Rotation Programme Jacqueline Barr (IBI Group)
Collaborative Sensor Rotation Programme Jacqueline Barr (IBI Group)STEP_scotland
 
Bridging the Competency Gap with eLearning
Bridging the Competency Gap with eLearningBridging the Competency Gap with eLearning
Bridging the Competency Gap with eLearningedgedigitalgroup
 
Smart Systems and The Future of Smart Products_ Group 4_FinalPaper (1)
Smart Systems and The Future of Smart Products_ Group 4_FinalPaper (1)Smart Systems and The Future of Smart Products_ Group 4_FinalPaper (1)
Smart Systems and The Future of Smart Products_ Group 4_FinalPaper (1)Michael Hanacek
 

Viewers also liked (20)

Android Sensor
Android SensorAndroid Sensor
Android Sensor
 
Smartphone sensor and gesture
Smartphone sensor and gestureSmartphone sensor and gesture
Smartphone sensor and gesture
 
Sensors on android
Sensors on androidSensors on android
Sensors on android
 
Sensor's inside
Sensor's insideSensor's inside
Sensor's inside
 
Android Sensor System
Android Sensor SystemAndroid Sensor System
Android Sensor System
 
Android - Sensor Manager
Android - Sensor ManagerAndroid - Sensor Manager
Android - Sensor Manager
 
Sensors and their applications
Sensors and their applicationsSensors and their applications
Sensors and their applications
 
Sensors
SensorsSensors
Sensors
 
Android Sensor and Framework - AWARE
Android Sensor and  Framework - AWAREAndroid Sensor and  Framework - AWARE
Android Sensor and Framework - AWARE
 
Sensors and location based services
Sensors and location based servicesSensors and location based services
Sensors and location based services
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
Proximity Sensors
Proximity SensorsProximity Sensors
Proximity Sensors
 
Magnetic field sensing
Magnetic field sensingMagnetic field sensing
Magnetic field sensing
 
Proximity sensors
Proximity sensorsProximity sensors
Proximity sensors
 
Top sensors inside the smartphone you want to know
Top sensors inside the smartphone you want to knowTop sensors inside the smartphone you want to know
Top sensors inside the smartphone you want to know
 
Factual writing
Factual writingFactual writing
Factual writing
 
Collaborative Sensor Rotation Programme Jacqueline Barr (IBI Group)
Collaborative Sensor Rotation Programme Jacqueline Barr (IBI Group)Collaborative Sensor Rotation Programme Jacqueline Barr (IBI Group)
Collaborative Sensor Rotation Programme Jacqueline Barr (IBI Group)
 
Peno sensor
Peno sensorPeno sensor
Peno sensor
 
Bridging the Competency Gap with eLearning
Bridging the Competency Gap with eLearningBridging the Competency Gap with eLearning
Bridging the Competency Gap with eLearning
 
Smart Systems and The Future of Smart Products_ Group 4_FinalPaper (1)
Smart Systems and The Future of Smart Products_ Group 4_FinalPaper (1)Smart Systems and The Future of Smart Products_ Group 4_FinalPaper (1)
Smart Systems and The Future of Smart Products_ Group 4_FinalPaper (1)
 

Similar to Android sensors

Sensing Mobile Devices talk from QCon London 2013
Sensing Mobile Devices talk from QCon London 2013Sensing Mobile Devices talk from QCon London 2013
Sensing Mobile Devices talk from QCon London 2013Adam Blum
 
Android Training (Sensors)
Android Training (Sensors)Android Training (Sensors)
Android Training (Sensors)Khaled Anaqwa
 
Tk2323 lecture 10 sensor
Tk2323 lecture 10   sensorTk2323 lecture 10   sensor
Tk2323 lecture 10 sensorMengChun Lam
 
iwatchjr | Mobile Handset Sensors Coordinate System
iwatchjr | Mobile Handset Sensors Coordinate Systemiwatchjr | Mobile Handset Sensors Coordinate System
iwatchjr | Mobile Handset Sensors Coordinate Systemiwatchjr
 
Sensors Unit IV.pptx
Sensors Unit IV.pptxSensors Unit IV.pptx
Sensors Unit IV.pptxrahul177578
 
Robotics unit3 sensors
Robotics unit3 sensorsRobotics unit3 sensors
Robotics unit3 sensorsJanarthanan B
 
roboticsunit3sensors and -201013084413.pptx
roboticsunit3sensors and -201013084413.pptxroboticsunit3sensors and -201013084413.pptx
roboticsunit3sensors and -201013084413.pptxDrPArivalaganASSTPRO
 
Sensors-and-Actuators-working principle and types of sensors
Sensors-and-Actuators-working principle and types of sensorsSensors-and-Actuators-working principle and types of sensors
Sensors-and-Actuators-working principle and types of sensorsRameshBabu920476
 
RMV sensors
RMV sensorsRMV sensors
RMV sensorsanand hd
 
Automatic Altitude Control of Quadroto3
Automatic Altitude Control of Quadroto3Automatic Altitude Control of Quadroto3
Automatic Altitude Control of Quadroto3isaac chang
 
S2 7 edm & total stations
S2 7 edm & total stationsS2 7 edm & total stations
S2 7 edm & total stationsEst
 

Similar to Android sensors (20)

Week12.pdf
Week12.pdfWeek12.pdf
Week12.pdf
 
Sensing Mobile Devices talk from QCon London 2013
Sensing Mobile Devices talk from QCon London 2013Sensing Mobile Devices talk from QCon London 2013
Sensing Mobile Devices talk from QCon London 2013
 
Android Training (Sensors)
Android Training (Sensors)Android Training (Sensors)
Android Training (Sensors)
 
Tk2323 lecture 10 sensor
Tk2323 lecture 10   sensorTk2323 lecture 10   sensor
Tk2323 lecture 10 sensor
 
Generic sensors for the Web
Generic sensors for the WebGeneric sensors for the Web
Generic sensors for the Web
 
iwatchjr | Mobile Handset Sensors Coordinate System
iwatchjr | Mobile Handset Sensors Coordinate Systemiwatchjr | Mobile Handset Sensors Coordinate System
iwatchjr | Mobile Handset Sensors Coordinate System
 
Smart Phone Sensor
Smart Phone SensorSmart Phone Sensor
Smart Phone Sensor
 
Sensor android
Sensor androidSensor android
Sensor android
 
Sensors Unit IV.pptx
Sensors Unit IV.pptxSensors Unit IV.pptx
Sensors Unit IV.pptx
 
Sensors 9
Sensors   9Sensors   9
Sensors 9
 
Sensors
SensorsSensors
Sensors
 
Robotics unit3 sensors
Robotics unit3 sensorsRobotics unit3 sensors
Robotics unit3 sensors
 
roboticsunit3sensors and -201013084413.pptx
roboticsunit3sensors and -201013084413.pptxroboticsunit3sensors and -201013084413.pptx
roboticsunit3sensors and -201013084413.pptx
 
Android sensor
Android sensorAndroid sensor
Android sensor
 
Smart sensors
Smart sensorsSmart sensors
Smart sensors
 
Sensors-and-Actuators-working principle and types of sensors
Sensors-and-Actuators-working principle and types of sensorsSensors-and-Actuators-working principle and types of sensors
Sensors-and-Actuators-working principle and types of sensors
 
RMV sensors
RMV sensorsRMV sensors
RMV sensors
 
Automatic Altitude Control of Quadroto3
Automatic Altitude Control of Quadroto3Automatic Altitude Control of Quadroto3
Automatic Altitude Control of Quadroto3
 
Base sensor
Base sensorBase sensor
Base sensor
 
S2 7 edm & total stations
S2 7 edm & total stationsS2 7 edm & total stations
S2 7 edm & total stations
 

Recently uploaded

Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 

Recently uploaded (20)

Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 

Android sensors

  • 3. Android Sensors Overview  Android Sensors: – Accelerometer – Gravity sensor – Linear Acceleration sensor – Magnetic Field sensor – Orientation sensor – Gyroscope – Light sensor – Proximity sensor – Temprature sensor – Pressure sensor – Other sensor
  • 4. Accelerometer  Provides the total force applied on the device.  When device is stationary, this gives +1g (gravitational force) reading in one axis and its components on other axes.  Accelerometer values minus the gravity factor gives the induced acceleration.  Generally it is used to determine device orientation.  The measurment unit is SI m/s2.
  • 6. Accelerometer and Gravity  All forces acting on the device will be detected by the accelerometers.  F= ma  If device is stationary we get the gravity value with zero acceleration, which can be saperated by low pass filter.  Can We calculate distance/speed ? – D= ut + 1/2 at2  How to seperate Gravity and linear accelereation ?  Used in gaming to make it interactive.  Pattern recognition. pedometer
  • 7. Gravity Sensor and Linear Acceleration  Gravity sensor is not a saparate hardware but t’s a virtual sensor based on the accelerometers, acceleration is removed from accelerometer data.  Similarly Linear acceleration is not a saparate hardware but it is based on the accelerometer, gravity is removed from accelerometer data.
  • 8. Magnetic field Sensor  The magnetic field sensor measures the ambient magnetic field in the x, y, and z axes.  The units of the magnetic field sensor are microteslas (uT). This  sensor can detect the Earth’s magnetic field and therefore tell us where north is. This sensor is also referred to as the compass  Magnetic field sensor is used in combination with accelerometer.  The coordinate system
  • 9. Orientation sensor  Measures degrees of rotation that a device makes around all three physical axes (x, y, z). As of API level 3 you can obtain the inclination matrix and rotation matrix for a device by using the gravity sensor and the geomagnetic field sensor in conjunction with the getRotationMatrix() method.  There is no hardware for orientation sensor but combination of two sensor detrmine the orientation of device.  Form API level 8 is is been deprecated.
  • 10. Gyroscope sensor  Gyroscopes measure the rate of rotation around an axis. When the device is not rotating, the sensor values will be zeroes.  It gives us 3 value. – Pitch (around X – Roll (around y) – Azimuth (around z)
  • 11. Gyroscope Continue...  Unfortunately gyroscope is error prone over time. As time goes gyroscope introduce drift in result, but by sensor fusion(combine accelerometer and gyroscope) results can be corrected and path of movment of device can be obtain correctly.  The measurment unit is SI m/s2.
  • 12. "Angel of rotation using Gyroscope(GyroRaw.java)”  Call backs PerSecond  Observe the readings  Highly Accurate initially  Gyro drift  Used to build responsive games.
  • 13. Light Sensor  Located at front of mobile near to front facing camera.  gives a reading of the light level detected by the light sensor of the device. As the light level changes, the sensor readings change.  The units of the data are in SI lux units  Range is from 0 to maximum value for sensor.
  • 14. Proximity Sensor  The proximity sensor either measures the distance that some object is from the device (in centimeters) or represents a flag to say whether an object is close or far.  Some proximity sensors will give a value ranging from 0.0 to the maximum in increments, while others return either 0.0 or he maximum value only.  Interesting fact about proximity sensors : the proximity sensor is sometimes the same hardware as the light sensor. Android still treats them as logically separate sensors.
  • 15. Temprature Sensor  The old temperature sensor provided a temperature reading and also returned just a single value in values[0]. This sensor usually read an internal temperature, such as at the battery. Till API level 13  From API level 14 it is replaced by TYPE_AMBIENT_TEMPERATURE.  The new sensor tell us about the room temprature in degree Celsius.
  • 16. Pressure sensor  This sensor measures barometric pressure, which could detect altitude can be used for weather predictions.  The unit of measurement for a pressure sensor is atmospheric pressure in hPa (millibar).
  • 17. Other Sensor  Rotation Vector  The rotation vector represents the orientation of the device as a combination of an angle and an axis, in which the device has rotated through an angle θ around an axis (x, y, or z).  Humidity sensor  Measures the relative ambient humidity in percent (%).
  • 18. Sensor fusion  Sensor fusion is a technique to filter the data and obtain the result by combining two or more sensor's data.  Well known algorithem for sensor fusion − Kalman filter alogrithem − Complimentary filter algorithem
  • 19. Measures Device's Angle by Accelerometer  Generally Accelerometer use for measure device rotation around axis(x, y, or z).  By Combining of Accelerometer orientation sensor and magnetic field sensor correct device orientation can be obtain.  Android sensor framwork provide methods like getRotationMatrix() and getOrientationMatrix() which tell us the device rotation reltive to ground on all axis.  Earth Coordinate System
  • 20. Sensor Framework  Android has provided sensor Framework managed by following classes − Sensor − SensorManager − SensorEvent − SensorEventListener  Framework has provided call back to obtain sensor data.
  • 21. SensorFramework continue...  SensorEventListener async Your App SensorManager call back Register Callback  Call back retrive data at different duration Sensor Event Sensor Event − Normal 20mS − Game 20mS Sensor Event − Fast 0mS  Accuracy of rerieved data can be Low,Medium or High
  • 22. Sensor example public class SensorActivity extends Activity implements SensorEventListener { private SensorManager mSensorManager; private Sensor mLight; @Override public final void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); MSensorManager =(SensorManager) getSystemService(Context.SENSOR_SERVICE); mLight = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); }
  • 23. SensorEventListener call back @Override public final void onAccuracyChanged(Sensor sensor, int accuracy) { // Do something here if sensor accuracy changes. } @Override public final void onSensorChanged(SensorEvent event) { // The light sensor returns a single value. // Many sensors return 3 values, one for each axis. float lux = event.values[0]; }
  • 24. Good Habits for sensors @Override protected void onResume() { super.onResume(); mSensorManager.registerListener(this, mLight, SensorManager.SENSOR_DELAY_NORMAL); } @Override protected void onPause() { super.onPause(); mSensorManager.unregisterListener(this); } }