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

Find real time stop arrivals [depends on #24, #26][advanced] #27

Closed
daphshez opened this issue Mar 20, 2017 · 1 comment
Closed

Find real time stop arrivals [depends on #24, #26][advanced] #27

daphshez opened this issue Mar 20, 2017 · 1 comment
Assignees

Comments

@daphshez
Copy link
Collaborator

daphshez commented Mar 20, 2017

The goal of this task is to build a table with at least the following fields:

  • trip_id
  • date
  • stop_code
  • actual_arrival_time

Write a script that outputs that to a CSV (no need to write to DB at this point). The script should go under /siri .

How to do this
Assuming

You should be able to do something like:

  • For each trip_id in siri_arrivals, build:

    • planned stops: a list of all planned stops in the trip, from gtfs_stop_times (stop_code & shape dist ratio)
    • known locations: a list of know positions from siri_arrivals - route_offset & timestamp
  • For each stop in planned stops, find the last know location before it, and first known location after it. If the previous know location was at time t1 and offset x1, and the next known location is at time t2 and offset x2, and the stop offset is xs, then

    ts = (xs - x1) / (x2 - x1) * (t2 - t1)

What do I need to know

@daphshez daphshez changed the title Create real time stop arrivals table Find real time stop arrivals [depends on #24, #26][advanced] May 29, 2017
@daphshez daphshez added the Hackathon Preparation for the upcoming hackathon label May 29, 2017
@MYank0 MYank0 assigned MYank0 and unassigned MYank0 Nov 13, 2017
@MYank0 MYank0 added Main and removed Hackathon Preparation for the upcoming hackathon labels Nov 13, 2017
@AvivSela AvivSela self-assigned this Jan 3, 2018
@AvivSela
Copy link
Collaborator

AvivSela commented Jan 3, 2018

Done.
The script is in open-bus/siri/analyseRealTime/Main.py

@AvivSela AvivSela closed this as completed Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

3 participants