Outputting the Range and doppler_bin values
HichriAyoub opened this issue · 1 comments
HichriAyoub commented
Hello,
although the project doesnt output doppler_bin range and bearing i was able to change somethings in the header file and the datahandlerclass.cpp to make it possible to have the bearing but im still having problem with the other 2 it is actually outputting the index of range and doppler_bin here is the code i am using
radarscan.range = mmwData.newObjOut.range * vrange;
radarscan.velocity = mmwData.newObjOut.v
radarscan.doppler_bin = mmwData.newObjOut.doppler;
the outputs im getting are these :
header:
seq: 4706
stamp:
secs: 1648822232
nsecs: 384347895
frame_id: "ti_mmwave_0"
point_id: 1
x: 0.5450921058654785
y: -0.3482675850391388
z: 0.5625860691070557
range: 4775.673828125
velocity: -1.476569414138794
doppler_bin: 38806
bearing: -32.57512664794922
intensity: 47.127925872802734
---
Does anyone know how to solve this
HichriAyoub commented
The issue was resolved by myself all i had to do was add a
float range in mmwaveCloudtype
then add 2 simple code for range doppler and range that you will find here
RScan->points[i].range = sqrt(radarscan.x*radarscan.x +
radarscan.y*radarscan.y + radarscan.z*radarscan.z);
radarscan.range = sqrt(radarscan.x*radarscan.x +
radarscan.y*radarscan.y + radarscan.z*radarscan.z);
radarscan.velocity = mmwData.newObjOut.velocity;
radarscan.doppler_bin = (uint16_t)(
mmwData.objOut.dopplerIdx + nd / 2);
Hope it will be usefull to someone