I use this page to display hard sensing data. It is what UCLA CENS called a “Slog” or Sensor Log and a playground for experimenting with visualization and sensor technologies.

The sensor

The data was captured using a Sensaris ECOsense Senspod which has the following characteristics:

  • Bluetooth Class 2 radio
  • Texas Instruments MSP430 processor
  • 3.7 V Li-Po battery 1100mAh
  • 2G Bit micro SD Card
  • Mediatek MT3318 GPS chip
  • Real Time Clock
  • MICS 4514 COx and NOx sensor

The device is no longer available as Sensaris closed in 2014. I usually carry it attached to my computer bag carefully avoiding exposure to wind and water.

The data

Data is downloaded via Bluetooth from the device in the form of proprietary move-it frames which are like NMEA frames adding proprietary $P frames. An output sample is provided below.


I then use a small script written in Python for parsing and downsampling samples based on Douglas-Peucker. Parsing of the frames is based on a finite state machine with the possibles states shown below the options.

$ ecotool -h
usage: ecotool [-h] [-e {gpx,csv,json}] [-s SEGMENT] [-t TOLERANCE]
               [-c CUTOFF] [-v]

ECOsens Data Tool

positional arguments:
  logfile            Sensaris move-it log data

optional arguments:
  -h, --help         show this help message and exit
  -e {gpx,csv,json}  output format (default: csv)
  -s SEGMENT         data segment to extract
  -t TOLERANCE       Douglas-Peucker downsampling tolerance
  -c CUTOFF          segment cutoff in s (default: 5)
  -v                 verbose

[(None, '^\\$PSEN,Noise', <function save_PSEN at 0x7fa032f4c500>, 'Noise'),
('Reading', '^\\$PSEN,Noise', <function save_PSEN at 0x7fa032f4c500>,
'Noise'), ('Noise', '^\\$PSEN,NOx', <function save_PSEN at 0x7fa032f4c500>,
'Noise+NOx'), ('Noise+NOx', '^\\$PSEN,COx', <function save_PSEN at
0x7fa032f4c500>, 'Noise+NOx+COx'), ('Noise+NOx+COx', '^\\$GPRMC', <function
save_trkpt at 0x7fa031c6f410>, 'Reading'), ('Noise+NOx+COx', '^\\$PSEN,Noise',
<function save_PSEN at 0x7fa032f4c500>, 'Noise')]

The resulting CSV file corresponding to an itinerary is then uploaded to GitHub. This widget used to rely on Google Fusion tables but was modified as Google discontinued that service.

The visualization

Finally, the visualization above is handled by the ecoviz JavaScript widget which uses OpenLayers 3, Raphael and Morris.js to render the data. The widget obtains the URL to the csv file from the identifier in the drop-down menu on this page, which I update manually. I am not yet reading humidity and temperature which are required to convert V to ppm for the gases.