   }
 }
 
+
 /********************************************************************************
  * boolean GPSAnalyzer(char *gpsBuffer)
  * Analyze the Serial information received after request the information 
- * AT+CCPSINF=2
+ * AT+CCPSINF=0
  * +CGPSINF: 2,050656.000,0030.2706,N,00120.1007,E,1,9,0.90,51.9,M,7.0,M,,
  * AT+CGPSINF=2, get GPS location with format
  * Message ID       = 2

      east_west[sizeof(east_west)-1] = '\0';      
      Serial.print("E/W INDICATOR   : ");
      Serial.println(east_west);    
      Serial.println("************************************************************ ");  
        
   }else return false; 

   return true;     
}  



char infoLocation[BUFFER_SIZE];  
posBuf=0;
int i = 0;

  //Get position
  while(GPRS.available()){
    GPRS.read();
  } 
  GPRS.println("AT+CGPSINF=2");
   
  //Read response of SIM808 at Serial Port, Uno buffer all data without other activities
  //otherwise it may lose some bytes 
  //after send the command to GPS, it takes about 100ms to all serial information arrives UNO   
  delay(50);
   

  //for(int i=0;i<7;i++){
  while((posBuf<=99)&&(i<15)){ 
    while((GPRS.available()>0)){
      infoLocation[posBuf++]=GPRS.read();
    }
    delay(10);
    i++;
    //delay(15); 
  }
  GPSAnalyzer(infoLocation);





  //Get Speed
  while(GPRS.available()){
    GPRS.read();
  } 
  GPRS.println("AT+CGPSINF=32");
   
  //Read response of SIM808 at Serial Port, Uno buffer all data without other activities
  //otherwise it may lose some bytes 
  //after send the command to GPS, it takes about 100ms to all serial information arrives UNO   
  delay(50);
   

  posBuf=0;
  i=0;
  //for(int i=0;i<7;i++){
  while((posBuf<=99)&&(i<15)){ 
    while((GPRS.available()>0)){
      infoLocation[posBuf++]=GPRS.read();
    }
    delay(10);
    i++;
    //delay(15); 
  }
   
  GPSAnalyzer32(infoLocation);

   

  //Send collected data to mysql server 
  SendGPSLocation();
}


