| java.lang.Object org.cougaar.tools.csmart.util.EarthConstants
EarthConstants | final public class EarthConstants (Code) | | Interface containing constants for doing math on the Earth:
Computing distances between points largely
Constants here taken from
OpenMap
Files: com.bbn.openmap.proj.ProjMath, com.bbn.openmap.proj.MoreMath
com.bbn.openmap.proj.GreatCircle and com.bbn.openmap.proj.Planet
Those files in turn rely in part on John Snyder's
Map Projection --A Working Manual
Some routines taken from Cougaar
and the class org.cougaar.glm.util.GeoUtils
|
Method Summary | |
public static float | DistanceBetweenLatLonPoints(LatLonPoint position1, LatLonPoint position2) | public static float | DistanceBetweenPoints(float latitude1, float longitude1, float latitude2, float longitude2) Compute great-circle distance in KM between two points on globe
expressed as latitude and longitude. | final public static boolean | approximately_equal(double a, double b, double epsilon) Checks if a ~= b. | final public static boolean | approximately_equal(float a, float b, float epsilon) Checks if a ~= b. | final public static float | arcRadius(float meters) Convert the meters distance into arcRadius on the earth.
Parameters: meters - distance, should be <= the Earth's Circumference. | final public static double | degToRad(double deg) Convert degrees to radians. | final public static float | degToRad(float deg) Convert degrees to radians. | final public static int | hashLatLon(float lat, float lon) Generate a hashCode value for a lat/lon pair. | final public static double | radToDeg(double rad) Convert radians to degrees. | final public static float | radToDeg(float rad) Convert radians to degrees. | final public static LatLonPoint | spherical_between(float phi1, float lambda0, float c, float Az) Calculate point at azimuth and distance from another point. | final public static LatLonPoint | spherical_between(LatLonPoint point, float c, float Az) Calculate point at azimuth and distance from another point. | final public static LatLonPoint | spherical_between_degs(float lat, float lon, float c, float Az) Calculate point at azimuth and distance from another point. | final public static float | spherical_distance(float phi1, float lambda0, float phi, float lambda) Calculate spherical arc distance between two points.
Computes arc distance `c' on the sphere. | final public static float | spherical_distance(LatLonPoint p1, LatLonPoint p2) Calculate spherical arc distance between two points.
Computes arc distance `c' on the sphere. | final public static float | spherical_distance_deg(float lat1, float lon1, float lat2, float lon2) Calculate spherical arc distance between two points.
Computes arc distance `c' on the sphere. |
TWO_PI | final public static float TWO_PI(Code) | | |
equatorialCircumferenceMeters | final public static transient float equatorialCircumferenceMeters(Code) | | |
equatorialRadiusMeters | final public static transient float equatorialRadiusMeters(Code) | | |
polarRadiusMeters | final public static transient float polarRadiusMeters(Code) | | |
DistanceBetweenLatLonPoints | public static float DistanceBetweenLatLonPoints(LatLonPoint position1, LatLonPoint position2)(Code) | | Compute great-circle distance (expressed as float Kilometers)
between two points on globe (expressed as LatLonPoint)
Parameters: position1 - LatLonPoint of first point Parameters: position2 - LatLonPoint of second point double distance in KM of great-circle distance between points |
DistanceBetweenPoints | public static float DistanceBetweenPoints(float latitude1, float longitude1, float latitude2, float longitude2)(Code) | | Compute great-circle distance in KM between two points on globe
expressed as latitude and longitude.
Parameters: latitude1 - float latitude of first point (decimal degrees) Parameters: longitude1 - float longitude of first point (decimal degrees) Parameters: latitude2 - float latitude of second point (decimal degrees) Parameters: longitude2 - float longitude of second point (decimal degrees) float great-circle distance between two points in KM |
approximately_equal | final public static boolean approximately_equal(double a, double b, double epsilon)(Code) | | Checks if a ~= b.
Use this to test equality of floating point numbers.
Parameters: a - double Parameters: b - double Parameters: epsilon - the allowable error boolean |
approximately_equal | final public static boolean approximately_equal(float a, float b, float epsilon)(Code) | | Checks if a ~= b.
Use this to test equality of floating point numbers.
Parameters: a - float Parameters: b - float Parameters: epsilon - the allowable error boolean |
arcRadius | final public static float arcRadius(float meters)(Code) | | Convert the meters distance into arcRadius on the earth.
Parameters: meters - distance, should be <= the Earth's Circumference. float radians arc radius (0 < ret <= PI) |
degToRad | final public static double degToRad(double deg)(Code) | | Convert degrees to radians.
Parameters: deg - degrees double radians |
degToRad | final public static float degToRad(float deg)(Code) | | Convert degrees to radians.
Parameters: deg - degrees float radians |
hashLatLon | final public static int hashLatLon(float lat, float lon)(Code) | | Generate a hashCode value for a lat/lon pair.
Parameters: lat - latitude Parameters: lon - longitude int hashcode |
radToDeg | final public static double radToDeg(double rad)(Code) | | Convert radians to degrees.
Parameters: rad - radians double decimal degrees |
radToDeg | final public static float radToDeg(float rad)(Code) | | Convert radians to degrees.
Parameters: rad - radians float decimal degrees |
spherical_between | final public static LatLonPoint spherical_between(float phi1, float lambda0, float c, float Az)(Code) | | Calculate point at azimuth and distance from another point.
Returns a LatLonPoint at arc distance `c' in direction `Az'
from start point.
Parameters: phi1 - latitude in radians of start point Parameters: lambda0 - longitude in radians of start point Parameters: c - arc radius in radians (0 < c <= PI) Parameters: Az - azimuth (direction) east of north (-PI <= Az < PI) LatLonPoint |
spherical_between | final public static LatLonPoint spherical_between(LatLonPoint point, float c, float Az)(Code) | | Calculate point at azimuth and distance from another point.
Returns a LatLonPoint at arc distance `c' in direction `Az'
from start point.
Parameters: point - LatLonPoint of start Parameters: c - arc radius in radians (0 < c <= PI) Parameters: Az - azimuth (direction) east of north (-PI <= Az < PI) in radians LatLonPoint |
spherical_between_degs | final public static LatLonPoint spherical_between_degs(float lat, float lon, float c, float Az)(Code) | | Calculate point at azimuth and distance from another point.
Returns a LatLonPoint at arc distance `c' in direction `Az'
from start point.
Parameters: lat - latitude in degrees of start point Parameters: lon - longitude in degrees of start point Parameters: c - arc radius in radians (0 < c <= PI) Parameters: Az - azimuth (direction) east of north (-PI <= Az < PI) LatLonPoint |
spherical_distance | final public static float spherical_distance(float phi1, float lambda0, float phi, float lambda)(Code) | | Calculate spherical arc distance between two points.
Computes arc distance `c' on the sphere. equation
(5-3a). (0 <= c <= PI)
Parameters: phi1 - latitude in radians of start point Parameters: lambda0 - longitude in radians of start point Parameters: phi - latitude in radians of end point Parameters: lambda - longitude in radians of end point float arc distance `c' in radians |
spherical_distance | final public static float spherical_distance(LatLonPoint p1, LatLonPoint p2)(Code) | | Calculate spherical arc distance between two points.
Computes arc distance `c' on the sphere. equation
(5-3a). (0 <= c <= PI)
Parameters: p1 - LatLonPoint of first point Parameters: p2 - LatLonPoint of second point float arc distance `c' in radians |
spherical_distance_deg | final public static float spherical_distance_deg(float lat1, float lon1, float lat2, float lon2)(Code) | | Calculate spherical arc distance between two points.
Computes arc distance `c' on the sphere. equation
(5-3a). (0 <= c <= PI)
Parameters: lat1 - latitude in degrees of start point Parameters: lon1 - longitude in degrees of start point Parameters: lat2 - latitude in degrees of end point Parameters: lon2 - longitude in degrees of end point float arc distance `c' in radians |
|
|