|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dinopolis.gpstool.util.GeoMath
This class provides some calculations for latitude/longitude. The formulas are taken from http://williams.best.vwh.net/avform.html Beware that on the web page, negative longitude indicates west!
Field Summary | |
static double |
CIRCUMFERENCE_EQUATOR
|
static double |
M_PER_DEGREE
|
static double |
M_PER_RADIAN
|
static double |
RADIUS_EQUATOR
|
Constructor Summary | |
GeoMath()
|
Method Summary | |
static double |
courseDegrees(double latitude1,
double longitude1,
double latitude2,
double longitude2)
Calculates the course between two points. |
static double |
courseRadians(double latitude1,
double longitude1,
double latitude2,
double longitude2)
Calculates the course between two points. |
static double |
distance(double latitude1,
double longitude1,
double latitude2,
double longitude2)
Calculates the distance between two points. |
static double |
distanceDegrees(double latitude1,
double longitude1,
double latitude2,
double longitude2)
Calculates the distance between two points. |
static double |
distanceRadians(double latitude1,
double longitude1,
double latitude2,
double longitude2)
Calculates the distance between two points. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final double RADIUS_EQUATOR
public static final double CIRCUMFERENCE_EQUATOR
public static final double M_PER_DEGREE
public static final double M_PER_RADIAN
Constructor Detail |
public GeoMath()
Method Detail |
public static double distance(double latitude1, double longitude1, double latitude2, double longitude2)
latitude1
- the latitude of the first point given in degrees.longitude1
- the longitude of the first point given in degrees.latitude2
- the latitude of the second point given in degrees.longitude2
- the longitude of the second point given in degrees.
public static double distanceDegrees(double latitude1, double longitude1, double latitude2, double longitude2)
latitude1
- the latitude of the first point given in degrees.longitude1
- the longitude of the first point given in degrees.latitude2
- the latitude of the second point given in degrees.longitude2
- the longitude of the second point given in degrees.
public static double distanceRadians(double latitude1, double longitude1, double latitude2, double longitude2)
latitude1
- the latitude of the first point given in radians.longitude1
- the longitude of the first point given in radians.latitude2
- the latitude of the second point given in radians.longitude2
- the longitude of the second point given in radians.
public static double courseDegrees(double latitude1, double longitude1, double latitude2, double longitude2)
latitude1
- the latitude of the first point given in degrees.longitude1
- the longitude of the first point given in degrees.latitude2
- the latitude of the second point given in degrees.longitude2
- the longitude of the second point given in degrees.
public static double courseRadians(double latitude1, double longitude1, double latitude2, double longitude2)
latitude1
- the latitude of the first point given in radians.longitude1
- the longitude of the first point given in radians.latitude2
- the latitude of the second point given in radians.longitude2
- the longitude of the second point given in radians.
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |