|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.sc.seis.TauP.SphericalCoords
public class SphericalCoords
Utility class for spherical coordinate (lat-lon) transformations. Given lat, lon, lat, lon you can find the distance or azimuth and given lat, lon, distance, azimuth you can find the lat lon of the resultant point. Just uses spherical relations, no ellpticity correction is applied. See Appendix A of "Seismology and Plate Tectonics" by David Gubbins Cambridge University Press, 1990 and Chapter 3 of "Plate Tectonics: How it Works" by Allan Cox and Robert Brian Hart Blackwell Scientific Publications, 1986
Field Summary | |
---|---|
protected static double |
dtor
|
protected static double |
rtod
|
Constructor Summary | |
---|---|
SphericalCoords()
|
Method Summary | |
---|---|
static double |
azimuth(double latA,
double lonA,
double latB,
double lonB)
Calculates azimuth between two lat lon pairs. |
static double |
distance(double latA,
double lonA,
double latB,
double lonB)
Calculates angular distance between two lat lon pairs. |
static double |
latFor(double latA,
double lonA,
double distance,
double azimuth)
Calculates the latitude of a point a given distance along a given azimuth from a starting lat lon. |
static double |
lonFor(double latA,
double lonA,
double distance,
double azimuth)
Calculates the longitude of a point a given distance along a given azimuth from a starting lat lon. |
static void |
main(java.lang.String[] args)
|
static double[] |
rotate(double latA,
double lonA,
double[] pole,
double angleDeg)
rotates a point about a pole by an angle. |
static double[] |
rotationPole(double latA,
double lonA,
double latB,
double lonB)
Find the rotation pole required to rotate the first lat lon pair to the second. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final double dtor
protected static final double rtod
Constructor Detail |
---|
public SphericalCoords()
Method Detail |
---|
public static double distance(double latA, double lonA, double latB, double lonB)
public static double azimuth(double latA, double lonA, double latB, double lonB)
public static double[] rotationPole(double latA, double lonA, double latB, double lonB)
public static double[] rotate(double latA, double lonA, double[] pole, double angleDeg)
pole
- is a 3 element double array with X, Y and Z components of the
pole.
public static double latFor(double latA, double lonA, double distance, double azimuth)
public static double lonFor(double latA, double lonA, double distance, double azimuth)
public static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |