This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/AWR1642BOOST-ODS: 1642 ODS How to get the target peakval?

Part Number: AWR1642BOOST-ODS

Tool/software: Code Composer Studio

When i read the sorce code from the  "lab0004_obstacle_detection", i found the detect object peakval is zero . How can i get the target peakval?

void populateOutputs(ODSDemo_DataPathObj *obj)
{
    uint32_t ik,jk;
    float oneQFormat = (float) (1U << gMmwDssMCB.dataPathObj[0].xyzOutputQFormat);
    float formatConversion = oneQFormat/((float)gMmwDssMCB.cliCfg[0].dbscanCfg.fixedPointScale);

    /* 1. Detected Object List */
    for (ik = 0; ik < obj->numDetObj; ik ++)
    {
        obj->detObjFinal[ik].rangeIdx   = obj->detObjRaw[ik].rangeIdx;
        obj->detObjFinal[ik].speedIdx   = obj->detObjRaw[ik].speedIdx;
        obj->detObjFinal[ik].peakVal    = 0;
        obj->detObjFinal[ik].x       = (int16_t)(obj->detObjRaw[ik].x * oneQFormat + 0.5);
        obj->detObjFinal[ik].y       = (int16_t)(obj->detObjRaw[ik].y * oneQFormat + 0.5);
        obj->detObjFinal[ik].z       = (int16_t)(obj->detObjRaw[ik].z * oneQFormat + 0.5);
    }
    obj->numDetObjFinal = obj->numDetObj;


    /* 2. Clustering output for the point cloud subframe. */
    jk = 0;
    for (ik = 0; ik < obj->dbscanOutputData->numCluster; ik ++)
    {
        if (obj->dbscanOutputData->report[ik].numPoints == 0)
        {
            continue;
        }
        obj->clusterOpFinal[jk].xCenter      =  (int16_t)((float)(obj->dbscanOutputData->report[ik].xCenter)*formatConversion + 0.5);
        obj->clusterOpFinal[jk].yCenter      =  (int16_t)((float)(obj->dbscanOutputData->report[ik].yCenter)*formatConversion + 0.5);
        obj->clusterOpFinal[jk].zCenter      =  (int16_t)((float)(obj->dbscanOutputData->report[ik].zCenter)*formatConversion + 0.5);
        obj->clusterOpFinal[jk].xSize        =  (int16_t)((float)(obj->dbscanOutputData->report[ik].xSize)*formatConversion + 0.5);
        obj->clusterOpFinal[jk].ySize        =  (int16_t)((float)(obj->dbscanOutputData->report[ik].ySize)*formatConversion + 0.5);
        obj->clusterOpFinal[jk].zSize        =  (int16_t)((float)(obj->dbscanOutputData->report[ik].zSize)*formatConversion + 0.5);
        jk ++;
    }
    obj->numClusterFinal = obj->dbscanOutputData->numCluster;
}
  • Hi Mr. Wang,

    This application is based on mmw demo of mmwave SDK which you can refer to find out the calculation of peakval.

    mMWave SDK 2.1 mmw demo : packages\ti\demo\xwr16xx\mmw\dss\dss_data_path.c: MmwDemo_interFrameProcessing()  

                for(detIdx2=0; detIdx2 <numDetObjPerCfar; detIdx2++)
                {
                    if (numDetObj2D < MAX_DET_OBJECTS_RAW)
                    {
                        obj->detObj2DRaw[numDetObj2D].dopplerIdx = dopplerLine;
                        obj->detObj2DRaw[numDetObj2D].rangeIdx = obj->cfarDetObjIndexBuf[detIdx2];
                        obj->detObj2DRaw[numDetObj2D].peakVal = obj->sumAbsRange[(detIdx1 & 0x1) *
                            obj->numRangeBins + obj->cfarDetObjIndexBuf[detIdx2]];
                        numDetObj2D++;
                    }
                }

    Regards,

    Jitendra