diff options
Diffstat (limited to 'lib/Travelynx/Model/InTransit.pm')
-rw-r--r-- | lib/Travelynx/Model/InTransit.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Travelynx/Model/InTransit.pm b/lib/Travelynx/Model/InTransit.pm index 5f27a22..ab724a4 100644 --- a/lib/Travelynx/Model/InTransit.pm +++ b/lib/Travelynx/Model/InTransit.pm @@ -1635,6 +1635,12 @@ sub estimate_trip_position { // $route[$i][2]{rt_dep} // $route[$i][2]{sched_dep} // 0; my $ts_dep = $route[$i][2]{rt_dep} // $route[$i][2]{sched_dep} // $route[$i][2]{rt_arr} // $route[$i][2]{sched_arr} // 0; + if ( $ts and $ts_dep and $now >= $ts and $now <= $ts_dep ) { + + # Currently at a stop + @now_latlon = ( $route[$i][2]{lat}, $route[$i][2]{lon} ); + last; + } if ( $ts and $prev_ts and $now > $prev_ts |