[android-beginners] Re: Calculating distance between GPS position and way_point

2010-06-03 Thread ckloch
But, then it would be great to get some help understanding the explanation. It says (see http://developer.android.com/reference/android/location/Location.html) The computed distance is stored in results[0]. If results has length 2 or greater, the initial bearing is stored in results[1]. If

Re: [android-beginners] Re: Calculating distance between GPS position and way_point

2010-06-03 Thread TreKing
On Thu, Jun 3, 2010 at 4:13 AM, ckloch htc.kl...@hotmail.com wrote: But what does it mean by length 2 or greater? The length of the array you pass in. If you only care about distance, you pass an array of size 1. If you care about the initial bearing, you pass in an array of size 2. If you

Re: [android-beginners] Re: Calculating distance between GPS position and way_point

2010-06-03 Thread james pruett
compares lat, lon'shttp://www.google.com/codesearch/p?hl=en#Y_-5uvbfPDs/trunk/BackSeatDriverV-RadarLove/src/com/digitalagora/utilities/Converter.javaq=computeLatLongDistance%20package:http://speedlimit%5C.googlecode%5C.comsa=Ncd=2ct=rc bearing is 0-360 degrees. On Thu, Jun 3, 2010 at 10:03 AM,

[android-beginners] Re: Calculating distance between GPS position and way_point

2010-06-02 Thread ckloch
Thank you for your help. The method works fine. I just have one more questions, which solve my current problem regarding the accuracy. I am using the command Location.distanceBetween(lat1, lon1, lat2, lon2, results); to find the distance to a fix point. Unfortunately, my app and I do not agree

Re: [android-beginners] Re: Calculating distance between GPS position and way_point

2010-06-02 Thread TreKing
On Wed, Jun 2, 2010 at 7:07 AM, ckloch htc.kl...@hotmail.com wrote: But what do the different options 1, 2 and 3 in float[] results = new float[1] refer to ? This is explained in the documentation for that function.

[android-beginners] Re: Calculating distance between GPS position and way_point

2010-05-21 Thread ckloch
Thank you for your input. I have tried using it but it seems to be more challenging than expected. I am importíng android.location.location and then trying the line float results [] = distanceBetween(lat_a1, lng_a1, lat_b1, lng_b1); where lat_a1, lng_a1, lat_b1 and lng_b1 have all been converted

Re: [android-beginners] Re: Calculating distance between GPS position and way_point

2010-05-21 Thread TreKing
On Fri, May 21, 2010 at 7:25 AM, ckloch htc.kl...@hotmail.com wrote: I am importíng android.location.location and then trying the line float results [] = distanceBetween(lat_a1, lng_a1, lat_b1, lng_b1); Well that doesn't make sense since it doesn't match the function signature... My