{% extends 'base.html.twig' %} {% import 'components/datalogger_tabs.html.twig' as tabs %} {% block title %}GPS Daten - Dashboard{% endblock %} {% block content %}
{% if not apiAvailable %}
Warnung: Datalogger API ist nicht erreichbar. Keine GPS-Daten verfügbar.
{% endif %}
{% if datalogger is defined %} {{ tabs.renderTabs(datalogger, app.request.attributes.get('_route')) }} {% endif %}
{% if currentGps is not empty and currentGps.error is not defined %}
{% if currentGps.lat is defined and currentGps.lat is not iterable %}
{{ currentGps.lat|number_format(6) }} Breitengrad
{% endif %} {% if currentGps.lon is defined and currentGps.lon is not iterable %}
{{ currentGps.lon|number_format(6) }} Längengrad
{% endif %} {% set speedVal = currentGps.speed_kmh is defined ? currentGps.speed_kmh : (currentGps.speed is defined ? currentGps.speed : null) %} {% if speedVal is not null and speedVal is not iterable and speedVal is not same as('') %}
{{ speedVal }} km/h Geschwindigkeit
{% endif %} {% if currentGps.source is defined and currentGps.source %}
{{ currentGps.source }} Quelle
{% endif %} {% if currentGps.altitude is defined and currentGps.altitude is not iterable and currentGps.altitude is not same as('') %}
{{ currentGps.altitude }} m Höhe
{% endif %} {% if currentGps.satellites is defined and currentGps.satellites is not iterable and currentGps.satellites is not same as('') %}
{{ currentGps.satellites }} Satelliten
{% endif %}
{% endif %}

Aktueller GPS-Punkt

{% if currentGps.error is defined %}
Fehler: {{ currentGps.error }}
{% elseif currentGps is not empty %}
{% if currentGps.lat is defined and currentGps.lat is not iterable and currentGps.lat is not same as('') %}
Breitengrad {{ currentGps.lat }}
{% endif %} {% if currentGps.lon is defined and currentGps.lon is not iterable and currentGps.lon is not same as('') %}
Längengrad {{ currentGps.lon }}
{% endif %} {% if currentGps.datetime is defined and currentGps.datetime is not iterable and currentGps.datetime is not same as('') %}
Datum/Zeit {{ currentGps.datetime }}
{% elseif currentGps.timestamp is defined and currentGps.timestamp is not iterable and currentGps.timestamp is not same as('') %}
Zeitstempel {{ currentGps.timestamp|round|date('d.m.Y H:i:s') }}
{% endif %} {% if currentGps.accuracy is defined and currentGps.accuracy is not iterable and currentGps.accuracy is not same as('') %}
Genauigkeit {{ currentGps.accuracy }} m
{% endif %} {% if currentGps.source is defined and currentGps.source %}
Positionsquelle {{ currentGps.source }}
{% endif %}
{% if currentGps.lat is defined and currentGps.lat is not iterable and currentGps.lon is defined and currentGps.lon is not iterable %} {% endif %} {% else %}

Keine GPS-Daten verfügbar

{% endif %}

GPS-Punkte (letzte {{ hours }} Stunden, max. {{ limit }})

{% if gpsPoints.error is defined %}
Fehler: {{ gpsPoints.error }}
{% elseif gpsPoints is iterable %}
{% if gpsPoints is iterable %} {% for point in gpsPoints|slice(0, 100) %} {% set pointSpeed = point.speed_kmh is defined ? point.speed_kmh : (point.speed is defined ? point.speed : null) %} {% endfor %} {% endif %}
Zeitstempel Breitengrad Längengrad Geschwindigkeit Quelle Genauigkeit Höhe Aktionen
{% if point.datetime is defined and point.datetime is not iterable %} {{ point.datetime }} {% elseif point.timestamp is defined and point.timestamp is not iterable %} {{ point.timestamp|round|date('d.m.Y H:i:s') }} {% else %} - {% endif %} {% if point.lat is defined and point.lat is not iterable %}{{ point.lat }}{% else %}-{% endif %} {% if point.lon is defined and point.lon is not iterable %}{{ point.lon }}{% else %}-{% endif %}{% if pointSpeed is not null and pointSpeed is not iterable %}{{ pointSpeed }} km/h{% else %}-{% endif %} {% if point.source is defined and point.source is not iterable %}{{ point.source }}{% else %}-{% endif %} {% if point.accuracy_m is defined and point.accuracy_m is not iterable %} {{ point.accuracy_m }} m {% elseif point.accuracy is defined and point.accuracy is not iterable %} {{ point.accuracy }} m {% else %} - {% endif %} {% if point.altitude is defined and point.altitude is not iterable %}{{ point.altitude }} m{% else %}-{% endif %} {% if point.lat is defined and point.lat is not iterable and point.lon is defined and point.lon is not iterable %} {% endif %}
{% else %}

Keine GPS-Punkte verfügbar

{% endif %}
{% endblock %}