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.

IWR6843ISK: Detected points (x,y,z,Doppler) data format. Now in float format; need help converting.

Part Number: IWR6843ISK
Other Parts Discussed in Thread: IWR6843, MMWAVEICBOOST

Hi,

For the IWR6843 the data format for the detected points has been changed, from a Q-format to a float.

I have looked through the doxygen files and the visualizer gui code, but I can't seem to get the data to convert correctly. Could I get some help with this?

As an example, here is the x coordinate data for 2 detected points:

[0 0 0 255]

[200 1 255 60]

My attempts have involved typecasting from 8 bit to single precision float. What should the correct values be?

Thanks

  • Former Member
    0 Former Member

    Hello Khalid,

    Single precision float should be correct. I've included below the parsing function used in the mmWave Demo Visualizer for your reference.

    var getXYZ_type2 = function (vec, vecIdx, Params, numDetecObj, sizeObj) 
    {
        var x_coord = [];
        var y_coord = [];
        var z_coord = [];
        var doppler = [];
        var i, startIdx;
        var subFrameNum = Params.currentSubFrameNumber;
    
        /* list of detected objs
        for platform = 68xx
        typedef struct DPIF_PointCloudCartesian_t
        {
            x - coordinate in meters
            float  x;
            y - coordinate in meters
            float  y;
            z - coordinate in meters
            float  z;        
            Doppler in m/s 
            float    doppler;
        }DPIF_PointCloudCartesian;
        */
        for (i = 0; i < numDetecObj; i++)  
        {
            /*start index in bytevec for this detected obj*/
            startIdx = vecIdx + i*sizeObj;
    
            x_coord[i] = getFloat(vec[startIdx + 0],  vec[startIdx + 1],  vec[startIdx + 2],  vec[startIdx + 3]);
            y_coord[i] = getFloat(vec[startIdx + 4],  vec[startIdx + 5],  vec[startIdx + 6],  vec[startIdx + 7]);
            z_coord[i] = getFloat(vec[startIdx + 8],  vec[startIdx + 9],  vec[startIdx + 10], vec[startIdx + 11]);
            doppler[i] = getFloat(vec[startIdx + 12], vec[startIdx + 13], vec[startIdx + 14], vec[startIdx + 15]);
        }
    
        var range;
        range = math.sqrt(math.add(math.dotMultiply(z_coord, z_coord), math.add(math.dotMultiply(x_coord, x_coord), math.dotMultiply(y_coord, y_coord))));
    
        var rangeIdx = math.map(range, function (value) {
            return Math.round(value / Params.dataPath[subFrameNum].rangeIdxToMeters);
        });
    
        var dopplerIdx = math.map(doppler, function (value) {
            return Math.round(value / Params.dataPath[subFrameNum].dopplerResolutionMps);
        });
    
        return { rangeIdx: rangeIdx, dopplerIdx: dopplerIdx, x_coord: x_coord, y_coord: y_coord, z_coord: z_coord, doppler: doppler}
    
    }

    To be able to view the source code for the demo visualizer:  

    1) Click on Import to Gui Composer button

    2) After project is imported click on folder icon to view project files

    3) Source files can be viewed by navigation window on the left

    Amanda

  • Hi Amanda,

    Many thanks for your response. I had actually seen the code already (viewable through Chrome, Developer Tools <Ctrl+Shift+I>). So while it was helpful, it didn't quite solve the issue.

    Anyway, the solution turned out to be quite straightforward: it seems that the first result - [0 0 0 255] in my post - is nonsensical. All the rest of the data converts fine! Do you know the meaning of this first point? Anyway, ignoring it does the job.

  • Former Member
    0 Former Member in reply to Khalid Rajab
    Khalid,

    Can you clarify - are you saying that the rest of the UART stream parses fine but that your first point is always nonsensical?

    Amanda
  • Yes that's correct Amanda. My first stream of 16 values (the first detected point) is always:
    0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0
    So the X value [0 0 0 255] converts to a float on the order of 1e37.

    Saying that though, I'm away from my equipment and I only have a single saved data stream to work with. I'll verify later on these values always appear at the start of each frame.

    Aside from this issue all the rest of the data looks fine.
  • Former Member
    0 Former Member in reply to Khalid Rajab
    Hello Khalid,

    I tried to replicate the issue described and did not see this issue with the first detected point with data logging.

    If you continue to see this issue can you provide the cfg file and setup details that you are using?

    Amanda
  • Hi Amanda,

    I was using just the default configuration, and the issue showed whether I used 6 or 7 antennas. Detected points and Range profile are monitored.

    However when I switch on Clutter Removal the issue resolves itself.

    Saying that, this afternoon I'll try some proper testing, between different boards and with different configurations, and I'll let you know if the issue shows.

    Khalid

  • Okay, so it seems to be specific to one particular board, and my other board works fine! Also, as noted earlier the faulty board only exhibits the issue when CFAR is off.

    It is also specific to the 6843ISK (problem still shows when I connect it to a different MMWAVEICBOOST).

    So in the end it was just a hardware issue, and otherwise everything is working great. Thanks very much for your help Amanda!
  • Former Member
    0 Former Member in reply to Khalid Rajab
    Hello Khalid,

    Thanks for the detailed debug info - I've raised it with the hardware team.

    In the meantime, for the one board that's having the issue can you try increasing the frame trigger delay?
    This is the last parameter in the frameCfg. Perhaps try 100ms or greater of delay and see if you still observe the bad frame packet?

    Thanks,
    Amanda
  • Hi Amanda,

    Tried increasing the frame delay but it doesn't solve the issue.

    Best regards,
    Khalid