webvmt / community-group

WebVMT Community Group
Other
6 stars 1 forks source link

Heading for observations #11

Open rjksmith opened 1 week ago

rjksmith commented 1 week ago

Background

Vehicle tracking work in OGC Testbed-19 has highlighted a requirement to record the direction in which an object is facing - such as a camera.

Issue

Passing vehicles were observed in Testbed-19 by static cameras at locations alongside a road. A method was devised to track a vehicle path from geotagged footage using sight lines which requires the location and heading of the camera to be known.

WebVMT supports location data natively, but orientation information such as heading is not supported in the 19 September 2023 Group Note.

Discussion

A possible workaround to include heading is to encapsulate this in synchronized data using either a GeoPose or a simple heading value. Both options were studied in Testbed-19 which raised a number of issues:

  1. GeoPose requires both location and orientation components. The location component (lat, lng, alt) is redundant since this is already encoded natively by WebVMT, and the orientation component mandates a yaw, pitch and roll (YPR) triple. As only heading is required, five of these six elements are redundant in this use case, so this format is unnecessarily verbose.
  2. Yaw has an ambiguous relationship to heading due to the many-to-one mapping of YPR triples to heading as discussed in Testbed-18 Engineering Report. For example, YPR triples of (90, 0, 0) and (270, 180, 180) both describe exactly the same orientation. In both cases the heading is due north, though this cannot be determined from the yaw component in isolation, so heading is better choice to define geospatial direction.
  3. Interpolation of heading can be achieved with simple linear interpolation, but this requires a workaround which breaks intervals at the 0-360 boundary to avoid rotational interpolation in the wrong direction. For example, the desired interpolation between 1 and 359 is the 2-degree anti-clockwise interval through north, rather than the 358-degree clockwise interval through south. The workaround is to split this into two intervals of 1 to 0 and 360 to 359. Handling heading natively enables WebVMT to interpolate rotations correctly without user intervention.

Proposal

Add heading in degrees as an optional component of location.

rjksmith commented 1 week ago

Example Files

Data files including a prototype design for heading (hdg) were published as part of the Testbed-19 Hillyfields Bubble dataset.

A hdg attribute was included in VMT files under the SceneGraph/Bubble/TrafficSync/StaticCameras subdirectory to indicate the heading of static cameras.