Motion Tracking System
The Motion Tracking System (a.k.a., Device Tracking System) is a collection of location-data-driven services that allow a User to query and extract location data from the system in multiple formats granting various insights, alerts, and notifications based on different events and rules. These triggers are offered by the system or configured by the User.
Devices send real-time tracking data to MTS in a predefined format and MTS is responsible to store it and make it available for various data consumers(dashboard/UI/other platform applications). Appropriate APIs are exposed to insert as well as extract data from MTS.
MTS Service provides APIs and Pub-Sub mechanisms for continuous tracking of device location or geofence entry/exit events.
📘 What is GPS Tracking Device?
A GPS tracking device is a navigation device normally on a vehicle, asset, or person that uses the Global Positioning System(GPS) to determine its movement and also determine its geographic position to determine its location.
App developers can leverage MTS for storing and managing real-time tracking data for their use, reducing their development effort and time. Developers can use data from MTS and write their business logic using the APIs exposed by MTS.
- Onboard a new device onto MTS so that it can start sending trace data via MQTT broker or via API. This POST API can be used by any source that needs to send data to MTS via the MQTT broker. The API accepts a device. This hardware ID needs to be unique for every device. In the case of FE mobile apps.
- The UpdateTraceData API is used to insert trace data to MTS. This can be done by passing the following parameters:
- The GetTraceData API fetches trace data for a specific device within a specified time range.
- The GetMissingSequenceNumbers API fetches missing sequence numbers for a specific deviceId and app and in between the provided time.
MTS also has the functionality of sending a notification once the location of a GPS device is close to a mentioned geographic location. You can create a new geofence entry in the database for which the notification is to be sent when the GPS device approaches the location.
The CreateSubscription API can be used to add a new subscription configuration to the Cassandra table. The following parameters will be passed in the body:
Time interval in seconds between two trace packets while streaming.
Topic expiry time.
With the GetSnappedDistance API, you can easily obtain the distance covered by a device during specific time intervals. This feature enables you to precisely calculate the distance traveled, which can be useful for determining driver payouts or more accurately measuring fuel usage.
The ID of the device to retrieve distance for.
Your appId provided after registration.
The start time of the period to calculate distance over (ISO 8601 format). Limits: This timestamp cannot be older than 2 days from current time.
The end time of the period to calculate distance over (ISO 8601 format).
The total number of trace points for the device in the specified time period.
Output from the RouteStats snapped distance algorithm.
The confidence level of the calculated distance. Possible values are high, medium, medium_1, medium_2, medium_3, or low.
The snapped distance traveled by the device in meters, calculated by RouteStats.
The response shows a snapped distance of 37.4 km calculated with high confidence. The totalTraces indicates there were 250 location traces analyzed to calculate the distance.