 
 // Function for returning formatted GPS string
 String getGPSLogString() {
-  return (String(gps.location.lat(),6) + "," + String(gps.location.lng(),6) + ",");
-}
-
+  return (String(gps.location.lat(), gpsDecimalPoints) + "," + String(gps.location.lng(), gpsDecimalPoints) + ",");
+}

  readIMU();

  // Print all information
  dataModule.print(getIMULogString(accelData)+getIMULogString(gyroData)+getIMULogString(magData));
  dataModule.println(getGPSLogString());
}


#define initExtension "txt"
#define dataExtension "csv"
#define csvLayout "ACCEL_X,ACCEL_Y,ACCEL_Z,GYRO_X,GYRO_Y,GYRO_Z,MAG_X,MAG_Y,MAG_Z,LAT,LNG,"
#define gpsDecimalPoints 6
// end region

// region IMU configuration
