Cortex Android
|
Public Member Functions | |
GeoFenceSensor (String name, SensePlatform sensePlatform) | |
GeoFenceSensor (SensePlatform sensePlatform) | |
void | disable () |
AIM | getAIM () |
void | setGoalLocation (double latitude, double longitude) |
void | setRange (double range) |
void | resetOutOfRange () |
The GeoFencing module calculates the distance from an incoming latitude, longitude point to a predefined latitude, longitude position in meters. If the distance is larger then a predefined range then this module will send an out of range message, it will also send a message when the position data comes in that lies within the range. This module will only send output data if there is a change in the value out/in range
This DataProcessor requires the following sensors/settings:
SensorNames.Location
Location sensing enabled
Copyright (c) 2013 Sense Observation Systems BV. All rights reserved.
nl.sense_os.cortex.GeoFenceSensor.GeoFenceSensor | ( | String | name, |
SensePlatform | sensePlatform | ||
) |
Geo-Fence constructor
A Geo-Fence data producer will be registered at the Sense Service
under the name supplied with this constructor.
To receive data from this DataProducer, subscription should be done at the Sense Service with the given name.
The DataProcessor persists its state based on the supplied name.
Re-creating a Geo-Fence DataProducer with the same name will load its previous settings.
sensePlatform | The SensePlatform |
name | The name of the data processor. Should be unique. |
nl.sense_os.cortex.GeoFenceSensor.GeoFenceSensor | ( | SensePlatform | sensePlatform | ) |
Geo-Fence constructor
A Geo-Fence data producer will be registered at the Sense Service
sensePlatform | The SensePlatform |
void nl.sense_os.cortex.GeoFenceSensor.disable | ( | ) |
Disables the module
This method un-subscribes the module for the different sensor input streams. It also unregisters the module at the Sense service as DataProducer
AIM nl.sense_os.cortex.GeoFenceSensor.getAIM | ( | ) |
Get the AIM module
This method returns the GeoFence AIM object;
void nl.sense_os.cortex.GeoFenceSensor.resetOutOfRange | ( | ) |
Reset out of range
This function resets the out of range to 0
void nl.sense_os.cortex.GeoFenceSensor.setGoalLocation | ( | double | latitude, |
double | longitude | ||
) |
Set the goal location
The goal location is the GPS location from which the distance is measured based on the current location.
latitude | The position latitude |
longitude | The position longitude |
void nl.sense_os.cortex.GeoFenceSensor.setRange | ( | double | range | ) |
Set the range in meters
This method sets the range in meters. This range defines the fence measured from the goal position. If the distance exceeds the defined range a data point will be send
range | The range in meters |