Distance measurement issue

Anything you want to read the CIR from needs to be connected to the computer. Other devices don’t need to be on a computer.
But when talking to more than one device you need to add some method of controlling which will reply or the order that they reply. If you run identical responder code on both then they will both respond at the same time and jam each other.

So basically I should somehow change the address of the multiple responders? Do you have some advice where I can bring some changes?

It’s all fairly standard:
Give each unit a unique ID in some way.
Modify the messages sent to include To and From IDs.
Only respond to messages with the correct ID in the To field.

This is a very common question and there are lots of previous posts on this subject.

Also, is it possible that sometimes while printing real CIR values and Imagvalues I got only real values from the initiator?

Hi @AndyA, I need your help with something, referred to the Cir behavior we discussed in the previous question: In the 3 m experiment the peak is around 740, which means 740*0.5= 370 ns, which would correspond to about 110 m.
Obviously therefore there is an initial bias that i must quantify, is it there a known or adjustable parameter? Thank you in advance again

The first peak is always around 740 for all ranges.

The receiver doesn’t know the time the transmit started. It only knows when it was received. Very early into the reception process it makes a guess as to where the start of the pulse is, once the reception is complete it can refine this guess and give a more accurate time. So they don’t want to make that initial guess time zero, if the guess turns out to be too late then you’d end up with negative times. Instead they make the initial guess around 740 in the CIR buffer.

The CIR data can tell you about reflections and other features within the packet but it can’t give you any absolute numbers, everything is relative to an arbitrary point in time.

So this 740 as value of the sample resembling the first peak, is just random? Is not written somewhere, right?

It’s not documented anywhere that I’ve ever seen but it seems logical.

You need to make a first guess at how to align the correlators, you know this guess could be off.
You really don’t want to have to worry about wrap around issues so normally you’d put this initial guess in the middle of the time window. That would maximise the error in this guess that you could cope with.
But you’re looking for a very weak signal, the chances of your first guess being later than truth are far higher than it being earlier than truth. So instead it’s better to put the initial guess around 3/4 of the way into the correlator time window. Which puts it around 740.