 
 
 void WriteDataToLogger(float Temperature, float Pressure, float Altitude, float Latitude, float Longitude) {
-  DataLogger.listen();
+  if(!DataLogger.isListening()) { DataLogger.listen(); }
+
   DataLogger.print(Temperature, 2);
   DataLogger.print(",");
   DataLogger.print(Pressure, 0);



// *********************************************************************
// GPS receiver settings
SoftwareSerial gpsSerial(10, 9); // RX, TX (TX not used)
const int sentenceSize = 80;
char sentence[sentenceSize];


void setup(void) {
  Serial.begin(9600);
  
  Wire.begin();
  CalibratePressureSensor();

  DataLogger.begin(9600);
//  gpsSerial.begin(9600);
}


void loop(void) {
  float CurrentTemp = GetTemp();
  float CurrentPressure = GetPressure(bmp085ReadUT(), bmp085ReadUP());
  float CurrentAltitude = CalculateAltitude(CurrentPressure);
  
  // TODO: Get GPS coordinates
//  float CurrentLatitude, CurrentLongitude;
//  char field[20];
//  GetGPSData();
//  getField(field, 0);
//  if(strcmp(field, "$GPRMC") == 0)
//  {
//    getField(field, 3);
//    CurrentLatitude = atof(field);
//    
//    getField(field, 5);
//    CurrentLongitude = atof(field);
//  }

//  PrintToSerialOutput(CurrentTemp, CurrentPressure, CurrentAltitude, CurrentLatitude, CurrentLongitude);
//  WriteDataToLogger(CurrentTemp, CurrentPressure, CurrentAltitude, CurrentLatitude, CurrentLongitude);
  PrintToSerialOutput(CurrentTemp, CurrentPressure, CurrentAltitude, 0.0, 0.0);
  WriteDataToLogger(CurrentTemp, CurrentPressure, CurrentAltitude, 0.0, 0.0);
  
  // TODO: What data do we write to the radio?
  // TODO: How frequently should we write data to the radio?
  // TODO: Write data to radio
  
  delay(SAMPLING_DELAY);
  
}



// *********************************************************************
// GPS Receiver subroutines
void getField(char* buffer, int index)
{
  int sentencePos = 0;
