Developing Apama Applications > Developing Apama Applications in Event Modeler > Using Standard Blocks > General analytic blocks > Velocity Calculator v2.0
Velocity Calculator v2.0
Velocity calculates the rate of change (that is, change divided by the time between the changes) of the last two values of a stream. The time of incoming events is taken to be the correlator’s current time. Note that the first result will not be generated until two events have been received on the input feed.
Parameters
This block has no parameters.
Operations
Operation
Description
start
Starts the calculation of velocity. Must be called before any output events are sent.
stop
Stops the calculation of velocity. Any subsequent input feeds are ignored.
clear
Discards all current data.
Input feeds
Feed
Fields
Description
data
value
The feed of values.
Output feeds
Feed
Fields
Description
velocity
value
The difference of the last two values divided by the time between the last two values. Values are assumed to arrive at no less than 0.01 seconds apart. Thus, no two events are considered to have the same timestamp, which would mean the velocity could not be computed.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.