Documentation of 'com.mhuss.AstroLib.LocationElements' Java class
LocationElements
com.mhuss.AstroLib

Class LocationElements



  • public class LocationElements
    extends java.lang.Object
    This is a convenience class used for passing around polar coordinates.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int LATITUDE
      Pseudo-enum indices into vector form of LocationElements.
      static int LONGITUDE
      Pseudo-enum indices into vector form of LocationElements.
      static int RADIUS
      Pseudo-enum indices into vector form of LocationElements.
      static int X 
      static int Y 
      static int Z 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double[] get()
      Get all values in this instance as a vector.
      double getLatitude()
      Get the latitude
      double getLongitude()
      Get the longitude
      double getRadius()
      Get the radius
      double getX()
      Get the X element
      double getY()
      Get the Y element
      double getZ()
      Get the Z element
      void invalidate()
      Mark all members as invalid
      void set(double[] vector)
      Set all members of this instance from a vector.
      void set(double lat, double lon, double rad)
      Set all members of this instance individually
      void setLatitude(double d)
      Set the latitude
      void setLongitude(double d)
      Set the longitude
      void setRadius(double d)
      Set the radius
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LocationElements

        public LocationElements()
        Default constructor
      • LocationElements

        public LocationElements(Latitude lat,
                                Longitude lon,
                                double rad)
        Explicit constructor
        Parameters:
        lat - latitude, X
        lon - longitude, Y
        rad - radius, Z
      • LocationElements

        public LocationElements(double[] vector)
        Vector constructor
        Parameters:
        vector - { lat, lon, rad }
    • Method Detail

      • invalidate

        public void invalidate()
        Mark all members as invalid
      • getLatitude

        public double getLatitude()
        Get the latitude
        Returns:
        The latitude value of this instance
      • getX

        public double getX()
        Get the X element
        Returns:
        The X value (in XYZ vector form) of this instance
      • getLongitude

        public double getLongitude()
        Get the longitude
        Returns:
        The longitude value of this instance
      • getY

        public double getY()
        Get the Y element
        Returns:
        The Y value (in XYZ vector form) of this instance
      • getRadius

        public double getRadius()
        Get the radius
        Returns:
        The radius value of this instance
      • getZ

        public double getZ()
        Get the Z element
        Returns:
        The Z value (in XYZ vector form) of this instance
      • get

        public double[] get()
        Get all values in this instance as a vector.

        The vector is an array of three doubles, latitude, longitude, and radius, in that order.

        Returns:
        v[0] = latitude, v[1] = longitude, v[2] = radius
      • setLatitude

        public void setLatitude(double d)
        Set the latitude
        Parameters:
        d - The new latitude value
      • setLongitude

        public void setLongitude(double d)
        Set the longitude
        Parameters:
        d - The new longitude value
      • setRadius

        public void setRadius(double d)
        Set the radius
        Parameters:
        d - The new radius value
      • set

        public void set(double[] vector)
        Set all members of this instance from a vector.

        The vector is an array of three doubles, latitude, longitude, and radius, in that order.

        Parameters:
        vector - v[0] = latitude, v[1] = longitude, v[2] = radius
      • set

        public void set(double lat,
                        double lon,
                        double rad)
        Set all members of this instance individually
        Parameters:
        lat - The new latitude
        lon - The new longitude
        rad - The new radius

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.