Jeospace API

Package org.jeospace.measure.angle

Contains classes that support angular measurements.

See:
          Description

Interface Summary
Angle Angle provides the base operations for setting, getting and manipulating angular measurement values.
AngleType Marker interface to distinguish an AngleType class
AngleUnit Requirements for defining an AngleUnit class
 

Class Summary
AngleConstants Numeric constants used for the conversions of angles representations.
AngleNorm Constant object identifiers of the options for normalization of an angle.
AngleSign Constant object identifiers of the direction of rotation of an angle.
DecimalAngle DecimalAngle provides a concrete implementation of Angle which is designed for high performance usage in conjunction with java.lang.Math trigonometric methods - or other functions which require double precision floating point representations of angular measurements.
DecimalAngleType Constant object identifier of a decimal angle type.
DecimalAngleUnit DecimalAngleUnit provides constant object identifiers for the commonly used decimal representations of Angle's.
HourConstants Numeric constants used for the conversions of angles representations.
Latitude A subclass of DecimalAngle, a latitude is an angle that is restricted in value to be within a half revolution of arc.
Longitude A subclass of DecimalAngle, a longitude is an angle that is always normalized to a value within a full revolution of arc.
SexagesimalAngle SexagesimalAngle provides a concrete implementation of Angle which is designed for accurate manipulations of the sexagesimal sub-unit fields to the minimum value of 1 microsecond of degree.
SexagesimalAngleType Constant object identifiers of the type and grouping of the primary units and sub-units of sexigesimal angle representations.
SexagesimalAngleUnit Constant object identifiers of the units of sexigesimal angle representations.
 

Package org.jeospace.measure.angle Description

Contains classes that support angular measurements.

Angles may be represented and manipulated in a variety of forms. The Angle interface provides a 'Rosetta Stone' for instantiating, manipulating and retrieving angle values in a variety forms. There are 4 forms of decimal representation: degrees, hours, radians and revolutions. For example, the following values are equivalent:

360.0° = 24.0h = 6.283185307179586rad = 1.0rev

Two forms of the decimal representation are also commonly presented in sexagesimal form. Degrees and hours are sub-united into minutes and seconds with the possibility that the least significant sub-unit is presented as a decimal value. For example:

1 radian in sexagesimal form of degrees and hours respectively would be:

57°17'44.806247" = 3h49m10.987083s

Two concrete implementations of the Angle interface are provided.

DecimalAngle provides an internal implementation based on double precision floating point and 'should' be the best performance option when the angle values will be passed to the trigonometric functions of the java.lang.Math package or other functions requiring a double precision floating point angle value (typically in radians). The 'cost' of a conversion from one decimal type to another is at most a double multiply.

SexagesimalAngle provides an internal implementation based on integral manipulation of the angle values. This implementation provides additional methods for accurately manipulating the sub-unit fields of the angle. The internal representation of the SexagesimalAngle is maintain as a long representing the number of microseconds of arc in the angle. Thus the minimum angle representable is 1 microsecond of degree and the maximum angle representable is approximately +/-2,562,047,788 degrees.

Note: The microsecond of degree was chosen as the smallest integral value for a SexagesimalAngle based on several criteria:

  1. By the author's experience, this was a finer granularity than is used in any known (to the author) practical application.
  2. Within a normalized angle value (i.e. > 360 degrees, < -360 degrees), which is arguably the most common usage, the representation of an angle to the microseconds of degree would have a number of significant digits within that of a double precision floating point number. Therefore, within the limits of accuracy of a double precision floating point number, equivalent DecimalAngle and SexigesimalAngle objects could be instantiated. ( Or in other words, 360 is ~O(10^2), there are 3600 seconds per degree which is ~O(10^3), microseconds are O(10^6). Summing the 'order-of' exponents, the largest normalized angle value in microseconds will have approximately 11 [12 actually] significant digits - which is within the number of significant digits of a double precision floating point number.)

 


Jeospace API

Copyright © 2006 - jeospace.org