summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-12-02 19:23:48 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2023-12-02 19:23:48 +0100
commit801fea28fe765c59d9ee27a8cec876f6fece09d0 (patch)
tree00dd98ea1a66dfbfb3dd23ffab61e9d0af8f9fab
parent1d734c0767d6fc7d055d2861e090b2a99f1b4e10 (diff)
track-via: estimate real-time arrival data
-rwxr-xr-xbin/efa-m9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/efa-m b/bin/efa-m
index 479d48d..d4c4ba6 100755
--- a/bin/efa-m
+++ b/bin/efa-m
@@ -313,7 +313,10 @@ sub show_results {
}
elsif ($track_via) {
my $via = first { $_->name =~ m{$filter_via}io } $d->route_post;
- $dtime .= ' → ' . $via->arr->strftime('%H:%M');
+ $dtime
+ .= ' → '
+ . $via->arr->clone->add( minutes => $d->delay // 0 )
+ ->strftime('%H:%M');
}
if ( $d->delay ) {
$dtime .= ' ' . format_delay( $d->delay, $delay_len );
@@ -633,7 +636,9 @@ use B<-s> I<service> when making requests.
=over
-=item * B<--track-via> uses real-time data for departure but schedule data for arrival
+=item * EFA does not provide real-time data for the routes of requested
+departures. Hence, B<--track-via> estimates the arrival time from scheduled
+departure and departure delay
=back