PDA

View Full Version : QwtPolarPlot as radar display. Plotting in realtime.



crooveck
14th March 2013, 09:59
Hello
I need to implement something similar to military radar display.
I have a program that generates many vector's of doubles (std::vector<double>) and stores them in boost::circular_buffer. Now I need to implement a polar plot to display it in real time, as they are pushed into the buffer.

I've also found QwtPolar that ideally suits my needs (spectrogram version). But it needs QwtRasterData on input and create the plot.
My question is: is there a way to implement real time radar display using qwtpolar (or other qwt/qt widgets).

Uwe
14th March 2013, 12:04
The spectrogram example shows how to display a spectrogram - if you don't want this I can't see how this example suits your needs.
As you have a vector of points it looks more like you want to display a QwtPolarCurve on a polar plot - but what is your question then ?

Uwe

crooveck
14th March 2013, 12:22
Thanks for your reply Uwe.
I don't have a vector of points, but many vectors of doubles. Single vector<double> represents data in radial position. If I had 360 vectors like that, I could draw a full circle with 1deg interval. In places where my double value is higher colour changes... that's exactly what polar spectrogram is.
The problem is, that I'm adding new vectors of double in realtime to the buffer. That's not static data. I do many and many rounds with my "virtual radar antenna" and I i just need that vectors to be drawn on a polar plot, according to the antenna angle.
My ideal data structure would be something like a standard QwtRasterData but with some functionality of a buffer, into which I can push new vector<double> and each time new data is pushed, plot is refreshing or only new data appears on a plot.

Uwe
15th March 2013, 10:45
Well this doesn't sound like raster data to me - isn't it more like vector data spanning a region in polar coordinates. Then the region has to be filled where the color of each pixel depends on the distance from the origin ?

Uwe