Tuesday, November 18, 2008

OSMTrack 1.0.1

I have just submitted an update for the OSMTrack application to the App Store. It fixes some minor issues I have found in the recent days:

  • Faster upload. Writing the documentation it comes to my mind, that I must be transmitting the log twice: first time just at the beginning and second time after an authorization request is received. Inspecting the documentation and after several attempts it has appeared that, in fact, iPhone OS is optimized for downloading things, it will always send the first request without credentials and supply credentials only if required by the web server. Fortunately, there is a way to supply custom HTTP header fields, and I used this to add a manually created authorization header. Now the log is transmitted only once, upload is twice fast.

  • Upload indication changed. Since now there is no authorization step inbetween indicating that upload is 50% done, progress indicator makes no sense any more. I have changed it to an activity indicator (you know, the rotating thing).

  • Fixed GPX log format (time stamp is now UTC). This was a smaller bug from my side - I have written times in current time zone instead of UTC as required by the GPX standard.

  • Fixed incorrect presentation of tracks in OSM map editing mode. I have originally written timestamps to the log very precisely - up to fractions of second (in "HH:mm:ss.SS" format to be exact). It is inline with the GPX specification, and such logs were indeed correctly understood by the API. However Potlatch has shown these logs as if the first point were somewhere far away. This was actually more difficult to find than to fix: timestamps are now written with up to 1 second preciseness.

  • Same positions are written in log just once. If you have to stop and wait for a moment, the 1.0 would keep writing the same coordinates into the log all the time. This increases upload time, but is of no use for map creation. Now, if you don't move, coordinate updates are shown on the screen (I hope to implement filtering at some point in time, I will need the best timing there), but not written into log.

  • More detailed error reporting for location errors. You shall never see it, actually. But in case if something is totally wrong, e.g. you have an iPod Touch or you are in a flight mode, you will now get a correct error message.

  • More robust in low memory situations. Again, you shall never see it. The application is very careful of how it uses iPhone's memory. However, if other applications on your iPhone appear to have memory leaks, the leaked memory is not automatically cleaned when application exits. Thus it may appear that my application may be the unlucky one that encounters low memory situation and I should take care of it.

UPDATE: The update is available on the App Store since November, 20th.

Sunday, November 9, 2008

Battery life

As you know, to save battery iPhone goes to stand-by if no touches have been made for certain time. Unfortunately, in stand-by a running application is sent to sleep as well, it is not able to perform any operations. Fortunately, it is possible for an application to switch off the stand-by timer (though if you press stand-by button iPhone will still go to standby).

For the OSMTrack application, I do switch off the timer during the logging phase. Obviously, it has a disadvantage to waste your battery very fast (I have not measured, but others report something like 3 hours). Be warned.

UPDATE: I have tested it yesterday, and it took me approximately 2 hours to go from full battery to below 20% (I got low battery warning). So best of all, connect your iPhone to some power supply when logging...

Saturday, November 8, 2008

Available on the App Store!

The application has been approved and is now available on the App Store. (On iPhone go to the App Store and search for OSMTrack.)

Tuesday, November 4, 2008

1.0 is ready!

Though it has taken longer than I have ever expected, I finally managed to finalize the first version of the application and sent it today to Apple for review. Thanks a lot for waiting! I will let you know as soon as it will be approved (I hope it will).