SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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...
 

Dernier

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
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
 
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...Drew Madelung
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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 SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Dernier (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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...
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

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