gga = '$GPGGA';
numMessages = 0;
s = serial('COM4');
fopen(s);
s.Timeout = 5;
while(numMessages < 2)
    inString = fscanf(s);
    if( strncmp(inString, '$GPGGA', 6) )
        [token,remain] = strtok(inString,',');
        [token,remain] = strtok(remain,',');
        [token,remain] = strtok(remain,',');
        vals = sscanf(token, '%2d%f');
        dDeg = vals(1) + (vals(2)/60.0)
        numMessages = numMessages + 1;
    end
    pause(1);
end

fclose(s);
delete(s);
clear s;
