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 ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: How to calculate distance between two droids?

  1. Droid Newbie
    Chrispyk's Avatar
    Member #
    182504
    Join Date
    Mar 2011
    Posts
    4
    Phone
    Enter Current Phone Model Here
    #1

    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!
  2. Sponsor
    DF Advertising
    Join Date
    Nov 2008
    Location
    DroidForums.net
     
     
     
     
  3. Master Droid
    Skull One's Avatar
    Member #
    45849
    Join Date
    Mar 2010
    Posts
    757
    Liked
    9 times
    Phone
    iPhone 4S daily. Droid and DX
    #2
    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?
  4. Droid Newbie
    Chrispyk's Avatar
    Member #
    182504
    Join Date
    Mar 2011
    Posts
    4
    Phone
    Enter Current Phone Model Here
    #3

    Red face

    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.
  5. Droid Ninja
    Snow02's Avatar
    Member #
    159755
    Join Date
    Jan 2011
    Posts
    1,343
    Liked
    25 times
    Phone
    Droid X
    #4
    It sounds like this might be a good place to start.
    http://developer.android.com/guide/t...-location.html
  6. Master Droid
    Skull One's Avatar
    Member #
    45849
    Join Date
    Mar 2010
    Posts
    757
    Liked
    9 times
    Phone
    iPhone 4S daily. Droid and DX
    #5
    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?
  7. Droid Newbie
    Chrispyk's Avatar
    Member #
    182504
    Join Date
    Mar 2011
    Posts
    4
    Phone
    Enter Current Phone Model Here
    #6
    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.
  8. Droid Newbie
    Chrispyk's Avatar
    Member #
    182504
    Join Date
    Mar 2011
    Posts
    4
    Phone
    Enter Current Phone Model Here
    #7
    And that link is incredibly helpful, btw. Many thanks, Snow02.
  9. Droid Ninja
    Snow02's Avatar
    Member #
    159755
    Join Date
    Jan 2011
    Posts
    1,343
    Liked
    25 times
    Phone
    Droid X
    #8
    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.
  10. Master Droid
    Skull One's Avatar
    Member #
    45849
    Join Date
    Mar 2010
    Posts
    757
    Liked
    9 times
    Phone
    iPhone 4S daily. Droid and DX
    #9
    Quote Originally Posted by Chrispyk View Post
    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?

Sponsors

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. Cake - The Distance
    By tpoynor in forum Droid Ringtones
    Replies: 0
    Last Post: 03-08-2010, 12:36 AM
  2. Measuring Distance
    By homemadehitshow in forum Droid Applications
    Replies: 11
    Last Post: 02-23-2010, 03:07 PM
  3. Distance Traveled app?
    By kidtelex in forum Droid Applications
    Replies: 1
    Last Post: 01-10-2010, 09:58 AM
  4. Short Distance Navigational IM
    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