public class SphericalCoords
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static double |
dtor |
protected static double |
rtod |
Constructor and Description |
---|
SphericalCoords() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected static final double dtor
protected static final double rtod
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)