I'm attempting to get my phone to update the assisted GPS info.
I've followed the instructions outlined in question
Android: How to reset and download A-GPS data?
This seems to tell GPS to remove the "almanac" SO I'll assume the next time my handheld attempts to connect it will also attempt to get the almanac.
This is not really what I'm looking for, because (at least according to wikipedia) GPS take about 12.5 minutes to get the new almanac. It does indeed feel that long, though I've not timed it. Even 5 minutes seems like a long wait when I'm ready to start a run.
When i was skulking about, I came across "GPS Status & Toolbox." This app downloads the data via wifi or 3g. It's lightning fast and perfectly suited to my needs.
Beyond setting clearing the data, I'm wondering if anyone knows how they accomplish the insertion of the data?
You are confusing two different methods to obtain the almanac necessary for GPS to compute user locations:
Receive and decode the almanac directly from the GPS satellite signal, which is broadcast in its navigation message. This is the part that takes 12.5 minutes (i.e. to download the entire almanac from scratch. In practice, this is only needed after a "cold start" of the GPS receiver). In general, a GPS receiver does not require the almanac to obtain a position solution. Instead it performs a so-called sky search to determine which satellite signals are present.
Receive the almanac from an alternative network (e.g. cellular network) that is dedicated to providing such information. This method is also known as Assisted-GPS (A-GPS). This is the method that smartphone-based receivers will typically use, as it is much faster.
The answer you cited concerns the second method, i.e. telling the system to retrieve an updated almanac from a server.
For those who came to this page due to the headline "Is there a way to download the GPS almanac?" and who want to actually see how the almanac data actually looks, you can always download the current almanac data from the US Navigation Center.
First you must distinguish between
almanach
epheremides
preditced ephermides model
The almanach contains the rough satellite curves, valid for "long" time.
Once received the chip does not need to wait for it each time.
The epheremides contains the detailed satellite orbit modell. They are valid a short time.
The predicted ephermides is a ephermides modell that can predict up to two weeks.
It has to be downloaded form a server, this data is not available through GPS communication. And might be proprietary to specific GPS chip manufacturer.
You can set both the almanach and the epheremides to the chip, via (custom) NMEA or usually the GPS chips properietary binary messages.
How this can be done via a hack on android i cannot tell you.
I expect that android OS does this automatcially without need to have a GPS Status Toolbox
Related
I am writing my Master thesis atm and analyzed about 400 different GPS-Trajectories (paths consisting of a list of longitude/latitude points and an according timestamp) recorded with the MediaQ-App (probably not important) for Android (about 310 trajectories) and iOS (about 90).
When analyzing the time intervals between the timestamps, I was expecting the inaccuracies around the 1 second frequency, in which the timestamps were supposed to be recorded, since neither Android or iOs are real-Time-OS from apps point of view. Still, why are there, what appears to be local peaks in about 200ms steps? Be nice, I do not know a lot about mobile operating systems :-)
(x-axis: seconds, y-axis: the relative probability that a timestamp will be recorded at this point in time. Ignore the exact values of the y-axis...)
The usual behavior is that an App takes the timestamp direct from the location delivered by the system. Most probably this is the case in that App, otheriwse this would be a heavy programming bug. (The delay between nominal GPS time and receiving system time of about 200ms is plausible, I saw that in my app, and in ios Map app, which makes a correction in their map api to extrapolate the location into the future, to try to compensate that delay)
Under android (and ios) it is import to know whether the location are determined exclusively by GPS. On both plattforms (ios, android) an App can set whether GPS only or combined GPS + WLAN + Cell Locationing is used.
For high quality recording is is highly recomended to use GPS only.
A GPS chip once having a location usually outputs a location with a timestamp exactly at 000. Exception can happen before the location is valid.
Under ios if the location was obtained by GPS the millisecond are always 0.
I have no experience with android, but usually the GPS chip itself sets the value to millis = 0. (However, some android phones are known to use a crippled cheap GPS chips, that are not able to get an intial position without the help of an internet conection)
It is possible to determine whether the location was obtained by GPS by looking at the course (or called heading) and speed value, which are invalid for non GPS locations (cell Tower locationing)
To know whether this time variations come from the Application (not using the GPS only mode) or if it is caused by Android, you can test that with another application on the same phone. (E.g Motion-X GPS) (Or by comparing both apps on another android phone)
I'm using intel xdk and cordova for an android app that uses geolocation this is the code that i use:
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(geolocalizacion,error,{enableHighAccuracy:true, maximumAge:Infinity, timeout:100000});
} else {
handleNoGeolocation(false);
}
I don't want to use the 'google location service' because, if that option is disabled, some people can get lost trying to find it in settings, so i'm using enableHighAccuracy:true in order to use GPS.
However with that it takes so much time, almost a minute to call the success function 'geolocalizacion' when the app is used indoors. I know that GPS is better in outdoors (in that case it takes 5 or 7 seconds) but i think 1 minute is too much for indoors.
Am i doing something wrong?
Is there a way to make faster the geolocation with GPS?
or a way to activate the 'google location service' without the user doing anything?.
The GPS signals transmitted by GPS satellites are very weak if you are not located outside. Even if you are outside, weather conditions, tall buildings and other large metal structures can hide or degrade the GPS signal. In addition, the GPS receivers inside of your typical phone or tablet are very low grade receivers and antennas, they are not as capable as the more expensive dedicated GPS devices, due to compromises associated price and physical size.
You should really take a two prong approach: get an initial reading using the "coarse" geo reading, with the geo cache enabled. The coarse reading will use the wifi, network, GPS and cached readings and return it's best estimate based on the parameters you specify, usually within a very reasonable time frame.
Then, after you've established an approximate position (which can be very accurate, as #SeahawksRdaBest points out, if based on the current wifi), switch to the "fine" location setting to get an accurate position. This part of your app can run in the background so it doesn't interrupt the responsiveness of your app, and can then update the position information in your app as more accurate position data becomes available.
One thing to keep in mind, many users have the GPS turned off because it severely degrades battery life. If all your app needs is to "find a restaurant nearby" then the coarse location should be good enough, since you're probably more interested in placing the destination on the map. This will be much more battery friendly, and is one of the reasons that the geo settings on the more recent Android devices have changed to make it harder for an app to enable GPS programmatically.
I see you've added the intel-xdk tag, so you might want to checkout this little geolocation test app that I've put together at https://github.com/xmnboy/hello-cordova. It needs a little work but should help you with some experimentation between coarse and fine settings.
I think you can diversify your app a little.
For example if you are indoors and have a WiFi connection why not use that to triangulate your position? WiFi is highly accurate because theoretically it covers a small space so the phone would know exactly where it is and return a position quickly.(if done right in my experience usually <10 secs).
If a Wifi connection is not found(outdoors). You can always drop back to GPS to provide the coordinates. Plus Gps is "fastest" outside anyways.
Checkout these pages: Stackoverflow discussion. Location Manager Android.
If you want to get really fancy you can even use the Geocoder Android library to get Location addresses etc in human readable form.
How would I verify/ track device location within a 5' accuracy? I've heard of people using cell towers/ gps combinations.
As far as I know, the only way to get a 5 feet accuracy figure is to use GPS, then it still isn't always that accurate depending on how good a fix of the satellites (clear view to the sky) you have.
Cell tower / Wifi triangulation methods only serve to speed up positioning and will seldom (if ever) be more accurate than satellite positioning methods.
GPS is the way to go. Cell towers won't cut it. In Android (and I believe iOS) the system will provide you with an accuracy reading in addition to the actual location. You could use this value to determine whether the value you've received should be uploaded to your server. Keep in mind using the GPS is very battery intensive and there's no guarantee of how good the accuracy will be. Depending on conditions you may not be able to achieve 5' precision.
As #CommonsWare points out, 5' is really unrealistic anyway although you can get close.
As CommonsWare says you will not get much better that 10 metters accuracy in a consummer-grade device. Even in open sky, the atmosphere characteristcs change minute by minute and thats enough to change the GPS readings.
However, it's teoreticaly possible to increase accuracy if you could get all of the following:
1-There are some stationary GPS receiver stations with fixed known locations which measure the current GPS signals deviation. You would need to have one of those close to you and have access to the data in real time.
2-You would need to have low level access to your phone GPS receiver to read the unprocessed data received from sattelites. This would be different from device to device, and as far as I know, no supplier is providing this access.
3-Finnaly, you would need to do all the calculations required to determine your location applying the deviations got from point 1 above.
good luck.
The only way you can get this type of accuracy is with WAAS. As far as I know, there are no Android handsets that can receive WAAS corrections. If this is for a specific controlled situation, you could use a bluetooth gps receiver with WAAS, and only in WAAS supported locations. However, if this was for a wider deployment, then I think you are out of luck.
I hope this is an appropriate question for this group. It is not strictly speaking a programming question unless I end up writing my own NEMA listener instead of the location listener but that would mean a start over on a lot of code. I have written a GPS based application and want to use an external GPS at 5HZ. I have been searching for a couple of hours on Google and this forum with no luck for answers to my problem.
I have been using Android apps to talk to the external GPS. I can get 5Hz with Bluetooth GPS Provider or GPS Mouse but they both have time errors of about 18 seconds (slow). I can get accurate time with Bluetooth GPS but only at 1Hz. I have checked the raw NEMA output of the Qstarz unit and it is correct at both 1Hz and 5Hz.
I am using the standard location listener and everything in the program is working fine. I just want to get 5Hz data and accurate GPS time. At first I thought it was a GPS Leap Second issue but the NEMA data is correct with real time. I use WWV to find real time.
Try:
http://sourceforge.net/projects/bluegps4droid/files/
This app updates mock location at the frequency of the source GPS.
I am using LocationManager to get the values of Latitude and Longitude of a user. These values are updated regularly to a database and find out the distance between two users basing on the stored Latitude and Longitude values.
Now,onLocationchanged() called very slow,some times get fast.while i'm waiting long time to proceed next process.When i 'm in indoor the Location search is very slow..
Is there any solution to this prob.pls give me a guide and example.
Please Accept My question as soon as give me a solution.
If you use network location provider, you will get location faster, but it will be less accurate (100-500m).
OTOH, GPS provider will be more accurate (10-20m) but it will take more time to acquire location as device needs to acquire GPS satellite signals. Sometimes it's not even possible to acquire signals, especially if indoor or beneath thick trees.
Well there are there types of GPS starts :
COLD start: takes a lot of time. The old GPS (satellite/time) data is practically useless.
WARM start : is when the GPS device remembers its last calculated position, almanac used, and UTC Time, but not which satellites were in view. You get the fix fairly fast.
HOT start : is when the GPS device remembers its last calculated position and the satellites in view, the almanac used (information about all the satellites in the constellation), the UTC Time and makes an attempt to lock onto the same satellites and calculate a new position based upon the previous information.
To emulate the warm start case all you have to do is connect to the SUPL network, which provides assistance data. Even cold starts can be converted to a warm start. To make sure that SUPL networks are available, make sure you are connected to the internet. In indoor cases no satellites are visible so getting an exact fix is tough without any assistance data. At least 3 satellites should be visible. Again SUPL networks come to the rescue.
Note that, various GPS chipset have different performances/algorithms and the triangulation time depends on the SUPL networks provided by your Network provider.
You can here more about this here
Good starting point is blog/project by Reto Meier:
http://code.google.com/p/android-protips-location/