How to extract latitude and longitude from GPS
First rather than just dumping it to the screen store the data in a char array

char dataBuffer[64];
int dataCount=0;

while ( (mySerial.available()!=0) &amp;&amp; (dataCount&lt;63) ) {
    dataBuffer[dataCount] = mySerial.read());
    dataCount++;
}
dataBuffer[dataCount] = 0;


then use strtok to split the string on the : and , characters

char *output;
output = strtok(dataBuffer,":");
// output will now point to everything up to the first : so "CGPSINF" for gps
int field = 0;
while (output != null) {
  field++;
  output = strtok(null,",");
// output will now point to each value in turn
// for CGPSINF:0,6.823375,80.001038,36.300000,
// when field == 1 output=="0"
// when field == 2 output=="6.823375" etc...
}