I am working on an app that will leverage the geolocation to update the location of either vehicles or other "parked" items within a specific area, either large parking lot or other outdoor facility. I can build this app either as an HTML5 app and use phonegap to distribute it to both ios and android or I can build as an ios native app. My first question is in regards to which is more accurate the native ios geolocation services or the HTML5 (I am assuming browser) capabilities? My second question is, in order for me to get the most accurate reading, will I need to know the coordinates for the boundries of the area in question and then calculate position based on the users location in regards to the boundries? (is this triangulation?) Obviously I have never done anything like this so I am looking for guidance and logic not code. Also I really need to know how to get the greatest accuracy as I have mocked up this app using HTML5 and phone gap and I am not very happy with the level of accuracy. Thanks for your help.
The level of accuracy available to either a native app or HTML5 app is the same. It depends on which mechanism on the device you use to determine position as to the accuracy delivered to your app. The most accurate position that can be obtained is via GPS, as opposed to phone signal triangulation or a WiFi connection. The accuracy of the GPS position you receive isn't related to the mechanism you use to implement your app (native or HTML5) but a function of the hardware that the device is running (i.e. the GPS receiver), the geographical location, weather conditions, etc.
In answer to your second question, there's nothing you need to (or can) do in terms of implementing your app to improve the accuracy of the GPS position you receive. You can, however, choose to ignore readings which are outside of minimum level of accuracy (the data returned in the geolocation message contains an estimated level of accuracy).
I've implemented an app using Phonegap and during testing found the average accuracy of the GPS positions returned to be within 2 to 6 metres depending on the device.
If you're using Phonegap, make sure to use the "enableHighAccuracy" parameter when requesting a position to make sure a GPS fix is requested from the underlying OS. Beware though that even if you do this, inaccurate positions can still be returned so it's best to set up a filter to reject any that are too inaccurate.
Hope this helps.
Related
I've read through the SDK documentation for both Windows and Android and found some functions for accessing the state of the current GPS connection and Latitude/longitude information.
I am looking to develop an application that uses 3d photogrammatry to monitor a set area in real time and am worried that built-in localization might not update the model accurately enough.
So I am wondering if there is a way to get the lower-level information like connection strength and specific connected satellites. (to compare to GPS information from the ground for better accuracy.) Is this supported? (maybe in specific drones?) Or is my only option to attatch a GPS device to it that I then access seperately?
I also know that DJI offers a drone with GPS-RTK to give this accuracy but I'm looking at alternative approaches because of the big step up in cost.
Any information / suggestions would be of great help! Thanks.
I am sorry to report but there is no access to the raw data from the GPS sensors. The information you found in the SDK documentation is all that is available.
How accurate are you looking for? Generally the accuracy is pretty close, certainly within 1 foot or so and there is specifications for GPS accuracy in specific drone's manuals.
There isn't any more info you can get from the sdk.
I guess you looking for raw meassurements? There is nothing that points to that's possible, even in the dumledore messages.
You better stick with the newer drones, since they seems to use dual freq gps, starting from mini2. Very accurate.
Havn't tried the mavic3 but my guess is that they switched to the same gps-chip as in the mini2.
Ne aware that gps lat/lon you get is actually fused with the imu.
I'm trying to find a good way to track location of people in a building. I would ultimately like to be able to create a graphic on demand showing where employees are in a building - which floor (elevation), and where on the floor they are located (lat/lon). I have read that elevation is relative to the WGS84 ellipsoid, not sea level necessarily, which is fine. I can define a baseline of where the first floor is, for example, and then calculate the difference of a person's current location from there. If I understand correctly, the general precision lat/lon for a GPS is as fine as 1m, which should be sufficient for me.
Part of my problem is finding a device to use for employees to carry around. The other is finding a device with a supported API (read: "free API") or other programming options. I would like this to be manufacturer-independent.
I would love to do cross-platform development - iOS, Android, PC, web, etc.
Does anyone have experience with something like this, and what recommendations can you offer on where to start? I know this is a little open ended but I'm not sure where to start.
Thanks.
This all does not work (tracking within a building).
GPS Signal is very poor or non existent within a building.
(Next time search here on Stackoverflow. It has been asked some times.)
The only robust and working solution, are BlueTooth beacons.
Such small hardware pieces are mounted within the building.
Such beacons (search for iBeacon) just send out an id.
The phone receives the id, and the approximate distance to it.
You have to administrate and know which id is at which level of the building.
Even when having good reception the GPS signal is not precise enough to determine the floor a person is location.
Some phones have a barometer, like the ipHone, this can track relative heigh changes, and may be used to determine level within a building. (Once calibrated before entering the buulding)
I am trying to get the user's speed from their Android device, but which is the most reliable way to do it?
There is the location.getSpeed() function that uses GPS; is this a reliable way to obtain the speed? Should I instead calculate speed manually using GPS coordinates obtained? Or is there another way that I'm missing to accomplish this?
IMO, best current approach on Android is to use Location.getSpeed() along with the Google Services Location API and the fused location provider. Then, reality-check this value against Google Play Services Activity Recognition.
The fused location provider integrates some other on-board sensors to tweak location data, which is better than GPS alone. Then, check the ActivityRecognition.getMostProbableActivity() method. If the DetectedActivity is type STILL, your true speed is probably equal to 0. If its ON_FOOT, it's probably a low speed (e.g., 1 m/s). If its ON_BICYCLE or IN_VEHICLE, you're probably fine relying on the speed output obtained directly from Location.getSpeed(). You'll also want to check the DetectedActivity.getConfidence() value too, and set your own threshold for a confidence level you feed "confident" with :) when relying on these values.
I'd also definitely suggest that you do NOT simply average sequential positions to get an average speed between two position (if you do this, it needs to be an average over a large number of positions). In my benchmarking on mobile devices (see my dissertation here, pages 105-106, and 137-138 especially), I've found instantaneous speed calculated by the GPS subsystem (which is typically based off of the Doppler shift of GPS carrier signals) to be far more accurate than the positions derived from GPS. 95th percentile of speed observed while stationary indoors (using assisted GPS only, no sensor fusion) was 1 m/s on a Sanyo Pro 200 I tested. I was able to filter out a significant number of position outliers using speed data (see page 137-138) in some intelligent energy management techniques I was evaluating. With sensor fusion, and activity recognition to help filter outliers, accuracy should be better than this on a similar device.
Finally, and I can't emphasis this enough, do you own testing on real devices, as many as you can get a hold off, and preferably the most popular models out there. Android has a variety of OEMs putting out devices, which will all have their eccentricities. Your best bet it to create a solution that targets the most popular models, acknowledging that it's unrealistic to get a solution working perfectly on all models.
It seems that the getSpeed() method is not always reliable, especially at low speed and when gps coverage is not optimal.
You can have a look at this question and this one which are both about alternatives for getSpeed().
The android developper page however says that you'll get better performance by using the Google Location API.
So it appears that the choice is depending on the usage of your app: if you target slow displacement in area with poor gps coverage (walking in the wood), use your own implementation. Fast in area with good GPS coverage, use the Google Location API.
The best way for devices that are moving faster than walking speed, is to use directly the location.getSpeed().
For pedestrian, or other slow speed situations, this is not quite easy, maybe it is simply impossible to have a valid slow speed that is valid at the moment.
Some try to evaluate the history and do an averaging, or threshold based approach, this will improve for a specific application / usage.
But the simplest is to design your App to ignore low speeds.
Some links related to speed:
GPS position correction
Smooth GPS data
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.
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.