gps

Cordova geolocation plugin not getting location from GPS for Android

我怕爱的太早我们不能终老 提交于 2019-12-06 02:56:46
in my Cordova application, I am trying to get user's location from GPS. For that I am using Geolocation plugin . I need to get location after every 10 seconds. I am doing something like: navigator.geolocation.getCurrentPosition( $rootScope.onSuccessForLocation, $rootScope.onErrorForLocation_High, {maximumAge:600000, timeout:7000, enableHighAccuracy: true} ); Now when this code runs, it gives me location in callback method but its not coming from GPS as when app starts the GPS icon should appear and starts blinking in status bar. But it is not happening. I had an old app which is using same

How accurate is CLLocation accuracy?

自闭症网瘾萝莉.ら 提交于 2019-12-06 02:45:22
问题 I'd like to use reliable locations, even on an old iphone. However, many readings (particularly from cell towers) are too inaccurate. I think. When I plot my position + accuracy radius (or look at google maps app), I notice the center of the estimated circle is generally close to my physical location. I'm guessing that if I cut the "accuracy" number in half, I'll still be in the circle 99% of the time. I believe this is a probabilistic game - the location manager is trying to provide an

Location Manager not working in Android 4.0.2 Emulator

萝らか妹 提交于 2019-12-06 02:32:02
I am using Location Manager for GPS tracking in my application. The app returns apt location while using in Android 2.2,2.3.3 emulators and devices. But, Strangely i tested the app in Emulator 4.0.2 . It returns force close error as 05-28 15:13:46.584: E/AndroidRuntime(4458): at com.package.TestRun.registerLocationListeners(TestRun.java:191) in logcat . I have implemented the code as below: LocationManager lm; LocationManager lmNet; private void registerLocationListeners() { lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); if (myGPSLocationListener == null ||

Google maps containsLocation on android

六眼飞鱼酱① 提交于 2019-12-06 02:31:07
问题 I'm writing an app that needs to determine whether a user falls within one of several defined zones (based on gps location). The Google maps javascript API has an easy to use function containsLocation(). However I want to be able to do this from an app on android, not a web-based service. Does anyone know if such a call exists in the android version of maps? Any pointers will be helpful! 回答1: A bit late, but here's the answer: com.google.maps.android.PolyUtil.containsLocation() from Google

How to get the most accurate possible speed from GPS in Android

ぐ巨炮叔叔 提交于 2019-12-06 02:09:39
How can I get an accurate speed from GPS in Android? Yes, I am aware of the location.getSpeed() method in the Location class. Problem is, the default implementation returns 0.0 as speed: apparently that is the default behavior . What I'm currently doing, is as follows, consider location objects a and b, where a is taken first, b later: a.distanceTo(b)/(b.getTime()-a.getTime()); (simplified for readability, original code deals with history ArrayList ) Problem is that this is somewhat inaccurate: under normal circumstances, the data points are so close to one another that the GPS inaccuracy

Receive NMEA0183 data from COM PORT C++

守給你的承諾、 提交于 2019-12-06 01:45:23
Hy everybody! I wrote a small gps application in simple C++, what switch the protocoll, send command to the gps chip...etc. The write to the GPS port is working good. But when I try to read the port (for check the accepted commands) I receive a lot of stupid characters. Normally an NMEA output message is something like this: $GPGLL,4916.45,N,12311.12,W,225444,A And I received similar: 1C0CFC14 I dont know whats wrong... This part of my code is the next: LPCVOID buffer[100]; ReadFile(hSerial, buffer, 100, 0, 0); Or an other for log some data: LPCVOID buffer[100]; ReadFile(hSerial, buffer, 100,

How do I determine if the current user location is inside of my MKCoordinateRegion?

陌路散爱 提交于 2019-12-05 23:22:26
问题 I have a coordinate region that I have determined contains the limits of what I want to show for my app. I have set this up as an MKCoordinateRegion with center point lat, longitude and a span. How do I determine if the current userLocation is inside of my coordinate region? 回答1: Use map rects. Here's an example using the map's current visible rect. With regards to your question, you could use convertRegion:toRectToView: to first convert your region to a MKMapRect beforehand. MKMapPoint

How Google Chrome knows my current GPS location and how to use it in my code?

我与影子孤独终老i 提交于 2019-12-05 21:41:44
today i realize that some pages can locate me (im using a laptop with no gps built-in) using google chrome with a an very impresive exactitude, i know that using my IP you can locate me, but not with such presision. Now in google maps you will see a button on top of the yellow men (street view) who locates you using google chrome . How does this work? There is an API to use that? It's also possible with the actual HTML 5 Geolocation functions (only if your browser supports): if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(success, error); } else { alert("Not Supported!");

activate GPS programmatically

你离开我真会死。 提交于 2019-12-05 21:14:52
My application needs the GPS to be on, is there any way to check whether GPS is currently enabled or not and if not , then how to enable. I am using android 2.3 bvaldivielso Android does not allow you to do that. The best thing you can do is checking if the GPS is enabled and if it's not, ask the user to activate it. Here you can see how to know if the GPS is enabled: How do I find out if the GPS of an Android device is enabled You can do it this way..check it out private void turnGPSOn() { String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS

Location accuracy defined - iOS

荒凉一梦 提交于 2019-12-05 21:12:06
问题 What is the statistical intention, even if an approximation, of the returned "accuracy" or "uncertainty" on iOS? For instance Android documentation gives an interpretation of its returned accuracy figure as being approximately one standard deviation in this sense: We define accuracy as the radius of 68% confidence. In other words, if you draw a circle centered at this location's latitude and longitude, and with a radius equal to the accuracy, then there is a 68% probability that the true