Other Parts Discussed in Thread: IWR1642
Hi,
I am developing an application based on the mmwave lab sample code, which is used along the High Accuracy Visualizer application. I am able to receive the data and view the objects in the High Accuracy Visualizer web page. Now I want to modify the data transmitted such that, only the information of the closest detected object is transferred. I am assuming MmwDemo_transmitProcessedOutput() function is the one which actually sends the data over UART. I am confused about the following code section:
/* Send detected Objects */
{
MmwDemo_output_message_dataObjDescr descr;
MmwDemo_detectedObj dummyDetectionOut; //work around the current format
int32_t tempRange;
memset((void *)&dummyDetectionOut, 0, sizeof(MmwDemo_detectedObj));
tempRange = (int32_t)(outputData->rangeEst * 1048576.f);
dummyDetectionOut.dopplerIdx = 0;
dummyDetectionOut.peakVal = 0;
dummyDetectionOut.rangeIdx = (uint16_t) tempRange & 0xFFFF;
dummyDetectionOut.x = tempRange >> 16;
dummyDetectionOut.y = 0;
dummyDetectionOut.z = 0;
UART_writePolling (uartHandle,
(uint8_t*)&tl[tlvIdx],
sizeof(MmwDemo_output_message_tl));
/* Send objects descriptor */
descr.numDetetedObj = 1;
descr.xyzQFormat = 20;
UART_writePolling (uartHandle, (uint8_t*)&descr, sizeof(MmwDemo_output_message_dataObjDescr));
/*Send array of objects */
UART_writePolling (uartHandle, (uint8_t*)&dummyDetectionOut, sizeof(MmwDemo_detectedObj) * 1);
tlvIdx++;
}
Here, it looks like only one object's data is being sent which is based on "rangeEst" value.
1. What is the significance of this parameter?
2. Why is it multiplied by 1048576.f?
3. In the graphs displayed in High Accuracy Visualizer, it seems to contain data about multiple objects. How can I identify the closest detected object in MmwDemo_transmitProcessedOutput() function so that I need to send only that information over UART.
Thanks and Regards
Ison Thomas