ANDROID APPS DEVELOPMENT FOR MOBILE GAME

Similar documents
CS371m - Mobile Computing. Sensing and Sensors

Sisoft Technologies Pvt Ltd SRC E7, Shipra Riviera Bazar, Gyan Khand-3, Indirapuram, Ghaziabad Website:

Master Thesis Presentation Future Electric Vehicle on Lego By Karan Savant. Guide: Dr. Kai Huang

Onboard Android Sensor Access

Working with Sensors & Internet of Things

Introduction to Mobile Sensing Technology

Location Based Services

Internet of Things Sensors - Part 2

Location Location support classes Maps Map support classes

MOBILE COMPUTING. Transducer: a device which converts one form of energy to another

CENG 5931 HW 5 Mobile Robotics Due March 5. Sensors for Mobile Robots

Generating Schematic Indoor Representation based on Context Monitoring Analysis of Mobile Users

Sponsored by. Nisarg Kothari Carnegie Mellon University April 26, 2011

A 3D Ubiquitous Multi-Platform Localization and Tracking System for Smartphones. Seyyed Mahmood Jafari Sadeghi

Hardware-free Indoor Navigation for Smartphones

MEMS Solutions For VR & AR

TEST YOUR SATELLITE NAVIGATION PERFORMANCE ON YOUR ANDROID DEVICE GLOSSARY

GPS-Aided INS Datasheet Rev. 2.3

GPS Waypoint Application

Utility of Sensor Fusion of GPS and Motion Sensor in Android Devices In GPS- Deprived Environment

GPS-Aided INS Datasheet Rev. 2.6

Aerospace Sensor Suite

ExpoM - ELF User Manual

idocent: Indoor Digital Orientation Communication and Enabling Navigational Technology

Accident Sensor with Google Map Locator

INDOOR LOCATION SENSING AMBIENT MAGNETIC FIELD. Jaewoo Chung

Unobtrusive Tracking and Context Awareness: Challenges and Trade-offs

Design and Implementation of an Intuitive Gesture Recognition System Using a Hand-held Device

Indoor Positioning 101 TECHNICAL)WHITEPAPER) SenionLab)AB) Teknikringen)7) 583)30)Linköping)Sweden)

FLCS V2.1. AHRS, Autopilot, Gyro Stabilized Gimbals Control, Ground Control Station

Senion IPS 101. An introduction to Indoor Positioning Systems

Module 2: Lecture 4 Flight Control System

HMD based VR Service Framework. July Web3D Consortium Kwan-Hee Yoo Chungbuk National University

Mobile Sensing: Opportunities, Challenges, and Applications

Inertial Sensors. Ellipse 2 Series MINIATURE HIGH PERFORMANCE. Navigation, Motion & Heave Sensing IMU AHRS MRU INS VG

Inertial Sensors. Ellipse 2 Series MINIATURE HIGH PERFORMANCE. Navigation, Motion & Heave Sensing IMU AHRS MRU INS VG

Mobile Sensor Data Measurements and Analysis for Fall Detection in Elderly Health Care

MINIMUS MINIMUS+ SMART SEISMIC DIGITISER WITH ADVANCED DATA-PROCESSING CAPABILITY AND SOFTWARE COMMUNICATIONS

Gesture Identification Using Sensors Future of Interaction with Smart Phones Mr. Pratik Parmar 1 1 Department of Computer engineering, CTIDS

The Jigsaw Continuous Sensing Engine for Mobile Phone Applications!

Inertial Sensors. Ellipse Series MINIATURE HIGH PERFORMANCE. Navigation, Motion & Heave Sensing IMU AHRS MRU INS VG

INDOOR LOCATION SENSING USING GEO-MAGNETISM

Hack Your Ride With Beacon Technology!

On Attitude Estimation with Smartphones

Sensor & motion algorithm software pack for STM32Cube

Upgrading Common Workflows from 10.2.x to 100.x with ArcGIS Runtime SDK for.net. Melanie Whalen & Lauren Boyd

SST Expert Testimony Common Questions and Answers

ECE 174 Computer Assignment #2 Due Thursday 12/6/2012 GLOBAL POSITIONING SYSTEM (GPS) ALGORITHM

Big Data What it Means For Business. Dr. Bob Porter Executive Director UCF Executive Development Center

TEST DATA, DEMONSTRATION VIDEOS, AND TRANSCEIVERS

Department of Computer Science and Engineering The Chinese University of Hong Kong. Year Final Year Project

Nebraska 4-H Robotics and GPS/GIS and SPIRIT Robotics Projects

Pervasive Systems SD & Infrastructure.unit=3 WS2008

Easy Input Helper Documentation

Location Based Technologies

MTi 100-series The most accurate and complete MEMS AHRS and GPS/INS

Inertial Sensors. Ellipse Series MINIATURE HIGH PERFORMANCE. Navigation, Motion & Heave Sensing IMU AHRS MRU INS VG

UNIVERSITY OF NORTH CAROLINA AT CHARLOTTE

Welcome to Lego Rovers

Sensing self motion. Key points: Why robots need self-sensing Sensors for proprioception in biological systems in robot systems

Determination of Nearest Emergency Service Office using Haversine Formula Based on Android Platform

Application Note. Communication between arduino and IMU Software capturing the data

Indoor Location System with Wi-Fi and Alternative Cellular Network Signal

BeFitter Apps Manual

NPTEL Online Course: Control Engineering

3DM-GX4-45 LORD DATASHEET. GPS-Aided Inertial Navigation System (GPS/INS) Product Highlights. Features and Benefits. Applications

GPS-Aided INS Datasheet Rev. 2.7

How to Test A-GPS Capable Cellular Devices and Why Testing is Required

Intelligent Robotics Sensors and Actuators

Platform Independent Launch Vehicle Avionics

APPLICATIONS OF GPS. The Global Positioning System, while originally a military project, is considered a

OughtToPilot. Project Report of Submission PC128 to 2008 Propeller Design Contest. Jason Edelberg

Available online at ScienceDirect. Ahmed Al-Haiqi*, Mahamod Ismail, Rosdiadee Nordin

Indoor localization using NFC and mobile sensor data corrected using neural net

Ubiquitous Positioning: A Pipe Dream or Reality?

Omni-Directional Catadioptric Acquisition System

GPS-Aided INS Datasheet Rev. 3.0

E 322 DESIGN 6 SMART PARKING SYSTEM. Section 1

A sneak peek into the JauntBee s next generation of GPS technology. Authored by Karamvir Singh Rajpal and Sayan Basak

Cooperative localization (part I) Jouni Rantakokko

I.1 Smart Machines. Unit Overview:

3DM -CV5-10 LORD DATASHEET. Inertial Measurement Unit (IMU) Product Highlights. Features and Benefits. Applications. Best in Class Performance

The widespread dissemination of

USER MANUAL FIELDBEE AND RTK BEE STATION FULL VERSION. WE PROVIDE ONLINE SUPPORT: VERSION 1.0.

GPS Position Sensor PS-2175

How to do Geo-fencing with the FM200

SELECTING THE OPTIMAL MOTION TRACKER FOR MEDICAL TRAINING SIMULATORS

Motion Reference Units

IOT104 2-Day Programming Internet of Things (IoT) using Arduino

Introduction to Geographic Information Science. Last Lecture. Today s Outline. Geography 4103 / GNSS/GPS Technology

Roadblocks for building mobile AR apps

Lesson Plan 1 Introduction to Google Earth for Middle and High School. A Google Earth Introduction to Remote Sensing

Multi-sensory Tracking of Elders in Outdoor Environments on Ambient Assisted Living

GLOBAL POSITIONING SYSTEMS

Kinect Interface for UC-win/Road: Application to Tele-operation of Small Robots

GPS Technical Overview N5TWP NOV08. How Can GPS Mislead

Methodology for Software-in-the-Loop Testing of Low-Cost Attitude Determination Systems

Attitude and Heading Reference Systems

Building Java Apps with ArcGIS Runtime SDK

ASR-2300 Multichannel SDR Module for PNT and Mobile communications. Dr. Michael B. Mathews Loctronix, Corporation

Transcription:

ANDROID APPS DEVELOPMENT FOR MOBILE GAME Lecture 5: Sensor and Location Sensor Overview Most Android-powered devices have built-in sensors that measure motion, orientation, and various environmental conditions. These sensors are capable of providing raw data with high precision and accuracy, and are useful if you want to monitor three-dimensional device movement or positioning, or you want to monitor changes in the ambient environment near a device. Peter Lo 2 Categories of Sensors Environment Sensor Android platform supports three broad categories of sensors: Environmental Sensors These sensors measure various environmental parameters, such as ambient air temperature and pressure, illumination, and humidity (barometers, photometers, and thermometers) Motion Sensors These sensors measure acceleration forces and rotational forces along three axes (Accelerometers, gravity sensors, gyroscopes, and rotational vector sensors) Position Sensors These sensors measure the physical position of a device. (Orientation sensors and magnetometers) Android provides four sensors that let you monitor various environmental properties. Sensor Type Unit Sensor Event Data TYPE_AMBIENT_TEMPERATURE C Data Description SensorEvent.values[0] Ambient air temperature TYPE_LIGHT lx SensorEvent.values[0] Illuminance TYPE_PRESSURE hpa/ mbar SensorEvent.values[0] Ambient air pressure TYPE_RELATIVE_HUMIDITY % SensorEvent.values[0] Ambient relative humidity These sensors are hardware-based and are available only if a device manufacturer has built them into a device. 3 4

Position Sensor Motion Sensors Type Android provides the geomagnetic field sensor and the orientation sensor that let you determine the position of a device. It also provide a proximity sensor that lets you determine how close the device to an object. Sensor Type Unit Sensor Event Data Data Description TYPE_PROXIMITY cm SensorEvent.values[0] Distance from object TYPE_MAGNETIC_FIELD μt SensorEvent.values[0] Geomagnetic field strength along the x axis SensorEvent.values[1] Geomagnetic field strength along the y axis SensorEvent.values[2] Geomagnetic field strength along the z axis 5 Sensor Type Unit Sensor Event Data Data Description TYPE_ACCELEROMETER m/s 2 SensorEvent.values[0-2] Acceleration force along the x, y, z axis TYPE_GRAVITY m/s 2 SensorEvent.values[0-2] Force of gravity along the x, y, z axis. TYPE_GYROSCOPE rad/s SensorEvent.values[0-2] Rate of rotation around the x, y, z axis. TYPE_LINEAR_ACCELERATION m/s 2 TYPE_ROTATION_VECTOR SensorEvent.values[0-2] Acceleration force along the x, y, z axis (excluding gravity). SensorEvent.values[0-3] Rotation vector component along the x, y, z axis and rotation vector. 6 Motion Sensor Acceleration Sensor Android provides several sensors that let you monitor the motion of a device. Accelerometer and gyroscope sensors are always hardware-based. Gravity, linear acceleration and rotation vector sensors can be either hardware-based or software-based. An acceleration sensor measures the acceleration applied to the device, including the force of gravity. The force of gravity is always influencing the measured acceleration according to the following relationship: A = - g - F / mass To measure the real acceleration of the device, the force of gravity must be removed from the accelerometer data because: When the device is sitting on a table, g = 9.81 m/s 2. When the device is in free fall and therefore rapidly accelerating toward the ground at 9.81 m/s 2, g = 0 m/s 2. 7 8

Sensor Rate Using Sensor The rate sensor events are delivered at. This is only a hint to the system. Events may be received faster or slower than the specified rate. Usually events are received faster. SENSOR_DEPLAY_FASTEST Get sensor data as fast as possible SENSOR_DEPLAY_GAME Rate suitable for games SENSOR_DEPLAY_NORMAL Default rate suitable for screen orientation changes SENSOR_DEPLAY_UI Rate suitable for the user interface (Slowest) 9 Unregister the sensor when the activity pauses Used for receiving notifications from the SensorManager when sensor values have changed Get an instance of the sensor service, and use that to get an instance of a particular sensor Handling incoming sensor data in the onsensorchanged() callback method Register a listener for the sensor with specified rate 10 Introduction to LBS How the GPS Works? Location Based Service (LBS) is an information system driven by the ability of the central system to detect the geographical position of the mobile devices. Examples: Locate the nearest bank, restaurant, gas station, hotel, golf course, hospital, police station, etc. Provide transportation information on how to go from here to there. Social networking is used to locate and reach events, friends and family members. 11 Created by DOD-USA under the name NAVSTAR (Navigation System for Timing and Ranging) but it is commonly known as Global Positioning System (GPS). The system s backbone consists of 27 Earth-orbiting satellites (24 in operation and 3 in stand-by mode) The three circles intersect on the point over Central America. The actual location is: San Jose, Costa Rica. 12

Latitude and Longitude Main Component of LBS Latitude in GPS-Decimal notation: +90.00000 (North) to -90.000000 (South) Longitude GPS-Decimal notation: +180.000000 (East) to -180.000000 (West) The Location-Based API includes two packages Google Map API (com.google.android.maps) Location API (android.location) They provide an initial look at the support in the Android platform for building location-based services. These API work over the internet to invoke services from Google servers 13 14 Android GPS Algorithm Define Location Listener and Request Location Updates Define the criteria how to select the location provider Acquire a reference to the system Location Manager Define a listener that responds to location updates Called when a new location is found by the location provider 15 Register the listener with the Location Manager to receive location updates 16

Requesting User Permissions Google Maps In order to receive location updates from network provider or GPS provider, you must request user permission by declaring corresponding permission in your Android manifest file. Permission ACCESS_FINE_LOCATION ACCESS_COARSE_LOCATION Provider Allows the API to use the GPS to determine the device's location to within a very small area: NETWORK_PROVIDER GPS_PROVIDER Allows the API to use WiFi or mobile cell data (or both) to determine the device's location: NETWORK_PROVIDER The Google Maps API for Android provides developers with the means to create apps with localization functionality. Google Maps API V2 was released at the end of 2012 and it introduced a range of new features including 3D, improved caching, and vector tiles. Without these permissions, your application will fail at runtime when requesting location updates. 17 18 Google Maps Android API Getting Started Creating a new Android application that uses the Google Maps Android API v2 requires several steps. The overall process of adding a map to an Android application is as follows: Download and configure the Google Play services SDK, which includes the Google Maps Android API. Obtain an API key. You will need to register a project in the Google APIs Console, and get a signing certificate for your app. Add the required settings in your application's manifest. Add a map to your application. Publish your application. If you use the Google Maps Mobile SDK for Business you must download and configure the Google Maps Mobile SDK for Business static library. 19