net.surveyos.sourceforge.jtswarped.angles
Class DegreesMinutesSecondsValue

java.lang.Object
  extended by net.surveyos.sourceforge.jtswarped.angles.DegreesMinutesSecondsValue

public class DegreesMinutesSecondsValue
extends java.lang.Object

Represents a angle value in degrees, minutes, and seconds format. This is the angle format commonly used by land surveyors in the United States. In this system a complete ciruclar revolution is made up of 360 degrees. Each of these degrees is made up of 60 minutes. Each of these minutes is made up of 60 seconds. Each second can be further divided into decimal portions of a whole second. This class is used to represent and validate degrees-minutes-seconds angle values. The AngleFormatUtilities class can be used to convert values in this format to other angle value formats like radians, revolutions, and decimal degrees. You do not need to use this class directly to work with SurveyorsAngles and SurveyorsDirections. You can pass angle values to those classes direction. This class is used internally to validate and store degrees-minutes-seconds angle values.


Constructor Summary
DegreesMinutesSecondsValue(int argDegrees, int argMinutes, double argSeconds)
          Constructs a DegreesMinutesSecondsValue using the numeric values provided.
DegreesMinutesSecondsValue(int argDegrees, int argMinutes, int argWholeSeconds, double argFractionalSeconds)
          Constructs a DegreesMinutesSecondsValue using the numeric values provided.
DegreesMinutesSecondsValue(java.lang.String argValue)
          Constructs a DegreesMinutesSecondsValue from the string argument.
 
Method Summary
 int getDegrees()
          Returns the number of whole degrees in this angle.
 double getFractionalSeconds()
          Returns the number of fractional seconds in this angle.
 int getMinutes()
          Returns the number of whole minutes in this angle.
 int getSeconds()
          Returns the number of whole seconds in this angle.
 double getWholeAndFractionalSeconds()
          Returns the whole and fractional seconds in this angle as a double value.
 double splitFractionalSecondsFromWholeSeconds(double argSeconds)
          Splits the fractional seconds from the double and returns them as a double.
 int splitWholeSecondsFromFractionalSeconds(double argSeconds)
          Splits the whole seconds from the double and returns them as an int.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DegreesMinutesSecondsValue

public DegreesMinutesSecondsValue(java.lang.String argValue)
Constructs a DegreesMinutesSecondsValue from the string argument. The string argument must be in the following format: 256-29-63.226


DegreesMinutesSecondsValue

public DegreesMinutesSecondsValue(int argDegrees,
                                  int argMinutes,
                                  double argSeconds)
Constructs a DegreesMinutesSecondsValue using the numeric values provided. The first argument is the number of whole degrees in the angle. The second value is the number of whole minutes in the angle. The third value is the number of seconds in the angle, including the fractional seconds.


DegreesMinutesSecondsValue

public DegreesMinutesSecondsValue(int argDegrees,
                                  int argMinutes,
                                  int argWholeSeconds,
                                  double argFractionalSeconds)
Constructs a DegreesMinutesSecondsValue using the numeric values provided. The first argument is the number of whole degrees in the angle. The second value is the number of whole minutes in the angle. The third value is the number of whole seconds in the angle. The fourth value is the number of fractional seconds in the angle.

Method Detail

getDegrees

public int getDegrees()
Returns the number of whole degrees in this angle.


getMinutes

public int getMinutes()
Returns the number of whole minutes in this angle.


getSeconds

public int getSeconds()
Returns the number of whole seconds in this angle.


getFractionalSeconds

public double getFractionalSeconds()
Returns the number of fractional seconds in this angle.


getWholeAndFractionalSeconds

public double getWholeAndFractionalSeconds()
Returns the whole and fractional seconds in this angle as a double value.


splitWholeSecondsFromFractionalSeconds

public int splitWholeSecondsFromFractionalSeconds(double argSeconds)
Splits the whole seconds from the double and returns them as an int.


splitFractionalSecondsFromWholeSeconds

public double splitFractionalSecondsFromWholeSeconds(double argSeconds)
Splits the fractional seconds from the double and returns them as a double.