Android distancebetween: really strange behavior

Something really strange is going on there.

My application calculates the distance between two points stored in a text file:

Location.distanceBetween(lat1, long1, lat2, long2, res);

      

What I get when I log the following:

Log.d(tag, "lat1: " + lat1 + ", long1: " + long1 + ", lat2: " + lat2 + ", long2: " + long2 + ", dist: " + res[0]);

      

Output on sony smartphone:

lat1: 49.358788, long1: 7.25395, lat2: 49.358771, long2: 7.254031, dist: 6.180519

      

Output to lenovo tablet:

lat1: 49.358788, long1: 7.25395, lat2: 49.358771, long2: 7.254031, dist: 110.74074

      

As you can see, the distance is very different. But why???

The timer works by calculating the distance between two points every second. Most of the calculations are fine, but some of them are completely wrong.

+3
android gps


source to share


No one has answered this question yet

Check out similar questions:

3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up the development of an Android emulator?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
2609
Is there a unique identifier for an Android device?
2510
How to persist android activity state by persisting instance state?
2097
Is there a way to run Python on Android?
1858
"Debug certificate expired" error in Android Eclipse plugins
1844
What is "Context" on Android?
five
How to calculate the angle between two geographic / GPS coordinates?
-2
Getting sine of an angle as double in C ++



All Articles
Loading...
X
Show
Funny
Dev
Pics