Get number of gps fix satellites?

谁说胖子不能爱 提交于 2019-12-06 05:13:22

问题


I got the GPS_Location:

double lo=gps_loc.getLongitude();
double la=gps_loc.getLatitude();

I got the Horizontal_Accuracy:

int horiAcc=(int)(gps_loc.getAccuracy());

I got the HDOP:

int hd= (int) (horiAcc/5);

But I can't got the number of satellites.

How can I get the number of satellites have been used in my GPS localisation?


回答1:


Look at the GpsStatus Class it has a method called getMaxSatellites()

if you need further looking into the GPS Satellite Data you can iterate over the List of Satellites with getSatellites()

see: http://developer.android.com/reference/android/location/GpsStatus.html#getMaxSatellites%28%29



来源:https://stackoverflow.com/questions/7359823/get-number-of-gps-fix-satellites

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!