Closed j-d-b closed 2 years ago
+1 for adding the direction field.
Setting is optional or not should probably follow the same rules as for the wzdx road events, and is debated in #229. Personally I'm always siding with the idea of leaving more flexibility to the schema production (setting it optional) and letting the consumers filter on their side if they require that information and if it's not filled to just ignore these entries.
As for multiple direction per device, I suggest you read my comment in #225. We have the situation where the same physical speed sensor unit can read data for both directions. This end up with a single device who have two lanes readings numbered lane #1. Either we create a business rule that the same device can be present twice in the feed (in each direction), or we make the direction field a array, just like road_event_ids
in the core details, and each TrafficSensorLaneData
also have their direction field.
Another +1 on adding the direction field.
For all feeds I've ever been apart of, the simplest solution has been to just create a second entry for the same device to handle the direction that it provides data. Since typically this is only detection units, it doesn't spiral too badly. The biggest benefit seems to come from travel time calculations since only the "detector" data for that direction has to be included. So I'm in favor of @Dunge 's proposal to just cover in business rule for the device to be present multiple times in the feed. The direction associated with the lane numbers helps to eliminate the confusion around multiple lane no. 1 to a single device.
I'm co-chair on the worker Presence subgroup. We are conducting interviews with various stakeholders these days. One comment we got is been able to include the road direction of road elements. So I'm in with this proposal
Resolved in #273.
Background
The RoadEventCoreDetails, used by all WZDx road events, includes a required
direction
property which is defined as:It's value is restricted to the Direction enumerated type.
This property is required as a single road event can only describe an impact to one direction of travel.
direction
allows a WZDx consumer to know which direction of the road the road event is on.Issue
For field devices, there is no
direction
property. That means a consumer cannot tell what direction of travel the field device applies to. That is problematic in several cases, such as when a consumer is using the location of a device in a SwzDeviceFeed to generate a road event.This issue was discussed in https://github.com/usdot-jpo-ode/wzdx/discussions/248
Proposed Solution
Adding
direction
to the FieldDeviceCoreDetails would resolve the issue. Perhaps, as discussed in #229, the property should be namedroad_direction
ordirection_of_travel
for clarity (as it's the direction of the road the device is on rather than the direction of the device).Next Steps
direction
on the FieldDeviceCoreDetails be required or optional?