
public abstract class AbstractEarthModel extends Object implements EarthModel
| Modifier and Type | Field and Description |
|---|---|
(package private) double |
a
Model parameters: major and minor radius.
|
(package private) double |
b
Model parameters: major and minor radius.
|
(package private) double |
e
Derived model parameters: e and e squared.
|
(package private) double |
esq
Derived model parameters: e and e squared.
|
(package private) double |
f
Model parameters: flattening, inverse flattening.
|
(package private) double |
invf
Model parameters: flattening, inverse flattening.
|
private static int |
MAX_ITER
Maximum number of iterations.
|
private static double |
PRECISION
Maximum desired precision.
|
MODEL_ID| Constructor and Description |
|---|
AbstractEarthModel(double a,
double b,
double f,
double invf)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
distanceDeg(double lat1,
double lng1,
double lat2,
double lng2)
Compute the geodetic distance between two surface coordinates.
|
double |
distanceRad(double lat1,
double lng1,
double lat2,
double lng2)
Compute the geodetic distance between two surface coordinates.
|
double |
ecefToLatDeg(double x,
double y,
double z)
Convert a 3D coordinate pair to the corresponding latitude.
|
double[] |
ecefToLatLngDegHeight(double x,
double y,
double z)
Convert a 3D coordinate pair to the corresponding latitude, longitude and
height.
|
double[] |
ecefToLatLngRadHeight(double x,
double y,
double z)
Convert a 3D coordinate pair to the corresponding latitude, longitude and
height.
|
double |
ecefToLatRad(double x,
double y,
double z)
Convert a 3D coordinate pair to the corresponding latitude.
|
double |
ecefToLngDeg(double x,
double y)
Convert a 3D coordinate pair to the corresponding longitude.
|
double |
ecefToLngRad(double x,
double y)
Convert a 3D coordinate pair to the corresponding longitude.
|
double |
getEquatorialRadius()
Equatorial radius
|
double |
getPolarDistance()
Polar distance.
|
double[] |
latLngDegToECEF(double lat,
double lng)
Map a degree latitude, longitude pair to 3D X-Y-Z coordinates, using a
spherical earth model.
|
double[] |
latLngDegToECEF(double lat,
double lng,
double h)
Map a degree latitude, longitude pair to 3D X-Y-Z coordinates, using a
spherical earth model.
|
double[] |
latLngRadToECEF(double lat,
double lng)
Map a radians latitude, longitude pair to 3D X-Y-Z coordinates, using a
spherical earth model.
|
double[] |
latLngRadToECEF(double lat,
double lng,
double h)
Map a radians latitude, longitude pair to 3D X-Y-Z coordinates, using a
spherical earth model.
|
double |
minDistDeg(double plat,
double plng,
double rminlat,
double rminlng,
double rmaxlat,
double rmaxlng)
Compute a lower bound for the geodetic distance point to rectangle.
|
double |
minDistRad(double plat,
double plng,
double rminlat,
double rminlng,
double rmaxlat,
double rmaxlng)
Compute a lower bound for the geodetic distance point to rectangle.
|
String |
toString() |
private static final int MAX_ITER
private static final double PRECISION
final double a
final double b
final double f
final double invf
final double e
final double esq
public AbstractEarthModel(double a,
double b,
double f,
double invf)
a - Major axis radiusb - Minor axis radiusf - Flatteninginvf - Inverse flatteningpublic double getEquatorialRadius()
EarthModelgetEquatorialRadius in interface EarthModelpublic double getPolarDistance()
EarthModelgetPolarDistance in interface EarthModelpublic double[] latLngDegToECEF(double lat,
double lng)
EarthModellatLngDegToECEF in interface EarthModellat - Latitude in degreelng - Longitude in degreepublic double[] latLngDegToECEF(double lat,
double lng,
double h)
EarthModellatLngDegToECEF in interface EarthModellat - Latitude in degreelng - Longitude in degreeh - Heightpublic double[] latLngRadToECEF(double lat,
double lng)
EarthModellatLngRadToECEF in interface EarthModellat - Latitude in radianslng - Longitude in radianspublic double[] latLngRadToECEF(double lat,
double lng,
double h)
EarthModellatLngRadToECEF in interface EarthModellat - Latitude in radianslng - Longitude in radiansh - Heightpublic double ecefToLatDeg(double x,
double y,
double z)
EarthModelecefToLatDeg in interface EarthModelx - X valuey - Y valuez - Z valuepublic double ecefToLatRad(double x,
double y,
double z)
EarthModelecefToLatRad in interface EarthModelx - X valuey - Y valuez - Z valuepublic double ecefToLngDeg(double x,
double y)
EarthModelecefToLngDeg in interface EarthModelx - X valuey - Y valuepublic double ecefToLngRad(double x,
double y)
EarthModelecefToLngRad in interface EarthModelx - X valuey - Y valuepublic double[] ecefToLatLngDegHeight(double x,
double y,
double z)
EarthModelEarthModel.ecefToLatDeg(double, double, double)
and EarthModel.ecefToLngDeg(double, double) instead, which has a smaller memory footprint.ecefToLatLngDegHeight in interface EarthModelx - X valuey - Y valuez - Z valuepublic double[] ecefToLatLngRadHeight(double x,
double y,
double z)
EarthModelEarthModel.ecefToLatRad(double, double, double)
and EarthModel.ecefToLngRad(double, double) instead, which has a smaller memory footprint.ecefToLatLngRadHeight in interface EarthModelx - X valuey - Y valuez - Z valuepublic double distanceDeg(double lat1,
double lng1,
double lat2,
double lng2)
EarthModeldistanceDeg in interface EarthModellat1 - Latitude of first in degrees.lng1 - Longitude of first in degrees.lat2 - Latitude of second in degrees.lng2 - Longitude of second in degrees.public double distanceRad(double lat1,
double lng1,
double lat2,
double lng2)
EarthModeldistanceRad in interface EarthModellat1 - Latitude of first in radians.lng1 - Longitude of first in radians.lat2 - Latitude of second in radians.lng2 - Longitude of second in radians.public double minDistDeg(double plat,
double plng,
double rminlat,
double rminlng,
double rmaxlat,
double rmaxlng)
EarthModelminDistDeg in interface EarthModelplat - Latitude of point in degrees.plng - Longitude of point in degrees.rminlat - Min latitude of rectangle in degrees.rminlng - Min Longitude of rectangle in degrees.rmaxlat - Max Latitude of rectangle in degrees.rmaxlng - Max Longitude of rectangle in degrees.public double minDistRad(double plat,
double plng,
double rminlat,
double rminlng,
double rmaxlat,
double rmaxlng)
EarthModelminDistRad in interface EarthModelplat - Latitude of point in radians.plng - Longitude of point in radians.rminlat - Min latitude of rectangle in radians.rminlng - Min Longitude of rectangle in radians.rmaxlat - Max Latitude of rectangle in radians.rmaxlng - Max Longitude of rectangle in radians.