New topic: 

Serial port programming

<http://forums.realsoftware.com/viewtopic.php?t=37730>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        Talisker          Post subject: Serial port programmingPosted: 
Sat Feb 19, 2011 5:26 am                         
Joined: Tue Jul 27, 2010 4:27 am
Posts: 5                Hi Guys,

I am looking for some divine guidance.

The situation is, I have got a serial port listening to the output of NMEA 
sentences from a GPS. And with my limited programming experience, have got the 
program to write what it gets to a textarea. The GPS streams data to the serial 
port at 4800 baud and repeats every 2 seconds, each set of sentences are about 
940 bits, so there is only a few microseconds before the next set arrive. This 
system is purely data in and data out, so the handshaking is dealt with 
loopbacks.

My problem is, how can I cut into this stream of data to process the 
information I am getting?

For those who have no idea what NMEA sentences look like, here is an example!

$GPRMC,080935,A,3512.589,N,08449.304,W,000.0,360.0,230806,004.1,W*79 
$GPRMB,A,,,,,,,,,,,,V*71 
$GPGGA,080935,3512.589,N,08449.304,W,1,08,2.0,311.4,M,-31.4,M,,*76 
$GPGSA,A,3,02,,06,,10,18,21,26,,29,30,,3.2,2.0,3.0*31 
$GPGSV,3,1,11,02,29,090,42,05,03,202,00,06,53,297,46,08,00,074,00*7E 
$GPGSV,3,2,11,10,53,036,46,18,10,239,34,21,15,294,37,26,42,159,45*7D 
$GPGSV,3,3,11,27,00,048,00,29,51,146,46,30,16,237,37,,,,*48 
$PGRME,15.0,M,22.5,M,15.0,M*1B 
$GPGLL,3512.589,N,08449.304,W,080935,A*38 
$PGRMZ,1021,f,3*29 
$PGRMM,WGS 84*06 
$GPBOD,,T,,M,,*47 
$GPRTE,1,1,c,0*07 

And this repeats every 2 seconds. If I start the program after the GPS, then 
the serial port cuts in anywhere in the data. If I start the program first I 
get the first sentence beginning with "$GPRMC".

Any thoughts?


Steve   
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to