Academia.eduAcademia.edu

iSeismometer: A geoscientific iPhone application

2010, Computers & Geosciences

This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and education use, including for instruction at the authors institution and sharing with colleagues. Other uses, including reproduction and distribution, or selling or licensing copies, or posting to personal, institutional or third party websites are prohibited. In most cases authors are permitted to post their version of the article (e.g. in Word or Tex form) to their personal website or institutional repository. Authors requiring further information regarding Elsevier’s archiving and manuscript policies are encouraged to visit: http://www.elsevier.com/copyright Author's personal copy ARTICLE IN PRESS Computers & Geosciences 36 (2010) 573–575 Contents lists available at ScienceDirect Computers & Geosciences journal homepage: www.elsevier.com/locate/cageo Short note iSeismometer: A geoscientific iPhone application Kiichi Takeuchi, Patrick J. Kennelly n Department of Earth and Environmental Science, C.W. Post Campus of Long Island University, 720 Northern Blvd., Brookville, NY 11548, USA a r t i c l e in fo Article history: Received 30 April 2009 Received in revised form 11 September 2009 Accepted 21 September 2009 1. Introduction In the last few years, smartphones and similar handheld devices have evolved into fully integrated technology platforms which are used frequently and distributed widely. The second generation Apple iPhone is a prominent example which integrates a telephone, touchscreen, wireless internet access, global positioning system (GPS) receiver, accelerometer, light sensor, camera, speaker, proximity sensor and microphone. Due to their small size, light weight, long battery life, numerous utilities, and connectivity, the more than 21 million iPhones sold as of the second quarter of 2009 are likely to be constantly in use throughout the world. Software developers recognize a strong market for smartphone applications. Between the opening of the App Store in July of 2008 and the end of the first half of 2009, Apple reports availability of more than 50,000 applications reviewed and approved by their staff, with the number of downloads reaching one billion in April of 2009. We have developed a free application we hope will be useful in geoscience education and research. iSeismometer version 1.0 uses the iPhone’s built-in accelerometer to record and display motion. iSeismometer can currently be used in education, and has potential future use as a component of an earthquake early warning systems (EWS). Our choice of the iPhone platform was based on the current edge we feel Apple has in integrating technologies and distributing applications. Other major operating systems (OS) for smartphones with varying degrees of openness are: Symbian, Android, Blackberry’s Storm, and Palm’s webOS. As one example, Android is a mobile open source community OS platform led by Google which allows any hardware manufacturers to integrate Android into their devices, but these will not necessarily contain a GPS or an accelerometer. We also chose to develop iSeismometer for the n Corresponding author. Tel.: + 1 516 299 2652 (office); fax: + 1 516 299 3945. E-mail address: [email protected] (P.J. Kennelly). 0098-3004/$ - see front matter & 2010 Elsevier Ltd. All rights reserved. doi:10.1016/j.cageo.2009.09.012 iPhone because: (1) Apple was first to launch a storefront for downloadable applications with its App Store, while all other platforms are hurrying to catch up and compete; (2) Apple has a relatively low barrier to entry for developers in terms of offering support, documentation, and a low registration fee; (3) Apple’s unified platform and OS (including organized version upgrades) lowers the development risk. We continue to monitor the volatile mobile market for the potential of developing and running our application on other platforms. 2. iSeismometer description Apple’s iPhone specifications (http://www.apple.com/iphone/ features/accelerometer.html) describe the accelerometer’s functionality; ‘‘The accelerometer inside iPhone uses three elements: a silicon mass, a set of silicon springs, and an electrical current. The silicon springs measure the position of the silicon mass using the electrical current.’’ In essence, the accelerometer behaves like a plumb-bob. When a user places an iPhone flat on a table and face up, three coordinates, (X, Y, and Z in Fig. 1) have values (0,0, 1). Horizontal coordinates, X and Y, are not affected by gravity but Z-axis is affected vertically downward. The value 1 corresponds to a value of 9.8 m/s2. Moving the iPhone rapidly downward will increase Z (towards zero at terminal velocity). Tilting the iPhone will result in relative changes among the three coordinates. iSeismometer 1.0 was developed using the iPhone Software Development Kit (SDK) for the iPhone Operating System (OS) 2.2.1 and was released for OS 2.0 to maintain compatibility with older versions. The application was tested on the first generation iPhone, iPod Touch, and iPhone 3G (second generation). Version 1.0 provides three major interfaces: Graph, Spectrum, and Data Transfer. The Graph interface (Fig. 2(a)) immediately begins to record X, Y, and Z motion upon running the application. The graph simulates a roll of paper scrolling from right to left Author's personal copy ARTICLE IN PRESS 574 K. Takeuchi, P.J. Kennelly / Computers & Geosciences 36 (2010) 573–575 (i.e. a helicorder). The acceleration values are amplified by a constant multiple. The Spectrum interface (Fig. 2(b)) evaluates and displays the waveforms’ frequency by applying a Fourier transform (FT). The Data Transfer interface (Fig. 2(c)) transmits data over hyper text transfer protocol (HTTP) using the POST method, the same protocol used to browse websites on the Internet. Prompting users for permission to retrieve their current GPS location, it sends the location and the last 10 s of data. A program written in Personal Home Page (PHP) scripting language is called by our Apache web server, and stores the following data in a My Structured Query Language (MySQL) database: current location as latitude, longitude, and altitude; unique device id as an alpha-numeric code, and the recorded trace as X, Y, and Z values. The user is also able to send an email containing the URL for download and analysis. When a user requests a download of data from the website, the PHP program retrieves data from the database and sends it in comma-separated value (CSV) format. To date, we have received more than 12,000 uploads worldwide, although none are recognized as recorded seismic events. iSeismometer version 1.1 will include enhancements we have already implemented. We updated the Graph interface to show vertical lines in one second increments (Fig. 2(d)). Buttons will also be updated with icons (replacing the words ‘‘Pause,’’ ‘‘Spectrum,’’ ‘‘Data,’’ and ‘‘Info’’) and a new button will be added for settings such as toggling on and off the vertical second lines (Fig. 2(d)). 3. iSeismometer evaluation In terms of efficiency of frequency spectrum calculation, the FT used in iSeismometer 1.0 has a computation cost of O(N2). Using 3 s of data (300 float values), the actual computational time is about half a second per axis; however, this increases exponentially so that using 10 s of data take over 6 s per axis. In version 1.1, we implement a fast Fourier transform (FFT) which uses Fig. 1. Orientation of X, Y and Z axes used by iSeismometer with respect to iPhone. Modified from Apple Developer Connection – ‘‘Creating an iPhone Application’’, Fig. 5. Fig. 3. Graph showing optimized computation time using a fast Fourier transform (FFT) comprised of a discrete Fourier transform (DFT) optimized with a ‘‘divide and conquer’’ algorithm, as compared to a basic Fourier transform (FT). N is the number of data values, with data being sampled at a rate of 100 values per second. Fig. 2. Three interface views of iSeismometer 1.0 (a–c), and an interface view from upcoming version 1.1 (d). (a) Initial ‘‘Graph’’ interface. X, Y, and Z seismic traces are labeled in light gray. Buttons allow drawing of trace to be paused (Pause) and then scrolled. (b) ‘‘Spectrum’’ interface. X, Y, and Z show different peaks and values of frequency depending on last 3 s of data. In this example, test data of constant frequency was used to create a simple display. (c) ‘‘Data Transfer’’ interface. Last 10 s of motion recorded (and GPS location if approved by the user) will be uploaded to URL shown. This uniform resource locator (URL) can then be e-mailed to users for data retrieval. (d) Initial ‘‘Graph’’ interface for version 1.1, including vertical lines delineating 1 s intervals, and new icons to replace text. (This application can be downloaded for free at the Apple iPhone App Store /http://www.apple.com/iphone/appstore/S). Author's personal copy ARTICLE IN PRESS K. Takeuchi, P.J. Kennelly / Computers & Geosciences 36 (2010) 573–575 a discrete Fourier transform (DFT) and applies a ‘‘divide and conquer’’ algorithm. This lowers the computational cost to O(N log N). Benchmark results indicate this will decrease computation time for approximately 2.5 s (256 values) and 10 s of data (1024 values) to 0.024 and 0.100 s per axis, respectively (Fig. 3). As this FFT requires the number of input values to be powers of 2 (e.g. 28 =256), we chose numbers which do not represent whole seconds as a trade-off for faster computation. 4. iSeismometer applications iSeismometer has numerous classroom and laboratory applications. Students could mimic primary (P-wave) or secondary (S-wave) seismic waveforms while walking across the room by moving an iPhone in the correct direction(s) of particle motion. Students could also attempt to match the frequency of historic earthquakes. Using a long flat surface, multiple iPhones document attenuation in amplitude with distance. Comparing traces from an iPhone on a table and one floating in a container of water illustrates the inability of S-waves to travel through liquids. We believe it might be possible to build an inherently noisy but widely distributed earthquake early warning system (EWS) using iSeismometer. An EWS, which give seconds of warning before the arrival of destructive seismic waves, generally require large expenditures for precise instruments within limited geographic areas (Hoshiba et al., 2008; Kanamori, 2005; Allen and Kanamori, 2003). Our network would evaluate and compare abnormal traces on both the client- and server-side based on multiple criteria (e.g. amplitude, frequency, duration, typical user motions, geographic propagation patterns, information from traditional EWS, etc.). Users would have free access and could supply valuable qualitative information via iSeismometer at the push of a button by answering such critical questions as ‘‘Are you experiencing unexplained shaking?’’ (during arrival of the primary wave) or ‘‘Are you experiencing a second, more severe shaking event at the time we predicted?’’ (during arrival of the secondary wave). At this time, we do not have the data to assess the scientific merit of data recorded by iSeismometer. We plan to address this important issue in future releases by giving the user the option of toggling a setting to automatically record, be alerted to, and upload potential seismic events at times during which their iPhone is not in motion. 5. Related work Other computing devices have much or all of the functionality described above, but these may not currently be as seamlessly 575 integrated. For example, SeisMac /http://www.suitable.com/ tools/seismac.htmlS is a Mac OS X application which displays seismic traces for educational purposes on MacBooks and MacBook Pros. Quake Catcher Network (Lawrence et al., 2008; /http://qcn.stanford.edu/S) is a laptop-based seismic locator network begun last year, but requires fairly high-end laptops with built-in accelerometers. Lacking a built-in accelerometer, one with a universal serial bus (USB) connection may be purchased separately. Laptops lacking GPS devices will require either manual entry of the current location, or an additional download of a hybrid positioning plug-in, such as Loki /http:// www.loki.comS. Also, without a GPS device, services such as Skyhook Wireless /http://www.skyhookwireless.comS which use an internet protocol (IP) address to locate the user may be limited in precision. During evacuation, an iPhone may more likely remain with the user and connected to a network (3G or wireless internet) than some laptops. Also, it may be easier while on the move to enter feedback on a handheld touchscreen. 6. Conclusions iSeismometer illustrates how mobile applications offer new opportunities for geoscience software developers to focus on user interaction with the computer, and how the computer interacts with the environment. Developers may also consider the utility of an application’s distribution model. While not unique to Apple, its Apps Store tracks the number of downloads and feedback regarding usability of an application. iSeismometer, for example, has had over 120,000 downloads since March 2009, and generally positive user feedback. We hope to build on this popularity and ease of use to create an even more effective geoscientific application for educational and research. References Allen, R.M., Kanamori, H., 2003. The potential for earthquake early warning in southern California. Science 300, 786–789. Hoshiba, M., Kamigaichi, O., Saito, M., Tsukada, S., Hamada, N., 2008. Earthquake early warning starts nationwide in Japan. EOS Transactions. American Geophysical Union 89 (8), 73–80. Kanamori, H., 2005. Real-time seismology and earthquake damage mitigation. Annual Review of Earth and Planetary Sciences 33, 195–214. Lawrence, J.F., Cochran, E.S., Christensen, C., Jakka, R.S., 2008. Distributed computing and MEMS accelerometers: the Quake Catcher Network. EOS Transactions. American Geophysical Union 89 (53), Fall Meeting Supplement, Abstract IN23A-1068.