Class TerrainProperty

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, PropertyTransformer, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class TerrainProperty
    extends TypedAtomicActor
    implements PropertyTransformer
    This actor models an obstacle that attenuates signals that traverse it. The obstacle has a geometry given by the xyPoints parameter. By default, the attenuation is infinite, meaning that the obstacle completely blocks a signal. By increasing the attenuationDepth parameter you can specify partial attenuation that depends on the geometry of the obstacle. If attenuationDepth has value x and the signal traverses distance y through the obstacle, then the power of the signal is reduced by a factor of
       exp(log(0.5) * y / x)
     
    Thus, if x = y, then the power is reduced to half (3dB). The algorithm used here only works for convex obstacle shapes.

    This actor implements the PropertyTransformer interface. It register itself with the wireless channel specified by the channelName parameter. The channel may call it getProperty() method to get the property.

    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Yang Zhao and William Douglas (contributor: Edward A. Lee)
    Pt.AcceptedRating:
    Red (pjb2e)
    Pt.ProposedRating:
    Yellow (eal)
    • Field Detail

      • channelName

        public StringParameter channelName
        The name of the channel. The default name is "TerrainChannel".
      • attenuationDepth

        public Parameter attenuationDepth
        The width of material that will attenuate a signal power by 50% (3dB). This has the same units as the xyPoints parameter, which specifies the geometry of the obstacle. The default value is 0.0, which means infinite attenuation (no signal gets through).
      • xyPoints

        public Parameter xyPoints
        The x/y coordinates of the obstacle. This is an array of integers specifying a geometry. The icon will have the same geometry. The default value is an array of integer pairs: {{0, 0}, {0, 5}, {20, 5}, {20, 0}}