@Immutable public class Earth extends Object implements 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,
String name)
Create an ellipsoidal earth with a name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(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.
|
String |
getName()
Get the Name property.
|
double |
getPoleRadius()
Get the PoleRadius property.
|
int |
hashCode() |
boolean |
isSpherical() |
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, 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 double getEccentricity()
public double getEccentricitySquared()
public double getEquatorRadius()
public double getFlattening()
public double getMajor()
public double getMinor()
public String getName()
public double getPoleRadius()
public boolean isSpherical()