wiki:CameraControllerspec

Version 6 (modified by jdalbey, 6 years ago) (diff)

v2

CPTMS Camera Controller

Specification


See the User Interface Prototype in the Subversion repository:  trunk/webapps/cptms/CameraDisplay.html
Purpose: Display four camera views of current CPTMS highway conditions in a grid layout.

Functions;

  1. The user selects which of the four displays is to be updated.
  2. The user selects which route (highway) is to be displayed. The list of routes is 1 5 22 55 57 73 74 91 133 142 241 261 405 605.
    Once a route is selected, the camera drop down box filters the camera choices to just those on the selected route.
  3. The users selects a camera. The chosen camera view appears in the selected display.

Data Sources

  1. cptms/data_layers/cctv_locations_D12.gson is a static file containing the filename and locationName (among other things) for all the CCTV cameras. For each camera is also has a property "nearVDS" which is the ID of the nearest VDS to that camera.
  2. cptms/images/CCTV folder contains all camera images. The route name is the second field of the filename. The traffic speed is the last field in the filename. E.g. 12-005-CCTV-0084-slow.jpg is camera 84 on route 5 for slow traffic.
  3. webapps/dynamicdata/highway_status.json is updated every 30 seconds with traffic flow. The camera display controller reads this file every 30 seconds. For each camera currently being displayed it looks up the nearest VDS (using the "nearVDS" property). Then, based on the color property of that VDS (lime = freeflow, yellow = slow, red = stopped), it then chooses the corresponding image to display from the cptms/images folder.

Attachments