-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trip status lastLocationUpdateTime is 0, even when location has been updated recently #151
Comments
In Puget Sound, it looks like this may depend on the agency, based on a quick look at the data. For Metro Transit, Here's the GTFS-rt for Metro output from OBA:
But for Pierce Transit, Here's the GTFS-rt for Pierce Transit output from OBA:
We'll need to dig into the code, as both GTFS-rt outputs do include timestamps for vehicle positions. But, OBA could be populating this field internally - it doesn't necessarily match the data coming into OBA for each agency. |
finally setting lastLocationUpdate as requested
Pierce Transit updates come via OrbCAD integration, not via GTFS-RT as KCM does. I'm trying this commit out now in the WMATA dev environment. I think its what you are looking for: |
@sheldonabrown Thanks for taking a shot at this! So if I'm reading this right, by design this change wouldn't have any impact on the HART data, because HART's GTFS-rt feed doesn't have a timestamp per vehicle position or per trip update, right? http://realtime.prod.obahart.org:8088/trip-updates?debug Who created that GTFS-realtime feed anyway ;)? IIRC, in the underlying OrbCAD database view a timestamp record per vehicle update wasn't given to us, although one probably exists somewhere in the database. Would require a change to the view and the GTFS-realtime export code to expose it. |
A very astute observation. I saw the timestamp in the snippet above but only assumed it was relative to the vehicle and not the entire feed. So yes, more work is required here.... |
I think that commit is still useful to deploy as is though, right? And if (hopefully when) per vehicle timestamp is added to HART or other feeds it would automatically pick it up? |
Yes agreed. I'll keep the commit for when the data is there. |
I'm working on showing real-time vehicle positions in OBA Android (OneBusAway/onebusaway-android#176 (comment)), using the trips-for-route API - for example:
http://api.tampa.onebusaway.org/api/where/trips-for-route/Hillsborough%20Area%20Regional%20Transit_5.json?key=TEST&includeStatus=true
I want to include the age of the location data in the marker balloons - however, the
lastLocationUpdateTime
field that should have this info is always0
- for example:For now, I'm using
lastUpdateTime
instead as a workaround.Here are the source GTFS-rt feeds for HART:
http://realtime.prod.obahart.org:8088/trip-updates?debug
http://realtime.prod.obahart.org:8088/vehicle-positions?debug
I haven't had a chance to look into this yet, but I wanted to capture the information here for review later. The GTFS-rt feeds don't have timestamps in the vehicle position entities themselves - only the feed itself has a timestamp, which could be why the
lastLocationUpdateTime
isn't being populated. If that's the case, you could potentially argue that this is working as intended. At any rate, just wanted to document this behavior so we know why its doing this.The text was updated successfully, but these errors were encountered: