gps

What are the things which reduces (Android) battery time?

百般思念 提交于 2019-12-01 11:31:52
In one of our application we need to use the GPS continuesly ,the purpose is to get the user driving speed. Recently I found that while using the GPS continuesly can drain the device battery. If the GPS device is not used, device battery will work for hours but if the GPS is used it reduces the battery life dramatically. I was wondering that "what are other things" which can reduce the battery time? How we can avoid them ? What are the best practices to use them? Yaqub Ahmad Well i found the answer here, Google I/O 2009 - Coding for Life -- Battery Life, That Is What can I do to increase

convert GPS latitude longitude to Cartesian X and Y

谁说我不能喝 提交于 2019-12-01 11:25:00
I found many algorithms to convert (latitude, longitude) into (X, Y)... however, I cannot verify if the results I'm getting are correct.. I found also this link which does the conversion online.. but I couldn't manage to get any algorithm which gives the same results as the one given by the link.. I would be grateful if anyone has encountered the same problem and can help me iOS solution If you're looking for some ready to go code in Objective-C you can check out UTM converter . It is also available as a CocoaPod. There's a very nice Wikipedia article on UTM . It's got formulas, background,

Time based GPS location in background (iphone)

我的未来我决定 提交于 2019-12-01 11:20:51
I want to create an (game based) iPhone application which sends your GPS location on a specific time (like 3-5 times a day) to a server. I found an apple page explaining some functionality to run in the background like location, music and VOIP. I need the GPS to be accurate on the meter. Can someone help me with a small example? It really depends on your usage of the location. If you monitor actively, kiss the battery of your user goodbye. Very detailed accuracy, even bigger hit to battery. The backgrounding of location is all or nothing as far as accuracy goes. Less hit, less accuracy is

Interpolate between 2 GPS locations based on walking speed

此生再无相见时 提交于 2019-12-01 11:20:26
Problem: Given two locations: L 1 = (latitude 1 , longitude 1 , timestamp 1 ) , L 2 = (latitude 2 , longitude 2 , timestamp 2 ) , and a configurable, but constant, movement speed: v = 1.39 meters per second (for instance). How can we interpolate between these two locations to estimate a users location as he travels from L 1 to L 2 ? I have been searching for solutions to this problem and so far I have found, that for small distances (away from the poles) linear interpolation can be used. So, I looked up linear interpolation on Wikipedia and found this: // Imprecise method which does not

Sensor reading in web worker

☆樱花仙子☆ 提交于 2019-12-01 11:09:10
It seems that we can not get sensor data in the web workers. I wonder the reason behind it. The use case is that I am thinking about getting geolocation data in the worker thread and only send the processed version to the main thread. For GPS, this post says it is not supported in the worker thread (no reason is given). And I double checked it, navigator.geolocation is not supported in web workers. For accelerator and gyroscope, we have DeviceOrientationEvent and DeviceMotionEvent. But we need to use them through the window object, which is not available to the worker thread. The same

Automatically turn on GPS

天涯浪子 提交于 2019-12-01 10:51:33
I googled about it and there were solutions regarding the exploitation of Power Manager Bug to resolve this issue. But as the bug has now been solved. So how can now I solve this issue of starting the GPS when the app starts? Please help. Use this function : private void turnGPSOn(){ String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); if(!provider.contains("gps")){ //if gps is disabled final Intent poke = new Intent(); poke.setClassName("com.android.settings", "com.android.settings.widget.SettingsAppWidgetProvider"); poke.addCategory

how to programmatically remove gps blinking icon from status bar in android (or make it never blink)?

*爱你&永不变心* 提交于 2019-12-01 10:48:00
In my android application which uses GPS, I have UI elemnts that should blink permanently. I was told after a couple of pilot runs that the blinking GPS icon, i.e. when GPS is actually trying to get a fix, steals completely unnecessary bit of user's attention from the main UI. Is there a way to remove the GPS antenna icon from the status bar programmatically from within the application? Or, alternatively, make it never blink? Thanks! You could hide the Status Bar altogether: http://blog.thaichaiguy.com/1600/android-how-to-hide-the-status-bar-and-title-bar/ This is outside of the scope of the

Use service to get GPS location, android?

假装没事ソ 提交于 2019-12-01 10:47:46
问题 This is first time I am using service and it sure looks a lot complicated from activity. So I am trying to get the user's location after he has closed my application with the service. This is my service class. public class LocTrack extends Service { GPSTracker gp; @Override public void onCreate() { gp = new GPSTracker(getApplicationContext()); onLocationChanged(gp); super.onCreate(); } @Override public void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); } @Override public

3516dv300 开启串口 转载

↘锁芯ラ 提交于 2019-12-01 10:03:22
进入新公司参加的第一个项目,采用的是海思的Hi35xxVxx芯片。 我这边负责的模块是GPS模块,利用SDK代码框架,配置海思Hi35xx 芯片的串口,从串口读取GPS模块数据。 首先第一步,配置内核uart: 通过看芯片数据手册,GPS预留接口是 UART4。但是海思芯片未配置UART4。于是我们得从内核源码树配置UART4。 当然,得基于海思的内核patch 来配置,因为,原生内核是未对hi35xx芯片做适配的。 我们进入:osdrv/opensource/kernel/linux-4.9.y/arch/arm/boot/dts/ 目录 修改patch: diff -Naur linux-4.9.y.sdk/arch/arm/boot/dts/hi3559v200-demb.dts linux-4.9.y/arch/arm/boot/dts/hi3559v200-demb.dts --- linux-4.9.y.sdk/arch/arm/boot/dts/hi3559v200-demb.dts 2019-07-09 07:51:20.578954127 +0000 +++ linux-4.9.y/arch/arm/boot/dts/hi3559v200-demb.dts 2019-07-09 07:52:49.770587238 +0000 @@ -39,6 +39,9 @@

Finding intermediate Lattitude Longitude between two given points

蹲街弑〆低调 提交于 2019-12-01 09:56:09
问题 I am provided with this information - Lat-Long of source Lat-Long of destination I need to find the Lat-Long pairs on the path from source to destination. These Lat-Long pairs must differ from each other by some given granularity. Is there some Google API using which I can get this information ? 回答1: The Google Maps API Elevation Service does exactly that. Given a path (defined by your source and destination LatLng pair), you also specify the number of samples and it will return elevation for