   return v;
 }
 
-float calcAltitude(float pressure){
+float CalculateAltitude(float pressure){
 
   float A = pressure/101325;
   float B = 1/5.25588;



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

SoftwareSerial DataLogger(11, 12); // RX, TX


// *********************************************************************
// 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);
  
