Thread: 3 qwt plot with same time axis but different samplerate

1. Beginner
Join Date
May 2012
Posts
1
Qt products
Platforms

3 qwt plot with same time axis but different samplerate

Hello all,

I'm new in this forum and I hope that you could help me. I don't find a thread with a simliar question but I'm not sure if I have search for the correct key-words...

I have this problem.

I work in a project to detect if someone has sleep apnea. so I have created different captures which send the measured data over the new bluetooth4 to my host pc. in my application I will show the measured values in different plots.

but What I don't understand and I don't found in the different examples from qwt is this.

I have a sensor which sends all 2 seconds the body themperature and another sensor which transmit all 100ms the movement of the thorax. My professor will finally have 2 plots with the same timelength (in example a measure of 2minutes (xAxis) ) and the plots must be similar. that will mean that my measure after 1 minute must be at the same position for both plots. So I have no idea how I can do this because the one sensor receive a new measure every 2 seconds and the other every 100ms.

and then he will also that the graph shows only the last two minutes (like the cpu example where the plot shows only the measure of 1 minute)

I hope someone has any ideas for my problems.

wl06

2. Re: 3 qwt plot with same time axis but different samplerate

What is the problem? As long as the x-values for all of the curves have the same units and you use the same x-axis scale range for all plots, all of the plots will be similar. The curve that displays the 100ms sampling rate data will have 20 times more points than the one that samples every 2s, but that is the only difference.

The trick is you must convert the x values to time in seconds for both plots. So the 100ms curve will have x values at 0.0, 0.1, 0.2, 0.3, ... seconds, and the other curve will have points at 0, 2, 4, 6, 8, ... seconds.