gps

Android: How to reset and download A-GPS data?

匿名 (未验证) 提交于 2019-12-03 01:06:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How can I programmatically reset and download new A-GPS data in an Android application? In other words, how do the "Manage A-GPS state" tools work in the GPS Status & Toolbox app? 回答1: You should be able to use LocationManager.sendExtraCommand(String provider, String command, Bundle extras) . This will allow you to delete all or part of the GPS data, so it will redownload it. The docs are here , but a quick rundown of the arguments, referenced from this code (for a GPS Provider): For provider , use LocationManager.GPS_PROVIDER . For command

Android mock gps provider

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My code snippet is: mLocationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); if(mLocationManager.getProvider(LocationManager.GPS_PROVIDER) != null) { mLocationManager.removeTestProvider(LocationManager.GPS_PROVIDER); } mLocationManager.addTestProvider(LocationManager.GPS_PROVIDER, "requiresNetwork" == "", "requiresSatellite" == "", "requiresCell" == "", "hasMonetaryCost" == "", "supportsAltitude" == "", "supportsSpeed" == "", "supportsBearing" == "", android.location.Criteria.POWER_LOW, android.location.Criteria

GPS: How NTP time injection works

本小妞迷上赌 提交于 2019-12-03 01:04:39
问题 I've recently known about a gps.conf file in the /system/etc/ directory. Seems that tweaking NTP_SERVER values to NTP servers nearer to the usual location improves TTFF. Reading the source code in the LocationProvider class, seems that at boot, time is retrieved from NTP server and "injected" in the calculations. AFAIK each GPS sat has a very accurate atomic clock, and every one in the constellation is synchronized to the so called "GPS time". Once the receiver has got 4 or more satellites,

How to get coordinates of an address in android

▼魔方 西西 提交于 2019-12-03 01:04:20
问题 How do i get gps co-ordinates of the location/address entered by user in android ? 回答1: Geocoder geocoder = new Geocoder(<your context>); List<Address> addresses; addresses = geocoder.getFromLocationName(<String address>, 1); if(addresses.size() > 0) { double latitude= addresses.get(0).getLatitude(); double longitude= addresses.get(0).getLongitude(); } 回答2: You can use Android's Geocoder to do reverse geocoding: Geocoder geocoder = new Geocoder(this, Locale.getDefault()); List<Address>

GPS Timestamp with Dronekit-python API

匿名 (未验证) 提交于 2019-12-03 01:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm currently using the Dronekit-python API with MAVProxy to log attitude from a Pixhawk on an onboard computer running Linux. These measurements need to be integrated with external data for image processing, and I'm hoping to use a GPS timestamp for synchronization. The time of interest is time_utc in MAVLink message #63 (GLOBAL_POSITION_INT_COV), as documented here , and I was unable to find any GPS timestamp parameter listed in the DroneKit-Python API Reference . I'd appreciate any suggestions on retrieving the timestamp. 文章来源: GPS

How do I programmatically find direction on a blackberry?

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How do I programmatically find direction on a blackberry using GPS? 回答1: With GPS, the minimum resolution is aroud 3 meters. If you take consecutive GPS readings and look for significant changes in a given direction, it will give you a rough estimate of the direction of travel, and thus a probable direction the person is facing. This is not nearly as good as having a magnetic compass, which none of the Blackberries (Blackberrys?) on the market currently have. Some GPS systems have two GPS receivers placed beside each other in a known

GPS Provider unknown error in Set Mock Location?

匿名 (未验证) 提交于 2019-12-03 00:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to set my mock location however, I am getting the following error(Provider 'gps' unknown) and not to sure what is wrong? I've got all the permission declared in my manifest.xml along with all the parameters. Mock Location Method //Initiates the method to set the phones location private void setMockLocation() { mLocationManager.removeTestProvider(LocationManager.GPS_PROVIDER); mLocationManager.addTestProvider ( LocationManager.GPS_PROVIDER, "requiresNetwork" == "", "requiresSatellite" == "", "requiresCell" == "", "hasMonetaryCost"

calculating a gps coordinate given a point, bearing and distance

会有一股神秘感。 提交于 2019-12-03 00:48:24
I have a problem which draws my back in some project for some time now. Im basically looking to trap a polygon using x,y points drawn by some script ive written. lat1,lon1 are the center gps cords of the polygon and im looking for its surrounding polygon. here is a part of my code in python: def getcords(lat1,lon1,dr,bearing): lat2=asin(sin(lat1)*cos(dr)+cos(lat1)*sin(dr)*cos(bearing)) lon2=lon1+atan2(sin(bearing)*sin(dr)*cos(lat1),cos(dr)-sin(lat1)*sin(lat2)) return [lat2,lon2] my input goes like this: lat1,lon1 - are given in decimal degrees. -dr is the angular computed by dividing the

how to keep application running in background? keep collecting data?

强颜欢笑 提交于 2019-12-03 00:31:01
UPDATED AT BOTTOM I have written an application that logs the users position, current speed, average speed and top speed. I would like to know how to make the application do the following things: prevent the screen from turning off while it is open on the screen if the user opens another app or returns to the home screen, gets a call etc, the app should keep collecting data (or would it be better to just write all data to a database everytime the location is updated? and maybe have a button to signify when to start and stop collecting data?) here is the code that I have written. (feel free to

android c 如何规避Wunused-parameter等警告错误

匿名 (未验证) 提交于 2019-12-03 00:29:01
1, gps_gateway.cpp:405:35: error: unused parameter 'callbacks' [-Werror,-Wunused-parameter] static int gps_init(GpsCallbacks* callbacks) clang_cflags: ["-Wno-c++11-extensions"], cflags: [ 2, gps_fake.cc:84:10: error: unused variable 'pTmp' [-Werror,-Wunused-variable] =》 "-Wno-unused-variable", 3, gps_gateway.cpp:351:13: error: unused function 'gps_tty_read_thread' [-Werror,-Wunused-function] static void gps_tty_read_thread(void * /*arg*/) =》 "-Wno-unused-function", 文章来源: android c 如何规避Wunused-parameter等警告错误