I have developed an application for Android, for storing user\'s GPS location.
One of my customers gave me his device and I noticed that sometimes the accuracy of t
If you don't trust Google's Fused API, or any other algorithm, and you have some knowledge about NMEA formatted, raw GPS data, then I recommend you take a deep dive into the raw GPS data, and see what is actually going on.
You can get NMEA_0183 GPS messages from the GPS chipset, and analyze satellite constellation, SNR, DOP, lat, lon, etc.
LocationManager LM = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
((LocationManager)getSystemService(Context.LOCATION_SERVICE)).requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,new LocationListener(){
@Override
public void onLocationChanged(Location loc) {}
@Override
public void onProviderDisabled(String provider) {}
@Override
public void onProviderEnabled(String provider) {}
@Override
public void onStatusChanged(String provider, int status,Bundle extras) {} });
//for API23 and below
LM.addNmeaListener(new GpsStatus.NmeaListener() {
public void onNmeaReceived(long timestamp, String nmea) {
Log.d(TAG, nmea+"\n");
}});
//for API24 and above
LM.addNmeaListener(new OnNmeaMessageListener() {
public void onNmeaMessage(String nmea, long timestamp) {
Log.d(TAG, nmea+"\n");
}});
Here are some useful NMEA sentences:
GGA - Global Positioning System Fix Data
GSA - GPS DOP and active satellites
GSV - Satellites in view
ZDA - Time & Date - UTC, day, month, year and local time zone