Class TLcdRadar

java.lang.Object
com.luciad.realtime.radarvideo.TLcdRadar
All Implemented Interfaces:
ILcdDataObject, ILcdBounded, ILcdOriented

public class TLcdRadar extends Object implements ILcdOriented, ILcdDataObject, ILcdBounded
Defines a radar object that you can use to display radar data composed of radar sweeps.

The radar antenna is usually represented in the center of the display. Concentric circles represent the distance from the center and the height above ground. As the radar antenna rotates, a radial trace on the radar sweeps in unison around the center point.

The distance out from the center of the radar position indicates range, and the angle around the center is the azimuth to the target.

While it is rotating 360 degrees around the radar site at a fixed elevation angle, the radar antenna sends pulses. For the next rotation, it can change angle or proceed at the same angle according to requirements. The return echoes from the targets are received by the antenna and processed as radar sweeps.

A Radar Sweep

TLcdRadar can be used to display radar sweeps. You specify the radar position by setting the appropriate reference on the containing model. The ILcdOriented interface is implemented to get the azimuth of the most recently received radar sweep. This code snippet demonstrates how to create a model reference for the radar position:

    double radarRotation = Math.toRadians(0); // determines the up-direction of the radar
    TLcdLonLatPoint radarPosition = new TLcdLonLatPoint(4, 50);
    ILcdModelReference modelReference = new TLcdGridReference(
        new TLcdGeodeticDatum(),
        new TLcdAzimuthalEquidistant(radarPosition.getX(), radarPosition.getY()),
        0, 0,
        1.0, // scale
        1.0, // unit
        radarRotation
    );
See TLspRadarVideoLayerBuilder for information on how radar video feeds are visualized in a Lightspeed view.
Since:
2018.0
  • Constructor Details

  • Method Details

    • getBounds

      public ILcdBounds getBounds()
      Description copied from interface: ILcdBounded
      Returns the ILcdBounds by which the geometry of this ILcdBounded object is bounded.

      If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points) the return value is unspecified. It is highly recommended to return an undefined bounds. You can create undefined bounds using the default constructors of TLcdLonLatBounds or TLcdXYBounds.

      Specified by:
      getBounds in interface ILcdBounded
      Returns:
      the ILcdBounds by which the geometry of this ILcdBounded object is bounded.
    • addRadarSweep

      public void addRadarSweep(long aTimeStamp, double aStartAzimuth, double aEndAzimuth, int aStartCell, double aCellLength, int aBitResolution, int[] aCellAmplitudes, int aCellCount)
      Add a radar record provided by the sweep. Please refer to TLcdRadar documentation for limitations.

      You must call this method within a write lock, using TLcdLockUtil.writeLock(model) and event mode ILcdModel.FIRE_LATER.

      Parameters:
      aTimeStamp - The timestamp of the sweep in milliseconds since the epoch.
      aStartAzimuth - The azimuth at which the sweep starts in degrees clock-wise from the up-direction.
      aEndAzimuth - The azimuth at which the sweep ends in degrees clock-wise from the up-direction.
      aStartCell - The offset in number of cells at which the given sweep starts. You need this when the data of a single sweep line is split over multiple messages, for instance.
      aCellLength - The radial size of the radar cells, in meters.
      aBitResolution - The bit resolution used for the coding of the video data. Expressed in the number of bits that can be used for the amplitudes of the cells. The maximum value is 32.
      aCellAmplitudes - The amplitudes of the cells. Each element in the array represents a single cell in the sweep line. The values are all treated as unsigned integers. See Integer.toUnsignedLong(int). This TLcdRadar makes a copy of the given data. This means that you can reuse the integer array for radar video messages you receive afterwards.
      aCellCount - The valid cell count. This is the number of cells in the given amplitudes array.
      See Also:
    • getOrientation

      public double getOrientation()
      Description copied from interface: ILcdOriented
      Returns the orientation of this object in degrees. The orientation should be interpreted as a clockwise angle in degrees starting from 12 o'clock.

      If there is no rotation known for this object, return Double.NaN.

      Specified by:
      getOrientation in interface ILcdOriented
      Returns:
      the orientation of this object in degrees, or NaN if undefined.
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • getDataType

      public TLcdDataType getDataType()
      Returns the type of this data object. This can never be null.
      Specified by:
      getDataType in interface ILcdDataObject
      Returns:
      the type of this data object
    • getValue

      public Object getValue(TLcdDataProperty aProperty)

      Returns the value of the given property.

      If the property is a collection, the returned value will never be null. If the property has not been set, an empty collection of the appropriate type will be returned (Set, List or Map).

      The property must not be null, and must be declared in the data object's type or in one of its super types. Otherwise an IllegalArgumentException is thrown.

      Specified by:
      getValue in interface ILcdDataObject
      Parameters:
      aProperty - the property for which the value is to be returned
      Returns:
      the value of the given property for this data object
    • getValue

      public Object getValue(String aPropertyName)

      Convenience method that returns the value of the property with the given name.

      If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy).

      See ILcdDataObject.getValue(TLcdDataProperty) for more information.

      Specified by:
      getValue in interface ILcdDataObject
      Parameters:
      aPropertyName - the name of the property of which the value is to be returned
      Returns:
      the value of the property with the given name
      See Also:
    • setValue

      public void setValue(TLcdDataProperty aProperty, Object aValue)

      Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.

      The given property must be declared in the data object's type or in one of its super types. In other words, getDataType().getProperties().contains( aProperty ) should always be true. Otherwise, the implementation should throw an IllegalArgumentException.

      Specified by:
      setValue in interface ILcdDataObject
      Parameters:
      aProperty - the property for which the value is to be set
      aValue - the value to set
      See Also:
    • setValue

      public void setValue(String aPropertyName, Object aValue)

      Convenience method that sets the value of the property with the given name.

      If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy).

      See ILcdDataObject.setValue(TLcdDataProperty, Object) for more information.

      Specified by:
      setValue in interface ILcdDataObject
      Parameters:
      aPropertyName - the name of the property of which the value is to be set
      aValue - the value to set
    • hasValue

      public boolean hasValue(TLcdDataProperty aProperty)
      Indicates whether this data object has a value for the given property.

      • aProperty is from the right data type, and this instance has a value for it: returns true
      • aProperty is from the right data type, and this instance has no value for it: returns false
      • aProperty is not from the right data type: not allowed, you will get IllegalArgumentException
      • aProperty is null: not allowed, you will get NullPointerException

      A multivalued property is considered to have a value if it has at least one value.

      Specified by:
      hasValue in interface ILcdDataObject
      Parameters:
      aProperty - the property for which to return whether a value is present or not.
      Returns:
      true if this data object has a value for the given property, false otherwise.
    • hasValue

      public boolean hasValue(String aPropertyName)
      Indicates whether this data object has a value for the given property.
      See ILcdDataObject.hasValue(TLcdDataProperty) for more information.
      Specified by:
      hasValue in interface ILcdDataObject
      Parameters:
      aPropertyName - the name of the property for which to return whether a value is present or not.
      Returns:
      true if this data object has a value for the property with the given name, false otherwise.