@Reference(authors="Ed Williams", title="Aviation Formulary", booktitle="", url="http://williams.best.vwh.net/avform.htm") public final class SphereUtil extends Object
Ed Williams
Aviation Formulary
Online: http://williams.best.vwh.net/avform.htm
Modifier and Type | Field and Description |
---|---|
private static int |
MAX_ITER
Maximum number of iterations.
|
private static double |
ONE_SIXTH
Constant to divide by 6 via multiplication.
|
private static double |
PRECISION
Maximum desired precision.
|
Modifier | Constructor and Description |
---|---|
private |
SphereUtil()
Dummy constructor.
|
Modifier and Type | Method and Description |
---|---|
static double |
alongTrackDistanceDeg(double lat1,
double lon1,
double lat2,
double lon2,
double latQ,
double lonQ)
The along track distance, is the distance from S to Q along the track S to
E.
|
static double |
alongTrackDistanceDeg(double lat1,
double lon1,
double lat2,
double lon2,
double latQ,
double lonQ,
double dist1Q,
double ctd)
The along track distance, is the distance from S to Q along the track S to
E.
|
static double |
alongTrackDistanceRad(double lat1,
double lon1,
double lat2,
double lon2,
double latQ,
double lonQ)
The along track distance, is the distance from S to Q along the track S to
E.
|
static double |
alongTrackDistanceRad(double lat1,
double lon1,
double lat2,
double lon2,
double latQ,
double lonQ,
double dist1Q,
double ctd)
The along track distance, is the distance from S to Q along the track S to
E.
|
static double |
bearingDegDeg(double latS,
double lngS,
double latE,
double lngE)
Compute the bearing from start to end.
|
static double |
bearingRad(double latS,
double lngS,
double latE,
double lngE)
Compute the bearing from start to end.
|
static double |
cosineFormulaDeg(double lat1,
double lon1,
double lat2,
double lon2)
Compute the approximate great-circle distance of two points using the
Haversine formula
Complexity: 6 (2 of which emulated) trigonometric functions.
|
static double |
cosineFormulaRad(double lat1,
double lon1,
double lat2,
double lon2)
Compute the approximate great-circle distance of two points using the
Spherical law of cosines.
|
static double |
crossTrackDistanceDeg(double lat1,
double lon1,
double lat2,
double lon2,
double latQ,
double lonQ)
Compute the cross-track distance.
|
static double |
crossTrackDistanceDeg(double lat1,
double lon1,
double lat2,
double lon2,
double latQ,
double lonQ,
double dist1Q)
Compute the cross-track distance.
|
static double |
crossTrackDistanceRad(double lat1,
double lon1,
double lat2,
double lon2,
double latQ,
double lonQ)
Compute the cross-track distance.
|
static double |
crossTrackDistanceRad(double lat1,
double lon1,
double lat2,
double lon2,
double latQ,
double lonQ,
double dist1Q)
Compute the cross-track distance.
|
static double |
ellipsoidVincentyFormulaDeg(double f,
double lat1,
double lon1,
double lat2,
double lon2)
Compute the approximate great-circle distance of two points.
|
static double |
ellipsoidVincentyFormulaRad(double f,
double lat1,
double lon1,
double lat2,
double lon2)
Compute the approximate great-circle distance of two points.
|
static double |
haversineFormulaDeg(double lat1,
double lon1,
double lat2,
double lon2)
Compute the approximate great-circle distance of two points using the
Haversine formula
Complexity: 5 trigonometric functions, 2 sqrt.
|
static double |
haversineFormulaRad(double lat1,
double lon1,
double lat2,
double lon2)
Compute the approximate great-circle distance of two points using the
Haversine formula
Complexity: 5 trigonometric functions, 2 sqrt.
|
static double |
latlngMinDistDeg(double plat,
double plng,
double rminlat,
double rminlng,
double rmaxlat,
double rmaxlng)
Point to rectangle minimum distance.
|
static double |
latlngMinDistRad(double plat,
double plng,
double rminlat,
double rminlng,
double rmaxlat,
double rmaxlng)
Point to rectangle minimum distance.
|
static double |
latlngMinDistRadFull(double plat,
double plng,
double rminlat,
double rminlng,
double rmaxlat,
double rmaxlng)
Point to rectangle minimum distance.
|
static double |
sphericalVincentyFormulaDeg(double lat1,
double lon1,
double lat2,
double lon2)
Compute the approximate great-circle distance of two points.
|
static double |
sphericalVincentyFormulaRad(double lat1,
double lon1,
double lat2,
double lon2)
Compute the approximate great-circle distance of two points.
|
private static final int MAX_ITER
private static final double PRECISION
private static final double ONE_SIXTH
public static double cosineFormulaDeg(double lat1, double lon1, double lat2, double lon2)
R. W. Sinnott,
Virtues of the Haversine
Sky and telescope, 68-2, 1984
lat1
- Latitude of first point in degreelon1
- Longitude of first point in degreelat2
- Latitude of second point in degreelon2
- Longitude of second point in degreepublic static double cosineFormulaRad(double lat1, double lon1, double lat2, double lon2)
R. W. Sinnott,
Virtues of the Haversine
Sky and telescope, 68-2, 1984
lat1
- Latitude of first point in degreelon1
- Longitude of first point in degreelat2
- Latitude of second point in degreelon2
- Longitude of second point in degree@Reference(authors="Sinnott, R. W.", title="Virtues of the Haversine", booktitle="Sky and telescope, 68-2, 1984") public static double haversineFormulaDeg(double lat1, double lon1, double lat2, double lon2)
R. W. Sinnott,
Virtues of the Haversine
Sky and telescope, 68-2, 1984
lat1
- Latitude of first point in degreelon1
- Longitude of first point in degreelat2
- Latitude of second point in degreelon2
- Longitude of second point in degree@Reference(authors="Sinnott, R. W.", title="Virtues of the Haversine", booktitle="Sky and telescope, 68-2, 1984") public static double haversineFormulaRad(double lat1, double lon1, double lat2, double lon2)
R. W. Sinnott,
Virtues of the Haversine
Sky and telescope, 68-2, 1984
lat1
- Latitude of first point in degreelon1
- Longitude of first point in degreelat2
- Latitude of second point in degreelon2
- Longitude of second point in degree@Reference(authors="T. Vincenty", title="Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations", booktitle="Survey review 23 176, 1975", url="http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf") public static double sphericalVincentyFormulaDeg(double lat1, double lon1, double lat2, double lon2)
T. Vincenty
Direct and inverse solutions of geodesics on the ellipsoid with application
of nested equations
Survey review 23 176, 1975
lat1
- Latitude of first point in degreelon1
- Longitude of first point in degreelat2
- Latitude of second point in degreelon2
- Longitude of second point in degree@Reference(authors="T. Vincenty", title="Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations", booktitle="Survey review 23 176, 1975", url="http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf") public static double sphericalVincentyFormulaRad(double lat1, double lon1, double lat2, double lon2)
T. Vincenty
Direct and inverse solutions of geodesics on the ellipsoid with application
of nested equations
Survey review 23 176, 1975
lat1
- Latitude of first point in degreelon1
- Longitude of first point in degreelat2
- Latitude of second point in degreelon2
- Longitude of second point in degree@Reference(authors="T. Vincenty", title="Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations", booktitle="Survey review 23 176, 1975", url="http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf") public static double ellipsoidVincentyFormulaDeg(double f, double lat1, double lon1, double lat2, double lon2)
T. Vincenty
Direct and inverse solutions of geodesics on the ellipsoid with application
of nested equations
Survey review 23 176, 1975
f
- Ellipsoid flatteninglat1
- Latitude of first point in degreelon1
- Longitude of first point in degreelat2
- Latitude of second point in degreelon2
- Longitude of second point in degree@Reference(authors="T. Vincenty", title="Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations", booktitle="Survey review 23 176, 1975", url="http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf") public static double ellipsoidVincentyFormulaRad(double f, double lat1, double lon1, double lat2, double lon2)
T. Vincenty
Direct and inverse solutions of geodesics on the ellipsoid with application
of nested equations
Survey review 23 176, 1975
f
- Ellipsoid flatteninglat1
- Latitude of first point in degreelon1
- Longitude of first point in degreelat2
- Latitude of second point in degreelon2
- Longitude of second point in degreepublic static double crossTrackDistanceDeg(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ)
lat1
- Latitude of starting point.lon1
- Longitude of starting point.lat2
- Latitude of destination point.lon2
- Longitude of destination point.latQ
- Latitude of query point.lonQ
- Longitude of query point.public static double crossTrackDistanceRad(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ, double dist1Q)
lat1
- Latitude of starting point.lon1
- Longitude of starting point.lat2
- Latitude of destination point.lon2
- Longitude of destination point.latQ
- Latitude of query point.lonQ
- Longitude of query point.dist1Q
- Distance from starting point to query point on unit spherepublic static double crossTrackDistanceDeg(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ, double dist1Q)
lat1
- Latitude of starting point.lon1
- Longitude of starting point.lat2
- Latitude of destination point.lon2
- Longitude of destination point.latQ
- Latitude of query point.lonQ
- Longitude of query point.dist1Q
- Distance from starting point to query point in radians (i.e.
on unit sphere).public static double crossTrackDistanceRad(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ)
lat1
- Latitude of starting point.lon1
- Longitude of starting point.lat2
- Latitude of destination point.lon2
- Longitude of destination point.latQ
- Latitude of query point.lonQ
- Longitude of query point.public static double alongTrackDistanceDeg(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ)
lat1
- Latitude of starting point.lon1
- Longitude of starting point.lat2
- Latitude of destination point.lon2
- Longitude of destination point.latQ
- Latitude of query point.lonQ
- Longitude of query point.public static double alongTrackDistanceRad(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ)
lat1
- Latitude of starting point in radians.lon1
- Longitude of starting point in radians.lat2
- Latitude of destination point in radians.lon2
- Longitude of destination point in radians.latQ
- Latitude of query point in radians.lonQ
- Longitude of query point in radians.public static double alongTrackDistanceDeg(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ, double dist1Q, double ctd)
lat1
- Latitude of starting point.lon1
- Longitude of starting point.lat2
- Latitude of destination point.lon2
- Longitude of destination point.latQ
- Latitude of query point.lonQ
- Longitude of query point.dist1Q
- Distance S to Q in radians.ctd
- Cross-track-distance in radians.public static double alongTrackDistanceRad(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ, double dist1Q, double ctd)
lat1
- Latitude of starting point in radians.lon1
- Longitude of starting point in radians.lat2
- Latitude of destination point in radians.lon2
- Longitude of destination point in radians.latQ
- Latitude of query point in radians.lonQ
- Longitude of query point in radians.dist1Q
- Distance S to Q in radians.ctd
- Cross-track-distance in radians.@Reference(authors="Erich Schubert, Arthur Zimek and Hans-Peter Kriegel", title="Geodetic Distance Queries on R-Trees for Indexing Geographic Data", booktitle="Advances in Spatial and Temporal Databases - 13th International Symposium, SSTD 2013, Munich, Germany") public static double latlngMinDistDeg(double plat, double plng, double rminlat, double rminlng, double rmaxlat, double rmaxlng)
Erich Schubert, Arthur Zimek and Hans-Peter Kriegel
Geodetic Distance Queries on R-Trees for Indexing Geographic Data
Advances in Spatial and Temporal Databases - 13th International Symposium,
SSTD 2013, Munich, Germany
plat
- Latitude of query point.plng
- Longitude of query point.rminlat
- Min latitude of rectangle.rminlng
- Min longitude of rectangle.rmaxlat
- Max latitude of rectangle.rmaxlng
- Max longitude of rectangle.@Reference(authors="Erich Schubert, Arthur Zimek and Hans-Peter Kriegel", title="Geodetic Distance Queries on R-Trees for Indexing Geographic Data", booktitle="Advances in Spatial and Temporal Databases - 13th International Symposium, SSTD 2013, Munich, Germany") public static double latlngMinDistRad(double plat, double plng, double rminlat, double rminlng, double rmaxlat, double rmaxlng)
Erich Schubert, Arthur Zimek and Hans-Peter Kriegel
Geodetic Distance Queries on R-Trees for Indexing Geographic Data
Advances in Spatial and Temporal Databases - 13th International Symposium,
SSTD 2013, Munich, Germany
plat
- Latitude of query point.plng
- Longitude of query point.rminlat
- Min latitude of rectangle.rminlng
- Min longitude of rectangle.rmaxlat
- Max latitude of rectangle.rmaxlng
- Max longitude of rectangle.@Reference(authors="Erich Schubert, Arthur Zimek and Hans-Peter Kriegel", title="Geodetic Distance Queries on R-Trees for Indexing Geographic Data", booktitle="Advances in Spatial and Temporal Databases - 13th International Symposium, SSTD 2013, Munich, Germany") public static double latlngMinDistRadFull(double plat, double plng, double rminlat, double rminlng, double rmaxlat, double rmaxlng)
Erich Schubert, Arthur Zimek and Hans-Peter Kriegel
Geodetic Distance Queries on R-Trees for Indexing Geographic Data
Advances in Spatial and Temporal Databases - 13th International Symposium,
SSTD 2013, Munich, Germany
plat
- Latitude of query point.plng
- Longitude of query point.rminlat
- Min latitude of rectangle.rminlng
- Min longitude of rectangle.rmaxlat
- Max latitude of rectangle.rmaxlng
- Max longitude of rectangle.public static double bearingDegDeg(double latS, double lngS, double latE, double lngE)
latS
- Start latitude, in degreelngS
- Start longitude, in degreelatE
- End latitude, in degreelngE
- End longitude, in degreepublic static double bearingRad(double latS, double lngS, double latE, double lngE)
latS
- Start latitude, in radianslngS
- Start longitude, in radianslatE
- End latitude, in radianslngE
- End longitude, in radiansCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.