Can two cellphones act like radar/sonar with each other? - android

I was wondering if it were possible to have two cellphones interact with one another like a radar/sonar device to be able to find one another or be accurate within maybe 500 yards or so? Also, if there is a way to do it without the GPS or connecting to a cell tower (like being indoors or out in a desert)? Are there any technologies resident in a cellphone that can bounce off each other link radar to find one another basically without the need for gps/cell tower triangulation? Im trying to create a fun app similar to the Ghostbuster's EKG Meter :-)

Wifi direct can reach further than Bluetooth and also transmit data faster http://developer.android.com/guide/topics/wireless/wifip2p.html
But 500 yards seems to be too far for the technology reside in the current mobile phone.

No.
Even going through all the other ways a phone could possibly connect to another phone(bluetooth, ad-hoc networking, wireless network...), you have no frame of reference to calculate distance. You couldn't possibly "ping" another phone, and derive distance from that ping like you could with sonar/radar. You need another fixed point to derive the distance like you could with triangulation, or 2 fixed points with GPS.
Sorry.. doesn't sound feasible.

You can't use Wifi or Bluetooth for this (there is a reason why when installing a pro-network, they do wave propagation models of the building). Sound won't work also, as the sampling rates in iPhone are limited as explained here.

Related

How to distinguish the nearest bluetooth deivce in a small area accurately?

In my app,I use ble(Bluetooth Low Energy) to scan and connect to a nearest bluetooth device(There exists two similar bluetooth devices nearby).I use RSSI to make sure which is nearest and in most cases,it works fine.But I find it not 100% correct when the distances are short.During my test,one is 2 meters away from me and the other is 3 meters,and the RSSI of the farther one comes to be bigger,about 1 in 10 times.Is there any better idea to replace RSSI?
Your problem is very well known and it appears in any localization algorithm using ble beacons. Even if two devices are very close together, they may have different RSSI value due to the Fast fading effect.
The Fast fading originates due to effects of constructive and destructive interference patterns which is caused due to multipath.
To mitigate this problem, you can :
Compare the RSSI during a longer time. Especially if things are moving around, the radio-waves may interfere in a different way. If your receiver is a smartphone for example, the user is not static and a few more RSSI sample will give you a more accurate results.
Add spacial diversity. This can be done by adding another chip with another antenna that will also advertise. If the two antenna are not at the same place, you will have more RSSI data, coming from different path that will interfere in a different way. By doing the mean of the two value you should have better result (ideally combine with a longer acquisition time). But of course it is only possible if you are designing the hardware of the advertising device. Note that this can also allow your reciever to catch more adv for the same time-frame.
Frequency diversity. Make sure your advertiser is configured to use the 3 adv channels.
And of course if the two distances are very different the slow fading will be greater than any fast fading effect and you should not have any trouble.

Find users parked car's location Android

how can I correctly identify if the user is driving or not ? I am trying to make an app where I can find my parked car's location.
The simplest way was to ask user to press a button after parking the car so that my app can remember its location.
But I want my app to be automatic. It should correctly recognize if the user is in vehicle or not without interacting with the user.
I tried out Activity Recognition as well but it does not give me exact/correct result. Even when I am walking it says driving and vice versa. I cannot trust it.
There are several apps in the play store which achieve this. I want to learn this as well.
Would some one take some time and help me out on this. It will be of greate help. Thanks a lot in advance :)
I've never done this before, but here are some things I'd try:
location - mainly, how fast their location is changing. probably not great for slow traffic, but if they are moving 60mph, there's no way they are walking. You could also combine this with map data about known roads, or maybe even use locations of well-known airports to know that someone is more likely flying than driving
use the device's accelerometers to compute it's speed (in conjunction with location info to correct for accumulated error).
have the user connect their device to the car with bluetooth - and then when the connection drops, you know they aren't in their car. Or better yet, figure out if you can just detect they are in the car from strength of the bluetooth signal. Though I'm not sure that's possible.
(maybe) ask your users to use a simple RFID chip in their car, and then use that as an indicator of whether or not the phone is in the car. Of course this has implications on the user experience.
in a different vein, maybe some sensor on the device could pick up vibrations? Just thinking that car rides aren't perfectly smooth, so any vibration sensing + some signal processing (DFT the data, then look for certain low frequencies that correspond to driving - probably low frequency and below audible).
The best? Probably a combination of all of the above. The more signals you can gather, the better. Perhaps you could even collect a bunch of data, and try to use it to train a classifier? Then again, if any one of these signals turns out to be strong enough, you might not need the others. Be sure to test a variety of scenarios, e.g. phone in the cup holder v. in your pocket, city driving & slow traffic v. highway driving / empty streets, etc.
I'd be curious to know if any of these ideas pan out.
Also fwiw, Determining if user is driving using gps appears relevant - though it's a simple speed-based check - if you cruise around a parking lot at 8mph looking for a spot, you'll completely fail at catching where the car is parked if your threshold is 10mph.
If the speed drops from above 40km/h to under 7km/h, and stays low for more than 5 minutes.

Mobile position in relation to each other

Is there any library that can help me determine one mobiles devices position in relation to other?
For example:
Can one iPhone determine that there is another one laying next to it and if so which way is it facing?
I don't know of a way to do what you are asking.
NFC requires the devices to basically touch. Wifi and GPS location services probably don't have the granularity to determine location to that precise level. It would probably be possible to use the location services to determine if two phones were in the same room (not table), and which location. I think in real world, this would with variable results, and not be feasible.
I wonder if the new Wifi Direct technologies provide anything like that.
On Android you can use Near Field Communication

Calculate distance Between Bluetooth device in android

I want to calculate distance Bluetooth Paired device from android mobile. I am new in Android Bluetooth Concept can any one suggest me it's possible or not possible in android sdk.if it's possible post any code or tutorial link!
The Bluetooth signal strength distance relation depends on the devices (built-in Bluetooth device, antenna, actual orientation of device), current way the persons hold their devices, objects in-between... You could measure this for a pair of devices for a given situation and use these information.
A larger and more general solution would incorporate an external Bluetooth network. Bluetooth triangulation is the basic concept, that will help. The link will give an insight on certainties that are achievable with such a setup. Take is as an upper limit, a device to device approach will be worse.
The EE Stack Exchange site has a more complete answer which includes a mention of Apple using 802.11v for determining if Apple Watch is close to a MacBook.
Bluetooth uses radio, and radio travels at the speed of light. A 1cm round trip will take less than 100ps. Timing something that short will be tricky, probably you'll want a 10GHz clock, though there are other options. But even then, Bluetooth isn't designed to instantly echo the radio message. If you receive, process and re-transmit the message, then the processing delay will be much longer than the time of flight, and will vary randomly by at least the period of the clock used with the Bluetooth chip.
You can't. Maybe, you can get approximate value from signal indicator but it's too much subject because of envirounment - is there something between connected devices, some reflection surfaces, etc.
There is a way you can research, is coding a response time. just calculate the bluethooth response time in nano secs, physically measure the distance between the devices and make a tree rule... is the same concept of GPS. This is a Laboratory work. I have a project that i have to develop it, in schedule i will taking it in a month.
OFC, its possible. It just requires ultra precise app, build to calculate "pings" between the two objects - kinda like ekko-location or laser distance measurement - its about how much time a specific signal travels back and forth.

DGPS corrections on Android

I am developing a project that is intended to use the GPS capabilities of an Android phone and a nearby station to compute positioning to a much more precise degree (cm), using RTK DGPS technology.
So far, I haven't been able to see anyone saying they actually managed to perform a similar task (apart from #GPSmaster, who doesn't explain how), and the APK doesn't seem to offer any information from the GPS chip other than location and NMEA message updates. I need, if possible, pseudo-ranges and carrier phases.
I was wondering if:
It would be possible to look for lower level hooks on my phone using native code, or other lower level snooping;
It would be possible to send RTCM corrections to the GPS chip present on one of these devices;
Any ideas?
Generally speaking DGPS is a technique that improves real position accuracy by canceling out most of the atmospheric effects on the GPS signal. In a typical direct GPS measurement there is about a random error in the ranges computed to the satellites due to atmospheric effects. This is why a GPS receiver that is left collecting data in a fixed location will seem to wander with in an error ellipse. For two receiver stations in the same area the atmospheric effects are almost identical and they will wander in parallel within their similarly sized and oriented error ellipses. If one of the two receivers is at a know location then the differences in their apparent GPS locations can be taken and plotted from the true location of the known station to find the true location of the unknown station.
Back in the day (circa 1992) when we had to accomplish DGPS by "post processing" we used to take the raw NEMA data collected at the two stations match up the times, compute the baseline vector and apply it to the known point to find the unknown point. I think the NEMA data we were using was only recorded to the nearest 10 sec. The math isn't really that hard.
I suspect that NEMA GPS messages [http://developer.android.com/reference/android/location/GpsStatus.NmeaListener.html ] from a tablet at a known point (with a clear sky view) could probably be sent over an internet socket to a smart phone (also with a clear sky view), which could then compute the difference and achieve a sub-meter relative location over a distance of few km, even if the assumed Internet transit times were ignored. This technique would probably still work even if the tablet and smart phone were both applying broadcast DGPS adjustments.
With the andvent of Android 7.1, the raw data from GPS chips will be available to developers. (http://gpsworld.com/google-to-provide-raw-gnss-measurements/)
Others seem to have done something similar to what you wish to accomplish (http://gpsworld.com/innovation-precise-positioning-using-raw-gps-measurements-from-android-smartphones/)
No, it is not practical to get any lower level access to the GPS device by an Android application. This has several reasons:
The application has no other means of accessing the GPS device as through the Java based API. Native code is forbidden to use most devices and usually needs a Java wrapper to tunnel through the sandbox for Android sensor devices. This makes up the main security concept.
If native code would have access to the GPS device on a lower level, it would have to cope with several different manufacturers protocols now not abstracted by the API. Best chances are to get access to custom NMEA codes, which may still have device dependent caveats.
Even if lower level access would be possible, one loses the integrated merging of other location sources like WLAN and cellphone carrier, that are presumably merged in native code below the Java API but above the NMEA protocol.
You can use DGPS corrections in Europe via custom application for SISnet receiving correction signals from EGNOS augmentation satellites(http://egnos-portal.gsa.europa.eu/news/egnos-gets-invite-your-smartphone-11). It does however need a subscription (which isn't really open to public yet) to SISnet to obtain username and password for connection to their servers. There's some of SDK published which you may find useful. Just remember that you are limited to C/A signals only (pseudoranges) and you CANNOT get phase data (L1/L2) from those cheap chips inside smartphones.You'd need a precision GNSS receiver such as Trimble BD910 (http://www.trimble.com/gnss-inertial/bd910.aspx?dtID=overview) to be able to access L1 carrier phase signal for GPS & GLONASS. There are however cheaper chips that support SBAS but none are yet installed natively in phones.
Umm. Your android probably has such a crap GPS antenna that achieving cm accuracy is impossible. Maybe if you average the position for days.. usually DGPS support is not published and not many chipsets support it. Last time I saw DGPS implemented it involved hacking the actual GPS chip firmware to add support. Even getting A-GPS to work on a random chipset is iffy since they might not support a documented way of feeding the assistance data.
It should be related with the hardware implementation , rather than the software implementation.
In the reality, GPS is usually accompanied with Wi-Fi or 3G to assist in searching the current position.
RTCM correction can be sent to your android phone using NTRIP 'provider'. Then you need to apply it to your raw GPS in your android.

Categories

Resources