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 Instruments  Convention used by Radar Toolbox 



Elevation is the angle between the target (R) vector and the xy plane with positive elevation defined by the direction of the zaxis. 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 xaxis direction, whereas convention used in Texas Instruments has zero azimuth aligned with the yaxis. Set Texas Instruments y data to Radar Toolbox x data which results in zero azimuth pointing in the xaxis direction in Radar Toolbox.
$${x}_{RT}={y}_{TI}$$
Set Radar Toolbox y data as the negative of the Texas Instruments xaxis to keep a righthanded coordinate system.
$${y}_{RT}={x}_{TI}$$
Texas Instruments and Radar Toolbox use the same convention for the zaxis. 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)$$