Skip to content

Commit

Permalink
reverse_trip not reverse_prediction
Browse files Browse the repository at this point in the history
  • Loading branch information
bfauble committed Mar 21, 2024
1 parent afeb8f5 commit 282e28e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/concentrate/parser/gtfs_realtime_enhanced.ex
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ defmodule Concentrate.Parser.GTFSRealtimeEnhanced do

defp calculate_uncertainty("mid_trip"), do: 60
defp calculate_uncertainty("at_terminal"), do: 120
defp calculate_uncertainty("reverse_prediction"), do: 360
defp calculate_uncertainty("reverse_trip"), do: 360

defp schedule_relationship(nil), do: :SCHEDULED

Expand Down
4 changes: 2 additions & 2 deletions test/concentrate/parser/gtfs_realtime_enhanced_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -428,13 +428,13 @@ defmodule Concentrate.Parser.GTFSRealtimeEnhancedTest do
assert stu.uncertainty == 120
end

test "decodes reverse_prediction update_type to determine uncertainty value" do
test "decodes reverse_trip update_type to determine uncertainty value" do
update = %{
"trip" => %{
"trip_id" => "trip",
"route_id" => "route"
},
"update_type" => "reverse_prediction",
"update_type" => "reverse_trip",
"stop_time_update" => [
%{
"arrival" => %{"time" => 100, "uncertainty" => 500},
Expand Down

0 comments on commit 282e28e

Please sign in to comment.