I finally replaced my old HTC Wizard with a brand new HTC TyTN2. Nice device, fast connection, nice form factor, and GPS!
I talked about my GPS Tracker a little while ago in this blog. It’s an application that uses a GPS connected to a Windows Mobile PDA to log the positions in three dimensions and export it to a Google Earth KML file.
Before I got the TyTNII, I was using an external Bluetooth GPS (GPSlim 236) which is kind of an inconvenience as there was always two devices to keep charged and I had to carry both of them at the same time.
The TyTN II, coming with a GPS, gave me a new idea… An application that would log my every single movement on earth and that would send the data on my website.
Well, not all the data, I’m not an convict on probation with a tracking device on my ankle ;)
I would just send four items: the top speed of the day, the maximum and minimum altitude and the total distance. Doesn’t tell much, but I find it fun to know :)
I updated the code to enable permanent tracking, and the basic functionality was done yesterday night. I ran a few tests while going out for groceries, and everything worked fine. One problem though, when it was in my pocket, it didn’t work, even outside! Which didn’t make sense since it was working even inside my apartment.
Anyway, what better way is there to find out if the program really works, than go out for a little flight?
To make sure, I headed to Palo Alto airport for a test flight in a Citabria. I carefully started the old and the new phone with their tracking programs, and took off. Today was really crowded at Palo Alto. I thought with the not so good weather that people would have stayed home, but apparently, they did not…
A few of touch and goes later, I returned back to the parking… to find out that the tracker on the TyTNII had not logged one single thing!!!
Oh well, I had fun flying… too bad this didn’t work…
I eventually figured out that the problem was when the device was on stand by… it used to work on the Wizard, even when on stand by, the tracker was still logging…
For a while, I thought that the internal GPS was turned off when on stand by, but further tests revealed that it was indeed still on (Queried the device power state to make sure).
I figured it might be because the UI is stalled when the device is on stand by, and since I was relying on a Windows Timer, the events were probably not dispatched.
After moving the data reading and track writing to a thread, everything worked as expected!
It’s been running for the past hours and aside from the heavy battery drainage, nothing to complain about.
So, here are the features:
- Automatic Daily Tracking
- Automatic Start/Stop of tracking when moving / stopping
- Automatic upload of the file to a web service on White-clouds.org :-P
- Export to Google Earth KML file
- Email sent for every Google Earth export
- GPS Signal Quality Icon
- Battery Level Icon
Features to add:
- Establish schemes to save battery
o Figure out the location where nothing even happens and reduce the polling frequency. (Home, work…)
o Reduce poll frequency when the GPS position hasn’t changed for the past 5 minutes or so.
o Increase poll frequency when the GPS starts moving again…
That’ll be for another day…
Meanwhile, to make up for the cloudy pictures of today, here's a slideshow from last week's flight.