Module JNISpice
Package spice.basic

Class AngularUnits


  • public class AngularUnits
    extends Units
    Class AngularUnits represents angular units and supports conversion between them.

    Version 1.0.0 18-DEC-2009 (NJB)

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static AngularUnits ARCSECONDS
      ARCSECONDS represents 1/3600 of a degree.
      static AngularUnits DEGREES
      DEGREES represents the unit degrees.
      static double DPR
      DPR represents degrees per radian.
      private java.lang.String name  
      static AngularUnits RADIANS
      RADIANS represents the unit radians.
      private double radiansPerUnit  
      static double RPD
      RPD represents radians per degree.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        AngularUnits​(java.lang.String name)
      Construct an angular unit from a string.
      private AngularUnits​(java.lang.String name, double radiansPerUnit)  
    • Method Summary

      Modifier and Type Method Description
      double toRadians()
      Return the magnitude of this unit in radians.
      java.lang.String toString()
      Return the name of this unit as a String.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DPR

        public static final double DPR
        DPR represents degrees per radian.
      • RPD

        public static final double RPD
        RPD represents radians per degree.
      • ARCSECONDS

        public static final AngularUnits ARCSECONDS
        ARCSECONDS represents 1/3600 of a degree.
      • RADIANS

        public static final AngularUnits RADIANS
        RADIANS represents the unit radians.
      • DEGREES

        public static final AngularUnits DEGREES
        DEGREES represents the unit degrees.
      • name

        private final java.lang.String name
      • radiansPerUnit

        private final double radiansPerUnit
    • Constructor Detail

      • AngularUnits

        private AngularUnits​(java.lang.String name,
                             double radiansPerUnit)
      • AngularUnits

        public AngularUnits​(java.lang.String name)
                     throws SpiceException
        Construct an angular unit from a string.

        The unit name must be one of the following:

              "RADIANS"
              "DEGREES"
              "ARCMINUTES"
              "ARCSECONDS"
              "HOURANGLE"
              "MINUTEANGLE"
              "SECONDANGLE"
           
        Parameters:
        name - String
        Throws:
        SpiceException - exception
    • Method Detail

      • toString

        public java.lang.String toString()
        Return the name of this unit as a String.
        Specified by:
        toString in class Units
        Returns:
        name
      • toRadians

        public double toRadians()
        Return the magnitude of this unit in radians.
        Returns:
        radiansPerUnit