eliajaz:
Once I change the condition to "while (strncmp(buffer, "$GPRMC",6) == 0)" I get good results as listed below. However It stay in this infinite loop.
readline();
//Check if $GPRMC sentence type
if (strncmp(buffer, "$GPRMC",6) == 0) {
You aren't re-reading the line, so of course it will repeat the same data.
function1();
function2();
function3();
function4();
Better function names please. Next you will be using variable1, variable2, variable3, and so on.
while(1)
{
}
I agree with PaulS here. Restructure so that setup goes in setup, then you don't have to have a loop inside loop.
while (1) {
c=Serial1.read();
if (c == -1)
continue;
Better read up on Serial1.available().