char q[2];
q[0] = ',';
q[1] = 0;
/*Tokenizer*/
if(x>30){
//Flush serial port B & C input buffer
serBrdFlush();
serCrdFlush();
tcp_tick(&StopNavsock);
//Wait for the GPS message from the GPS card, tokenize and convert to integers
while ((n = serCread(GPSIn, MAXSIZE-1, TIMEOUT)) == 0) ;
GPSIn[n] = 0;
if(strlen(GPSIn)>92){
// printf("%s\n",GPSIn);
GPSIn0 = strtok(GPSIn, q);
GPSIn1 = strtok(NULL, q);
GPSIn2 = strtok(NULL, q);
GPSIn3 = strtok(NULL, q);
GPSIn4 = strtok(NULL, q);
GPSIn5 = strtok(NULL, q);
GPSIn6 = strtok(NULL, q);
GPSIn7 = strtok(NULL, q);
// printf("GPSIn7 = %s\n",GPSIn7);
LATDEG = atof(GPSIn7);
// printf("Lat Degrees = %f\n", LATDEG);
GPSIn8 = strtok(NULL, q);
// printf("GPSIn8 = %s\n",GPSIn8);
LATMIN = atof(GPSIn8);
// printf("Lat Minutes = %f\n", LATMIN);
Kommentare zu diesen Handbüchern