Cortex Android
 All Classes Namespaces Functions Variables
nl.sense_os.cortex.FallSensor Class Reference
Inheritance diagram for nl.sense_os.cortex.FallSensor:

Public Member Functions

 FallSensor (String name, SensePlatform sensePlatform)
 
 FallSensor (SensePlatform sensePlatform)
 
void setDemo (boolean demo)
 
boolean isDemo ()
 
void setUseInactivity (boolean useInactivity)
 
boolean isUseInactivity ()
 
void onNewData (SensorDataPoint dataPoint)
 

Detailed Description

This class is a DataProducer implementation of the FallDetector module.
FallDetect will determine a fall based on the acceleration sensor.
For this the acceleration sensor needs to sample at least with game mode: 50Hz.
By default the demo mode is disabled.
Demo mode will only look at a free fall for 200ms and triggers a fall.
By default the useInactivity is enabled.
When useInactivity is enabled then a check for in-activity for 2 sec is done after a free fall, an impact and an orientation change and if the checked is passed then a fall is triggered.
This class returns a json object with the structure {"value":{"fall":1}, "date":1366876517.12}
This DataProcessor requires the following sensors/settings:
SensorNames.ACCELEROMETER
Motion sensing enabled

Author
Ted Schmidt

Copyright (c) 2013 Sense Observation Systems BV. All rights reserved.

Constructor & Destructor Documentation

nl.sense_os.cortex.FallSensor.FallSensor ( String  name,
SensePlatform  sensePlatform 
)

FallDetect Constructor

A FallDetect 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.
By default the demo mode is off and it uses the check for inactivity after an impact.
Re-creating a FallDetect DataProducer with the same name will load its previous settings.

Parameters
sensePlatformThe SensePlatform
nameThe name of the data processor. Should be unique.
nl.sense_os.cortex.FallSensor.FallSensor ( SensePlatform  sensePlatform)

FallDetect Constructor

See Also
FallSensor(String name, SensePlatform sensePlatform)
Parameters
sensePlatformThe SensePlatform

Member Function Documentation

boolean nl.sense_os.cortex.FallSensor.isDemo ( )

Check for demo settings.

This function checks for the demo property.

Returns
boolean Returns true if the demo property is activated.
boolean nl.sense_os.cortex.FallSensor.isUseInactivity ( )

Check for the inactivity property

This function checks whether the inactivity property is set.

Returns
boolean Returns true if the inactivity property has been set.
void nl.sense_os.cortex.FallSensor.onNewData ( SensorDataPoint  dataPoint)

Set the interval

This method sets the interval at which to do the computation whether the device is carried. The default is 60 seconds. Setting the interval will reset the time window

Parameters
intervalin seconds
void nl.sense_os.cortex.FallSensor.setDemo ( boolean  demo)

Set or unset the demo fall detect.

With demo enabled, a fall will be triggered when a free fall is detected for 200 ms.

Parameters
demoThe boolean to set the demo property
void nl.sense_os.cortex.FallSensor.setUseInactivity ( boolean  useInactivity)

Set or unset the check for inactivity.

This function set/unsets the check for inactivity after a free fall and impact. If enabled a fall will be triggered only when there is no movement for 2 seconds after an impact.

Parameters
useInactivityThe boolean to set or unset the inactivity check

The documentation for this class was generated from the following file: