Missing direction_id and bearing in realtime feeds

Hi,

I’ve been using the realtime .proto feed (https://api.transport.nsw.gov.au/v1/gtfs/vehiclepos/*), and I have found that many regions are supplying incorrect information.


Specifically, the following feeds always have vehicle.trip.direction_id === 0:

  • ferries/sydneyferries
  • buses
  • lightrail/innerwest
  • lightrail/newcastle
  • nswtrains
  • metro
  • sydneytrains

The one exception is lightrail/cbdandsoutheast, which correctly sets the direction id in each vehicle position report.


The sydneytrains endpoint also does not provide correct information for vehicle.position.bearing as it is always set to zero.


Are you able to fix these bugs please? In my opinion, it would be better to exclude the information completely than to provide incorrect data.

If the omission of this information is intentional, could you please provide a list of all the data that has incorrect values?


Cheers,
Matt

Seconding this question at least for the Sydney Trains realtime feed (this API). I’d like to display the realtime direction in a web application but there is no bearing available in the response. Although I probably have a workaround that would involve pre-computing the bearings from shapes.txt and getting the bearing from the nearest relevant shape point, if this data is available upstream, it’d be nice to have :slight_smile:

Hi There,

Most app devs infer the direction id from the location and movement of the vehicle.

I’ve sent an email to Sydney Trains to find out why direction_id and bearing fields aren’t included in their realtime feed. I’ll let you know once I get an answer. Thanks!

1 Like