@Immutable
public class Earth
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static Earth |
DEFAULT |
static double |
WGS84_EARTH_RADIUS_KM
Get canonical radius of the spherical earth in km from "WGS 84"
|
static double |
WGS84_EARTH_RADIUS_METERS
Get canonical radius of the spherical earth in meters from "WGS 84"
|
Constructor and Description |
---|
Earth()
Spherical earth with canonical radius.
|
Earth(double radius)
Create a spherical earth.
|
Earth(double equatorRadius,
double poleRadius,
double reciprocalFlattening)
Create an ellipsoidal earth.
|
Earth(double equatorRadius,
double poleRadius,
double reciprocalFlattening,
java.lang.String name)
Create an ellipsoidal earth with a name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
double |
getEccentricity()
Get the Eccentricity property.
|
double |
getEccentricitySquared()
Get the EccentricitySquared property.
|
double |
getEquatorRadius()
Get the EquatorRadius property.
|
double |
getFlattening()
Get the Flattening property.
|
double |
getMajor()
Get the equatorial radius (semimajor axis) of the earth, in meters.
|
double |
getMinor()
Get the polar radius (semiminor axis) of the earth, in meters.
|
java.lang.String |
getName()
Get the Name property.
|
double |
getPoleRadius()
Get the PoleRadius property.
|
int |
hashCode() |
boolean |
isSpherical() |
java.lang.String |
toString() |
public static final Earth DEFAULT
public static final double WGS84_EARTH_RADIUS_KM
public static final double WGS84_EARTH_RADIUS_METERS
public Earth()
public Earth(double radius)
radius
- radius of spherical earth.public Earth(double equatorRadius, double poleRadius, double reciprocalFlattening)
equatorRadius
- equatorial radius (semimajor axis) in meters, must be specifiedpoleRadius
- polar radius (semiminor axis) in metersreciprocalFlattening
- inverse flattening = 1/flattening = a / (a-b)public Earth(double equatorRadius, double poleRadius, double reciprocalFlattening, java.lang.String name)
equatorRadius
- equatorial radius (semimajor axis) in meters, must be specifiedpoleRadius
- polar radius (semiminor axis) in meters; if reciprocalFlattening != 0 then this is ignoredreciprocalFlattening
- inverse flattening = 1/flattening = a / (a-b); if 0 use the poleRadius to calculatename
- name of the Earthpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public double getEccentricity()
public double getEccentricitySquared()
public double getEquatorRadius()
public double getFlattening()
public double getMajor()
public double getMinor()
public java.lang.String getName()
public double getPoleRadius()
public int hashCode()
hashCode
in class java.lang.Object
public boolean isSpherical()
public java.lang.String toString()
toString
in class java.lang.Object