What’s the brief?
to create a small, light cheap device that is capable of taking a photo every n seconds, tag it with a location and then upload it to a server. Its got to fit on the front of my comedy clown bike and generally be weather/knock proof.
Where can I get the code
Well if you really want it, you can download it here: photo_tracker.zip It’s mostly complete, but I don’t provide the http “receiver” to allow the photos to be uploaded to a website.
How ya gonna do it?
After a bit of thinking I remembered that I have an old series 60 nokia kicking about. Whilst it doesn’t have a GPS it does have a camera and HSDPA. A few minutes of googling relieved that Nokia ported both python and perl to the symbian operating system.
I can use a Bluetooth GPS for getting a location fix. Apparently Symbian allows programmes to seamlessly use either internal or external GPS’s
As for attaching it to the bike, fortunately for me there are two threaded bolt holes just where the front fork attaches to the main body of the bike. Normally this is where the clip is screwed on to take the Brompton branded bike bag. However I’m not rich enough to afford such luxuries!
Execution
Sadly it appears that Perl on Symbian wasn’t really developed much. It had some of the basic symbian API ported to it, the rest requires skill way above my pay grade to work. Also the last update was made in 2005, not conducive to great technical support.This means that I’m stuck with Python. *Shudders*
Basic Programme Layout
The layout is relativity simple, everything is controlled by the GPS callback monitor. As soon as there is a positive GPS lock, it will trigger the picture taker every minute. The picture is assigned a unique name (Unix time) and relevant details are passed into the database( filename lat/long accuracy and other signal information).
Once a certain number of photos have been captured, they are uploaded to the server. As soon as the server has acknowledged the upload, all the pictures they are deleted from the phone.
Usage
Sadly I’ve not “compiled” all the code into a user-friendly .sis yet. This means that you will need a “high capas” python interpreter.(I assume you’ll be a little familiar with python on s60 if not then go here to learn more.) Download python from here open the .tgz and look for the high_capas.sis (both python and the shell script app must be high capacity) upload them here to get them signed for your phone and install.
You’ll want to change the following variables either in the code, or at runtime (possibly not the best idea):
- self.dbPath: Where to look for the database. Will create one if it can’t find it at startup
- self.imagePath: Where to put the images, this will need lots of space, put this on a memory card if you can
- self.upload: The website to upload the photos (mywebsite.co.uk, without the path, not my idea, as I didn’t write this library)
- self.upload.setPage: the upload path (uploads/receiver.php, no preceding “/”)
Whats left to do?
Making the display! I’ve pretty much finished the phone side of things, I just need to compile the code and make it run as soon as the phone it switched on. What happens at the server is a different story. Currently the photos are just uploaded at the lat-long data is archived. I need to find someway of displaying all the photos on a map. Gpicsync looks interesting.