Re: Getting GPS data into stream

2023-05-07 Thread Marcus Müller
Cool! By the way, if you know the samples being processed by your block have a sampling rate, you can also use `nitems_written(0)` to check how many items have been passed by. It should look a bit like this: in __init__: def __init__(self): gr.sync_block.__init__( self,

Re: Getting GPS data into stream

2023-05-07 Thread Fabian Schwartau
Doing it the way Marcus M. described wasn actually not that complicated as I expected. I have a small "Embedded Python Block" that does more or less what I need. The file is attached, if anyone else needs this :) The error handling is a bit rough and there are probably many things to improve on,

Re: Getting GPS data into stream

2023-05-07 Thread Fabian Schwartau
Hi again, as I described earlier, I am now using a "Tags Strobe" block to periodically tag the data with the current gps coordinates. Within the "Tag Strobes" I use a function call to create the value: pmt.to_pmt(gps.get_current_gps_position()) And this function is defined in a "Python Module"

Re: Getting GPS data into stream

2023-05-05 Thread Marcus Müller
Hi Fabian, it's interleaved real, imag, real, imag. If you used dtype=np.complex64 instead of float32 (and then not double the count), you'd get it interpreted exactly that way :) Cheers, Marcus On 04.05.23 19:38, Fabian Schwartau wrote: Sorry again, never mind... I found the problem. The sou

Re: Getting GPS data into stream

2023-05-04 Thread Marcus D. Leech
simple observing modes where low-rate textual logging makes considerable sense... -Original Message- Sent: Thursday, May 4, 2023 01:40 To: discuss-gnuradio@gnu.org Subject: [EXTERNAL] Re: Getting GPS data into stream Hey Marcus, as you say, for a lot of science you don't get high r

Re: Getting GPS data into stream

2023-05-04 Thread Fabian Schwartau
Sorry again, never mind... I found the problem. The source code for reading the data does not include the fact that I am reading complex data and also three streams. Change the one line to: data=np.fromfile(file=fh, dtype=np.float32, count=3*2*int(header_info['nitems']), sep='', offset=0) and ev

RE: Re: Getting GPS data into stream

2023-05-04 Thread Jim Melton
data science tool (R, Python/numpy/pandas, etc.) and you quickly see how pushing Excel issues into the data representation layer is a losing proposition. --- Jim Melton -Original Message- Sent: Thursday, May 4, 2023 01:40 To: discuss-gnuradio@gnu.org Subject: [EXTERNAL] Re: Getting GPS d

Re: Getting GPS data into stream

2023-05-04 Thread Marcus Müller
Hey Marcus, as you say, for a lot of science you don't get high rates – so I'm really less worried about that. More worried about Excel interpreting some singular data point as date; or, as soon as we involve textual data, all the funs with encodings, quoting/delimiting/escaping… (not to menti

Re: Getting GPS data into stream

2023-05-03 Thread Marcus D. Leech
On 03/05/2023 16:51, Marcus Müller wrote: Do agree, but really don't like CSV, too underspecified a format, too many ways that comes back to bite you (aside from a thousand SDR users writing emails that their PC can't keep up with writing a few MS/s of CSV…) I like CSV because you can hand yo

Re: Getting GPS data into stream

2023-05-03 Thread Marcus Müller
Hey Marcus, 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 app

Re: Getting GPS data into stream

2023-05-03 Thread Fabian Schwartau
Exactly, and there are some nice examples in the documentation :) Thanks a lot! Am 03.05.23 um 21:01 schrieb Marcus D. Leech: On 03/05/2023 14:59, Fabian Schwartau wrote: Sorry, forget it. Wrong sink... You probably want: https://wiki.gnuradio.org/index.php/File_Meta_Sink Am 03.05.23 um 20:

Re: Getting GPS data into stream

2023-05-03 Thread Marcus D. Leech
On 03/05/2023 14:59, Fabian Schwartau wrote: Sorry, forget it. Wrong sink... You probably want: https://wiki.gnuradio.org/index.php/File_Meta_Sink Am 03.05.23 um 20:52 schrieb Fabian Schwartau: OK, I think I found an easier way (at least for me), without having to write my own module - never

Re: Getting GPS data into stream

2023-05-03 Thread Fabian Schwartau
Sorry, forget it. Wrong sink... Am 03.05.23 um 20:52 schrieb Fabian Schwartau: OK, I think I found an easier way (at least for me), without having to write my own module - never done that. I used the "Tags Strobe" block in combination with the "Python Module" for my gps_get_position() function.

Re: Getting GPS data into stream

2023-05-03 Thread Fabian Schwartau
OK, I think I found an easier way (at least for me), without having to write my own module - never done that. I used the "Tags Strobe" block in combination with the "Python Module" for my gps_get_position() function. Anyway, where can I find a definition of the format of the "Tagged File Sink"?

Re: Getting GPS data into stream

2023-05-03 Thread Marcus D. Leech
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

Re: Getting GPS data into stream

2023-05-03 Thread Fabian Schwartau
Hi Marcus, wow, a lot to read... I am about to do this all manually without gnuradio ;) Thanks a lot, Fabian Am 03.05.23 um 20:04 schrieb Marcus Müller: 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 FIF

Re: Getting GPS data into stream

2023-05-03 Thread Marcus Müller
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 th