discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting GPS data into stream


From: Marcus D. Leech
Subject: Re: Getting GPS data into stream
Date: Wed, 3 May 2023 14:38:54 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 03/05/2023 14:04, Marcus Müller wrote:
Hi Fabian,

I'd write a block that copies a stream in- to output. It might query gpsd every time the work() function is called, or have a FIFO into which data from gspd is being pushed by a separate thread (or by reading from  a socket or however gspd works, I must admit I'm not sure).

You then take that info, and encode the long, lat, uncertainty as (double, double, double) PMT tuple. You then use add_item_tag to add that PMT to the first sample in your output buffer.

You'd feed the result into a metadata file sink block: That saves things in a serialized format ready for retrieval.

Best,
Marcus

On 5/3/23 19:52, Fabian Schwartau wrote:
Hi everyone,

I am trying to record some data from an SDR and would like to sync/tag the data with the current gps position from gpsd. I am kind of stuck and don't know how a possible solution for that might look like in grc. I have a python function that gets the current position as a tuple, but how do I get this into my data stream, which I would like to write to a CSV file or similar? I am not asking for a solution of my problem, just point me in the right direction ;)

Best,
Fabian



Quite apart from the GPSD-specific stuff, it would be useful to have a kind of "annotated formatted data" file sink for low-rate   data (like scientific data, etc) which supports CSV outputs, and has some way of ordering any tags that come in with the   data and formatting them appropriately, but still be reasonably "generic"  (in that the block doesn't really *know* anything   about the tags, and can be told how to format them).  Maybe *in addition* you could pass the block a series of methods to
  call at some configurable cadence.

This somewhat overlaps with what SigMF tries to do, but this is formatted data, inherently low-rate, with formatted
  annotations.

I nearly always end up doing this in a custom way for my applications, but having a generic block would be cool, and not   hard to do.   Could be entirely in Python, since we're talking "low rate" (like perhaps a few per second at most).







reply via email to

[Prev in Thread] Current Thread [Next in Thread]