Nokia N900, sports tracking and geotagging

This blog contains some tips how to use your Nokia N900 smart phone as a “augmented reality” sports device.

1. Sports tracking

Sport tracking is about collecting your sports activity data using GPS and other equipment. After running/cycling/skiing/whatever you see where you have been, how much time it took and how fast you are. In same cases you are able to calculate burnt calories and estimated heart rate.

N900 has at least one sports tracking application out there, eCoach.  eCoach is also suitable for professionals as it has heart rate monitor integration.

eCoach allows you record and  store sport activities. During the activity it uses Open Street Map based map viewer to show your current location. At least Helsinki area has very detailed maps available there, showing even the smallest trails, so you can safely venture to unknown neighbourhoods.

eCoach exports its tracks as GPX gps data file format. eCoach does not have any service integration yet, but you can upload this file to Nokia Sports Tracker and Map My Tracks. The recommend the latter as it has better social media integration and seems to be under active development. On the otherhand I have been using Nokia Sportstracker since 2007 and it has not really development during the whole this time and seems to lack will to go forward. Also Nokia has disabled track profile for imported GPX files which gives a message “we really don’t care about this service”.

There is also a service called mapmyrun.com with various domain names like “maymysomething.com”. Steer away from this service as I tested it and it didn’t live up to my expections (too much advertising, horrible user interface).

Some sport tracks I have made

2. Geotagging

Geotagging is about having GPS  coordinates on your photos. This way photos can be put on the map autotically in photo sharing services like Yahoo Flick or Google Picasa. When you known location, capture time and sharing license of the photo, all kind of fantastic services can be created, like Microsoft Photosynth.

Technically geotagging works by embedded GPS coordiates into the EXIF metadata of JPEG files.

N900 has geotagging as out of the box feature – no additional software needed. Just turn on it on in Camera application settings.

Also, you can retrofit your photos with geotagging information afterwards. You can do this by hand using labels and drag and drop in the most of photo sharing applications, like Google Picasa. Also there exist automated tools if you have relates GPS records available as GPX or KML file: checkout GPicSync. This is handy if you record your sports in eCoach and forgot to turn on geotagging in N900 camera. GPicSync also has a Google Maps export feature if you want to create custom maps for your friends or customers.

3. Sports tracking + geotagging = ?

I am still trying to figure out how to combine sports tracking and geotagging to something cool. Maybe something along the lines of urban exploration.

But in any case here are some of cities I have “collected” from my travels

PhoneGap ported on N900 (Maemo)

We have ported PhoneGap mobile application framework to the new Nokia N900 smartphone and its Maemo operating system. PhoneGap is a framework to build mobile applications easily with HTML and Javascript. With the new Maemo port PhoneGap platform support covers iPhone, Android, Nokia Series 60, Blackberry, Windows Mobile and Maemo, making it one of the most portable mobile application development solution available.

01012008052

snapshot1

The demo application currently supports only Device Info and Accelerometer APIs. The porting work is still in its early stages and we suggest novice developers steer away from it. We’ll develop and maintain the work as long as we have client cases for mobile applications. If you are looking forward to port your commercial PhoneGap application to N900, please contact us.

PhoneGap port was done using QT and QWebView controller. The native shell source code is in C++. Build and packaging scripts are standard Makefiles. More technical information on the release notes page.

Code is available on GitHub.

1. So what’s cool about Maemo (compared to other PhoneGap platforms)?

Shortly: The openess of Maemo platforms enables developer innovation never seen before. There are zero artificial limitations chaining your imagination.

  • No code signing whatsoever required
  • No approval process to get your application distributed
  • Very robust development tools and development environment. Hey, it’s Linux! The phone ships with X terminal built in.
  • You have root access to the device if needed
  • QWebView WebKit control which itself is open source – you can recompile from scratch and stick in the needed features
  • The phone itself is rock solid. It beats iPhone 100-0.
  • Maemo has very active open source community. You actually might get help when stuck, unlike with NDAs and other madness from some other vendors.

So what’s cool about PhoneGap (compared to other mobile application technologies)?

  • Use low entry level HTML, CSS and Javascript technologies – even PHp coder can build his/her own mobile application! This is the most cost effective way to develop non-CPU-intensive applications.
  • PhoneGap has the widest mobile platform support – the best medicine against fragmented mobile application markets
  • You can always break out from the sandbox and use the native capabilities of the phone. This is something you cannot do with Flash Lite or Java ME.
  • Very active community
  • WebKit rendering engine enables CSS3 goodies and much more
  • Easily convert your existing mobile site to an application

Installing Python Imaging Library (PIL) under virtualenv or buildout

I have greatly struggled to have PIL library support in isolated Python environments like virtualenv –no-site-packages.

For example, when installing Satchmo shop under virtualenv:

../bin/clonesatchmo.pyhe Python Imaging Library is not installed. Install from your distribution binaries.
../bin/clonesatchmo.py The Python Imaging Library is not installed. Install from your distribution binaries.

Though it clearly is there, installed by easy_install PIL command:

ls ../lib/python2.5/site-packages/PIL-1.1.7-py2.5-linux-x86_64.egg
ArgImagePlugin.py	 ExifTags.py		  GimpGradientFile.pyc...

Does anyone know if this problem is with PIL itself, eggified PIL or something else?

In any case, there is an easy workaround: use system-wide PIL (sudo apt-get install python-imaging) and symlink PIL from your site-wide installation under the isolated Python environment:

(satchmo-py25)mulli% pwd
/srv/plone/mmaspecial/satchmo-py25/lib/python2.5/site-packages
(satchmo-py25)mulli% ln -s /usr/lib/python2.4/PIL .
That works for now, but I’d like to learn how to make virtualenv and buildout install PIL egg bullet-proof way.