Distance between 2 nexus 7's [duplicate] - distance

This question already has answers here:
distance between android and iphone
(2 answers)
Closed 9 years ago.
I know nexus 7's have bluetooth 4.0 but what I was wondering if you could use bluetooth 4.0 LE to calculate the distance between two devices? I want a very accurate distance calculator between two devices. I asked earlier about an android and an iphone but I am now only concerned with 2 android devices.

No. Bluetooth LE isn't some kind of magic hi-res GPS, it's basically just bluetooth data transfer using lower-powered transmitters.
Distance to the other device affects signal strength, but so do a bunch of other things. It's like trying to use a WiFi signal analyzer to measure the distance to a wifi hotspot. (Try it. You won't have much success!)
Look at the rather over-hyped Hone Keyfinder: The only thing it can tell you is if you're getting closer or further away from your keys. The keys don't know where the phone is, and the phone doesn't know where the keys are.
iBeacon works by having beacons at fixed lat/long, with a low-power transmitter. They broadcast their lat/long, so if you're in range of one, you know where you are. If you have enough beacons near you, you can triangulate based on relative signal strength. iOS devices acting as 'beacons' only makes sense if somehow they have better GPS coverage than you do.

Related

How to measure close distance between two iphone devices using bluetooth?

Can you work out if another iphone is say ~5 horizontal meters away?
This question has been asked here almost identically but a decade is a long time in tech. I have no interest in direction.
How to measure distance between two iphone devices using bluetooth?
Current solution attempts
GPS - This is too inaccurate for <10m
Bluetooth - iBeacon a potential solution for iphones. Similarly, may be too inaccurate due to BT signal interference. At least as SO claims 5 years ago. (How to measure the distance between an iPhone acting like an iBeacon and an Android device)
Have we made any progress here?
There have been no significant changes in the past 5 years. I wrote a blog post with a deep dive into the current state as of 2020. Mobile phones in 2020 have newer bluetooth chipsets than in 2015, and may support Bluetooth 5, but there are no significant new capabilities that improve the reliability distance estimates. Indeed, there are no new proximity sensors on iOS and Android phones (other than NFC, which only measures proximity of a few centimeters away), so it is inappropriate for this use case. What's more, 5 years has made things worse by adding fragmentation, especially on the iOS side. Back in 2015, there were only a few Apple handset variants in common circulation. Now there are over a dozen.
To recap the current state of affairs that is mostly unchanged: you can use one phone to transmit over BLE and another to measure the signal strength and estimate distance. For known transmitters and approximately line of sight conditions (e.g. phones are not in a pocket or purse) measuring whether two phones are 5 meters apart is possible with perhaps a 60 percent confidence interval. Where this falls apart is with three important variables:
Phones and especially Android phones are quite fragmented. Transmitter power and receiver sensitivity are quite unpredictable between models and have a large variance. Apple has much less variance between models, but you still see differences that noticeably affect results.
People often put phones in a case, a purse or a pocket. This throws things off considerably further.
When clear line of sight conditions are not present, results are unreliable as you have said.
Bluetooth 5.1 does offer Angle of Arrival and other features that may improve this, but as of October 2020, neither Android 11 nor iOS 14 support any of these features, making the features unusable with almost any mobile phone.

Which Android device has all possible orientation sensors [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Looking for a device that give maximum possible combination of:
Accelerometer
Gyroscope
Rotation matrix
Linear acceleration
Magnetic field
Rotation vector
Or any other sensor which gives any data about 3D orientation.
OR: Are there devices that embed InvenSense MotionFusion chips?
I'm looking for a device which is already available for sale on market, however any confirmed information about any upcoming devices will help as well.
Thanks.
A couple of Market apps, AndroSensor and Sensor List show actual phone sensors with running data. Good old Nexus One has Accelerometer and Magnetic compass. I assume you want a gyroscope.
My year-old AT&T Galaxy S has a couple of orientation sensors that may add-up to 6 axis but not a true gyro. A wealth of gyroscople links are documented on SO and more details on Galaxy S sensors here.
Max, let us know which device you settle on, please, and how it works out.
Apparently, Galaxy S2 has LOTS of sensors Orientation type of the sensor
My HTC Desire (aka the Nexus One) is an oldish device now and it has all the sensors needed to detect it's orientation in 3 dimensions (gyro) and movement therein (acceleration).
I suspect most phones have these sensors - they're commonly used in Apps and people tend not to use stuff which isn't widely available (like proper multitouch for example).
It must have some sort of light sensor as it has an automatic backlight adjustment too - tho I've never tried to access that for any development purpose.
In fact, those apps which demonstrate sensor values only show a blank against things like temperature sensors which I suspect few devices have!?
If you'd like me to check it for any other sensor value - let me know - but I've developed a few Apps which use those sensors widely so I know they do work...

Is iPhone Proximity detection possible with Bluetooth?

Would it be possible to fill a building with 20 - 30 bluetooth devices that act as proximity detectors and write an app that can calculate location in the building based on distance from the current detected sensors.
I've looked at the GameKit API, but I don't see anything about calculating distance from devices.
Can someone point me in the direction of an Apple API, or a 3rd party API that can be used for this kind of application.
We don't get the low level BlueTooth or WiFi control that would be required to do this. So unless you jailbreak you can't.
Low level Bluetooth can provide RSSI and Trasmit power level at the maximum for any kind of proximity indications.
As I understand it is extremely difficult to calculate the distance from these reliably.
Location services is surprisingly good at estimating location even in a residential area with only secured wireless APs detectable. But how you would add your APs into that DB, I don't know.

What is the range of bluetooth and is it strictly 1:1?

Does anyone know what kind of range can you get from the iPhone
bluetooth? Also, would the connection be strictly one to one? I know you
can choose from a number of peers to connect to but once the connection
is established, it seems you can only transfer data between one peer? So
basically, is it possible to create some kind of "multiplayer" experience?
Just answering the range part of your question...
The 10 meter figure for class 2 devices (of which the iPhone is an example) is very much a guideline.
The range of a Bluetooth device is limited by many real world factors. The 2.4 GHz radio frequency used by Bluetooth is strongly absorbed by water. For example, consider an iPhone connected to a Bluetooth mono headset. If the headset is in one ear and the iPhone is in your trouser pocket on the opposite side of your body, then there's a lot of water between the two devices. This will often cause a significant amount of packet loss in practice (you can hear this in the audio being carried). So, in this case, the range is about one meter.
At the opposite extreme, two class 2 devices separated by nothing more than clear air can get ranges of hundreds of meters.
Other factors that influence things are:
Interference - Lots of things use 2.4 GHz. WiFi, for example can cause problems.
Antenna design - Space and cost constraints often mean that the antenna design is sub-optimal. I don't know how good the iPhone is in this respect.
Walls - Generally walls attenuate Bluetooth signals. However, sometimes they are useful reflectors.
Quality of hardware - Some chips work better than others. Even different firmware revisions of the same chip may perform differently. Different versions of the iPhone probably have (or will have) different chips in them.
Protocol - It is possible to work around poor signal quality with error correction and retransmission. Even if the iPhone SDK forces you to use a particular protocol, careful design of your application can make a difference.
So, in summary, you should probably do some real world tests.
The connection is one-to-one, but you can create an adhoc network with one of the phones acting as the master/coordinator. The other phones would route all their communication through the master/coordinator.
One device can theoretically connect to 7 devices. according to the master-slave role, the device can multiplex between each of them giving the user an impression that you are connected to all of them simultaneously. Bluetooth specification does not stop you from doing that.This is theory.
Now for the iphone, whether it can connect to to more than one device can only be answered by apple or someone who knows the iphone bluetooth API. But I am pretty sure the bluetooth chip inside iphone should be able to connect to more than one device.
Range is essentially going to be good enough for a normal sized room to be covered. It can be longer or shorter depending on environmental circumstances, but remember that bluetooth was created to implement short range connections.
A bluetooth device can be part of a piconet of eight devices, one master and up to seven slaves. The slaves cannot communicate with each other, they must talk through the master, think of a star topology with the master in the center. The iPhone SDK has a GameKit framework that can be used to create the network for multiplayer games. Go to developer.apple.com at look at the GKTank and GKRocket sample code to see how it's used. These games only support two players, but the GameKit framework supports more. Look at the app store and you will see games that have four or more players.
Hope this helps to get started.
Apple iPhone 3G has a Class 2 bluetooth module. Class 2 Bluetooth devices have a communication range of 10 meters.
At a given instance a device can connect to just one device because it follows a master/slave communication model. But still we can perform a multiplexing. So we can virtually connect to more than 1 device and by rapidly changing the connected device.
I found a good article here. It explains bluetooth very well.
According to the my knowledge, multicasting is not impossible with bluetooth. So gaining a multiplayer experience is NOT impossible.
The bluetooth in the iPhone is Class-2, with a 10-meter range, approximately.
Unfortunately I can't answer the other parts of your question.
One device can be connected up to 8 others. It all depends on the iPhone bluetooth API (which I don't know anything about), but with Bluetooth itself you could then send data to multiple devices.
I tether my iPhone to my laptop over bluetooth every day, and I seem to remember having done that at the same time as using a bluetooth headset. YMMV.
It’s the latest incarnation of Bluetooth, the wireless device-to-device technology that allows your phone to talk to headsets, car stereos, keyboards and other devices directly, without the need for a router or shared wireless network.

How accurate is the triangulated GPS of the non-3G iPhone?

Does anyone have any experience with the triangulated GPS used by the non-3G iPhone? How does it compare with 3G positioning? Does the iPhone 3G use triangulation in the event that there is no GPS signal available? Is there anyway to determine the accuracy of the non 3G coordinates? Thanks.
I have done a lot of mobile software with a bunch of different devices including 3G iphones and 3G blackberry's and here is what I have found.
The blackberry and iPhone GPS is really good when you have clear line of sight and at least 9 satellites present. In some dense residential or urban areas you might only get 5-6 satellites which can take a while to converge.
If you do not have a signal, GSM phones like the iPhone will try and find your position using cell tower signal strength but it is NOT as accurate as GPS... not by a long shot.
I have heard, though this has not been confirmed that the iPhone also uses some server side machine learning when it can't find a GPS lock meaning that it takes the average all of the cell towers, plus the average of all the users who have used GPS in your area to try and find your best position. This is sometimes called AGPS or assisted GPS where the GPS information and cell tower strength are used together.
Also, the only thing I can think of for finding the accuracy of the non 3G coordinates would be to programmaticly switch providers in your code, or simply go into preferences and turn off 3G and write an application that does some tests.
The Pragmatic Programmers have a great iPhone SDK book that just added a chapter on using the Location API, so that might be a great place to start.
Hope this helps.
The CLLocation class has the properties 'horizontalAccuracy' (for latitude/longitude) and 'verticalAccuracy' (for elevation).
In addition to cell towers and GPS, locations may also determined by Skyhook Wireless, which has a database of Wi-Fi base station MAC addresses and locations.
When using only GSM towers, it's +/- 500m (it varies greatly, sometimes it's more precise).
If it finds known Wi-Fi network, then it's down to +/- 50m.