Device Location Tracking

Iotellect Server device accounts provide a generic way to obtain, store and process geographical locations of physical devices. Location information can be dynamically updated by polling the device or manually specified inside the device account. The account can also keep track of position history.

The actual positions of devices and their historical tracks can be displayed on maps and satellite images. For example, Map widget component provides an extremely easy way to track devices on Google Maps.

Calculating Device Location

Each device account has two special settings:

  • Latitude Expression
  • Longitude Expression

These expressions can be specified by editing generic device properties. Each expression is recalculated in the end of every synchronization cycle. It should return a floating point number representing current device latitude/longitude.

Normally, these expressions calculate the coordinates by performing some mathematical operations over device settings that contain information about latitude and longitude. For example, it's quite easy to convert value stores in degrees, minutes and seconds to a floating point value using an expression.

To manually specify device position, write Latitude Expression and Longitude Expression that return floating point constants, e.g. 12.4459.

Viewing Device Location

Most Iotellect facilities, such as Map widget component, obtain location information automatically once correct Latitude Expression and Longitude Expression are defined. Numeric values of current latitude and longitude are available via Location variable of Device context.

Was this page helpful?