Last modified 8 years ago Last modified on 03/25/12 16:36:59

Earthworm Module: ewaccel

Contributed by:


An acceleration threshold monitor; reads TRACEBUF2 packets from sensors on different floors of a building, compares the sum of their forces w/ a threshold which, if exceeded, causes an alarm message to be written to a ring.


The ewaccel module monitors a ring for TRACEBUF2 messages, assumed to be from sensors on different floors of a building. The sum of the forces for the floors is computed for each sample time and, if it exceeds a specified threshold, an alarm message is written to an output ring.

The primary options are what floors to monitor (identifying the sensor and values for converting its values into forces) and what threshold to use.

Example Configuration File

#         ewaccel Configuration File
 MyModuleId     MOD_EWACCEL     # module id for this program
 InRing         TEST_RING           # transport ring to use for input
 OutRing        HYPO_RING           # transport ring to use for output
 HeartBeatInt   30                  # EW internal heartbeat interval (sec)
 LogFile        1                   # If 0, don't write logfile; if 1, do
                                    # if 2, write to module log but not to
                                    # stderr/stdout
 MaxMsgSize     4096          # maximum size (bytes) for input/output msgs

 DefaultConversion	0.0004673	# Optional default floor conversion value;
 								# MUST be provided BEFORE any Floor or
 								# GroundFloor command that is to use it

# Floor definitions
#   Each specifies the mass, SCNL & conversion factor for that Floor
#   There must be exactly 1 ground floor
 GroundFloor 100 5405 HNE NP GS

#   There can be an arbitrary number of non-ground floors, but each must have
#   a distinct identifier (first arg to Floor command)
 Floor XE_floor 100 5405 HNN NP XE

 BaseShearThreshold 70	# force threshold to trigger alarm

 AvgWindow   2                # Number of seconds of data to use to compute

 HighPassFreq        0.075    # Cutoff frequency for high pass filter
 HighPassOrder       4        # Order for high pass filter

# DebugForces		# Optional command to write force computations to OutRing

 AlarmDelay	3		# Required number of seconds to suspend issuing alarm messages
 					# after an alarm message has been issued

Helpful Hints