gps

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

妖精的绣舞 提交于 2019-12-07 13:08:46
问题 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

Reading USB-GPS info with Python

不羁的心 提交于 2019-12-07 13:04:25
问题 I've written a small python script that uses information from a usb gps dongle. This far I've been working in linux where I could just identify the device in /dev/ and read NMEA data from it using pySerial. This isn't a perfect solution though and it's not platform independent in any way so I started looking at pyUSB to try to communicate with the device. The device: Product name: ND-100S baud rate: 4800 USB class: 0xEF subclass: 2 My problem is that I know very little about usb so I don't

how can i get the mouse click position from my JMapViewer world map

烈酒焚心 提交于 2019-12-07 12:51:49
问题 Im using the JMapViewer jar to show the world map on a JPanel. On the map im adding MapMarkerDot's which are gps points. The problem is when i click a MapMarkerDot on the map i cannot find an interface or listener to catch the click and give me the clicked MapMarkerDot identity. has anyone here worked with the code or can give me some ideas what to do. I would not like to modify the jar source but maybe i have to input an interface. I know this is kind of an abstract question but hoping for

Location Manager not working in Android 4.0.2 Emulator

断了今生、忘了曾经 提交于 2019-12-07 12:33:24
问题 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 =

Cordova geolocation plugin not getting location from GPS for Android

我是研究僧i 提交于 2019-12-07 11:56:50
问题 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

Getting current location in Android Studio app

走远了吗. 提交于 2019-12-07 10:26:35
问题 I am developing my first Android app which should get the latitude and longitude of an android device and send it via a web service to a template document. I followed the guide of getting the location from http://developer.android.com/training/location/retrieve-current.html. This is the code from my .java class: import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.location.Location; import android.location.LocationManager;

how to use/install gps python library

倾然丶 夕夏残阳落幕 提交于 2019-12-07 10:22:25
问题 root@raspberrypi:~# python Python 2.7.3 (default, Jan 13 2013, 11:20:46) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from gps import gps Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name gps >>> exit () it doesn't seem to work. Installed debian packages: gpsd, gpsd-clients, python-gps, libgps20, libgps-dev 回答1: I tried it on an Ubuntu machine and it worked just fine: $ python Python 2.7.3

Q. Android GPS location

放肆的年华 提交于 2019-12-07 10:12:08
问题 I'm trying to access my GPS location of my device, so I can then use this to load Google maps on the user's coordinates. I have followed various guides, but I dont seem to be acquiring any correct values. The app does not crash, it simply displays a zero Here is the code for my maps activity: import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.ActionBarActivity; import android.view.LayoutInflater; import android.view.Menu; import android.view

How get the current latitud and longitud without use getLastKnownLocation method in Android?

社会主义新天地 提交于 2019-12-07 09:48:42
问题 I am trying to get the current position of the phone, for this I use the GPSTracker tutorial, the problem is always use the method getLastKnownLocation and return older position. if (isNetworkEnabled) { locationManager.requestLocationUpdates( LocationManager.NETWORK_PROVIDER, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES, this); Log.d("Network", "Network"); if (locationManager != null) { location = locationManager .getLastKnownLocation(LocationManager.NETWORK_PROVIDER); if (location !=

How to read GPS signal strength in Windows Mobile?

老子叫甜甜 提交于 2019-12-07 08:27:31
问题 How can I read the GPS signal strength from my Compact .NET app in Windows Mobile 5 and/or 6? I've only seen accessors for GPRS and Wi-Fi signal strength in the API. 回答1: Check out the GPS Application Windows Mobile code sample at MSDN. It's what taught me most of what I needed to know to get started with Hineini. 来源: https://stackoverflow.com/questions/2064996/how-to-read-gps-signal-strength-in-windows-mobile