Task: detect is smartphone in a building (not a street) now.
What is the ways to implement this?
I see one way: switch on GPS and detect signal quality. Is there any other ways? May be it possibly with another sensors?
Please check out Google's Project Tango. It is a concept of a surroundings-aware device and it could be the answer to your problem. It is still in development, but there is already one phone available that supports it - Lenovo's Phab 2 Pro.
Apart from the above, there is no reliable way to detect if the device is inside, as signal strength and quality may vary even in open areas.
I think you couldn't achive it using "GPS signal quality" because it depends on how many satellites you will catch. Better way is to get actual position via GPS and make map-mask. For example if you're using Google Maps there are a lot of buildings so if your location "overlay" building - you are inside. This is just general case.
P.S. Even GPS with tens of satellites won`t guarantees accurate position.
Related
I would like to make an app which is keep tracking various points in a room in 3D and can tell where to look up the tracked points again.
The problem is: I can't use GPS and Wifi points to determine my phone's location and orientation.
So far I know two things which can be useful in this case, the gravitation force, and magnetic north. It is not a problem if there is some misleading fake magnetic north unless it is too close to the room where I want to locate things.
I found that the gyro + acceleration isn't accurate enough to use, is there a "ready made" API what I can use for that? I have the feeling I am reinventing the wheel.
Thanks in advance.
There is only one "ready made" API - Fused locations ( https://developer.android.com/google/play-services/location.html ). But currently it relies on GPS/WiFi/Cell-tower data. I don't beleive there is easy/cheap solution for your problem.
You could use bunch of Bluetooth devices, maybe some BT4 low power tags. Place them everywhere in the room and measure signal strength of each.
I want to develop an application in which I need to know the position of my device within a building (the room in which the device currently is). GPS is not working in the building. Is there any way to find the position of the device in building? If yes how? Can i use position or motion sensors or combination of these for this purpose?
There is no general solution. In case you can place WiFi hotspots/repeaters in the building (preferably in every room), you can triangulate the position from the WiFi signal strengths. But that's also not straightforward, because of different signal losses through the walls and floors. You'll need to survey the building and make a signal strength map in advance and then, based on the signals you receive, look up your location on the map.
Motion sensors are also not precise enough and compass, if you are inside a steel construction, is inaccurate, too.
You can try using the Network to locate the user. If the signal is strong enough, it should return a decent location fix, though not as accurate as GPS
Unfortunately there is no easy solution. Network location is out of the question, since it is not precise enough to show buildings, not even mentioning rooms.
The only way I could think of for this to work is to use external sensors in building and somehow connect them with the device.
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.
I'm new in Android and I would like to ask you is there any possible way to know if the Android phone moved about 5 meters from its current location ?
One idea is to use the accelerometer to detect when the phone is moving. Naturally, you can't estimate the distance moved very accurately, but it might work for your application. If the accelerometer says the phone is moving for more than 5 seconds or so (maybe you can detect a pattern of movement?) you might infer that the phone moved significantly from its original position.
Of course, the user can trick your app by shaking the phone...
A good resource concerning GPS can be found at the official site: http://www.gps.gov/systems/gps/performance/accuracy/
The short answer, however, is that the GPS accuracy of a specific phone at a given moment is dependent upon several variables. Those that are most pertinent to your question would be the actual hardware of the device, and the environmental conditions at present. Typically, a phone under good conditions can expect at best 10m of lateral accuracy. Taking into account poor conditions, local interference, limited satellite connectivity, etc, can push the error of a reading much higher. Unfortunately, consistently and precisely measuring a movement of 5m is unlikely.
After doing some asking around and reading, it sounds like you're lucky to get even within 10 meters of accuracy with a GPS on a mobile device (specifically Android).
I've seen a video that shows a home-made device reading out to several decimals. Is this only because of the data format from the chip? (aka, not really precise either?)
Is there any real working way that I can use an Android device to track real static positions within rooms in a building?
Ideally, I'd be able to mark a point in a room and come back to it later with virtually no drift.
The LocationProvider is different from each Android Device you are using. The SDK does not handle the calculation of your exact location but the phone does. But each device can have one or mare LocationProvider, thats why you need to set some Criterias when your picking a LocationProvider.
To get your exact position on the earth the GPS needs 3 points from 3 different satellites. Thats why the GPS works best in the open space. Regarding making a precise calculation on a static persion inside a building, this conflict with the whole scenario of the GPS-System. I'm not saying it's impossible to get a location inside a building but as with any other signals, obstacles that blocks the signal makes is weaker.
If you are inside a barn with thin walls this might work, but inside a 10 storage building your scenario seems quite impossible.
You can though force your phone to get the best LocationProvider and hopefully that will give you the most precise location. And yes, you can get inside 1-2m in precision outside.
I hope this helps a little. Enjoy your project.