usdot-jpo-ode / wzdx

The Work Zone Data Exchange (WZDx) Specification aims to make harmonized work zone data provided by infrastructure owners and operators (IOOs) available for third party use, making travel on public roads safer and more efficient through ubiquitous access to data on work zone activity.
Creative Commons Zero v1.0 Universal
89 stars 62 forks source link

Change TrafficSensor and TrafficSensorLaneData traffic measure properties type to "number" #219

Closed j-d-b closed 2 years ago

j-d-b commented 2 years ago

Background

The average_speed_kph property on the TrafficSensor and TrafficSensorLaneData objects is type "integer". As data producers sometimes record speeds as an integer in miles per hour then convert that to kilometers per hour when building a SwzDeviceFeed, precision is lost when the kilometers per hour value must be rounded to an integer.

Note that the WorkZoneRoadEvent reduced_speed_limit_kph is already of type "number".

Proposed Solution

The average_speed_kph property on the TrafficSensor and TrafficSensorLaneData objects type should change to "number". This is a backwards compatible change.

j-d-b commented 2 years ago

This should be updated so that average_occupancy and volume_vph also have type Number, for consistency. There is no need to restrict them integers.

j-d-b commented 2 years ago

Resolved in #329.