Hi, I am working on a project to measure distance between two objects (A and B) using Arduino.
Both these two objects are moving with time among other objects, but there is always a Line of sight available (assumed for now). After some research I concluded to use ultrasonic sensors.
My idea is to use an ultrasonic transmitter on object A and a receiver on object B

Now my understanding of ultrasonic sensors comes frrom this Arduino ultrasonic sensor tutorial blog, i have also shared the image above for ease of asking this question
From this what is understand is, the HCSR04 module has Tx and Rx units and they work independently. Meaning I can connect the two set of generic HCSR04 ultrasonic sensors and Arduino on object A and object B.
Then on object A I can just give a 10ms pulse to trigger pin of sensor and listen to incoming pulse on object B using the Echo pin of the ultrasonic sensor
I thought this would work until I realized I don't know when exactly the pulse was trigger from Object A to do my calculation as mentioned in the blog.
I tried using RTC on both to sync time, but something tells me it won't be reliable.
So it appears I am stuck, is there any way to do this better? I am even willing to scarp the progress and use a better sensor if something like that is available.
Both these two objects are moving with time among other objects, but there is always a Line of sight available (assumed for now). After some research I concluded to use ultrasonic sensors.
My idea is to use an ultrasonic transmitter on object A and a receiver on object B

Now my understanding of ultrasonic sensors comes frrom this Arduino ultrasonic sensor tutorial blog, i have also shared the image above for ease of asking this question
From this what is understand is, the HCSR04 module has Tx and Rx units and they work independently. Meaning I can connect the two set of generic HCSR04 ultrasonic sensors and Arduino on object A and object B.
Then on object A I can just give a 10ms pulse to trigger pin of sensor and listen to incoming pulse on object B using the Echo pin of the ultrasonic sensor
I thought this would work until I realized I don't know when exactly the pulse was trigger from Object A to do my calculation as mentioned in the blog.
I tried using RTC on both to sync time, but something tells me it won't be reliable.
So it appears I am stuck, is there any way to do this better? I am even willing to scarp the progress and use a better sensor if something like that is available.