Learning the git, Mobidentica now Open Source

I’m learning to use the git, distributed version control system. It seems to be much faster then Subversion that I have used with my Google Code projects. I just created a repository on GitHub for Mobidentica project. Source code is available under the Apache License 2.0. If you like to clone the repository, use this:

git clone git://github.com/tlaukkanen/mobidentica.git

I’ll have to see if I’ll start using git with those projects that are on Google Code as it seems to be possible too: Benjamin Lynn from Google Developer Programs wrote a blog post on how to use git on Google Code projects.

Optimizing Trail Recording

I coded a prototype how we could record fewer GPS positions in Mobile Trail Explorer and therefore save some memory but still have the same level of detail of the trail. Video might explain it best. Unoptimized recording is on the left and optimized trail is on the right.

The algorithm simply checks if the current direction have changed since last recorded position. If direction isn’t changed over the tolerance value then we can replace the last position with current position. Otherwise we only append the new position to the trail.

  1. public boolean canRemovePreviousPosition(
  2.         Vector<GpsPosition> positions,
  3.         GpsPosition pos1) {
  4.  
  5.     if(positions.size()<2) {
  6.         return false;
  7.     }
  8.  
  9.     GpsPosition pos2 = positions.elementAt(
  10.             positions.size()-2 );
  11.     GpsPosition pos3 = positions.elementAt(
  12.             positions.size()-1 );
  13.  
  14.     // Calculate last angle of trail
  15.     double latDelta = pos2.lat – pos3.lat;
  16.     double lonDelta = pos2.lon – pos3.lon;
  17.     double lastAngle = Math.atan(latDelta/lonDelta);
  18.  
  19.     // Calculate current angle
  20.     double latDelta2 = pos3.lat – pos1.lat;
  21.     double lonDelta2 = pos3.lon – pos1.lon;
  22.     double currentAngle =
  23.             Math.atan(latDelta2/lonDelta2);
  24.  
  25.     // Get absolute value of direction change
  26.     double angleDelta =
  27.             Math.abs(lastAngle – currentAngle);
  28.  
  29.     // Check the tolerance (0.105 radians = 6 degrees)
  30.     if(angleDelta>0.105) {
  31.         return false;
  32.     } else {
  33.         return true;
  34.     }
  35. }

Adding Laconi.ca support

I just coded a new version of Mobidentica application. Now you can define custom service URL when logging in. This way you can use it with all services that are built on top of Laconi.ca platform. This is possible because Laconi.ca has built-in support for Twitter compatible API.

I just tried it with identi.ca and miggi.fi services and it works great with both of them. You can download the latest release (v1.1) from here and try it out yourself.

What about next version? Maybe support for having multiple account support so that you could have timeline showing status updates from multiple services (like Twitter, Identi.ca and miggi.fi). When updating status you most likely would select a service where you want to publish your status. Any thoughts?

Mobile Trail Explorer v1.14

It took a while to make this release. There was some kinky issues with the S40 devices which caused them to crash on NoMethodFoundException (Issue 145). Release notes for v1.14:

  • New logo and icon (Thanks Ash)
  • Improved MapCache initialization time
  • Fixed information screen scrolling
  • Splash screen hang fix (Issue 106)
  • WGS84 coordinates in degrees and minutes (Issue 162, Thanks Marco van Eck)
  • Fixed NullPointerException, NoMethodFoundException with S40 devices (Issue 145, 164)
  • NoSuchFieldError fixed (Issue 166)
  • Added decimal check to calculate time form (Issue 167)
  • Multiple formats for audio recording
  • …plus other minor fixes and features

Download binaries from here. Download source code from Google Code, here. Enter your issues here. Discuss about features and problems here.

Mobile Client for Identi.ca

My Twitter client, Twim, is getting a lot of positive feedback from users which is always nice to hear. There have also been few requests to create a version for Identi.ca service. Identi.ca is same soft of microblogging service as Twitter but maybe a bit different kind of users.

IMG_4897

Mobidentica running on Nokia E71

Today I spent few hours to create a port from Twim to Identi.ca. It was pretty easy since laconi.ca has Twitter compatible API so basically all I had to do was to change the URLs in the API calls. I also changed some graphics to make it more appealing for Identi.ca users :)

IMG_4899

Public Timeline of identi.ca

Check out the application page for more details and download links. I’ll also release the source code shortly.

By the way, my identi.ca account is here: http://identi.ca/tlaukkanen/