Slide 1OutlineMotivation/Problem StatementG-force calculationdImpackSoftware Overview – ImplementationData StatisticsPhone Coordinate SystemOrientation DirectionsSoftware Overview – DesignSoftware Overview – Use CaseDemoSoftware Test (not official)Technical Difficulties/ChallengesLessons LearnedImprovementsQuestion or Suggestion?Evaluation PlandImpackBy Chau NgoEEL 6788 Spring 2011Outline•Problem Statement/Motivation•Software Overview•Demo•Technical Difficulties•Lessons Learned•ImprovementsMotivation/Problem Statement•Shock (G-force) associated with an object is its acceleration relative to freefall.•This acceleration experienced by an object is due to the vector sum of non-gravitational forces acting on an object free to move.•http://en.wikipedia.org/wiki/G-force•How much shock do your body absorb when you walk vs. jog vs. run?▫Shock is transmitted from feet up the legs, through the pelvis, to the lower back. ▫It may potentially cause pain in legs, knees, and backG-force calculation•An astronaut taking off in the shuttle his/her acceleration is 29.4 m/s^2 upward. =•This is three times the acceleration of gravity (9.8 m/s^2)the astronaut will feel an apparent force downward equal to 3 times his/her weightPLUS the normal force of gravityThus the total “g-force” on the person will be “4 g's”.dImpack•Is an Android application that utilizes the 2 Android phone sensors:▫Accelerometer to measure the amount of shock while a person is walking or running▫Orientation sensor to measure changes in orientation•Compute/Display shock statistics records•Visualize the analyzed data on graphsSoftware Overview – Implementation•COTS: Java, Android SDK, sqlite, AndroidPlot, DroidDraw•Configuration ▫Turn accelerometer off/on▫Turn orientation sensor off/on: •Control: Start, Pause/Resume, Stop•Record: New, Open, Save, DeleteData Statistics•Accelerometer▫Start time/date▫Stop time/date▫Total time (seconds)▫Pause time (seconds▫Counts: total number (> 1.2 G) of shocks.▫Biggest shock▫Average of all shocks▫Sum of all shocks•Orientation sensor▫Biggest change for each direction (azimuth, roll, and pitch)▫Average change for each directionPhone Coordinate SystemOrientation Directions•SensorEvent•values[0]: 0 to 359 in degrees▫Azimuth: angle between the magnetic north direction and the y-axis, around the z-axis•values[1]: -180 to 180 in degrees▫Pitch: rotation around x-axis•values[2]: -90 to 90in degrees▫ Roll: rotation around y-axisSoftware Overview – DesignSoftware Overview – Use Case1. Create new record2. Start▫If skip 1, will be asked to do so before save (3)3. Save record▫Master table: keeps name and statistics▫Accelerometer samples table▫Orientation samples table4. Open record▫Statistics tab▫Graphs tab•Delete RecordDemo•Az: 0 vs. 359•Pitch: -180 vs. 180•Roll: -90 vs. 90•Only pick up sensor changes every 10th of a second•Shock < 1.2 will not be recorded▫No shock = 1GSoftware Test (not official)•Test at home: 30 minutes, takes 9 minutes to save, size 176KBTechnical Difficulties/Challenges•Change screen orientation causes crash Disable auto-rotate screen•Threads issues•Debug without Android SDK source code•Unfamiliar with Android architecture and components implementation•How to wear/carry phoneLessons Learned•It’s important to implement “Try/Catch”•Can find online tutorial for almost everything•DroidDraw can be used to design GUI but some color value, e.g. @drawable/green, is not comparable with Android SDK•Clear application data when database is corrupted:▫Settings/Application/Manage Application: select application, then press Clear data•Database:▫Use db.execSQL(“Drop Table …“) command to delete table▫Use db.delete(…) to delete a row•Store record after stop: takes some time•Record name can’t have space, or be a number: sqlite limitationImprovements•Implemente a service to store sensor data in backgroundPersisting large size of data takes a long time•Store data every update/frame.•Change graph domain range•Measure power consumption•Implement a service to listen to sensor data in background▫User might not want look at graphs recording▫Reduce power consumption by not drawing graph.•Change main GUI design to be more Android app-like•Add capability to connect to GPS and record run/walk track.Question or Suggestion?Evaluation Plan•Run, walk, jog▫Different surfaces▫Different type of shoes?•Wear phone above knees and by
View Full Document