public final class AzimuthElevationRange extends Object implements IEquatable<AzimuthElevationRange>, IEquatableEpsilon<AzimuthElevationRange>, ImmutableValueType
The Azimuth
(get
) is the angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
The Elevation
(get
) is the angular coordinate measured from the xy-plane and toward the negative z-axis.
The Range
(get
) is the linear coordinate measured from the origin.
Constructor and Description |
---|
AzimuthElevationRange()
Initializes a new instance.
|
AzimuthElevationRange(Cartesian coordinates)
Initializes a set of
AzimuthElevationRange coordinates from the provided set of
Cartesian coordinates represented in the North-East-Down orientation with
X pointing north, Y pointing east, and Z pointing down. |
AzimuthElevationRange(double[] elements)
Initializes a set of
AzimuthElevationRange coordinates from the first 3 consecutive elements in the provided array. |
AzimuthElevationRange(double[] elements,
int startIndex)
Initializes a set of
AzimuthElevationRange coordinates from the provided array. |
AzimuthElevationRange(double azimuth,
double elevation,
double range)
Initializes a set of
AzimuthElevationRange coordinates from the provided values. |
Modifier and Type | Method and Description |
---|---|
static Motion1<AzimuthElevationRange> |
convertMotion(Motion1<Cartesian> topographic,
int order)
Construct a Motion<Cartesian> which represents the motion
expressed with
AzimuthElevationRange values and derivatives. |
static boolean |
equals(AzimuthElevationRange left,
AzimuthElevationRange right)
Returns
true if the two instances are exactly equal. |
boolean |
equals(Object obj)
Indicates whether another object is exactly equal to this instance.
|
boolean |
equalsEpsilon(AzimuthElevationRange other,
double epsilon)
Indicates whether each coordinate value of another instance of this type
is within the required tolerance of the corresponding coordinate value of this instance.
|
boolean |
equalsType(AzimuthElevationRange other)
Indicates whether another instance of this type is exactly equal to this instance.
|
static AzimuthElevationRange |
fromCartesian(Cartesian coordinates)
Initializes a set of
AzimuthElevationRange coordinates from the provided set of
Cartesian coordinates represented in the North-East-Down orientation with
X pointing north, Y pointing east, and Z pointing down. |
double |
get(int index)
|
double |
getAzimuth()
Gets the angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
|
double |
getElevation()
Gets the angular coordinate measured from the xy-plane measured toward the negative z-axis.
|
int |
getLength()
Gets the number of elements in this set of coordinates.
|
double |
getRange()
Gets the linear coordinate measured from the origin.
|
static AzimuthElevationRange |
getZero()
Gets a set of
AzimuthElevationRange coordinates with values of zero. |
int |
hashCode()
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
|
static boolean |
notEquals(AzimuthElevationRange left,
AzimuthElevationRange right)
Returns
true if the two instances are not exactly equal. |
String |
toString()
Returns the string representation of the value of this instance.
|
public AzimuthElevationRange()
public AzimuthElevationRange(double azimuth, double elevation, double range)
AzimuthElevationRange
coordinates from the provided values.azimuth
- The angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.elevation
- The angular coordinate measured from the xy-plane and toward the negative z-axis.range
- The linear coordinate measured from the origin.public AzimuthElevationRange(@Nonnull Cartesian coordinates)
AzimuthElevationRange
coordinates from the provided set of
Cartesian
coordinates represented in the North-East-Down orientation with
X pointing north, Y pointing east, and Z pointing down.coordinates
- The set of Cartesian
coordinates.public AzimuthElevationRange(@Nonnull double[] elements)
AzimuthElevationRange
coordinates from the first 3 consecutive elements in the provided array.elements
- The array of coordinate values ordered consecutively as azimuth, elevation, range.ArgumentNullException
- Thrown when elements
is null
.ArgumentOutOfRangeException
- Thrown when an object of this type is constructed from an array with less than 3 elements
.public AzimuthElevationRange(@Nonnull double[] elements, int startIndex)
AzimuthElevationRange
coordinates from the provided array.elements
- The array of coordinate values ordered consecutively as azimuth, elevation, range.startIndex
- The index of the first element in the array to use.ArgumentNullException
- Thrown when elements
is null
.ArgumentOutOfRangeException
- Thrown when an object of this type is constructed from an array with less than 3 elements
.@Nonnull public static AzimuthElevationRange getZero()
AzimuthElevationRange
coordinates with values of zero.@Nonnull public static AzimuthElevationRange fromCartesian(@Nonnull Cartesian coordinates)
AzimuthElevationRange
coordinates from the provided set of
Cartesian
coordinates represented in the North-East-Down orientation with
X pointing north, Y pointing east, and Z pointing down.coordinates
- The set of Cartesian
coordinates.AzimuthElevationRange
coordinates which represents the provided set of .@Nonnull public static Motion1<AzimuthElevationRange> convertMotion(@Nonnull Motion1<Cartesian> topographic, int order)
AzimuthElevationRange
values and derivatives.
"Topographic" coordinates are defined by a North-East-Down convention, with the X axis pointing North,
Y pointing East, and Z antiparallel to the local surface normal. For more detailed information, see
AxesNorthEastDown
.
topographic
- The Motion<Cartesian> topographic motion to convert.order
- The order of the highest derivative to convert. To convert just the position, pass 0 for this value. To convert velocity as well, pass 1.public final double getAzimuth()
public final double getElevation()
public final double getRange()
public final int getLength()
public final double get(int index)
index
of 0, 1, and 2 corresponding to the coordinates
Azimuth
(get
), Elevation
(get
), and Range
(get
).index
- The index to retrieve.index
.ArgumentOutOfRangeException
- Thrown when index
is less than 0 or greater than or equal to Length
(get
).public boolean equals(Object obj)
equals
in class Object
obj
- The object to compare to this instance.true
if obj
is an instance of this type and represents the same value as this instance; otherwise false
.Object.hashCode()
,
HashMap
public final boolean equalsType(@Nonnull AzimuthElevationRange other)
equalsType
in interface IEquatable<AzimuthElevationRange>
other
- The instance to compare to this instance.true
if other
represents the same value as this instance; otherwise false
.public final boolean equalsEpsilon(@Nonnull AzimuthElevationRange other, double epsilon)
equalsEpsilon
in interface IEquatableEpsilon<AzimuthElevationRange>
other
- The set of AzimuthElevationRange
coordinates to compare to this instance.epsilon
- The limit at which the absolute differences between the coordinate values will not be considered equal.true
if the absolute differences are less than or equal to epsilon
; otherwise false
.public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
public String toString()
public static boolean equals(@Nonnull AzimuthElevationRange left, @Nonnull AzimuthElevationRange right)
true
if the two instances are exactly equal.left
- The instance to compare to right
.right
- The instance to compare to left
.true
if left
represents the same value as right
; otherwise false
.public static boolean notEquals(@Nonnull AzimuthElevationRange left, @Nonnull AzimuthElevationRange right)
true
if the two instances are not exactly equal.left
- The instance to compare to right
.right
- The instance to compare to left
.true
if left
does not represent the same value as right
; otherwise false
.