discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: QT block to plot datapoints as they come in and keep history


From: Marcus D. Leech
Subject: Re: QT block to plot datapoints as they come in and keep history
Date: Wed, 18 Dec 2019 18:52:53 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 12/18/2019 06:42 PM, Lukas Haase wrote:
Hi Julian,

Thanks for the pointer.

If you have any idea how to proceed with this would be much appreciated:

[  4%] Generating moc_scope_impl.cxx
usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at 
"BOOST_JOIN"
lib/CMakeFiles/gnuradio-rollingscope.dir/build.make:62: recipe for target 
'lib/moc_scope_impl.cxx' failed
make[2]: *** [lib/moc_scope_impl.cxx] Error 1
CMakeFiles/Makefile2:135: recipe for target 
'lib/CMakeFiles/gnuradio-rollingscope.dir/all' failed
make[1]: *** [lib/CMakeFiles/gnuradio-rollingscope.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Thanks,
Luke

Gesendet: Mittwoch, 18. Dezember 2019 um 16:42 Uhr
Von: "Julian Arnold" <address@hidden>
An: "Lukas Haase" <address@hidden>
Cc: "discuss-gnuradiognu.org" <address@hidden>
Betreff: Re: QT block to plot datapoints as they come in and keep history

Hey,
I had similar requirements a few years ago and came up with a rolling-scope block: https://github.com/RWTH-iNets/gr-rollingscope/[https://github.com/RWTH-iNets/gr-rollingscope/tree/master/lib] I haven't used this code for quite a while so no guarantees but maybe it can serve as a base for your own implementation. Hope that helps!
Cheers,
Julian
  Am 18.12.2019 um 22:30 schrieb Lukas Haase <address@hidden>:
Hello,

I have a block which computes a distance and outputs this distance regularly 
(10x per second) via a message.

I am looking for a way to plot this distance over time: Basically, whenever a 
new update comes in, it should show this value while keeping a certain amount 
of past samples so that the distance can be seen over time.

I played with the QT GUI Time Sink for quite some time (playing with sample 
rate, update period, sending a vector of same numbers in the message or sending 
just a vector with one element). The value updates but it only shows the point 
at t=0 which moves up and down on the y-axis ... but I do not get the history 
over time.

I also tried implementing a "message-to-sample" converter that works like this:

def incoming_msg(self, msg): # whenever new message comes in, update our state
   if pmt.is_f32vector(msg):
      dist = pmt.to_python(msg)
      self.distance = dist[0]

def work(self, input_items, output_items): # this is a source block
    output_items[0][:] = self.distance # for each block, just output constant 
signal
    return len(output_items[0])

Now I see a constant line that shifts up and down regularly, but still no 
distance-vs-time plot.

Any suggestions?

Thanks,
Luke


For low-rate stuff, I've tended to just use a vector-display block, and then some python helper code to update that vector from time to time. This is great for a "stripchart" for science things like radio astronomy. Not that useful for higher-rate stuff.





reply via email to

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