gps

How determine if point is within rectangle given all latitude/longitude coordinates?

做~自己de王妃 提交于 2019-11-30 19:09:08
问题 If given x/y coordinates for all 4 corners of rectangle, and then another x/y, it's easy to determine if the point is within the rectangle if top left is 0,0. But what if the coordinates are latitude/longitude where they can be negative (please see attached). Is there a formula that can work in this case? 回答1: Mathematicaly, you could use inequations to determine that. edit: When doing the example, i've noticed you put the coordinates in the inverse format (y,x) instead of (x,y). In my

Android - Process Has Died Issue

一世执手 提交于 2019-11-30 18:45:10
Application simply crashes and finishes the activity without much info. 04-01 13:30:43.739: W/AudioService(180): setMode() client died 04-01 13:30:43.739: W/GpsLocationProvider(180): Unneeded remove listener for uid 1000 04-01 13:30:43.739: D/libloc(180): loc_eng_stop called 04-01 13:30:43.739: I/ActivityManager(180): Process com.company.android (pid 2590)has died. 04-01 13:30:43.739: W/ActivityManager(180): Scheduling restart of crashed service com.company.android/.utilities.OurGPSService in 80000ms Log retrieved is much less, it simply shows that the process just died and causes our GPS

Continuous location updates in background

这一生的挚爱 提交于 2019-11-30 18:15:02
问题 i am developing a application which will send location updates continuously from a background service. i tried following code. public class LocationService extends Service implements LocationListener, GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener { LocationRequest mLocationRequest; LocationClient mLocationClient; @Override public void onCreate() { //creating log file in mobile appendLog(DateFormat.getDateTimeInstance().format(new Date()) + "

Need help in correcting issues in CRC-ITU check method written in Javascript (node.js)

☆樱花仙子☆ 提交于 2019-11-30 18:11:38
问题 We are trying to code GPS device listener on Javascript. While doing this, we are unable to develop the right script for the CRC-ITU error check. The explanation for the crc code generation from protocol document is as below A check code may be used by the terminal or the server to distinguish whether the received information is error or not. To prevent errors occur during data transmission, error check is added to against data misoperation, so as to increase the security and efficiency of

How can I monitor the status of the GPS adapter using Android SDK?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 18:09:26
问题 I need to have my app monitor whether the GPS adapter is anabled or disabled. I don't care about the actual GPS functionality running at the monemt or not -- I need the status of the GPS adapter. I can manually do it by calling: String providers = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); If "gps" is listed, then it's active, otherwise it's not. But I can't find any documentation on getting notified when GPS is enabled or disabled by the user

Android: GPS fallback from fine to coarse

戏子无情 提交于 2019-11-30 18:06:23
问题 Greetings, Does anyone know how I can get coarse GPS coordinates when I don't have a fix and get fine GPS coordinates when I have a fix? I've tried googling for some sample code to no avail. I did find this: http://www.android10.org/index.php/articleslocationmaps/226-android-location-providers-gps-network-passive But I don't know how to implement the fallback to coarse/upgrade to fine. I hope someone can help. Thanks in advance, 回答1: You can find an excellent introduction to the subject in

Is there any GPS library for use in Python?

别等时光非礼了梦想. 提交于 2019-11-30 18:00:28
问题 I am looking for Python library, which can work with GPS coordinates. Let's say, I have a list of coordinates: >>> gps = [ ... (53.25012925, −6.24479338, 349.9, '2011-08-20T09:35:00Z'), ... (53.25028285, -6.24441800, 359.9, '2011-08-20T09:35:30Z'), ... (53.25049500, -6.24266032, 395.9, '2011-08-20T09:36:00Z'), ... # and so on... ... ] >>> I would like to compute average speed, distance, get the higest point, and other info. I know, it is quite simple to compute it, but I am wondering if there

Unbelievably inaccurate GPS points. What is the reason?

三世轮回 提交于 2019-11-30 17:28:14
I have developed an application for Android, for storing user's GPS location. One of my customers gave me his device and I noticed that sometimes the accuracy of the device is really bad and unbelievable. Sometimes the device returns points about 200 kilometers away from the actual location. You can see this in the following GPS location samples for that device. You see that two points are about 200 km away from the real location. The device is Samsung SM-T111 with Android 4.2.2, and I only use a GPS provider for getting locations ( LocationManager.GPS_PROVIDER ). I want to know what causes

onLocationChanged() never called

百般思念 提交于 2019-11-30 17:23:38
I am writing a code that brings current location but it is not giving me the location because it never calls onLocationChanged() .Is there any way to find the location. mobileLocation is coming 0 for this case, so the execution goes to the else block. My code is public class FindLocation { private LocationManager locManager; private LocationListener locListener; private Location mobileLocation; private String provider; public FindLocation(Context ctx){ locManager = (LocationManager) ctx.getSystemService(Context.LOCATION_SERVICE); locListener = new LocationListener() { @Override public void

How to keep background gps service alive

落花浮王杯 提交于 2019-11-30 16:57:34
I'm trying to have a background gps location listener as a service that can be used by all activities in my app. It should also be scanning for locations until I "kill" it. However I realized that after a couple of hours the gps service gets killed and I can't get anymore locations. How do I keep this service alive (the locationManager and location listener at least) until I want it off? Thanks public class GPS extends IntentService { public static LocationListener loc_listener = null; public static LocationManager locationManager = null; public GPS() { super("GPS"); } @Override protected void