Skip to content
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

Update /vehicles to parse more information #54

Open
alanna-zhou opened this issue Sep 10, 2020 · 0 comments
Open

Update /vehicles to parse more information #54

alanna-zhou opened this issue Sep 10, 2020 · 0 comments
Assignees

Comments

@alanna-zhou
Copy link
Contributor

alanna-zhou commented Sep 10, 2020

We match live tracking data to data at vehicles:
https://realtimetcatbus.availtec.com/InfoPoint/GTFS-Realtime.ashx?&Type=VehiclePosition&serverid=0&debug=True

If we include debug=True, this is a JSON view-- however, if you check vehicles.py, we parse it in protobuf.

The problem is, I only recently started parsing this, and we're actually missing some info (not crucial though). I've only included the bare min.

The task is to update the entity_dict in vehicles.py:
entity_dict[vehicle_id] = {
"vehicleID": vehicle_id, # new!
"bearing": bearing,
"congestionLevel": congestion_level,
"latitude": latitude,
"longitude": longitude,
"routeID": route_id,
"speed": speed,
"timestamp": timestamp,
"tripID": trip_id,
}

to add more fields that can match the fields we already have but that we're just giving default values for in the PR below.

Highly recommend that you look at cuappdev/ithaca-transit-backend#305 to get more ideas on what other information we can be parsing to provide the empty data that we are just giving default values for.

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

No branches or pull requests

2 participants