Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

vehicles don't have individual timestamps #22

Open
barbeau opened this issue Aug 15, 2018 · 1 comment
Open

vehicles don't have individual timestamps #22

barbeau opened this issue Aug 15, 2018 · 1 comment
Assignees
Labels

Comments

@barbeau
Copy link
Member

barbeau commented Aug 15, 2018

If you look at the vehicle positions feed:
http://maps.usf.edu:8088/vehicle-positions?debug

header {
  gtfs_realtime_version: "1.0"
  incrementality: FULL_DATASET
  timestamp: 1534340044
  [transit_realtime.oba_feed_header] {
    incremental_index: 520940
    incremental_heartbeat_interval: 60
  }
}
entity {
  id: "11"
  vehicle {
    trip {
      route_id: "F"
    }
    position {
      latitude: 28.05921
      longitude: -82.41301
      bearing: 0.0
    }
    vehicle {
      id: "1537"
    }
    occupancy_status: MANY_SEATS_AVAILABLE
  }
}

...the header has a timestamp, but the individual vehicles don't. Vehicle timestamps are important for analysis and generating predictions, as well as showing an accurate "Last updated..." message to the user.

We need to look and see if the underlying API was missing this data, or if we missed adding it in the original implementation (in which case we should add it now).

@barbeau barbeau added the bug label Aug 15, 2018
@minhhpham
Copy link

The underlying API does not provide this data. On the second page of the documentation, in the Result Structure section, the VehicleLocation array only contains tripId, vehicleLat, and vehicleLong:

|-VehicleLocation [an array of vehicle location (1 per each unique vehicle) for
vehicles on the current route]
|-tripId [We don't currently support trip id in this context]
|-vehicleLat [the latitude position of a vehicle on the current route]
|-vehicleLong [the longitude position of a vehicle on the current route]

This is consistent with the result that we got from the request http://api.syncromatics.com/feed/511/prediction/?api_key={key}&format=json:

 "VehicleLocation":[  
               {  
                  "vehicleLat":28.065729,
                  "vehicleLong":-82.410401,
                  "VehicleId":"1701"
               },
Etc.
]

We are requesting Syncromatics for this information.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants