Sorry, my mistake. 

The line 

smoothingCoor[i] = smoothingCoor [i] +alpha * (coor[i] - smoothingCoor[i]); 

is correct as it stands. However my comment on your nearing smoothing not 
taking into account the 359 degrees problem is correct.

Two other problems with the code you have posted: I presume that coor is 
declared as int[] coor = new int[2]; and smoothingCoor as int[] 
smoothingCoor = null;

So your line smoothingCorr = coor; causes both variables to refer to the 
same array so coor[0] and smoothingCoor[0] always have the same value. The 
other problem is that smoothLat should be smoothingCoor / 1.0E6. Of course 
smoothLat needs to be a double. In fact I can't see why you convert the 
lat/long values into ints - the smoothing agorithm is going to work better 
on floating point numbers.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to