Pado - all about geo tracking Pado on facebook

Frequently Asked Questions

What does the name "Pado" mean?
"Pado" is Esperanto and means "path".
Under iOS 11 the App does not longer correctly record tracks in the background. How can I solve this?
This is a bug of the early iOS 11 releases. iOS 11 does no longer deliver location updates. To fix this, please shut down and switch off the device and reboot the iOS. This should fix the issue. As soon as Apple has fixed this bug, it is no longer necesary to do a reboot after a system update anymore.
How is the battery usage affected by the different features of the App?
The location-based actions and the time tracking features do use the "geofencing" feature of the iOS. The iOS itself is checking if the monitored regions are entered or exited and notifies the App if this is the case. So the App can remain inactive almost all the time. The "geofencing" feature does not need much energy at all, so the additional battery usage is very low, and therefore you usually do not need to care about the battery usage at all.

Only if the App is actually recording a track (either started manually or automatically), the App will use the GPS hardware all the time. Using the GPS hardware does require some more energy, so recording a track for a longer time will noticeable reduce the battery life. Especially on an iPhone you should check the battery status regularly when recording a track for hours. On an iPad the impact on the battery life is much lower.

How many regions can be monitored at the same time?
Currently the iOS can monitor up to 20 regions at the same time per App.
How accurate can the regions be defined which will are used for the location-based actions?
Currently the iOS only allows to define a region by its geo coordinates and a radius. So all regions have the shape of a circle. The geofencing feature of the iOS (which notifies the App when these regions are entered or left) does not immediately inform the App when the region is entered or left, because this might result in many "entering"/"leaving" messages in rapid succession, if you walk on or near the border or the region. Therefore the iOS adds an additional "buffer" area around the defined region and only if you leave this additional "buffer" area within a certain time frame, a "leaving" message will be sent. And only if you have entered this buffer area far enough within a certain time frame, the App gets an "enter" message.

In practice when walking, the "leaving" message will be reported by the iOS about 200m after you've left the defined region border, and the "enter" message will be delivered by the iOS about 80m before you enter the defined region border. The actual distances may vary depending on the device, the surrounding WLAN networks, your speed, the quality of the GPS reception and maybe other factors.

Sometimes actions are triggered only after a large delay, if I visit this location the very first time. Can this be prevented?
In order to understand this issue, you should understand the way the iOS is getting the current location.

Getting the current location can be done via GPS (very accurate) and also via WLAN (much less accurate). Getting the location via GPS alone can take a very long time (more than 10 min) and can be even impossible (related to the environment. Trees and the own body can shield the GPS signals, reflections of the GPS signals on buildings can have a serious impact on the GPS signal). The time to get a GPS location can be greatly reduced if the device already knows an approx. location from another source, like the less-accurate location of a nearby WLAN network.

Getting the current location via WLAN networks requires that the iOS has a database where WLAN networks and their locations are stored. The iOS will update this database for the current region automatically from time to time. It needs an internet connection for this.

The location-bases actions in Pado rely on the "geofencing" feature of the iOS. This feature monitors regions and notifies App when the monitored regions are exited or entered in a very energy-efficient way. In order to have almost no impact on the battery life, the iOS tries to avoid using GPS in favor of using WLAN and also checks the location only in longer time intervals.

In case you travel to a new location where you've never been before, the iOS eventually does not have any information about the locations of WLAN networks for this region. So for getting a location the WLAN database needs to be updated first. And without the WLAN database the GPS lock can take a very long time.

This is why actions might be triggered after a large delay in the new region at first.

To help the iOS getting the current location faster after you arrive in the new region, you can simply start any App that is able to locate your current position (the Maps App, Pado, etc) and use the feature to locate your position. Also make sure that the iOS can use the Internet to update the WLAN database for the current region. When doing this manually in an App, the iOS is able to update its WLAN database immediately. Otherwise the iOS would have to update the WLAN database in the background, and in order to preserve the battery life, the iOS would do this only with a very low priority, which therefore would take much longer.

Why is the filled compass needle shown in the status bar?
This is because Apple has done a bad choice when the filled and when the hollow needle is shown. There are three modes for the location manager of the iOS, the mode "significant location change" and the "geofencing" mode both do need almost no energy, but the iOS shows the filled needle for the first mode and the hollow for the second. The normal "tracking" mode which uses the GPS hardware permanently requires much energy and does also show the filled needle in the status bar. So if the filled needle is shown in the status bar, you can not know how much energy is currently used. It could be almost no energy at all ("significant location change") or it could be much energy (normal "tracking").

Apple should have shown the hollow needle for the "significant location change" and the "geofencing" mode, then the needle in the status bar would be a good indication of the energy usage. But unfortunately Apple has not done this. So the filled compass needle does not tell you anything at all about the current energy usage.

Pado uses "significant location change" and the "geofencing" mode when a location-based action or the time tracking is enabled. And both modes do not use much energy at all.

Is there a sample PHP script which helps to get started with the WebHook feature?
Yes, you can download a sample PHP script. This script will simply retrieve all the paramaters which are sent by Pado and writes them into a text file. It's probably a good idea to start your experiments with this sample file, so by looking at the created text file, you get an idea how the data will look like which you get from Pado. Then you can start to do other things with the data, it's all up to you...

Within Pado when configuring WebHook you only have to enter the URL of this PHP page on your server. The main settings will allow you to set the URL of a default Webhook script, which is automatically used for all new WebHook actions by default. But you can change or modify this individually for each WebHook action, so you are not limited to a single WebHook script.

The sample script from above expects the parameters encoded as "www-form-urlencoded", so the option "Parameter as JSON" in the WebHook options needs to be switched off. But if you write your own scripts you can switch this option on if you prefer the paramaters delivered as JSON.


Fragen & Antworten

Was bedeutet der Name "Pado"?
"Pado" ist Esperanto und bedeutet "Weg" bzw. "Pfad".
Unter iOS 11 werden Tracks nicht mehr korrekt im Hintergrund aufgezeichnet, wie kann man das lösen?
Die ist leider noch ein Fehler in den frühen iOS 11-Versionen. Nach der Installation eines iOS-Updates leifert das iOS leider keine Koordinaten im Hintergrund. Als Abhilfe hilft aber gewöhnlich, das Gerät komplett herunterzufahren/auszuschalten und das iOS neu zu booten. Sobald Apple den Fehler behoben hat, ist dann nach einem Systemupdate kein erneuter Neustart nötig.
Wie sind die Auswirkungen auf die Akkulaufzeit der verschiedenen Features der App?
Die Ortsbasierten-Aktionen und die Zeiterfassung nutzt die "Geofencing"-Funktion des iOS. Dabei übernimmt das iOS selbst die Überwachung der Orte und benachrichtigt die App nur bei Bedarf, so dass die App nahezu immer inaktiv bleiben kann. Das "Geofencing" benötigt so gut wie keine zusätzliche Energie, so dass dies auf die Akkulaufzeit kaum Auswirkungen hat. Sie müssen sich daher normalerweise gar nicht um den Akkuverbrauch kümmern.

Nur solange die App einen Track aufzeichnet, wird permanent die GPS-Hardware genutzt. Und die längere dauerhafte Nutzung der GPS-Hardware kostet spürbar Energie. Sofern Sie auf einem iPhone über Stunden einen Track aufzeichnen, sollten Sie daher den Akkustatus von Zeit zu Zeit kontrollieren. Auf einem iPad spielt der Akkuverbrauch der GPS-Hardware eine deutlich kleinere Rolle, der Akku hält dort wesentlich länger durch.

Wie viele Orte können gleichzeitig beobachtet werden?
Zur Zeit erlaubt das iOS die Beobachtung von bis zu 20 Orten gleichzeitig pro App.
Wie genau können die Orte für die ortsbasierten Aktionen definiert werden?
Zur Zeit unterstützt das iOS nur kreisförmige Orte (definiert durch Koordinate und Radius). Das "Geofencing"-Feature des iOS, welches Apps darüber informiert, wenn ein Ort betreten oder verlassen wird, tut dies allerdings nicht direkt beim Überschreiten der definierten (kreisförmigen) Grenze, denn das könnte eine Unmenge an sinnloser "Betreten""/"Verlassen"-Meldungen auslösen, wenn man sich direkt auf der Grenze fortbewegt. Das iOS verwendet daher einen zusätzlichen Sicherheitsbereich um den definierten Ort. Erst wenn dieser innerhalb einer gewissen Zeit verlassen wurde, wird eine "Verlassen"-Nachricht an die App verschickt, und nur wenn der Bereich innerhalb einer gewissen Zeit weit genug betreten wurde, wird die "Betreten"-Nachricht verschickt.

Wenn man zu Fuss unterwegs ist, kann man in der Praxis in etwa davon ausgehen, dass die App rund 200m nach dem Verlassen des definierten Ortes vom iOS eine "Verlassen"-Nachricht bekommt, und beim Betreten rund 80m vor dem definierten Ort eine Betreten-Nachricht bekommt. Die genauen Werte hängen von vielen Faktoren ab, wie dem Gerät selbst, der Geschwindigkeit, den umliegenden WLAN-Netzen, der GPS-Empfangsqualität und vermutlich anderen Faktoren.

Manchmal werden Aktionen erst verspätet ausgelöst, wenn ich an diesem Ort zuvor noch nie war. Kann man dies vermeiden?
Für dieses Problem sollte man ungefähr verstehen, wie das iOS die Ortung überhaupt durchführt.

Die Ortung an sich kann über die GPS-Hardware (genau) und WLAN (deutlich ungenauer) stattfinden. Die reine Ortung über GPS kann je nach Umgebung durchaus recht lange dauern (bis über 10 min) oder auch ganz unmöglich sein (wegen Reflektionen des GPS-Signals an Gebäuden, Abschirmung durch Bäume oder den eigenen Körper (speziell bei Geräten, die man z.B. in der Hosentasche trägt)). Die Zeit bis zu einer erfolgreichen GPS-Ortung kann man aber extrem verkürzen, wenn man schon die ungefähre Position über andere Wege ermittelt (z.B. über die WLAN-Ortung), also zur Ortung GPS und WLAN kombiniert.

Für die WLAN-Ortung benötigt das iOS eine Datenbank in der die WLAN-Netze der Umgebung und deren Positionen verzeichnet sind. Diese Datenbank muss daher regelmäßig aktualisiert werden und benötigt hierfür eine Internet-Verbindung.

Generell funktionieren die ortsbasierten Aktionen von Pado über das "Geofencing"-Feature des iOS, bei dem das iOS die jeweiligen Orte überwacht und die App benachrichtigt, sobald diese Orte verlassen oder betreten werden (die App ist also bei der Überwachung der Orte nicht beteiligt). Damit diese Überwachung der Orte praktisch keinen Strom kostet, nutzt die Geofencing-Funktion wenn möglich nicht die GPS-Hardware, sondern verwendet statt dessen die stromsparendere Ortung über WLAN-Netzwerke. Außerdem wird die Ortung nur in größeren zeitlichen Abständen durchgeführt.

Reist man nun an einen neuen Ort, den man noch nie zuvor besucht hat, dann kennt das iOS u.U. noch keine Daten über die WLAN-Netze dieses Gebietes und kann daher noch nicht sofort eine WLAN-Ortung vornehmen. Die Ortung über GPS ist ohne Wissen der ungefähren Position ebenfalls extrem langsam, zumal diese auch nur sehr selten über die Geofencing-Funktion durchgeführt wird. Daher kann das iOS u.U. nur mit deutlicher Verzögerung überhaupt das Betreten oder Verlassen des neuen Ortes erkennen.

Erst nachdem das iOS die WLAN-Ortsdatenbank aktualisiert hat und damit eine schnelle WLAN-Ortung möglich ist, oder eine erste erfolgreiche GPS-Ortung erfolgt ist, kann das iOS dann tatsächlich ohne große Verzögerungen auf das Verlassen/Betreten des Ortes reagieren.

Sie können dem iOS hier helfen, schnell die WLAN-Datenbank zu aktualisieren, in dem Sie an dem neuen Ort ein beliebiges App starten, welches die Ortungsfunktion nutzt (z.B. Karten, Pado usw.), und sich damit direkt orten lassen. Dabei sollten Sie zulassen, dass das iOS auf das Internet zugreifen kann, damit das iOS seine WLAN-Ortungsdatenbank aktualisieren kann. Falls das iOS nicht aktiv in einem App die Ortungsfunktion nutzten muss, dauert die Aktualisierung der WLAN-Datenbank deutlich länger, da das iOS dies dann im Hintergrund tun muss, und es dies dann nur mit einer sehr niedrigen Priorität tut, um den Akku nicht zu stark zu belasten.

Warum wird in der Statusleiste die gefüllte Kompassnadel angezeigt?
Das iOS kennt drei Modi über die sich Apps vom iOS über Ortsveränderungen informieren lassen können.
  1. Significant Location Update (Apps werden über signifikante Ortsänderungen informiert, was üblicherweise eine Ortsänderung im Kilometerbereich bedeutet). Dieser Modus benötigt praktisch keinen Strom, das iOS zeigt hierfür aber die gefüllte Kompassnadel in der Statusleiste
  2. Geofencing (App werden informiert, wenn bestimmte Orte betreten oder verlassen werden). Dieser Modus benötigt praktisch keinen Strom, das iOS zeigt hierfür die hohle Kompassnadel in der Statusleiste
  3. Normaler "Tracking"-Modus (Apps bekommen permanent Ortsinformationen). Durch die permanente GPS-Nutzung ist hier ein höherer Stromverbrauch normal. In der Statusleiste wird die gefüllte Kompassnadel angezeigt.
D.h. der erste und dritte Modus zeigen die selbe gefüllte Kompassnadel, obwohl im ersten Fall kein und im zweiten Fall viel Strom verbraucht wird. An der gefüllten Kompassnadel kann man daher leider nicht ablesen, ob aktuell eine stromintensive Ortsbestimmung stattfindet. Das hat Apple leider sehr schlecht gelöst.

Pado nutzt die ersten beiden Modi (beide stromsparend) sobald eine ortsbasierte Aktion oder die Zeiterfassung aktiv ist. Damit ist die Kompassnadel dann gefüllt aber trotzdem wird praktisch kein Strom verbraucht.

Gibt es ein PHP-Script welches man verwenden kann, um mit dem WebHook-Feature vertraut zu werden?
Ja, es steht ein einfaches WebHook PHP-Script zum Download bereit. Dieses PHP-Script ermittelt alle von Pado gesendeten Daten und schreibt diese in eine einfache Text-Datei. Es ist sicherlich eine gute Idee, dieses Script auf dem eigenen Server zu installieren, und für die ersten Tests zu verwenden, um zu sehen, wie genau die Daten von Pado aussehen. Danach können Sie das Script nach belieben modifizieren und umschreiben um die eigenen Ideen umzusetzen.

In Pado muss nur die URL des PHP-Scripts bei der Konfiguration einer WebHook-Aktion angegeben werden. In den Haupteinstellungen lässt sich die URL angeben, die dann automatisch als Standard für alle neuen WebHook-Aktionen verwendet wird. Man kann diese aber auch individuell für jede Aktion gezielt anpassen und ändern, so dass man nicht auf ein einziges WebHook-Script beschränkt ist.

Das Beispiel-Script von oben erwartet die Parameter als "www-form-urlencoded"-kodierte Daten, daher muss die Option "Parameter als JSON" in den WebHook-Einstellungen ausgeschaltet werden. Für Ihre eigenen Scripte können Sie diese Option aber auch einschalten, falls Sie die Parameter im JSON-Format bevorzugen.