Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/29/06 07:16
Read: times


 
#123274 - Extracting NEMA $GPRMC protocol with Qbasic
Responding to: ???'s previous message
Hello,

Basic is such a simple and powerful language the following program will extract a NEMA $GPRMC sentence. The data was saved to a file (shown below). This can be imported into Excel as a delimited string and all of the fields are automatically extracted.

Regards,

Charles Bannister
=====================================GPS2.BAS=============
'Read NEMA $GPRMC sentence protocol
CLS
OPEN "COM1:4800,N,8,1,CD0,CS0,DS0,OP0,RS,TB2048,RB2048" FOR RANDOM AS #1
OPEN "gps2.txt" FOR OUTPUT AS #2
DO
 GPSinput$ = INPUT$(300, #1)' Read 300 bytes from com port 1
 GPSinput$ = MID$(GPSinput$, INSTR(GPSinput$, "$GPRMC,"), 68)
 PRINT GPSinput$
 PRINT #2, GPSinput$	
LOOP
=====================================GPS2.TXT=============
$GPRMC,065624,V,3000.2984,N,09741.1729,W,0.000,0.0,290806,5.5,E*77
$GPRMC,065626,V,3000.2984,N,09741.1729,W,0.000,0.0,290806,5.5,E*75
$GPRMC,065627,V,3000.2984,N,09741.1729,W,0.000,0.0,290806,5.5,E*74
$GPRMC,065628,V,3000.2984,N,09741.1729,W,0.000,0.0,290806,5.5,E*7B
$GPRMC,065630,V,3000.2984,N,09741.1729,W,0.000,0.0,290806,5.5,E*72
$GPRMC,065631,V,3000.2984,N,09741.1729,W,0.000,0.0,290806,5.5,E*73
$GPRMC,065633,V,3000.2984,N,09741.1729,W,0.000,0.0,290806,5.5,E*71
$GPRMC,065634,V,3000.2984,N,09741.1729,W,0.000,0.0,290806,5.5,E*76
$GPRMC,065636,V,3000.2984,N,09741.1729,W,0.000,0.0,290806,5.5,E*74


List of 17 messages in thread
TopicAuthorDate
Interfacing 8051 with GPS Rcvr            01/01/70 00:00      
   Most GPS out multiple NEMA sensenances            01/01/70 00:00      
      you can use a simple statemachine            01/01/70 00:00      
   Assembly or Bascom?            01/01/70 00:00      
   GPS            01/01/70 00:00      
      Why doubt?            01/01/70 00:00      
      GPS Interface Protocols            01/01/70 00:00      
   okj            01/01/70 00:00      
   Switch to a high level language            01/01/70 00:00      
      Jumping the gun?            01/01/70 00:00      
      Language wars...            01/01/70 00:00      
         Hmmm            01/01/70 00:00      
         English grammar            01/01/70 00:00      
            Calm down, it\'s only a programming language!            01/01/70 00:00      
               Must laugh, life is too short!            01/01/70 00:00      
                  Now there's an offer...            01/01/70 00:00      
   Extracting NEMA $GPRMC protocol with Qbasic            01/01/70 00:00      

Back to Subject List