Hi guys, I have a live script and i want to add a code to show me in real time when a value (from the signal) is above my threshold and pop up a message.
My code runs into a "while figure is open".
Those peaks around 1.2m , 2.7m and 3.6m are objects. Lets say that i want to set the threshold around 0.01.
What i want is:
(lets do this about amplitude first).
a) to get back a message that says " There is an object " .
b) to get a 2nd message that says " There is an object at X meters ".
If anyone can help i would appreciate it a lot.
Thank you for your time guys !
This is a photo of my signal
1st figure is amplitude
2nd figure is Phase
[contentID,data_length,info,data] = xep.read_message_data_float();
disp(['Number of data float messages in queue: ' num2str(xep.peek_message_data_float())]);
i_vec = data(1:data_length/2);
q_vec = data(data_length/2+1:data_length);
iq_vec = i_vec + 1i*q_vec;
ph_amp.YData = abs(iq_vec);
ylim(ax_amp,[0 max([0.03 max(abs(iq_vec)) + 0.01])]);
th_amp.String = ['Baseband amplitude - frameCounter = ' num2str(info)];
ph_phase.YData = atan2(q_vec,i_vec);
th_phase.String = ['Baseband phase - frameCounter = ' num2str(info)];