gps

how to trap the location alert response iphone

雨燕双飞 提交于 2019-12-21 20:38:54
问题 I am using GPS in iphone and it show conformation message for use location service. and i want to trap what user select "Allow" or "No". can any one suggest how i do this? Thank 回答1: You don't get a direct callback from this alert. However, if the user does not allow Core Location usage, you'll receive a -locationManager:didFailWithError: with a kCLErrorDenied error to your CLLocationManagerDelegate . Since iOS 4.2, you can also listen to -locationManager:didChangeAuthorizationStatus: or

android Location Listener

限于喜欢 提交于 2019-12-21 20:18:34
问题 i want to listen to both GPS and NETWORK location provider from the same listener and implementation is this ok for doing that: locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,metersToUpdate,this); locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,0,metersToUpdate,this); will it user the same methods for both providers ? 回答1: Google says here: You can also request location updates from both the GPS and the Network Location Provider by calling

Get GPS start/stop events with addGpsStatusListener

最后都变了- 提交于 2019-12-21 19:53:44
问题 In an application I would like to start a Service that can receive two notification from GPS: GPS_EVENT_STARTED and GPS_EVENT_STOPPED. To do so I've done the following code: package com.test; import android.app.Service; import android.content.Context; import android.content.Intent; import android.location.GpsStatus; import android.location.LocationManager; import android.os.IBinder; import android.util.Log; public class TestNotification extends Service { private LocationManager mLm; private

GPS卫星标准时钟系统

白昼怎懂夜的黑 提交于 2019-12-21 16:58:16
随着科技的进步社会的发展,人们对于时间的精准和统一要求越来越高。各行各业对于时间的精准和统一要求也非常高,比如电力,机场、轻轨、地铁、体育场馆、酒店、医院、部队、油田、水利工程等行业。标准时钟系统SYN4505,为时钟和计算机系统及其它弱电子系统提供标准的时间源,并使各系统的时间同步。 标准时钟系统SYN4505接收GPS卫星或北斗卫星系统中的时标信号作为标准时间源,标准时间源通过交换机传输,将信号源传输到子钟SYN6109和计算机系统并对信号源进行校准,提供统一标准的时间基准。标准时钟系统控制中心,向各子系统或子钟发送标准时钟信号,并监测所有时钟工作状态,控制所有时钟的运行,如图所示。 授时系统 授时系统是向时钟设备提供授时和时间服务的。授时可通过电话、网络、无线电、电视、专用(长波和短波)电台、卫星等设施和系统进行,它们具有不同的传递精度,可满足不同用户的需要。GPS卫星校时顾名思义时间源是从gps卫星上获取时间信息的。GPS授时系统接收GPS卫星和北斗卫星授时时间信号,将标准UTC时间信息通过网络传输,为网络设备提供精确、标准、安全、可靠和多功能的ntp校时服务。 时间同步系统: 时间同步系统是NTP网络时间服务器通过接收GPS卫星输入信号或北斗输入卫星信号,并通过交换机传输,将标准时间传输到子钟或计算机中,通过计算机对子钟时间进行监控实现时间同步

How to build a compass with the iPhone?

为君一笑 提交于 2019-12-21 12:47:33
问题 After some searching on Google, I ask myself: Is it possible to build a compass (simple showing the heading/direction) with the iPhone 3G's GPS sensor? I have the suspicion, that this is only possible, if the device is moving. Any ideas are appreciated. 回答1: Yes, you are right, that's the only way. Although I think once you know the direction, you could track small movements of the phone from acceleration sensors and draw the direction accurately even if the original movement stops. Note:

Multi-point trilateration algorithm in Java

不羁岁月 提交于 2019-12-21 09:28:18
问题 I'm trying to implement a trilateration algorithm into my Android app to determine a user's indoor location. I'm using ultra-wideband beacons to get the distances to fixed points. I was able to adapt the method suggested in Trilateration Method Android Java as follows: public LatLng getLocationByTrilateration( LatLng location1, double distance1, LatLng location2, double distance2, LatLng location3, double distance3){ //DECLARE VARIABLES double[] P1 = new double[2]; double[] P2 = new double[2]

How to receive GPS data from device with PHP?

北城余情 提交于 2019-12-21 06:59:36
问题 I have a car GPS device, the only thing I can change is the IP-address. Is it possible to have shared hosting with a dedicated IP-address (that part is possible) and then to have a PHP script that picks up the data that is being send? So what is in my mind: GPS device send gps data to IP-address. That IP-address has a PHP script that picks up the data and use it. As requested a little bit more detailed. There is a question that is exactly the same but don't have an answer: how-to-get-data

Get current latitude and longitude android

蓝咒 提交于 2019-12-21 06:28:32
问题 Requirement : 1.Sometimes(not everytime) I am getting latitude and longitude 0.0. 2.I want to know how to get the location update after user has enabled the gps from the settings. Here is my code public class GPSTracker extends Service implements LocationListener { private final Context mContext; // flag for GPS status boolean isGPSEnabled = false; // flag for network status boolean isNetworkEnabled = false; // flag for GPS status boolean canGetLocation = false; Location location; // location

android turn GPS On & Off Programmatically in 2.2?

眉间皱痕 提交于 2019-12-21 06:26:47
问题 i am using GPS in My application and i want to turn GPS on and off Programmatically to save power how can i do it :( this is for turn off i need the turn on please private void turnGPSOnOff(){ String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); if(!provider.contains("gps")){ final Intent poke = new Intent(); poke.setClassName("com.android.settings", "com.android.settings.widget.SettingsAppWidgetProvider"); poke.addCategory(Intent

How to keep GPS turned on when switching between activities but off when when “home” is pressed

你。 提交于 2019-12-21 06:18:16
问题 I am trying to figure out the best way to implement Listener to location with the onResume and onPause. Best I can do not it to turn it off on onPause and reconnect on onResume. But then I keep having disconnect-reconnect when all I want is for the GPS to stay on for the duration of the application. When Home is pressed (or another application is interrupting) then GPS can be downed off for battery saving. Any ideas? Thanks. 回答1: Your question can be generalized to "How do I tell when my app