gpt4 book ai didi

android - 定位速度使用融合提供者出错

转载 作者:行者123 更新时间:2023-12-05 07:46:32 27 4
gpt4 key购买 nike

我正在使用具有 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com