 
 
 // *********************************************************************
-// Data logger routines
-void ConfigureDataLogger() 
-{
-  // set the data rate for the SoftwareSerial port
-  DataLogger.begin(9600);
-}
+// GPS Receiver subroutines
+void GetGPSData() 
+{
+  int i = 0;
+  gpsSerial.listen();
+  char ch = gpsSerial.read();
+  while (ch != '\n' && i < sentenceSize)
+  {
+    sentence[i] = ch;
+    i++;
+  }
+
+  sentence[i] = '\0';
+}
+
+
+void getField(char* buffer, int index)
+{
+  int sentencePos = 0;
+  int fieldPos = 0;
+  int commaCount = 0;
+  while (sentencePos < sentenceSize)
+  {
+    if (sentence[sentencePos] == ',')
+    {
+      commaCount ++;
+      sentencePos ++;
+    }
+    if (commaCount == index)
+    {
+      buffer[fieldPos] = sentence[sentencePos];
+      fieldPos ++;
+    }
+    sentencePos ++;
+  }
+  buffer[fieldPos] = '\0';
+} 
+

  return v;
}

float calcAltitude(float pressure){

  float A = pressure/101325;
  float B = 1/5.25588;



void WriteDataToLogger(float Temperature, float Pressure, float Altitude, float Latitude, float Longitude) {
  DataLogger.listen();
  DataLogger.print(Temperature, 2);
  DataLogger.print(",");
  DataLogger.print(Pressure, 0);
