且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何测量在Android GPS信号强度?

更新时间:2022-01-11 22:22:30

你确定你的意思是信号强度与精度?有什么好的信号强度?由于GPS的位置是通过多颗卫星确定的,你没有一的信号强度。

Are you sure you mean signal strength vs. accuracy? What good is the signal strength? Since the GPS position is determined via many satellites, you don't have "one" signal strength.

所以假设你真的是信号强度,即可获得 GpsStatus 通过 LocationManager.getGpsStatus(),并为您提供卫星通过 getSatellites列表(),而这些每个人都有一个信噪比( getSnr() )。

So assuming that you really mean signal strength, you can get the GpsStatus via LocationManager.getGpsStatus(), and that gives you a list of satellites via getSatellites()', and each one of those has a signal-to-noise ratio (getSnr()).

假设你的意思的准确性,尽量 Location.getAccuracy()

Assuming you mean accuracy, try Location.getAccuracy().