Loading lib/Travelynx/Model/InTransit.pm +9 −2 Original line number Diff line number Diff line Loading @@ -1697,6 +1697,7 @@ sub estimate_trip_position { my $now = DateTime->now( time_zone => 'Europe/Berlin' )->epoch; my $prev_ts; my $delta = 1; for my $i ( 0 .. $#route ) { my $ts = $route[$i][2]{rt_arr} Loading @@ -1721,7 +1722,7 @@ sub estimate_trip_position { { @now_latlon = $self->estimate_trip_position_between_stops( now => $now, from => $route[ $i - 1 ], from => $route[ $i - $delta ], from_ts => $prev_ts, to => $route[$i], to_ts => $ts, Loading @@ -1729,7 +1730,13 @@ sub estimate_trip_position { ); last; } if ($ts_dep) { $prev_ts = $ts_dep; $delta = 1; } else { $delta += 1; } } if ( not @now_latlon Loading Loading
lib/Travelynx/Model/InTransit.pm +9 −2 Original line number Diff line number Diff line Loading @@ -1697,6 +1697,7 @@ sub estimate_trip_position { my $now = DateTime->now( time_zone => 'Europe/Berlin' )->epoch; my $prev_ts; my $delta = 1; for my $i ( 0 .. $#route ) { my $ts = $route[$i][2]{rt_arr} Loading @@ -1721,7 +1722,7 @@ sub estimate_trip_position { { @now_latlon = $self->estimate_trip_position_between_stops( now => $now, from => $route[ $i - 1 ], from => $route[ $i - $delta ], from_ts => $prev_ts, to => $route[$i], to_ts => $ts, Loading @@ -1729,7 +1730,13 @@ sub estimate_trip_position { ); last; } if ($ts_dep) { $prev_ts = $ts_dep; $delta = 1; } else { $delta += 1; } } if ( not @now_latlon Loading