I want to build a prototype app that allows users to rope off a building such that when others open the app in that roped off area they can be located to that building without fail. Current geolocation services have many toss up scenarios that fail widely in many cases.
What could be a naive approach to overcoming this by potentially adding an additional service (like a simple wifi heat mapper) to clear up some of the location ambiguity in order to create a reliable bound over the location? Are their any APIs in existence to help with such a problem?
Are you talking about some specific buildings or any building that the user has entered? In the first case I would use beacons or IndoorAtlas. Both methods require you to visit the buildings and either install beacons or map it up with IndoorAtlas. With beacons it would be enough just to place one on each exit to keep track of who enters and exists the building.
There's really no possible way to reach building-level accuracy with a method that would be possible the extend to any building. The only exception would be some public buildings, which Google has mapped indoors (read more about the Google indoors project here). However, the list of available locations is still really limited.
Even though not optimal, the easiest way would be to use GPS/core-location for this project. According to our experiments, GPS never shows your location inside the building, where you are currently, but always about 15m outside of it. You could try placing a geofence that is slightly larger than the building itself outside of the locations you wish to use.
Whichever technology you end up using, you can try the Proximi.io API for a super simple solution of keeping track of the locations and geofences/beacons.
Related
I have a service, from which I get the user's location on an interval of time (e.g. 7 seconds). The walking path is displayed on the map, but as you can see there're many invalid locations, since the GPS receiver is trying to obtain the exact current position.
The blue one is the displayed walking path and the black one is the actual walked. I was thinking of using the IMU as kind of a filter in order to check whether the retrieved location is on the path, or the location provider needs more time to update it.
Is it possible doing it in this way?
Yes in theory its possible to improve the GPS position with an IMU, but it requires a Kalman-Filter, which is not trivial to set up correctly and get it working correctly on range of devices. There lots of resources on the internet explaining how a Kalman-Filter works and what it can be used for.
I also recommend reading this blog post: https://blog.maddevs.io/reduce-gps-data-error-on-android-with-kalman-filter-and-accelerometer-43594faed19c . The authors pretty much wanted to achieve the same thing as you by using a Kalman-Filter. They also published a library on github for a Kalman-based location estimation.
I would like to build an app that uses GPS coordinates and then Augments the phone's camera with a straight line to a friends' GPS location and modifies the line graphics accordingly in real-time based on the users' movements.
I'm confused about what to use in order to create it- I've googled for buzz words like Unity, ARkit and python for Android....but I can't really understand what to use and how?
If I do need a server- what service should I use? this one?https://console.firebase.google.com/u/0/?pli=1
and on which platform should I write the app? Unity?
I've seen answers like: Real time sharing of GPS location but all these answers were received quite a long time ago.
Thanks in advance
Unity is the easiest to get started with. You likely won't even need to make use of any AR engines outside of just accessing the camera. You'll just need to know which direction the phone is facing.
You'll need a database to store a user ID and GPS location at minimum.
GPS can be accessed in Unity using Input.location.
Keep in mind that GPS is currently accurate to ~5-10 metres, so at close range your line may be a little off the other device.
I'm developing an application which requires the user's path taken to be recorded, and measured. I'm already familiar with utilizing onLocationChanged to receive location change updates, but how could I use these Location points to create a complete path, encompassing their entire trip from one location to another?
I was thinking I could utilize each Location passed as a point, and simply connect all of the points with a polyline, but this seems to me like it would be a weird and slightly ugly line (as location approximations aren't always super-accurate).
Another idea I had would be to acquire each street the user travels down, and then ultimately connect them all, but I'm not even certain as to how I would perform this.
Any ideas?
The best method would be to have some kind of representation of the map,
then keeping your recent locations in a data structure (omitting too close locations by keeping only locations in fixed deltas, for example).
Then you could match the points to nearest roads, and calculate their projection on them to created a matched path on the map.
Since I've implemented this before, I can tell that it involves quite a bit of work, having some representation of the map as a graph (say using OSM), and knowledge with geometric queries (in PL/PGSQL probably if we talk about OSM).
The trigonometric calculation themselves are rather easy and can be found on the web (E.g. projection of point on a given line).
To get quality results, you'll also have to deal with your progress along the route (I.e. filtering gps points that lead you "backwards" instead of "forward" by mistake due to GPS signal error).
You'd better off starting with a working POC:
Depending on your map implementation (Google / OSM)-
Choose some kind of an online routing provider (http://wiki.openstreetmap.org/wiki/Routing/online_routers).
Then you could send small navigation requests between locations you stored earlier. Since their delta is small, you'll probably get the relevant matched path on the road.
Downsides: You depend on an external service and its quota, and can't serve many clients without paying.
Advantages: You could build a working POC in a small amount of time (~hours)
Either way, you'll be bound to the quality of your given map (e.g. updated roads, turn restrictions) that will determine the correctness of your results.
This Android app developing business is accelerating the brown-to-grey-color conversion of my hair.
Can someone tell me how I'm supposed to get aFunction() to run when the app starts, seeing as I'm not supposed to make a while(true) inside onCreate()?
I've read the tutorial on Android Developer, several other tutorials, multiple questions on here, but none have answered this, seemingly, simple question. Or, at least I haven't been able to find it - without a doubt because I'm asking the wrong question to the great oracle of Amphitheatre Parkway.
The app is my first homemade non-tutorial app, and I'm attempting to make a speedometer based on GPS (obviously). Basic stuff I guess. It needs to update ever so often which I'm using Thread.sleep() for. Setting up LocationManager, getting location, calculating distance and speed is working. Printing the speed is working. Everything, except making it run, is working (he claims in his naivety).
Android development (and in fact most GUI development) is very different than the console development you may have done in the past. The main difference is that GUIs are event-driven. You typically create what are called "callback methods" which respond to events. This allows the system to do other things rather than waiting for a while(true) loop in your app. I am unfamiliar with using GPS in an Android app. You will need to research what callbacks are necessary to deal with GPS notifications. I suggest starting with Making Your App Location Aware and Location and Maps.
I am new to Android development and want to build a first sample application. My goal is to build a tracking application which sends my current location to a remote server. I want to use the collected data to calculate how many hours I spend in well known places like home or work.
Which approach should I use? I think it will be sufficient to use the information of present WLANs to get a good idea about the current location I am at. All the places I am interested in have WLAN with a static SSID. Are there any frameworks I should use or is there a better approach to what I am trying to do? GPS is not a real option, because the most interesting places are indoors and I have no GPS connection there.
I am working on Android 4.0.
As you say, GPS connection doesn`t work indoor, but it is very useful to estimate your current position. How? You could use the function getLastKnownLocation(best) that provides the LocationManager.
If you want to do it by yourself, you could try to get the last position by GPS, to locate a big area, and use the WLANs to estimate it with more accuracy, using the smaller group of radius with your interesting places.
You might want to read the Making Your App Location Aware training guide on the Android developer site. There's also an included sample application.
I actually am working on a similar project. Here is my code for location tracking on android; check it out. It tracks user's location regularly, uses Network location while indoor, and GPS when it could have a fix. It should give you a quick start.