我試圖讓GPS現在的位置那樣精確,在不同的區間範圍內更多鈔票GPS位置,我有幾個外部GPS,爲10Hz,5HZ和1Hz的獲得一個精確的時間間隔
LocationManager locationManager = (LocationManager)
car.this.getSystemService(car.this.LOCATION_SERVICE);
LocationListener locationListener = new LocationListener() {
public void onLocationChanged(Location location) {
// Called when a new location is found
}
public void onStatusChanged(String provider, int status, Bundle extras) {}
public void onProviderEnabled(String provider) {}
public void onProviderDisabled(String provider) {}
};
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
locationListener);
有了這樣我得到一個日誌更新這樣的駕駛時以恆定速度
10hz GPS
81ms new position
79ms new position
88ms new position
96ms new position
196ms new positon
60ms new positon
256ms new position
70ms new position
5 hz GPS
187ms new...
189ms ..
275ms ..
140ms ..
180ms ..
220ms ..
因此,我認爲onStatusChanged最初低於標稱頻率快,但隨後飽和,並導致大個子跳
如果IU它是行之有效的,我得到的位置每100ms(200或1000),但計時器關閉約100ms每10秒
編輯:爲了澄清,我想獲得一個位置每個確切(或接近)100ms ,200毫秒或1000毫秒
* *更新13年12月4日
重做我的代碼以location.getTime)工作(這是結果,所有試驗在外面做,在中/ HIGHT後速度和每個設備在10分鐘內記錄日期
HTC Sensation Z710e 4.0.3 Internal GPS 1HZ
Average Accuracy: 12.1m
Average intertval: 1186ms
Min: 98ms
Max: 2621ms
HTC Desire HD 4.0.4 Internal GPS 1HZ
Average Accuracy: 10.6m
Average intertval: 1211ms
Min: 144ms
Max: 2588ms
ASUS Transformer TF101 4.0.4 Internal GPS 1HZ
Average Accuracy: 18.15m
Average intertval: 1000MS
Min: 1000ms
Max: 1000ms
SAMSUNG NOTE II GT-N7100 4.1.2 Internal GPS 1HZ (Glonass)
Average Accuracy: 6.8m
Average intertval: 1000MS
Min: 1000ms
Max: 1001ms
SAMSUNG, HTC OR ASUS with external GPS 5HZ
Average Accuracy: 2.2m
Average intertval: 200MS
Min: 200ms
Max: 200ms
SAMSUNG, HTC OR ASUS with external GPS 10HZ (Glonass)
Average Accuracy: 1.6m
Average intertval: 100MS
Min: 100ms
Max: 100ms
該API使您能夠指定在收到下一次更新之前必須經過的最短時間和最短距離。但是,它並不能讓您指定一個時間間隔來收集GPS更新。 – 2013-04-04 19:41:34