-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix incorrect type for direction id, write pseudocode for direction id
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
- for stop id, fetch all the stops | ||
|
||
```rs | ||
fn get_departures(stop_id: String, chateau: String) -> DepartureBoard {} | ||
``` | ||
|
||
```rs | ||
struct DepartureBoard { | ||
updated_time_ms: u64, | ||
departures: Vec<DeparturesPerRoute>> | ||
} | ||
|
||
struct DeparturesPerRoute { | ||
route_id: String, | ||
chateau: String, | ||
//headsign -> Sorted Vec of Departures | ||
directions: BTreeMap<String, Vec<DepartureArrivalEvent>> | ||
} | ||
|
||
struct DepartureArrivalEvent { | ||
stop_id: String, | ||
stop_location: geo::Point, | ||
stop_code: String, | ||
scheduled_departure_time_s: Option<u64>, | ||
//optional if the service is the last stop | ||
scheduled_arrival_time_s: Option<u64>, | ||
actual_departure_time_s: Option<u64>, | ||
actual_arrival_time_s: Option<u64>, | ||
has_realtime: bool, | ||
trip: gtfs_rt::TripDescriptor, | ||
is_frequency: bool, | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters