Skip to content

Update /vehicles to parse more information #54

Description

@alanna-zhou

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions