我正在使用具有 PRIORITY_HIGH_ACCURACY 模式的融合位置提供程序进行位置轮询,但有时它会给出错误的定位速度,如 77 m/s。这是错误的,那么我如何才能获得正确的定位速度?
位置请求:
mLocationRequest = new LocationRequest();
mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
mLocationRequest.setInterval(6000);
mLocationRequest.setSmallestDisplacement(80);
加快位置更新速度
Double lat = location.getLatitude();
Double lon = location.getLongitude();
float sd = (float) location.getAltitude();
// float ac_speed = sd;
//----- For Testing Purpose---------------//
float ac_speed = location.getSpeed();
最佳答案
也许您正在使用精度较低的网络提供商,因此将其更改为 GPS 提供商以获得准确的值。
关于android - 定位速度使用融合提供者出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40678907/