The goal of the Sensorpedia Mobile Platform was to develop a software application which can be run on a mobile computing device and used to transmit distributed data readings from citizens in near-real time. This application permits citizens to rapidly report event information, such as disaster occurrences, security anomalies, and accounts of emergencies.
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Sensorpedia iPhone Application
1. The Mobile Platform:
Enabling citizen sensors
Christopher H.Tomkins-Tinch
RIT BS, Imaging Science (2011)
tomkinstinch at ornl dot gov
cht(nine-three-three-nine) at rit dot edu
Hi, Iʼm Chris Tomkins-Tinch from the Rochester Institute of Technology. This summer, I worked on creating an iPhone application interface to Sensorpedia and an associated backend web
service.
3. http://weblogs.newsday.com/news/local/longisland/politics/blog/anemometer.jpg
http://biosingularity.files.wordpress.com/2006/03/cantilever.jpg
http://www.kenrockwell.com/nikon/d40/images/d40-sensor.jpg
We might think of an a weather station--an anemometer, or maybe a camera sensor. These are largely stationary sensors designed for specific tasks.
5. We too are sensors.
We too then, are sensors. We can respond in ways static sensors cannot. We can notice things that autonomous systems may miss. We can frame readings with relevant context, and
quickly capture what matters.
11. Mobile phones
are ubiquitous.
Almost everyone in this country has a cell phone. In the decade following 1996, cell phone adoption jumped from thirty-four to two-hundred three million. Thatʼs a significant increase.
http://www.post-gazette.com/pg/06075/671034-294.stm
13. http://www.flickr.com/photos/davidwatts1978/3199405401/
This photo of US Flight 1549 was taken by Janis Krums on January 15, 2009 while standing on the bank of the Hudson River. It was captured with an iPhone, and distributed by Twitter
before any news agency of record had reached the scene.
14. http://www.fulana.org/images/if-you-see-something.JPG
http://www.flickr.com/photos/usgeologicalsurvey/2593475733/
http://www.narragansett.k12.ri.us/nes/images/citizen.gif
Whether acting in response to natural disasters, in the service of national security, or for curiosity, citizens are are a powerful source of data. The question then is, “How do we leverage this
power in an organized way?”
15. I wonʼt go into detail on what Sensorpedia is; that is outside the scope of this presentation. In short, it is a way to aggregate and index sensor data.
16. Here we have a screenshot of the BETA Sensorpedia interface. The popup window in the middle shows a stationary traffic camera in South Carolina.
17. Sensorpedia is currently indexing many different types of in-situ sensors. Here we can see numerous weather and buoy sensors.
18. Imagine if Sensorpedia included near-real-time human Sensor readings. Here is a screenshot of Flickrvision. As photographs are uploaded to Flickr, this service shows a thumbnail on
Google Maps. What if we could leverage the same functionality with Sensorpedia?
19. How do we get human
readings into ?
The question then, is “How do we get readings from distributed users into Sensorpedia?”
20. Create a mobile
application.
We can do it with a mobile phone application--something to interface with the native device hardware and serve data to Sensorpedia in an intuitive way. This summer I targeted the iPhone
for this task.
21. Initially, I began with a sketch-based interface design. This is something Iʼve learned to embrace from working with David Resseguie. Itʼs a low-risk and quick way to think about how
prototypes should work. Sketching on a tablet pc is especially helpful because it makes the iterative design process simple.
22. The main idea is to give each iPhone owner a feed on Sensorpedia. They can then capture the deviceʼs senses--accelerometer, camera, and position. They can also provide an optional
comment. A more generic data field is also included, anticipating sensors that interface through the iPhoneʼs dock connector.
23. Users experience native iPhone user interface controls, and will be able to review post-capture entries.
24. The app provides a historical backlog. From the Sensorpedia web interface, the API, or the Sensorpedia mobile app itself, users will be able to review past entries.
25. Rather than talk directly to Sensorpedia, the mobile application will send data to an associated web service which will then in turn generate feeds to be later consumed by Sensorpedia.
26. Left as an exercise
for the reader.
http://www.flickr.com/photos/austinevan/1225274637/
This was an educational program after all, and I needed to learn. Dave Markʼs iPhone book, and Stephan Kockanʼs Objective-C books were invaluable for gaining knowledge of how to
develop for Appleʼs mobile platform.
27. After getting comfortable with Objective-C and Appleʼs way of doing mobile development, I had an early Sensorpedia application running on the iPhone simulator.
28. It presents an interface that makes capturing the iPhoneʼs senses simple and quick.
30. In addition to being able to capture using the large button on the first tab, users can opt to have the app capture immediately upon load. This makes it easy to catch time-sensitive events.
31. Each user of the application will need a username and password. Having this credential obviates the need to tie the app to specific devices, and permits fleet deployment. Data from any
device will make it to the same feed, as long as it comes from the same user.
32. The app handles errors gracefully, using windows according to Appleʼs user interface guidelines.
33. In accordance with Appleʼs user interface guidelines, the app also ties in to the iPhoneʼs global settings pane.
34. The Sensorpedia iPhone app settings are available from a global location familiar to the user.
37. Making the mobile
application does not
complete the system.
Creating the mobile application does not get information from field users into Sensorpedia, however. A web service is needed to complete the system.
38. You may remember this diagram from earlier in the presentation. Weʼve covered the iPhone side of things, and the Sensorpedia side remains largely complete. The “Third party web
service” in the middle of this diagram is needed collect data from iPhones and provide it to Sensorpedia as a compatible ATOM feed.
40. (it’s all code)
Thereʼs not much to see for the web interface. Itʼs about a thousand lines of Python code, executing through Apache with mod_wsgi. It makes use of existing libraries for JSON, database
interaction, and wsgi. It uses webpy.
41. It has a RESTful interface.
'http://baseurl/auth'
'http://baseurl/submit'
'http://baseurl/query/(userId)/[returnCount]/[offset]'
'http://baseurl/delete'
'http://baseurl/image/(imageId)'
'http://baseurl/imagethumb/(imageId)/[maxSize]'
Link Sensorpedia itself, the web service has a RESTful interface, and responds to normal HTTP operations like GET and POST. It collects data in JSON format, stores it locally in a SQLite
database, and serves it in varying ways, depending on content type.
42. Readings Users
id id
user_id api_key
image password_hash
image_thumb username
accel_x date_registered
accel_y date_last_seen
accel_z sp_uuid
magnetometer
altitude
comment
lon
lat
altitude
generic_content
timestamp
The data model is quite simple, and provides tables for users and readings. Each of the iPhoneʼs sensors is given a column, along with a generic_content column for extensibility.
43. One of the resources I used in creating the web backend for the Sensorpedia iPhone app is the Sensorpedia Python Library, or spylib as weʼve been calling it. Tim Garvin created it during
his time here at ORNL. Spylib takes the raw data and transforms them into a Sensorpedia-compatible ATOM feed.
45. http://www.flickr.com/photos/howieluvzus/389163804/
The next thing to do is to test get the app fully working actual hardware. Eighty percent of the application was developed using the iPhone simulator. This works well. The simulator provides
constant canned values for the GPS and magnetometer. A photo album can be used to simulate taking a picture, and a hack allows one to simulate the accelerometer on a MacBook Pro.
Simulating the phone accelerometer with the MacBook Pro's Sudden Motion Sensors can be accomplished using http://bit.ly/18uGq8 to send data via UDP to a waiting accelerometer
override http://bit.ly/m6E7E . It is especially neat because it's transparent to the developer. Deploying to ARM swaps in the native accelerometer thanks to #if !TARGET_CPU_ARM ; no
changes to the interface. Once the application is complete and running on the device, it can be submitted to Apple for entry to the App Store.
46. The mobile platform
Enabling citizen sensors
Christopher H. Tomkins-Tinch David R. Resseguie
Rochester Institute of Technology Oak Ridge National Laboratory
Imaging Science (BS 2011) Computational Sciences and Engineering
tomkinsc@gmail.com resseguiedr@ornl.gov
We too are sensors. The Application
Prior work - Interface design
Sharing information from sensors and other real-time data systems The Sensorpedia mobile application was designed to capture data
is critical for situational awareness, knowledge discovery, and from the iPhone's sensors and relevant context as quickly as possible.
simulation. Current proprietary systems and ad-hoc interoperability This timely situational awareness is critical. User interaction for the
solutions increase sensing system integration time and delay Sensorpedia mobile application was prototyped with sketch-based
decision-making and data analysis. interfaces. This technique allowed for rapid iterative design, and
greatly accelerated the development process.
Sensorpedia is a program initiated by Oak Ridge National
Laboratory (ORNL) to utilize "Web 2.0" social networking principles
and lightweight data portability standards to organize and provide
rapid access to online sensor network data and related data sets.
Sensorpedia has leveraged established industry best practices for
information dissemination, and provides an accessible application
programming interface (API) for retrieving data in standardized
forms such as JavaScript Object Notation (JSON), and the Atom
Syndication Format. Data feeds can be tagged with keywords and
indexed in the spatial and temporal domains. Sensorpedia
enables decision makers to pull in many different types of
information sources and view them on a common operating
picture.
Intention - citizen sensors
The goal of the Sensorpedia Mobile Platform was to develop a
software application which can be run on a mobile computing
device and used to transmit distributed data readings from citizens
in near-real time. This application permits citizens to rapidly report
event information, such as disaster occurrences, security
anomalies, and accounts of emergencies.
This photo of US Flight 1549 was taken by
Janis Krums on January 15, 2009 while
standing on a ferry crossing the Hudson
River. It was captured with an iPhone, and
distributed by Twitter before any news
agency of record had reached the scene.
http://www.flickr.com/photos/davidwatts1978/3199405401/
Implementation
The Sensorpedia mobile application is implemented in Objective-C,
and utilizes native Apple Foundation and Cocoa classes. It adheres to
Architecture
the model-view-controller paradigm for software development.
The associated web service is implemented in Python and utilizes
existing libraries for its web server gateway interface (WSGI), image
Web Service processing, JavaScript Object Notation (JSON), and database
interaction. Data are stored in a relational SQLite database and can be
The creation of the mobile application necessitated an associated retreived through a Representational State Transfer (REST) interface.
web service, which collects and registers data with Sensorpedia.
Data flow
ATOM
JSON Data model
Users maintain accounts to allow Users Readings
web
each user to be associated with magnetometer
service multiple devices. Data are id id
altitude
api_key user_id
associated with users through an password_hash image
comment
API key. Each of the sensors lon
username image_thumb
lat
The web service communicates with devices using JavaScript present in the device and a date_registered accel_x
altitude
generic content block are date_last_seen accel_y
Object Notation (JSON) and publishes data using the Atom sp_uuid accel_z
generic_content
Syndication Format (ATOM). represented in the data model. timestamp
Sensorpedia is funded by the Department of Homeland Security’s Southeast Region Research Initiative (SERRI) and is supported in
part by the U.S. Department of Energy under DOE Project No. 2367-T103-06. For more information about Sensorpedia and related
efforts at ORNL, please contact Bryan Gorman at gormanbl@ornl.gov or visit Sensorpedia online at http://www.sensorpedia.com
This is the poster presented on the application at the 2009 ORNL Summer Student Poster Session. on August 5, 2009.
47. The Mobile Platform:
Enabling citizen sensors
Christopher H.Tomkins-Tinch
RIT BS, Imaging Science (2011)
tomkinstinch at ornl dot gov
cht(nine-three-three-nine) at rit dot edu
Hi, Iʼm Chris Tomkins-Tinch from the Rochester Institute of Technology. This summer, Iʼve worked on creating an iPhone application and an associated backend server to interface with
Sensorpedia.