Abstract Rule class¶
Specific Rules¶
Zone Rule¶
Velocity Rule¶
-
class
Rule.
VelocityRule
(level, event, vel_rule_type, threshold, delay)[source]¶ Bases:
Rule.Rule
A Rule that triggers if the velocity is above or below a certain threshold.
Parameters: - level (Level) – The Level this Rule is active on.
- event (Event) – The event the rule triggers.
- vel_rule_type (str) – Type of comparison. Can be ‘above’ or ‘below’.
- threshold (float) – Absolute velocity should be above or below this value.
- delay (float) – How long should the absolute velocity be above or below the threshold.
Smooth Velocity Rule¶
-
class
Rule.
SmoothVelocityRule
(level, event, bin_size, vel_rule_type, threshold, delay)[source]¶ Bases:
Rule.VelocityRule
A Rule that triggers if the moveing average of velocity is above or below a certain threshold.
Parameters: - level (Level) – The Level this Rule is active on.
- event (Event) – The event the rule triggers.
- bin_size (int) – How many velocities should be used for calculating the moving average.
- vel_rule_type (str) – Type of comparison. Can be ‘above’ or ‘below’.
- threshold (float) – Smoothed absolute velocity should be above or below this value.
- delay (float) – How long should the smoothed absolute velocity be above or below the threshold.
Speed Rule¶
-
class
Rule.
SpeedRule
(level, event, speed_rule_type, threshold, bin_size)[source]¶ Bases:
Rule.Rule
A Rule that triggers if the absolute integral of the velocity on a given range is above or below a given threshold.
Parameters: - level (Level) – The Level this Rule is active on.
- event (Event) – The event the rule triggers.
- speed_rule_type (str) – Type of comparison. Can be ‘above’ or ‘below’.
- threshold (float) – The calculated integral should be above or below this value.
- bin_size (int) – How many velocities should be used for the integral.