From 78b2d995ef32b60cfbde086953c5069e327e08a5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 21 Apr 2019 15:46:19 +0200 Subject: Ignore stations without coordinates in distance calculation Reported by @marudor --- templates/journey.html.ep | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'templates/journey.html.ep') diff --git a/templates/journey.html.ep b/templates/journey.html.ep index 07c53c1..47c85f0 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -89,19 +89,35 @@ Entfernung + % if ($journey->{skip_route}) { + gps_off + <%= numify_skipped_stations($journey->{skip_route}) %>
+ % } % if ($journey->{km_route} > 0.1) { ca. <%= sprintf('%.f', $journey->{km_route}) %> km + (Luftlinie: <%= sprintf('%.f', $journey->{km_beeline}) %> km) + % } + % else { + ? % } - (Luftlinie: <%= sprintf('%.f', $journey->{km_beeline}) %> km) Geschwindigkeit - ∅ <%= sprintf('%.f', $journey->{kmh_route}) %> km/h - (<%= sprintf('%.f', $journey->{kmh_beeline}) %> km/h) - % if ($journey->{edited} & 0x0303) { - ∗ + % if ($journey->{skip_route}) { + gps_off + <%= numify_skipped_stations($journey->{skip_route}) %>
+ % } + % if ($journey->{km_route} > 0.1 and $journey->{kmh_route} > 0.01) { + ∅ <%= sprintf('%.f', $journey->{kmh_route}) %> km/h + (<%= sprintf('%.f', $journey->{kmh_beeline}) %> km/h) + % if ($journey->{edited} & 0x0303) { + ∗ + % } + % } + % else { + ? % } -- cgit v1.2.3