The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk and NMEA strings rleal Shell Programming and Scripting 9 01-02-2009 02:32 PM
?Comprehensive Guide to Evaluating Event Stream Processing Engines? iBot Complex Event Processing RSS News 0 11-23-2008 02:40 PM
Adaptive Overlays for Shared Stream Processing Environments iBot UNIX and Linux RSS News 0 10-07-2008 01:30 AM
Coral8: Event Stream Processing and Intrusion Detection iBot Complex Event Processing RSS News 0 01-03-2008 05:10 AM
CEP Use Case: Stream Processing in Multiplayer Online Gaming iBot Complex Event Processing RSS News 0 09-16-2007 11:00 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-01-2009
darius2 darius2 is offline
Banned
  
 

Join Date: Jan 2009
Posts: 26
gpsd, gpspipe NMEA sentences stream processing

Hi,

running gpsd, gpspipe I get a stream of NMEA sentences.
What I need is to write awk script for pipelining and on-the-fly processing of the streamed NMEA senteces to output (terminal session in my case).

The issue is, I can get gpsd working in -D 5 mode (debug mode).
There is no issue with gpspipe.

I need to extract some data from specific NMEA sentences (lines)
for use in another pipelined application/s.

I have got some nice examples, reading data from a static file.

Please tell me how to start such a pipeline with live data stream as input .

gpsd stream > filename | awk script - readline
gpsd stream | awk script - readline

Thanks.

Happy New Year
Darius
  #2 (permalink)  
Old 01-01-2009
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,190
If you want to have the output on screen, then
Code:
gpsd stream | awk 'your awk program' | your other program
would work.

However given then number of possible sentences, your awk program would quickly become very complicated.
  #3 (permalink)  
Old 01-01-2009
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,190
Also it might help if you said what exactly you need to do in the preprocessing, it's quite possible that there is a better tool than awk for what you need.
  #4 (permalink)  
Old 01-01-2009
darius2 darius2 is offline
Banned
  
 

Join Date: Jan 2009
Posts: 26
Quote:
Originally Posted by reborg View Post
If you want to have the output on screen, then
Code:
gpsd stream | awk 'your awk program' | your other program
would work.

However given then number of possible sentences, your awk program would quickly become very complicated.
Thanks for your kind reply.

It works fine.
Followed some awk examples from
The GAWK Manual - Reading Input Files
and did some testing to learn basics of awk first.

Darius
  #5 (permalink)  
Old 01-01-2009
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,190
You're welcome.

Just for information, your posts didn't show up straight away it is because you posted links. If your first few posts contain links they have to be approved before they appear.

If you need help with more advanced awk programs, such as correlation or parsing of groupings of multiple NMEA sentences there are some very good awk programmers on this site who will be glad to help.
  #6 (permalink)  
Old 01-01-2009
darius2 darius2 is offline
Banned
  
 

Join Date: Jan 2009
Posts: 26
Quote:
Originally Posted by reborg View Post
You're welcome.

Just for information, your posts didn't show up straight away it is because you posted links. If your first few posts contain links they have to be approved before they appear.

If you need help with more advanced awk programs, such as correlation or parsing of groupings of multiple NMEA sentences there are some very good awk programmers on this site who will be glad to help.
Ok.
I will try not to give web links in my posts to save your time
Another NMEA thread dealt with NMEA static file.
In my case, I succeeded to connect Bluetooth dongle to my server,
get it connected to Bluetooth GPS device and have gpsd, gpspipe
to read NMEA on-the-fly .
So awk examples gave me a hint how to select records with specified field and print results to stdout.

I would like to learn how basic gps software does work and what data gets from what NMEA sentences, fields, as for tests I need to write basic gps open source software, to discuss some features already known from
more advanced gps applications.

I don't expect to go to data graphical vizualization phase.
But would like to know how awk script can slow down postprocessed
data input. So have to open 2 awk terminal sessions in seperate windows to see how fast awk can process live data stream (pipeline), as in my case.

Darius
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 05:53 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0