*47 the checksum data, always begins with
*/
try
{
final byte oldLatitudeDegree = latitudeDegree;
final FixedPoint oldLatitudeMinutes = latitudeMinutes.clone();
final char oldLatitude = latitude;
final byte oldLongitudeDegree = longitudeDegree;
final FixedPoint oldLongitudeMinutes = longitudeMinutes.clone();
final char oldLongitude = longitude;
final short oldQuality = quality;
final short oldSatellites = satellites;
final FixedPoint oldAltitude = altitude.clone();
final StringTokenizer stk = new StringTokenizer( command, "," );
stk.nextToken(); // Skip GPGGA
stk.nextToken(); // Skip time
parseGpsLatitude( stk.nextToken() );
latitude = stk.nextToken().charAt( 0 );
parseGpsLongitude( stk.nextToken() );
longitude = stk.nextToken().charAt( 0 );
quality = Short.parseShort( stk.nextToken() );
satellites = Short.parseShort( stk.nextToken() );
stk.nextToken(); // Skip dilution
altitude = FixedPoint.parse( stk.nextToken(), '.' );
final boolean changed =
oldLatitude != latitude ||
oldLatitudeDegree != latitudeDegree ||
!oldLatitudeMinutes.equals( latitudeMinutes ) ||
oldLongitude != longitude ||
oldLongitudeDegree != longitudeDegree ||
!oldLongitudeMinutes.equals( longitudeMinutes ) ||
oldQuality != quality ||
oldSatellites != satellites ||
!oldAltitude.equals( altitude );
if( changed )
{
timestamp.setTime( System.currentTimeMillis() );
}
return changed;