   }
 }
 
-void getgps(void)
-{
+void getgps(int LATLONG)
+{
+  //digitalWrite(SIM808, HIGH); //SWITCH ON SIM808
+  delay(2000);
   String gpsdata = "";
   String gpsdatatmp = "";
+  String tmp = "";
   //GPS baud rate is 9600 for coms
   switchGPSonoff( "AT+UART=9600,8,1,0,0", 1000, DEBUG);
   switchGPSonoff( "AT+CGNSPWR=1", 1000, DEBUG);
   switchGPSonoff( "AT+CGNSSEQ=RMC", 1000, DEBUG);
   do
   {
+    //GET GPS DATA
+    gpsdata = "";
     gpsdata.concat(sendData( "AT+CGNSINF", 1000, DEBUG));
+    gpsdatatmp = "";
     delay(1000);
     gpsdatatmp.concat(gpsdata);
-    Serial.println(gpsdata);
+    gpsdatatmp.remove(75);
     //get YEAR
     gpsdatatmp.remove(31);
     gpsdatatmp.remove(0, 27);

//DEBUG
//#include <MemoryFree.h>
#include <Wire.h> //I2C needed for sensors
//https://github.com/sparkfun/SparkFun_MPL3115A2_Breakout_Arduino_Library
#include "MPL3115A2.h" //Pressure sensor

#include <TinyGPS++.h> //GPS parsing


#define DEBUG true

//For SIMDUINO GPS/GSM from Simduino
static const int RXPin = 7, TXPin = 8; //GPS is attached to pin 7(TX from GPS) and pin 8(RX into GPS)
