 
 char  lat[] =  "0000.00N" ;
 char  lon[] = "00000.00W" ;
+double latd = 0.0 ;
+double lond = 0.0 ;
+
+char  prevlat[] =  "0000.00N" ;
+char  prevlon[] = "00000.00W" ;
+double prevlatd = 0.0 ;
+double prevlond = 0.0 ;
+
 int alt = 0 ;
+
 bool position_changed = false ;
 bool lastpositionsent = false ;
-char  prevlat[] =  "0000.00N" ;
-char  prevlon[] = "00000.00W" ;
 
 
 
 void loop()
 {
 
-   // process the gps packets
-   while(serialgps->available() > 0 ) gps.encode(serialgps->read()) ;
-
-   // check location every 3 seconds
-
-   if ( (millis() - lastgpsupdate) > 3000 ) {
-
-       lastgpsupdate = millis() ;
-
+// process the gps packets
+while(serialgps->available() > 0 ) { 
+       
+   if ( gps.encode( serialgps->read() ) )  
 
        if( gps.location.isValid() ) {
           double dmh ; 
+           latd = gps.location.lat() ;
+           lond = gps.location.lng() ;
            // latitude
            if ( gps.location.rawLat().negative ) {
-               dmh = ddtodmh( -gps.location.lat() )  ;
+               dmh = ddtodmh( -latd )  ;
                dtostrf(dmh,7,2,lat) ;
                lat[7] = 'S';
            } else {
-               dmh = ddtodmh( gps.location.lat() )  ;
+               dmh = ddtodmh( latd )  ;
                dtostrf(dmh,7,2,lat) ;
                lat[7] = 'N';
            }
            // longitude
            if ( gps.location.rawLng().negative ) {
-               dmh = ddtodmh( -gps.location.lng() )  ;
+               dmh = ddtodmh( -lond )  ;
                dtostrf(dmh,8,2,lon) ;
                lon[8] = 'W';
            } else {
-               dmh = ddtodmh(gps.location.lng() )  ;
+               dmh = ddtodmh(lond )  ;
                dtostrf(dmh,8,2,lon) ;
                lon[8] = 'E';
            }
-           
-
-           // position change
-           //  1 100th-second = 60 feet @ 38 lat
-           //  1 100th-second = 48 feet @  lon (fairly constant) 
-           // set a precision value to compare 
-           if ( strncmp(lat, prevlat, POSITION_CHANGE_PRECISION) != 0 ) {
-               strcpy(prevlat,lat) ;
-               position_changed = true ; 
-           }
-           if ( strncmp(lon, prevlon, POSITION_CHANGE_PRECISION + 1 ) != 0 ) {
-               strcpy(prevlon,lon) ;
-               position_changed = true ; 
-           }
+
        } // end lat lon update 
 
            // altitude 

   pinMode(LED_GPS,OUTPUT) ;

   digitalWrite(LED_TX,HIGH) ;
   digitalWrite(LED_RX,HIGH) ;
   digitalWrite(LED_GPS,HIGH) ;
   delay(750) ;
   digitalWrite(LED_TX,LOW);
   digitalWrite(LED_RX,LOW);
   digitalWrite(LED_GPS,LOW);
   delay(750) ;
   digitalWrite(LED_TX,HIGH) ;
   digitalWrite(LED_RX,HIGH) ;
   digitalWrite(LED_GPS,HIGH) ;
   delay(750) ;
   digitalWrite(LED_TX,LOW) ;
   digitalWrite(LED_RX,LOW) ;
   digitalWrite(LED_GPS,LOW) ;

} 


void setup()

#include "Log.h"
#include "SD.h"

#define VERSION "Beta-0.999n"
#define ADC_REFERENCE REF_5V
#define DEBUG_APRS_SETTINGS false

