Skip to main content

locationApproximate (Stream Function)

Calculates the average location of locationRecorder using the collection iBeacons in which the location recorder resides.

Syntax

geo:locationApproximate(<STRING> location.recorder, <DOUBLE> latitude, <DOUBLE> longitude, <STRING> sensor.proximity, <STRING> sensor.uuid, <DOUBLE> sensor.weight, <LONG> timestamp)

Query Parameters

NameDescriptionPossible Data TypesOptionalDynamic
location.recorderUnique ID of the specified object or item.STRINGNoNo
latitudeLatitude of the iBeacon.DOUBLENoNo
longitudeLongitude of the iBeacon.DOUBLENoNo
sensor.proximityProximity given by the iBeacon (eg: ENTER, RANGE, EXIT).STRINGNoNo
sensor.uuidUnique ID of the iBeacon.STRINGNoNo
sensor.weightApproximation weight of the iBeacon (e.g. approximate distance from the iBeacon).DOUBLENoNo
timestampTimestamp of the log you want to use to remove iBeacon from a collection after no new log for 5 minutes.LONGNoNo

Example

geo:geoLocationApproximate("person1", 6.876657, 79.897648, "ENTER", "uuid1", 20.0d, 1452583935L)

This example returns 6.876657000000001 as the approximate location.