   }
   GPSAnalyzer(infoLocation);
 
-
-
-
-
-  //Get Speed
+  //Get Speed of SIM808 from GPS
   while(GPRS.available()){
     GPRS.read();
   } 

      phone[sizeof(phone)-1] = '\0';

      //strcpy(gpsMode,token);
      Serial.print("phone    : ");
      Serial.println(phone);   
   }else return false;
   

}


/*************************************************************
 * CheckSignalQuality(char *)
 * scan and print the signal quality
 * return 99 unknow or failed to extract 
 *        0 to 98 valid result 
 *************************************************************/

int getSignalQuality(char *signalBuffer){
  char *token;
  char sig[3]="99";
  /* get the first token */
  //Serial.println("****************Content of gpsBuffer*******************");
  //Serial.println("bufferCSQ:");
  //Serial.println(signalBuffer);
  
  //Get Command sent
  token = strtok(signalBuffer,"\n\r" );
  if(token == NULL)  return 99;
  
  //Get "+CSQ:" string
  token = strtok(NULL, " ");   
  if(token == NULL)  return 99;
  
  //Get +CSQ: value
  token = strtok(NULL, ",");
  if(token == NULL) {
    return 99;
  }else{
    strncpy(sig,token,sizeof(sig)); //Speed in Knot
    sig[sizeof(sig)-1] = '\0';  
    return atoi(sig);
  }  
}
 


/********************************************************************************
