public class AzimuthElevationMask extends BaseCollection<ElevationMask> implements IAzimuthElevationMask
An Azimuth-Elevation Mask describes how the horizon looks to a stationary object. It holds the maximum obscured elevation angle in each sampled direction from the stationary object. It can also keep track of the maximum elevation angle as a function of the linear distance from the origin of the mask. For example, if the stationary object is in a canyon, objects also inside the canyon are visible at a very low elevation angle. However, objects past the canyon walls are only visible if they are at a much steeper elevation angle such that they are above the walls.
AzimuthElevationMask
is a collection of ElevationMask
instances. Each ElevationMask
corresponds to
a particular direction. The direction is described by the Azimuth
(get
/ set
) property as an
azimuth angle measured from North toward East. The maximum obscured elevation angle in that direction is
described by the Elevation
(get
/ set
) property. Each ElevationMask
instance is
also a collection of ElevationRise
instances, each of which describes a change in the maximum
obscured elevation angle along the ray. The ElevationRise
also records the linear distance from the
origin of the mask to the obscured point along the given azimuth and elevation angles.
Use TerrainAzimuthElevationMask
to compute an AzimuthElevationMask
from terrain data. Use
the AzimuthElevationMask.getMaximumObscuredElevation(double,double)
method to query the maximum obscured elevation angle as a function
of azimuth and distance. Alternately, you can use
DelayedTerrainAzimuthElevationMask
to produce an IAzimuthElevationMask
which computes its values on demand, which is useful in cases
where only a small swath of the mask needs to be computed for analysis.
NOTE: All of the ElevationMask
instances in this collection must be sorted by azimuth in increasing order
and the azimuths must not wind. The collection must have at least 2 items.
Constructor and Description |
---|
AzimuthElevationMask()
Initializes a new instance.
|
AzimuthElevationMask(Cartographic position)
Initializes a new instance centered at the specified planetodetic position.
|
AzimuthElevationMask(CentralBody centralBody,
Cartographic position)
Initializes a new instance centered at the specified planetodetic position on the
specified central body.
|
Modifier and Type | Method and Description |
---|---|
CentralBody |
getCentralBody()
Gets the central body to which this mask is relative.
|
double |
getMaximumObscuredElevation(double azimuth,
double distance)
Computes the maximum elevation angle that is obscured as of a specified distance
along an azimuth ray.
|
static double |
getMaximumObscuredElevation(ElevationMask firstElevationMask,
ElevationMask secondElevationMask,
double azimuth,
double distance)
Computes the maximum elevation angle that is obscured as of a specified distance
along an azimuth ray between two
ElevationMask instances. |
Cartographic |
getPosition()
Gets the planetodetic position of the observer for the mask.
|
void |
setCentralBody(CentralBody value)
Sets the central body to which this mask is relative.
|
void |
setPosition(Cartographic value)
Sets the planetodetic position of the observer for the mask.
|
add, add, addAll, addAll, clear, clearItems, contains, containsAll, get, getItems, indexOf, insertItem, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeItem, retainAll, set, setItem, size, subList, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, iterator, spliterator
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public AzimuthElevationMask()
The new mask is centered at 0.0 longitude, 0.0 latitude, and 0.0 altitude on the
EarthCentralBody
instance in the CentralBodiesFacet
of the current CalculationContext
.
public AzimuthElevationMask(@Nonnull Cartographic position)
The new mask is centered at the specified location on the
EarthCentralBody
instance in the CentralBodiesFacet
of the current CalculationContext
.
position
- The planetodetic position at the center of the mask.public AzimuthElevationMask(CentralBody centralBody, @Nonnull Cartographic position)
centralBody
- The central body on which the mask is defined.position
- The planetodetic position at the center of the mask.@Nonnull public final Cartographic getPosition()
getPosition
in interface IAzimuthElevationMask
public final void setPosition(@Nonnull Cartographic value)
public final CentralBody getCentralBody()
getCentralBody
in interface IAzimuthElevationMask
public final void setCentralBody(CentralBody value)
public final double getMaximumObscuredElevation(double azimuth, double distance)
getMaximumObscuredElevation
in interface IAzimuthElevationMask
azimuth
- The azimuth, in radians.distance
- The maximum linear distance along the azimuth ray to consider.public static double getMaximumObscuredElevation(@Nonnull ElevationMask firstElevationMask, @Nonnull ElevationMask secondElevationMask, double azimuth, double distance)
ElevationMask
instances.firstElevationMask
- The first elevation mask bounding the azimuth.secondElevationMask
- The second elevation mask bounding the azimuth.azimuth
- The azimuth between the two masks along which to search.distance
- The distance along the azimuthal ray to search for obscuration.