gpsd, gpspipe NMEA sentences stream processing


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting gpsd, gpspipe NMEA sentences stream processing
# 1  
Old 01-01-2009
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  
Old 01-01-2009
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  
Old 01-01-2009
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  
Old 01-01-2009
Quote:
Originally Posted by reborg
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  
Old 01-01-2009
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  
Old 01-01-2009
Quote:
Originally Posted by reborg
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 Smilie
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
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Video stream] network stream recording with mplayer

Hi I used this command: mplayer http://host/axis-cgi/mjpg/video.cgi -user root -passwd root \ -cache 1024 -fps 25.0 -nosound -vc ffh264 \ -demuxer 3 -dumpstream -dumpfile output.avi It's ok but... Video Playing is very fast! Why? Is it a synch problem? What parameter I have to use for... (1 Reply)
Discussion started by: takeo.kikuta
1 Replies

2. Shell Programming and Scripting

awk and NMEA strings

Hi all: I have a file with NMEA sentences of the type: $GPVTG,012.0,T,,M,00.0,N,,K*7D $GPRMC,180541,A,3631.874,N,00617.423,W,00.0,004.0,210608,,*36 $SDDBT,,f,,M,,F*28 $GPGLL,3631.874,N,00617.423,W,180542,A*3B $GPVTG,009.0,T,,M,00.0,N,,K*77 $GPVTG,019.0,T,,M,00.0,N,,K*76... (9 Replies)
Discussion started by: rleal
9 Replies
Login or Register to Ask a Question