How to calculate distance between two droids?
This is a discussion on How to calculate distance between two droids? within the Droid Development forums, part of the Droid Hacking category; Well, let's kill two birds with one thread. I'm new here, and I'm looking to develop a Droid game. I can code it, but I'd ...
-
How to calculate distance between two droids?
Well, let's kill two birds with one thread. I'm new here, and I'm looking to develop a Droid game. I can code it, but I'd like to see if there's some easier way than what I have planned now.
My game needs to know the relative distance between multiple droid phones and one central droid phone (all running my game). I have two theories on how that might be achieved.
1: require a particular GPS program be installed on each phone, and use that data to calculate the distance, or
2: Have one phone put out a signal of some sort, and have other phones use the amplitude of the signal to determine how close they are.
Is anyone familiar enough with this stuff to recommend a solution, or shall I blaze a trail? Thanks in advance!
-
-
First you need to define: What is the granularity of distances you want to measure. IE feet, yards, miles?
Your 1st idea is useless because your app can talk directly to the GPS of the phone without needing to have an extra program.
Your 2nd idea is unworkable under more conditions than I care to list.
Facts are a wonderful thing. They can be proven true or false. Opinions on the other-hand aren't facts and generally get argued to death. I wonder which one is more helpful normally?
-
Ideally, I'd like to have it return feet, but yards is workable. I can't use a margin bigger than that, though.
And sorry about my lack of knowledge on the Droid's capabilities, that's why I'm here.
-
-
Ok feet it is.
Does your app have to work indoors?
How many feet can it be off and not render the data useless?
EDIT:
And Snow02 found the link I was looking for.
Facts are a wonderful thing. They can be proven true or false. Opinions on the other-hand aren't facts and generally get argued to death. I wonder which one is more helpful normally?
-
It's all for outdoors (if they go indoors, they lose). And it can be off by no more than 2-3 yards and still be accurate enough for my purposes. Obviously, less than that is better, but I know battery life can be an issue.
-
And that link is incredibly helpful, btw. Many thanks, Snow02.
-
No problem. That's the go-to site for any android app development questions. For the most part, it does a great job of walking you through implementing specific features. Best of luck.
And you might want to check out the game Home Invasion. It sounds very similar to what you're working on.
-

Originally Posted by
Chrispyk
It's all for outdoors (if they go indoors, they lose). And it can be off by no more than 2-3 yards and still be accurate enough for my purposes. Obviously, less than that is better, but I know battery life can be an issue.
Excellent, so you can use true GPS to determine position instead of cell tower data.
If memory serves, been a while since I played with the live data, you need 4 sats to get a 3D fix on your location. But the float error can be as large as 900 feet. 5 sats can get you down into the 150 feet float error area. 6 sats can get you down into the 30 foot. 7 sats can get you down to 15 feet. But if you do averaging of the data over time you can actually reduce this issue greatly.
Buildings higher than 10 feet could screw with your accuracy if the sat is low on the horizon.
There is also the issue of drift, that can screw up your positioning data. WAAS is used to correct that and I am unsure if the Android OS has access to that data.
Facts are a wonderful thing. They can be proven true or false. Opinions on the other-hand aren't facts and generally get argued to death. I wonder which one is more helpful normally?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Similar Threads
-
By tpoynor in forum Droid Ringtones
Replies: 0
Last Post: 03-08-2010, 12:36 AM
-
By homemadehitshow in forum Droid Applications
Replies: 11
Last Post: 02-23-2010, 03:07 PM
-
By kidtelex in forum Droid Applications
Replies: 1
Last Post: 01-10-2010, 09:58 AM
-
By goodnluck2000 in forum Droid Development
Replies: 9
Last Post: 12-01-2009, 09:13 PM
Search tags for this page
android bluetooth sinal string sort
,
android calculate distance
,
android calculate distance between two phones
,
android distance between
,
android distance between phones
,
android distancebetween
,
android measure distance
,
check distance between phone android
,
distance between phones
,
how to calculate distence in android
,
how to develop distance in android
,
measure distance between two android devices
,
measure distance between two cell phones
,
measure distance between two phones
,
measuring distance between cell phones
Click on a term to search our site for related topics.
Tags for this Thread