SlideShare una empresa de Scribd logo
1 de 14
ANDROID SENSOR SYSTEM
Outline
• Sensors in Android
• SW
• Android sensor framework and implementation

• HW
• 3-axis e-compass hardware introduction

2
Sensors in Android
• Example
• Hardware
• STMicro LSM303DLHC 3-axis e-compass module
• 3-axis G-sensor (m/s2) and 3-axis M-sensor (gauss)
• 3-axis e-compass
• Using G/M-sensor data to compute heading

• Software
• Android 4.0

3
Software Architecture
Java Program

Android Framework

Sensor Library

Linux Driver
4
Java App on Android
• Android support several sensor types and provide unified
interface to control them.
• In android 4.0, there are 13 data types.
• G-sensor, M-sensor, Gyro-sensor, Light sensor, …

• Android defines several rules for app programmer
• Data polling rate
• SENSOR_DELAY_FASTEST
• SENSOR_DELAY_GAME
• SENSOR_DELAY_UI
• SENSOR_DELAY_NORMAL
• 3-axis dimension
• etc.

( 0 ms)
( 20 ms)
( 60 ms)
( 200 ms)

5
Java Program
• Classes and interface of android sensor framework
• Sensor class
• Instance of a specific sensor
• Get sensor’s capabilities

• SensorEvent class
• Instance of sensor event
• Get raw data

• SensorManager class
• Instance of sensor service
• Register/unregister, access, acquire orientation, …

• SensorEventListener interface
• Monitor sensor value/accuracy changed event
6
Sensors in Android
Framework
• Sensors in android framework
• User registers/unregisters listener for accessing sensor service
• User proposes the need for data exporting
• which sensor and data rate

• User could only get
• Static
•

Features of sensors

• Dynamic
•
•

raw data
processed information by android (eg. orientation, …)

7
Sensor Library in Android
• Sensor library provides necessary callback functions for
android to control sensors.
• Sensor manager in android framework
• Manages sensor resource for java apps
• Passes control commands and dispatches data

• In sensor library, we could implement extra features in Linux
user-space.
• Eg 1. orientation fixing
• Eg 2. For cost-down, we may use cheap sensor module. However, we
could develop some algorithm to improve its performance.

8
Callback Functions in Sensor
Library
• Callback functions should be implemented
• Open data source
• Initial the sensor library

• Close data source

Enter/Exit Sensor Library

• Exit the sensor library

• Activate
• Start/Stop sensor

• Set delay

Sensor State Setting

• Set the time interval of sensing

• Poll
• Poll all the sensors to get data

• Wake
• Stop sensor polling compulsively

Run-time Data Retrieving

9
Sensor Data Packet
• sensors_event_t structure
•
•
•
•

sensor type
timestamp
reserved
union {

}

float data[16];
sensors_vec_t acceleration; /* (m/s^2) */
sensors_vec_t magnetic; /* micro-Tesla (uT) */
sensors_vec_t orientation; /* degrees */
sensors_vec_t gyro; /* rad/s */
float temperature; /* Celsius */
float distance; /* centimeters */
float light; /* lux */
float pressure; /* hPa */
float relative_humidity; /* percent */
sensors_vec_t : union of (x,y,z), (azimuth, roll, pitch)

10
LSM303DLHC 3-axis ECompass
• Control hardware module and get data with I2C bus.
• G-sensor
• Two interrupt line for special situation
• Output data rate
• Output data range

• M-sensor
• Output data rate
• Output data range
• Enable/disable temperature exporting

11
Heading Computation

Xb

Yb
Zb

G-sensor

M-sensor

12
3-axis E-Compass Calibration
3-axis e-compass may not get right azimuth data
◦ Misalignment
◦ Magnetometer
 Hard-iron distortion
 It is a constant additive value to the output of each of the
magnetometer axes.
 Soft-iron distortion
 Soft-iron distortion cannot be compensated with a simple constant;
instead, a more complicated procedure is required.

Calibration sequence is related to hardware
13
Calibration for LSM303DLHC
• Accelerometer
• All ST MEMS accelerometers are factory calibrated, allowing the
user to avoid any further calibration for most of the applications
now present in the market.
• Calibration Matrix :

cal data

raw data

14

Más contenido relacionado

La actualidad más candente

Android sensors
Android sensorsAndroid sensors
Android sensorsdatta_jini
 
Smartphone sensor and gesture
Smartphone sensor and gestureSmartphone sensor and gesture
Smartphone sensor and gestureBhavya5800
 
Fire fighting robot using 8051 microcontroller
Fire fighting robot using 8051 microcontrollerFire fighting robot using 8051 microcontroller
Fire fighting robot using 8051 microcontrollervibs1893
 
Motion sensing and detection
Motion sensing and detectionMotion sensing and detection
Motion sensing and detectionNirav Soni
 
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
 
Missile detection and automatic destroy system
Missile detection and automatic destroy system Missile detection and automatic destroy system
Missile detection and automatic destroy system LokeshLavakusha
 
Plant Conditioner - Humidity, Light intensity,& Temperature measurement tools
Plant Conditioner - Humidity, Light intensity,& Temperature measurement toolsPlant Conditioner - Humidity, Light intensity,& Temperature measurement tools
Plant Conditioner - Humidity, Light intensity,& Temperature measurement toolsYasmine N. Afifah
 
Phys204 class project_final_b_cooper
Phys204 class project_final_b_cooperPhys204 class project_final_b_cooper
Phys204 class project_final_b_cooperBrianCooper76
 

La actualidad más candente (10)

Android sensors
Android sensorsAndroid sensors
Android sensors
 
Smartphone sensor and gesture
Smartphone sensor and gestureSmartphone sensor and gesture
Smartphone sensor and gesture
 
Mebin progress
Mebin progressMebin progress
Mebin progress
 
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
 
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
 
Syn ankit
Syn ankitSyn ankit
Syn ankit
 
Missile detection and automatic destroy system
Missile detection and automatic destroy system Missile detection and automatic destroy system
Missile detection and automatic destroy system
 
Plant Conditioner - Humidity, Light intensity,& Temperature measurement tools
Plant Conditioner - Humidity, Light intensity,& Temperature measurement toolsPlant Conditioner - Humidity, Light intensity,& Temperature measurement tools
Plant Conditioner - Humidity, Light intensity,& Temperature measurement tools
 
Phys204 class project_final_b_cooper
Phys204 class project_final_b_cooperPhys204 class project_final_b_cooper
Phys204 class project_final_b_cooper
 

Destacado

Android - Sensor Manager
Android - Sensor ManagerAndroid - Sensor Manager
Android - Sensor ManagerYong Heui Cho
 
Environmental Sensor Network Paper
Environmental Sensor Network PaperEnvironmental Sensor Network Paper
Environmental Sensor Network PaperZoey Y. Kang
 
Review Paper on Smart Sensor Network for Air Quality Monitoring
Review Paper on Smart Sensor Network for Air Quality MonitoringReview Paper on Smart Sensor Network for Air Quality Monitoring
Review Paper on Smart Sensor Network for Air Quality MonitoringAM Publications
 
湘南ミーティングChallenges for Real-time Activity Recognition報告
湘南ミーティングChallenges for Real-time Activity Recognition報告湘南ミーティングChallenges for Real-time Activity Recognition報告
湘南ミーティングChallenges for Real-time Activity Recognition報告Sozo Inoue
 
Sensor Cloud Infrastructure - Small Survey Report
Sensor Cloud Infrastructure - Small Survey ReportSensor Cloud Infrastructure - Small Survey Report
Sensor Cloud Infrastructure - Small Survey ReportVintesh Patel
 
Kernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source dronesKernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source dronesAnne Nicolas
 
Android training (android style)
Android training (android style)Android training (android style)
Android training (android style)Khaled Anaqwa
 
Android Training (Broadcast Receiver)
Android Training (Broadcast Receiver)Android Training (Broadcast Receiver)
Android Training (Broadcast Receiver)Khaled Anaqwa
 
Android Training (android fundamental)
Android Training (android fundamental)Android Training (android fundamental)
Android Training (android fundamental)Khaled Anaqwa
 
Android Training (Touch)
Android Training (Touch)Android Training (Touch)
Android Training (Touch)Khaled Anaqwa
 
Android Training (Services)
Android Training (Services)Android Training (Services)
Android Training (Services)Khaled Anaqwa
 
Android Training (ScrollView , Horizontal ScrollView WebView)
Android Training (ScrollView , Horizontal ScrollView  WebView)Android Training (ScrollView , Horizontal ScrollView  WebView)
Android Training (ScrollView , Horizontal ScrollView WebView)Khaled Anaqwa
 
Android Training (Notifications)
Android Training (Notifications)Android Training (Notifications)
Android Training (Notifications)Khaled Anaqwa
 
Chapter 5 ms access-1
Chapter 5   ms access-1Chapter 5   ms access-1
Chapter 5 ms access-1Pratik Gupta
 
Android internals 09 - Sensors, Power Management, Input subsystem, Data stora...
Android internals 09 - Sensors, Power Management, Input subsystem, Data stora...Android internals 09 - Sensors, Power Management, Input subsystem, Data stora...
Android internals 09 - Sensors, Power Management, Input subsystem, Data stora...Egor Elizarov
 
Seminar Report on RFID Based Trackin System
Seminar Report on RFID Based Trackin SystemSeminar Report on RFID Based Trackin System
Seminar Report on RFID Based Trackin SystemShahrikh Khan
 
Android HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyAndroid HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyJollen Chen
 

Destacado (20)

Android - Sensor Manager
Android - Sensor ManagerAndroid - Sensor Manager
Android - Sensor Manager
 
Environmental Sensor Network Paper
Environmental Sensor Network PaperEnvironmental Sensor Network Paper
Environmental Sensor Network Paper
 
Review Paper on Smart Sensor Network for Air Quality Monitoring
Review Paper on Smart Sensor Network for Air Quality MonitoringReview Paper on Smart Sensor Network for Air Quality Monitoring
Review Paper on Smart Sensor Network for Air Quality Monitoring
 
GPS
GPSGPS
GPS
 
湘南ミーティングChallenges for Real-time Activity Recognition報告
湘南ミーティングChallenges for Real-time Activity Recognition報告湘南ミーティングChallenges for Real-time Activity Recognition報告
湘南ミーティングChallenges for Real-time Activity Recognition報告
 
Sensors 9
Sensors   9Sensors   9
Sensors 9
 
Sensor Cloud Infrastructure - Small Survey Report
Sensor Cloud Infrastructure - Small Survey ReportSensor Cloud Infrastructure - Small Survey Report
Sensor Cloud Infrastructure - Small Survey Report
 
Kernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source dronesKernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source drones
 
Android training (android style)
Android training (android style)Android training (android style)
Android training (android style)
 
Android Training (Broadcast Receiver)
Android Training (Broadcast Receiver)Android Training (Broadcast Receiver)
Android Training (Broadcast Receiver)
 
Android Training (android fundamental)
Android Training (android fundamental)Android Training (android fundamental)
Android Training (android fundamental)
 
Android Training (Touch)
Android Training (Touch)Android Training (Touch)
Android Training (Touch)
 
Android Training (Services)
Android Training (Services)Android Training (Services)
Android Training (Services)
 
Android Training (ScrollView , Horizontal ScrollView WebView)
Android Training (ScrollView , Horizontal ScrollView  WebView)Android Training (ScrollView , Horizontal ScrollView  WebView)
Android Training (ScrollView , Horizontal ScrollView WebView)
 
Android Training (Notifications)
Android Training (Notifications)Android Training (Notifications)
Android Training (Notifications)
 
Spattern matching using biometric techniques
Spattern matching using biometric techniquesSpattern matching using biometric techniques
Spattern matching using biometric techniques
 
Chapter 5 ms access-1
Chapter 5   ms access-1Chapter 5   ms access-1
Chapter 5 ms access-1
 
Android internals 09 - Sensors, Power Management, Input subsystem, Data stora...
Android internals 09 - Sensors, Power Management, Input subsystem, Data stora...Android internals 09 - Sensors, Power Management, Input subsystem, Data stora...
Android internals 09 - Sensors, Power Management, Input subsystem, Data stora...
 
Seminar Report on RFID Based Trackin System
Seminar Report on RFID Based Trackin SystemSeminar Report on RFID Based Trackin System
Seminar Report on RFID Based Trackin System
 
Android HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyAndroid HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacy
 

Similar a Android Sensor System

Primary mirror edge sensor project for the Southern African Large Telescope
Primary mirror edge sensor project for the Southern African Large TelescopePrimary mirror edge sensor project for the Southern African Large Telescope
Primary mirror edge sensor project for the Southern African Large TelescopeDeonBester4
 
International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)irjes
 
Hello I hope you are doing well Would you be able to combi.pdf
Hello I hope you are doing well Would you be able to combi.pdfHello I hope you are doing well Would you be able to combi.pdf
Hello I hope you are doing well Would you be able to combi.pdfabeerafashion
 
Open Source Smartphone Libraries for Computational Social Science
Open Source Smartphone Libraries for Computational Social Science Open Source Smartphone Libraries for Computational Social Science
Open Source Smartphone Libraries for Computational Social Science Neal Lathia
 
Track 4 session 3 - st dev con 2016 - pedestrian dead reckoning
Track 4   session 3 - st dev con 2016 - pedestrian dead reckoningTrack 4   session 3 - st dev con 2016 - pedestrian dead reckoning
Track 4 session 3 - st dev con 2016 - pedestrian dead reckoningST_World
 
Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...
Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...
Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...InfluxData
 
Class5_DataloggerProgrammingArduino.pptx
Class5_DataloggerProgrammingArduino.pptxClass5_DataloggerProgrammingArduino.pptx
Class5_DataloggerProgrammingArduino.pptxHebaEng
 
Virtual Twins: Modeling Trends and Challenges Ahead
Virtual Twins: Modeling Trends and Challenges AheadVirtual Twins: Modeling Trends and Challenges Ahead
Virtual Twins: Modeling Trends and Challenges AheadBrain IoT Project
 
An Open And Reconfigurable Wireless Sensor Network For Pervasive Health Monit...
An Open And Reconfigurable Wireless Sensor Network For Pervasive Health Monit...An Open And Reconfigurable Wireless Sensor Network For Pervasive Health Monit...
An Open And Reconfigurable Wireless Sensor Network For Pervasive Health Monit...Andreas Triantafyllidis
 
LWM2M Introduction - Edinburgh 2016 Workshop with ARM
LWM2M Introduction - Edinburgh 2016 Workshop with ARMLWM2M Introduction - Edinburgh 2016 Workshop with ARM
LWM2M Introduction - Edinburgh 2016 Workshop with ARMOpen Mobile Alliance
 
The Design of Multi-Platforms Rail Intelligence Flatness Detection System
The Design of Multi-Platforms Rail Intelligence Flatness Detection SystemThe Design of Multi-Platforms Rail Intelligence Flatness Detection System
The Design of Multi-Platforms Rail Intelligence Flatness Detection SystemIJRESJOURNAL
 
Android location and sensors API
Android location and sensors APIAndroid location and sensors API
Android location and sensors APIeleksdev
 
Native container monitoring
Native container monitoringNative container monitoring
Native container monitoringRohit Jnagal
 
Education set for collecting and visualizing data using sensor system based o...
Education set for collecting and visualizing data using sensor system based o...Education set for collecting and visualizing data using sensor system based o...
Education set for collecting and visualizing data using sensor system based o...IJMER
 

Similar a Android Sensor System (20)

Primary mirror edge sensor project for the Southern African Large Telescope
Primary mirror edge sensor project for the Southern African Large TelescopePrimary mirror edge sensor project for the Southern African Large Telescope
Primary mirror edge sensor project for the Southern African Large Telescope
 
International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)
 
Week12.pdf
Week12.pdfWeek12.pdf
Week12.pdf
 
Hello I hope you are doing well Would you be able to combi.pdf
Hello I hope you are doing well Would you be able to combi.pdfHello I hope you are doing well Would you be able to combi.pdf
Hello I hope you are doing well Would you be able to combi.pdf
 
Open Source Smartphone Libraries for Computational Social Science
Open Source Smartphone Libraries for Computational Social Science Open Source Smartphone Libraries for Computational Social Science
Open Source Smartphone Libraries for Computational Social Science
 
Track 4 session 3 - st dev con 2016 - pedestrian dead reckoning
Track 4   session 3 - st dev con 2016 - pedestrian dead reckoningTrack 4   session 3 - st dev con 2016 - pedestrian dead reckoning
Track 4 session 3 - st dev con 2016 - pedestrian dead reckoning
 
Project_Objectives
Project_ObjectivesProject_Objectives
Project_Objectives
 
Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...
Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...
Phil Day [Configured Things] | Policy-Driven Real-Time Data Filtering from Io...
 
Class5_DataloggerProgrammingArduino.pptx
Class5_DataloggerProgrammingArduino.pptxClass5_DataloggerProgrammingArduino.pptx
Class5_DataloggerProgrammingArduino.pptx
 
Virtual Twins: Modeling Trends and Challenges Ahead
Virtual Twins: Modeling Trends and Challenges AheadVirtual Twins: Modeling Trends and Challenges Ahead
Virtual Twins: Modeling Trends and Challenges Ahead
 
An Open And Reconfigurable Wireless Sensor Network For Pervasive Health Monit...
An Open And Reconfigurable Wireless Sensor Network For Pervasive Health Monit...An Open And Reconfigurable Wireless Sensor Network For Pervasive Health Monit...
An Open And Reconfigurable Wireless Sensor Network For Pervasive Health Monit...
 
LWM2M Introduction - Edinburgh 2016 Workshop with ARM
LWM2M Introduction - Edinburgh 2016 Workshop with ARMLWM2M Introduction - Edinburgh 2016 Workshop with ARM
LWM2M Introduction - Edinburgh 2016 Workshop with ARM
 
The Design of Multi-Platforms Rail Intelligence Flatness Detection System
The Design of Multi-Platforms Rail Intelligence Flatness Detection SystemThe Design of Multi-Platforms Rail Intelligence Flatness Detection System
The Design of Multi-Platforms Rail Intelligence Flatness Detection System
 
MPU-6050_RF24L01
MPU-6050_RF24L01MPU-6050_RF24L01
MPU-6050_RF24L01
 
Portfolio
PortfolioPortfolio
Portfolio
 
Android location and sensors API
Android location and sensors APIAndroid location and sensors API
Android location and sensors API
 
Unit i
Unit iUnit i
Unit i
 
Native container monitoring
Native container monitoringNative container monitoring
Native container monitoring
 
Native Container Monitoring
Native Container MonitoringNative Container Monitoring
Native Container Monitoring
 
Education set for collecting and visualizing data using sensor system based o...
Education set for collecting and visualizing data using sensor system based o...Education set for collecting and visualizing data using sensor system based o...
Education set for collecting and visualizing data using sensor system based o...
 

Último

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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 AutomationSafe Software
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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.pptxKatpro Technologies
 
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 DevelopmentsTrustArc
 
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 RobisonAnna Loughnan Colquhoun
 
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 MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
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
 
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
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

Android Sensor System

  • 2. Outline • Sensors in Android • SW • Android sensor framework and implementation • HW • 3-axis e-compass hardware introduction 2
  • 3. Sensors in Android • Example • Hardware • STMicro LSM303DLHC 3-axis e-compass module • 3-axis G-sensor (m/s2) and 3-axis M-sensor (gauss) • 3-axis e-compass • Using G/M-sensor data to compute heading • Software • Android 4.0 3
  • 4. Software Architecture Java Program Android Framework Sensor Library Linux Driver 4
  • 5. Java App on Android • Android support several sensor types and provide unified interface to control them. • In android 4.0, there are 13 data types. • G-sensor, M-sensor, Gyro-sensor, Light sensor, … • Android defines several rules for app programmer • Data polling rate • SENSOR_DELAY_FASTEST • SENSOR_DELAY_GAME • SENSOR_DELAY_UI • SENSOR_DELAY_NORMAL • 3-axis dimension • etc. ( 0 ms) ( 20 ms) ( 60 ms) ( 200 ms) 5
  • 6. Java Program • Classes and interface of android sensor framework • Sensor class • Instance of a specific sensor • Get sensor’s capabilities • SensorEvent class • Instance of sensor event • Get raw data • SensorManager class • Instance of sensor service • Register/unregister, access, acquire orientation, … • SensorEventListener interface • Monitor sensor value/accuracy changed event 6
  • 7. Sensors in Android Framework • Sensors in android framework • User registers/unregisters listener for accessing sensor service • User proposes the need for data exporting • which sensor and data rate • User could only get • Static • Features of sensors • Dynamic • • raw data processed information by android (eg. orientation, …) 7
  • 8. Sensor Library in Android • Sensor library provides necessary callback functions for android to control sensors. • Sensor manager in android framework • Manages sensor resource for java apps • Passes control commands and dispatches data • In sensor library, we could implement extra features in Linux user-space. • Eg 1. orientation fixing • Eg 2. For cost-down, we may use cheap sensor module. However, we could develop some algorithm to improve its performance. 8
  • 9. Callback Functions in Sensor Library • Callback functions should be implemented • Open data source • Initial the sensor library • Close data source Enter/Exit Sensor Library • Exit the sensor library • Activate • Start/Stop sensor • Set delay Sensor State Setting • Set the time interval of sensing • Poll • Poll all the sensors to get data • Wake • Stop sensor polling compulsively Run-time Data Retrieving 9
  • 10. Sensor Data Packet • sensors_event_t structure • • • • sensor type timestamp reserved union { } float data[16]; sensors_vec_t acceleration; /* (m/s^2) */ sensors_vec_t magnetic; /* micro-Tesla (uT) */ sensors_vec_t orientation; /* degrees */ sensors_vec_t gyro; /* rad/s */ float temperature; /* Celsius */ float distance; /* centimeters */ float light; /* lux */ float pressure; /* hPa */ float relative_humidity; /* percent */ sensors_vec_t : union of (x,y,z), (azimuth, roll, pitch) 10
  • 11. LSM303DLHC 3-axis ECompass • Control hardware module and get data with I2C bus. • G-sensor • Two interrupt line for special situation • Output data rate • Output data range • M-sensor • Output data rate • Output data range • Enable/disable temperature exporting 11
  • 13. 3-axis E-Compass Calibration 3-axis e-compass may not get right azimuth data ◦ Misalignment ◦ Magnetometer  Hard-iron distortion  It is a constant additive value to the output of each of the magnetometer axes.  Soft-iron distortion  Soft-iron distortion cannot be compensated with a simple constant; instead, a more complicated procedure is required. Calibration sequence is related to hardware 13
  • 14. Calibration for LSM303DLHC • Accelerometer • All ST MEMS accelerometers are factory calibrated, allowing the user to avoid any further calibration for most of the applications now present in the market. • Calibration Matrix : cal data raw data 14