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.

GTrack library makes an error when calculating sine and cosine of an angle.

Part Number: IWR6843ISK-ODS

Hi,

I am studying gtrack library of people count demo in the package below.

"C:\ti\mmwave_industrial_toolbox_3_4_0__win\mmwave_industrial_toolbox_3_4_0\labs\lab0020_pplcount_Overhead\src\common\gtrack"

I exported the gtrack source code to Windows PC and built it in Visual Studio so that it can run on Windows PC (say gtrack.exe).

When I run this gtrack.exe with point cloud data given to it, I encountered a problem that this gtrack.exe application will crush.

Looking inside the source code of gtrack, I figured out that it makes an error in the following line.

file: gtrack_math.c

function: void gtrack_sincosd(float theta, float* pSinVal, float* pCosVal);

line: ysin0 = sinTable[i];

The thing is, when argument theta is -180.0, index i will be -1, and as a result it makes "index is out of range" error.

Is there any assumption that the argument theta is always in the range of (-180 < theta <= 180)?

Best regards,

Fields

  • Hi Fields,

    The data fed to GTrack will be between -60 and +60 when on the device. For example, People Counting Capon Signal chain only scans a 120 degree FOV. The best any PCB based antenna could theoretically do would be -90 to +90 (180 degrees total, but this performance has not been practically achieved with TI's EVMs). 

    The lookup table is used to save time on angle calculations, so if you are trying to expand GTrack to be used for wider angles, you can expand the lookup table or replace the lookup with the sin calculation.

    Regards,

    Justin