Actual distances covered by app users is an important input to financial systems for field workers. Distances are used to bill customers and pay out partners. This has direct financial impact for the business, and impacts customer and partner satisfaction. Both under-billing and over-billing have negative consequences for one side of the network, and negatively impact the aggregator business. Accurate distance computation for actual movement builds trust with customers and partners, and saves money by eliminating expensive maps costs involved in distance estimation. That means, a better solution at lower cost.
This guide explains how to get accurate distances for app users and orders. You may get distances between geofences and geotags as well.
How we calculate distance
HyperTrack servers apply a variety of filters and transformations to improve location accuracy. The goal is to precisely compute the primary metric for financial payouts–actual drive distance. This is in stark contrast to the industry-wide usage of coarse estimates using maps.
Stop locations are excluded from distance computation and drive locations are map matched. Locations while moving on paths with no roads are smoothened using Kalman filters. The resulting timeline looks like this.
- Tracking gaps have a meaningful impact on distance accuracy. To address this problem, we detect gaps in real-time and classify them into system driven outages (due to device conditions like battery, OS, GPS availability, etc.) or user driven outages (app permissions, location disabled on device, app killed, etc.).
- System-driven outages: Our SDKs are reliable and apply techniques to ensure that location updates come as frequently as our needed to understand ground truth. However, the fragmented base of device manufacturers, custom Android ROMs, external environment, and unintended user behavior may lead to tracking gaps that make distance less usable. HyperTrack fills such gaps by estimating routes along the road and shows them as dotted lines in the views. Please see this guide for a full enumeration of all system outages.
- User-driven outages: Privacy rules by Android and iOS require that users retain control over the app's ability to use location. Users enjoy a varying degree of controls over permissions. HyperTrack differentiates between these reasons and posts them to you in real-time over webhooks. Distance estimates are not computed for these gaps. We recommend that you communicate with your app users about them. Please see this guide for a full enumeration of all user drive outages and our webhooks guide on how to receive outages notifications in real time.
|Outage reason||Message to your app user|
|Tracking service terminated||Please turn off power saver settings and apps|
|Location service disabled||Please enable location service on your phone|
|Location permissions denied||Please allow location persmissions for the app|
|App terminated by OS reboot||Please open app after phone reboot|
|Location unavailable||DO NOT force kill app|
Get app user distance using Devices
Get the distance driven for your app users, through app user timeline views, webhooks and Devices API.
Once your device is tracking, go to your App user view and navigate to the app user timeline. Here you will see locations organized as a day-wise timeline of the app user's movement. Total distance driven including estimates for user-driven outages.
Location and distance has a lot of value on it's own, but to unlock the full potential of the data, most of our customers need the distance data in their own application database. HyperTrack has a set of APIs to make it easy to consume distance information along with the underlying location, activity and outage data.
The Device History API returns all the tracked data for an app user.
distance field returns the total drive distance in meters. The breakdown of different activities is part of the markers array. In order to get all the data for all your app users on a given day as a single JSON file, you can use the Account export API.
In our Scoreboard, you see the average distance driven by all app users on a given day along with trends for the last 7 or 30 days. Use this data to get a quick understanding how your fleet is performing daily.
In our Insights page, you can see the drive distances of each of your app users. Reports may be exported as a CSV file, for viewing in your favorite spreadsheets app or importing into other systems.
Get order distance using Trips
Trips allow you to track live route and ETA for orders. Trip summaries give you access to the distance traveled for the order–from start to completion of the trip. Order distances may be used to bill customers or payout partners or both.
The Trip embed view gives you a visual representation of the Trip, showing all the locations, drive distance and distance breakdown by activity.
When the trip is completed, we send out a webhook to notify you about the trip completion. The distance is included inside the data field.
To get the data, call the GET Trip API to retrieve all the trip data.
The trip summary follows the same format as the device history. To get the distance for a trip, use the returned
In the Scoreboard, you see the average distance of Trips. This represents the average distance driven per order.
Here you can see the drive distance for all Trips. This data can easily be exported into a CSV file using the export button.
Get distance between Geofences
To track the distance traveled between places of interest like warehouses, use Geofences. Once they are setup, every visit to any of the geofences gives you the distance and time it took the app user to reach the geofence. This represents the route efficiency for each place and productivity of app users.
In the device web view, click on any visited geofence to see the metadata and the
When an app user enters a geofence, we calculate
route_to.distance and send this as part of the webhook.
The Device History API returns
all the tracked data for an app user, this includes visted geofences with the
In our Scoreboard, you see the average route_to distance for Geofence visits. This represents the average distance driven per visit.
Here you can see average route_to distance for Geofences visited by your users. This data can easily be exported into a CSV file using the export button.
Get distance between Geotags
Need to know the distance between work performed in the app? Integrate HyperTrack geotags to your app and consume the data over webhooks, views and APIs. Geotag combines the app event with the location where it happened, computes distance from the previous Geotag, and tracks deviation from expected location. If your app user is temporarily offline, Geotags get captured on the device and then synced up with the server when the connection is restored.
Geotags show in user views as part of the user timeline.
Each app event is denoted as an interactive blue marker on the timeline and map, numbered in the order visited by user. Once you zoom in and click on the Geotag you are interested in, you can see the card with Geotags and the
route_to data showing the distance traveled to this Geotag from the previous Geotag.
Thomas, please update the image. Tracking stopped and unknown segments are distracting.
If your app business workflow requires real-time tracking of distance between app events, get Geotags on webhooks.
Not only do you get back the payload data your app user generated from the mobile app, you also get
route_to data which contain
distance in meters,
duration in seconds,
start_location from the previous app event for which
duration is generated, as well as
recorded_at timestamp which captures the time this app event was received from your mobile app.
In the example below, you can see the payload data your app user generated, as well as
route_to with the
distance data and
location that is recorded for this app event.
The Scoreboard shows you the average distance between Geotags. This represents the average distance per app event.
The insights page shows you the distance between the geotags in the "Route distance" field and can be exported to CSV.
Connect your QuickBooks account to automate financial payouts
Connect your existing QuickBooks account with HyperTrack to automatically capture and expense time your employees spend visiting customer sites and expense travel time between their site visits.
To get started, go to your HyperTrack Dashboard Setup page to connect your QuickBooks account with a few clicks. Once connected, deploy HyperTrack Visits App to your employees.
Each of their visit time and metadata are sent to QuickBooks as time activity. You can use QuickBooks reports to pull down their accurate, automatically captured, travel time and distance and easily automate payouts.
To learn more about QuickBooks and HyperTrack integration, please visit this guide.
If you have any questions or comments on any of the topics above, please do not hesitate to contact us.