Radar Me (MQTT)

Radar Me is an MQTT client for Axis Radar D2050.  It publish radar detection data to an MQTT broker to simplify integration for systems processing radar data.  Writing specific rules in e.g. Node-Red is very easy.

This integration also decouples the data consumer from the device, allowing 3:rd party consumers without the risk of compromising the device.
mqtt

The tab “Radar” provides a way validate published objects.  Leaving the page running for a while will give a heatmap of detected objects.  The web page uses a JavaScript MQTT client that can only connect to an MQTT broker using Secure WebSocket (WSS).  You need to set your broker WSS port on the page.  If your broker does not support Secure WebSocket you can use a MQTT snooper like MQTT.fx to monitor published objects.

It is also possible to filter unnecessary detections (reflections and swaying objects) to improve the system performance (bandwidth, broker and consumer).

radar

MQTT Topic:

object/<clientid>

MQTT Payload:

{
“id”: 495555,
“timestamp”: 1561666067258,
“birth”: 1561666065458,
“speed”: 0.6,
“direction”: 29.9,
“distance”: 28.2,
“angle”: 49.1,
“class”: 2,
“x”: 6273,
“y”: 5278,
“sx”: 6173,
“sy”: 5441,
“px”: 6269,
“py”: 5290,
“active”: true
}

Id:  Unique object tracking ID
Timestamp: Detection time (standard JavaScript millisecond timestamp)
Birth:  Timestamp when object was first detected.  Age = Timestamp – Birth
Speed: Object speed in meter/second
Direction:  Object direction angle in degrees -180 to 180 where 0 is direction of the radar
Distance:  Distance in meter between object and radar
Angle: The location angle of the object related to the radar direction (-180 to 180)
Class:  Object classification. 2 = Undefined, 3 = Human, 4 = Vehicle.  Note that Classification is a bit unpredictable.
x/y:  The graphical coordinates for plotting on a screen.  The coordinate system is 0-8192,0-8192 where 0,0 is the top left corner.  This simplifies plotting data on e.g. a HTML canvas.
sx/sy:  The graphical coordinates of the first detection.  Can be used to calculate the graphical travelled distance.  DeltaX = x – sx, DeltaY  = y – sy
px/py:  The coordinates of the previous published x,y.  This simplifies plotting a line-path.
Active: True while object is being tracked.  False when the object disappears, and that tracking ID will not be published any more.

Considerations:

  • You need to have an MQTT broker.  Install a local mosquito broker on Linux or Windows.  Or, try a free cloud-based broker such as CloudMQTT (Cute Cat plan with up to 5 client connections and maximum bitrate of 10/Kbps).
  • Radar Me only supports standard MQTT 3.1 (TCP port 1883) connection, not TLS.  This means that the payload will be sent in clear text.

Download

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s