Class Earth

    • Field Detail

      • DEFAULT

        public static final Earth DEFAULT
      • WGS84_EARTH_RADIUS_METERS

        public static final double WGS84_EARTH_RADIUS_METERS
        Get canonical radius of the spherical earth in meters from "WGS 84"
        See Also:
        Constant Field Values
      • WGS84_EARTH_RADIUS_KM

        public static final double WGS84_EARTH_RADIUS_KM
        Get canonical radius of the spherical earth in km from "WGS 84"
        See Also:
        Constant Field Values
      • eccentricity

        protected final double eccentricity
      • eccentricitySquared

        protected final double eccentricitySquared
      • equatorRadius

        protected final double equatorRadius
      • poleRadius

        protected final double poleRadius
      • flattening

        protected final double flattening
      • name

        protected final String name
    • Constructor Detail

      • Earth

        public Earth()
        Spherical earth with canonical radius.
      • Earth

        public Earth​(double radius)
        Create a spherical earth.
        Parameters:
        radius - radius of spherical earth.
      • Earth

        public Earth​(double equatorRadius,
                     double poleRadius,
                     double reciprocalFlattening)
        Create an ellipsoidal earth. The reciprocalFlattening is used if not zero, else the poleRadius is used.
        Parameters:
        equatorRadius - equatorial radius (semimajor axis) in meters, must be specified
        poleRadius - polar radius (semiminor axis) in meters
        reciprocalFlattening - inverse flattening = 1/flattening = a / (a-b)
      • Earth

        public Earth​(double equatorRadius,
                     double poleRadius,
                     double reciprocalFlattening,
                     String name)
        Create an ellipsoidal earth with a name.
        Parameters:
        equatorRadius - equatorial radius (semimajor axis) in meters, must be specified
        poleRadius - polar radius (semiminor axis) in meters; if reciprocalFlattening != 0 then this is ignored
        reciprocalFlattening - inverse flattening = 1/flattening = a / (a-b); if 0 use the poleRadius to calculate
        name - name of the Earth
    • Method Detail

      • getRadius

        @Deprecated
        public static double getRadius()
        Deprecated.
        use WGS84_EARTH_RADIUS_METERS
        Get canonical radius of spherical earth, in meters
      • isSpherical

        public boolean isSpherical()
      • getMajor

        public double getMajor()
        Get the equatorial radius (semimajor axis) of the earth, in meters.
        Returns:
        equatorial radius (semimajor axis) in meters
      • getMinor

        public double getMinor()
        Get the polar radius (semiminor axis) of the earth, in meters.
        Returns:
        polar radius (semiminor axis) in meters
      • getName

        public String getName()
        Get the Name property.
        Returns:
        The Name
      • getEccentricity

        public double getEccentricity()
        Get the Eccentricity property.
        Returns:
        The Eccentricity
      • getEccentricitySquared

        public double getEccentricitySquared()
        Get the EccentricitySquared property.
        Returns:
        The EccentricitySquared
      • getEquatorRadius

        public double getEquatorRadius()
        Get the EquatorRadius property.
        Returns:
        The EquatorRadius
      • getPoleRadius

        public double getPoleRadius()
        Get the PoleRadius property.
        Returns:
        The PoleRadius
      • getFlattening

        public double getFlattening()
        Get the Flattening property.
        Returns:
        The Flattening
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object