Friday, August 22, 2008

On my next steps

My current goal is to finish a first version of the application ASAP. It will have only a minimal set of features, but it shall work and be available to everyone.

For the next improvement I have two options: either to start with drawing of the current track graphically or to implement smoothing. This update, for sure, will not yet show a graphical map: my goal is to have map rendering locally on the device, and making it a good quality is a very complex task, not for a fast update. For the first step I'm targeting to something similar to what GPS Kit does (only track, without map), but cooler :) It should already use OpenGL, support zooming, flying around, etc.

The second alternative is to implement smoothing, and I'm actually tending more to this option: the graphical presentation of a track is more an eye candy, while eliminating a manual pathway creation is a real improvement.

Smoothing, filtering and navigation

Though I knew that Kalman filter is typically used to correct noisy sensor data, I haven't supposed that there are BOOKS (Global Positioning Systems, Inertial Navigation, and Integration and Kalman Filtering: Theory and Practice Using MATLAB) written on how to apply Kalman filter to combine GPS and accelerometer data to improve localization quality. It seems also that implementing a Kalman filter is not quite a trivial task (one have to take care to avoid the lost of preciseness caused by that the real numbers are stored with limited accuracy only). All in all, I have to read more to be able to implement smoothing algorithm in a correct way. So, I'm not doing any smoothing in the 1.0 and postpone it to a later version.

For those unfamiliar with the subject: smoothing should enable creation of smooth pathways with minimal number of intermediate points directly during the collection of a GPS log. No manual paths creation should be required during the map editing any more.

It's runnng on the device!

Great news: today I have received my iPhone Dev program confirmed (after getting all the prerequisite formalities like receiving my own UStID, etc). I'm now able to install the app on my iPhone 3G and test. As promised, here is the first screenshot:


As you see, the first version is very minimalistic. It consists of a single screen organized from top to bottom to fulfill a single goal: collect a GPS log. At the top of the screen there is a compass (though it is not very useful at the moment: smoothing is yet to be implemented, the compass rotates back and forth due to GPS errors; more details on smoothing is in the next post) and current horizontal and vertical location accuracies as reported by the iPhone's CoreLocation framework. Below follows the current location panel containing the timestamp of last update and the coordinates. The middle panel contains the coordinates of the starting position and the bottom panel contains the coordinates of the final position in the track (not yet reached on the screenshot). You can start/stop tracking using the toolbar button at the bottom and as soon as the track is complete you can either trash it or send to the OSM server. That's it.

Currently everything except sending to the OSM server is implemented and works. I hope to complete the posting to the server in the next few days.

Friday, August 8, 2008

Once again on Open Source and iPhone

It has been discussed a lot recently that iPhone SDK's license agreement prohibit developers to discuss any technical details or issues related to the development. Not that I didn't know that, but a detail that was new for me (I have just never thought about it) is that open source iPhone applications are in fact completely prohibited by the license agreement: making an application open source means sharing its source code, and this is not allowed.

Another detail, or better say a comment made by someone during a discussion of why the BoxOffice (Now Playing) application has been removed from the App Store: Apple could potentially be not very excited of developers getting donations and making their apps free, as it means Apple lose its 30% by not being able to sell the application (read it here: http://forums.macrumors.com/showpost.php?p=5990223&postcount=90). Though, possibly the application has been removed due to the SDK license agreement violation (its source code is available at google code).