      int incoming_byte = Serial2.read();
      if(incoming_byte == '\n')
      {
-       push_out_nmea_sentence(true);
-       parse_nmea_sentence();
+       if(validate_nmea_buffer())
+       {
+         push_out_nmea_sentence(true);
+         parse_nmea_sentence();
+       }
        nmea_read_buffer = "";
      }
      else if (incoming_byte == '\r')

     int incoming_byte = Serial3.read();
     if(incoming_byte == '\n')
     {
       if(gps_read_buffer.indexOf("$GPRMC,") == 0)
       {
         #ifdef GPS_DEBUG_ON
         debug_info(F("--GPS BUF RMC--"));
         debug_info(gps_read_buffer);
         #endif
         push_out_nmea_sentence(false);
         parse_gps_buffer_as_rmc();
       }
       else if(gps_read_buffer.indexOf("$GPGGA,") == 0)
       {
         #ifdef GPS_DEBUG_ON
         debug_info(F("--GPS BUF GGA--"));
         debug_info(gps_read_buffer);
         #endif
         push_out_nmea_sentence(false);
         parse_gps_buffer_as_gga();
       }
       gps_read_buffer = "";
     }

  }
}

bool validate_gps_buffer()
{
  byte_zero = 0;
  for(i = gps_read_buffer.indexOf('$') + 1; i < gps_read_buffer.lastIndexOf('*'); i++)
  {
    byte_zero = byte_zero ^ gps_read_buffer.charAt(i);
  }
  if(gps_read_buffer.endsWith(String(byte_zero, HEX)))
  {
    return true;
  }
  #ifdef GPS_DEBUG_ON
  debug_info("Bad GPS buffer: " + gps_read_buffer);
  #endif
  return false;  
}

bool validate_nmea_buffer()
{
  byte_zero = 0;
  for(i = nmea_read_buffer.indexOf('$') + 1; i < nmea_read_buffer.lastIndexOf('*'); i++)
  {
    byte_zero = byte_zero ^ nmea_read_buffer.charAt(i);
  }
  if(nmea_read_buffer.endsWith(String(byte_zero, HEX)))
  {
    return true;
  }
  #ifdef NMEA_DEBUG_ON
  debug_info("Bad NMEA buffer: " + nmea_read_buffer);
  #endif
  return false;  
}


void gps_read()
