SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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...
 

Kürzlich hochgeladen

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Kürzlich hochgeladen (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

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