@Immutable
public class Earth
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static Earth |
DEFAULT |
protected double |
eccentricity |
protected double |
eccentricitySquared |
protected double |
equatorRadius |
protected double |
flattening |
protected java.lang.String |
name |
protected double |
poleRadius |
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.
|
static double |
getRadius()
Get canonical radius of spherical earth, in meters
|
int |
hashCode() |
boolean |
isSpherical() |
java.lang.String |
toString() |
public static final Earth DEFAULT
protected final double eccentricity
protected final double eccentricitySquared
protected final double equatorRadius
protected final double poleRadius
protected final double flattening
protected final java.lang.String name
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 static double getRadius()
public boolean isSpherical()
public double getMajor()
public double getMinor()
public java.lang.String getName()
public double getEccentricity()
public double getEccentricitySquared()
public double getEquatorRadius()
public double getPoleRadius()
public double getFlattening()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object