Skip to content

radar trap Adapter (english)

carsten04 edited this page Apr 10, 2024 · 7 revisions

radar-trap generates information about the current traffic situation for freely definable routes and areas. The information is available in the object tree of the adapter, following the usual device/channel/state structure, and can be displayed in the VIS-2.

The following disruptions are determined:

  • Construction Site

    • Day Construction Site
    • Permanent Construction Site
  • danger spot

    • Accident
    • Defective Vehicle
    • Obstacle
    • Risk of Slipping
    • Visual Obstruction
  • Fixed Speed Camera

    • Bus Lane Control
    • Distance Control
    • Dummy
    • Entry Control
    • Height Control
    • No Overtaking
    • Pedestrian Crossing
    • Ramp Control
    • Section Control
    • End of Section Control
    • Speed Cameras
    • Speed Cameras In Tunnel
    • Traffic Light and Speed Camera
    • Traffic Light Camera
    • Weight Control
  • Mobile Speed Camera

    • Alcohol Control
    • Distance Control
    • General Traffic Control
    • Speed Camera
    • Traffic Light Camera
    • Unknown
    • Weight Control
  • Mobile Speed Camera Hotspot

    • Mobile Speed Camera Hotspot
  • Police Report

    • Police Report
  • Police Report, Archive

    • Police Report, Archive
  • Semi-Stationary Speed Camera

    • Speed Cameras, Semi-Stationary
  • Traffic Jam End

    • Traffic Jam End

A tree structure for routes and areas would look like this, for example:

image

  • infos: contains information about the route or area
  • cron-job: contains pause, resume, and run states
  • new: contains all new obstacles compared to the last update
  • established: contains all unchanged obstacles compared to the last update
  • rejected: contains all obstacles from the last update that are no longer present in the current update
  • current: contains all obstacles of the current update (established and new)

The routes and areas can be conveniently created via the adapter admin. However, before this can work, a Mapbox account needs to be created for route determination, and the generated token must be entered in the settings.

Settings

image

The Feathers Port only needs to be changed if the default port is already used elsewhere. Feathers is a real-time framework required for the synchronization of routes and areas.

Routes

image

When entering a route, you can choose between different profiles and exclusions. The start and destination input is context-sensitive and also supports POIs (Points of Interest). Once the correct address is displayed, it must be confirmed by pressing RETURN.

The input field Maximum Trap Distance indicates the maximum allowed obstacle distance from the route in meters. This allows for the detection and later visualization of obstacles that are not directly part of the route.

The input field Cron Pattern defines a cron pattern specific to the route for updating it.

After creating the route, the buttons Rewind, Play, and Stop become usable. Stop halts the current cron job, Play restarts the current cron job, and Rewind immediately updates the route even outside the current cron pattern. These three buttons are also available as states and can be used in custom scripts, visualizations, etc.

Areas

image

When entering an area, the input field Cron Pattern serves the same purpose as in route entry. This also applies to the buttons Rewind, Play, and Stop. The area is created graphically by drawing a closed polygon (freehand or circular). To do this, click on the globe symbol.

image

Maps

On the Maps tab, you can view the previously created routes and areas with their associated disruptions.

image

image

VIS-2

image

In the VIS-2, three widgets are available. Radar Traps Area displays areas, Radar Traps Route displays routes, and Radar Traps Info presents a list of configured obstacles. If the list and route or list and area are displayed together, clicking on a list entry will zoom in on the corresponding obstacle on the map.

Note

Under the configured Feathers Port, the adapter provides an API for routes, directions, and traps. You can view all route information, direction information, or trap information by visiting http://[hostname]:[configured Feathers Port]/[routes|directions|traps]. The output is in JSON format. To enhance the display, you can install one of the various JSON display plugins available for your browser. Please note that this is a fully-fledged REST API. Changes to routes and areas should always be made through the input forms.