Changes between Version 5 and Version 6 of CameraControllerspec


Ignore:
Timestamp:
04/02/2020 06:42:53 PM (6 years ago)
Author:
jdalbey
Comment:

v2

Legend:

Unmodified
Added
Removed
Modified
  • CameraControllerspec

    v5 v6  
    55Display four camera views of current CPTMS highway conditions in a grid layout.  
    66 
    7 [[Image(wiki:CameraControllerspec:CameraDisplayPrototype2.png)]] 
     7[[Image(wiki:CameraControllerspec:CameraDisplayPrototype3.png, 640px)]] 
    88 
    99Functions; 
     
    1414 
    1515Data Sources 
    16  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. 
     16 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. 
    1717 1. `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. 
    18  1. `webapps/dynamicdata/highway_status.json` is updated every 30 seconds with traffic flow.  The camera display controller reads this file every 30 seconds and obtains the "color" property for each camera currently being displayed.  It then chooses the corresponding image to display from the `cptms/images` folder.  lime = freeflow, yellow = slow, red = stopped. 
     18 1. `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. 
    1919 
    20 The complicated part is that the highway status data doesn't include where the CCTV cameras are.  Luckily CPTMS already has the algorithm for determining where the nearest CCTV camera is for a given VDS.   This could be used as is (do an exhaustive search), or write the converse algorithm that given a CCTV will find the traffic flow at the nearest VDS. 
    2120