## Coordinate System for Object Detection Using mmWaveRadar

The convention used by the `mmWaveRadar` object in Radar Toolbox Support Package for Texas Instruments® mmWave Radar Sensors to report the detections is different from the convention used by Texas Instruments. The mmWaveRadar object follows the convention followed by Radar Toolbox. This section describes the transformation used to convert the coordinate system used by Texas Instruments radar sensors to the one used by Radar Toolbox. By converting the detections to follow the convention used by the Radar Toolbox, the detections can be directly processed by tracking filters like the `initcvekf` function used by `radarTracker`.

Convention used by Texas InstrumentsConvention used by Radar Toolbox

• Uses the x-axis as antenna array axis

• Radar's azimuth measurement is the rotation around the negative z-axis, with zero azimuth aligned with the y-axis.

• Uses the y-axis as antenna array axis

• Radar's azimuth measurement is the rotation around the positive z-axis, with zero azimuth aligned with the x-axis (Right-hand rotation or counter-clockwise).

Elevation is the angle between the target (R) vector and the x-y plane with positive elevation defined by the direction of the z-axis. The convention used for elevation is same for Texas Instruments radar sensors and Radar Toolbox.

To convert the position data reported by Texas Instruments radar sensors to match the frame convention used by Radar Toolbox functions, a transformation is applied. After applying the transformation raw value obtained from Texas Instruments (TI) radar sensors are converted into detections of type `objectDetection` in Radar Toolbox (RT).

`${\left[\begin{array}{l}x\\ y\\ z\end{array}\right]}_{RT}=R{\left[\begin{array}{l}x\\ y\\ z\end{array}\right]}_{TI}={\left[\begin{array}{l}y\\ -x\\ z\end{array}\right]}_{TI}$`

The convention used in Radar Toolbox requires zero azimuth aligned in the x-axis direction, whereas convention used in Texas Instruments has zero azimuth aligned with the y-axis. Set Texas Instruments y data to Radar Toolbox x data which results in zero azimuth pointing in the x-axis direction in Radar Toolbox.

`${x}_{RT}={y}_{TI}$`

Set Radar Toolbox y data as the negative of the Texas Instruments x-axis to keep a right-handed coordinate system.

`${y}_{RT}=-{x}_{TI}$`

Texas Instruments and Radar Toolbox use the same convention for the z-axis. Therefore, there is no change for z.

`${z}_{RT}={z}_{TI}$`

The rotation, R, that transforms the Texas Instruments data into the Radar Toolbox frame is:

`$R=\left(\begin{array}{ccc}0& 1& 0\\ -1& 0& 0\\ 0& 0& 1\end{array}\right)$`