I have modified the gen2-multiple-devices project in depthai-experiments to complete my final year project. It is using 4 OAK-D cameras to perform the drone positioning for indoor environment.
The parameter I want to pass is the distance (z) between the drone and the camera, which is already obtained in camera.py and I want to pass it to the tcp.py file I wrote and then send it to MATLAB. I am currently manually defining a distance myself (hard coding) which is working perfectly.
![](https://discuss.luxonis.com/assets/files/2023-05-01/1682952251-271352-camera.png)
Can somebody give me some advice about how to replace the DetectedDistance that I manually assigned myself with the z-distance detected by the camera in real time?
![](https://discuss.luxonis.com/assets/files/2023-05-01/1682952270-630965-hardcodingdistance.png)
![](https://discuss.luxonis.com/assets/files/2023-05-01/1682952310-779511-functiontosenddistance.png)
I've uploaded the source code to GitHub! https://github.com/JYe9/drone-multiple-devices
Any help or advice would be appreciated!