-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Crowding data confidence determination (#673)
* Add locations feed engine * Add unit test for 'deletion' logic * Add a few more tests * remmove io puts * fix typedef * Begin reading in multi_carriage_details field * Calculate crowding data confidence level * Branch arrival and approaching audio logic based on crowding data confidence level * Add a todo for where to incorporate read loop selection logic * Clean up calculation logic * adjust mapping logic to match actual schema * Address PR comments * Use fully qualified name for CarriageDetails type
- Loading branch information
Showing
6 changed files
with
120 additions
and
25 deletions.
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
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
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
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,18 @@ | ||
defmodule Locations.CarriageDetails do | ||
defstruct label: nil, | ||
occupancy_status: nil, | ||
occupancy_percentage: nil, | ||
carriage_sequence: nil | ||
|
||
@type t :: %__MODULE__{ | ||
label: String.t(), | ||
occupancy_status: | ||
:many_seats_available | ||
| :few_seats_available | ||
| :standing_room_only | ||
| :crushed_standing_room_only | ||
| :full, | ||
occupancy_percentage: non_neg_integer(), | ||
carriage_sequence: non_neg_integer() | ||
} | ||
end |
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
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