bambangSud

parsing GPS data

Sep 6th, 2013
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. while (1)
  2. {
  3. // Place your code here
  4.  
  5. while( getchar() != 'C'){}
  6. while( getchar() != ','){}
  7. while( getchar() != ','){}
  8. //while( getchar() != ','){} // A/V
  9. i=0;
  10. while(i<30){
  11. data[i]=getchar();
  12. i++;
  13. #asm ("nop");
  14. }
  15. lcd_gotoxy(0,0);
  16. lcd_puts("Lat: ");
  17. i=0;
  18.  
  19. while(i<15){
  20. lcd_putchar(data[i+2]);
  21. i++;
  22. delay_ms(1);
  23. }
  24. if(data[0]=='V'){
  25. lcd_gotoxy(4,0);
  26. lcd_putchar('V');
  27. }
  28. i=0;
  29. lcd_gotoxy(0,1);
  30. lcd_puts("Lon:");
  31. while(i<12){
  32. lcd_putchar(data[i+14]);
  33. i++;
  34. delay_ms(1);
  35. }
  36. delay_ms(5000);
  37.  
  38. //for(i=0;i<30;i++) {data[i]=' ';}
  39.  
  40. gps_compare(); //
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment