|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.bbn.openmap.proj.GreatCircle
Methods for calculating great circle and other distances on the sphere and ellipsoid.
Spherical equations taken from John Synder's Map Projections --A
Working Manual , pp29-31.
Latitude/longitude arguments must be in valid radians:
-PI<=lambda<PI, -PI/2<=phi<=PI/2
| Method Summary | |
static float[] |
earth_circle(float phi1,
float lambda0,
float c,
float s,
float e,
int n)
Calculate partial earth circle on the sphere. |
static float[] |
earth_circle(float phi1,
float lambda0,
float c,
float s,
float e,
int n,
float[] ret_val)
Calculate earth circle in the sphere. |
static float[] |
earth_circle(float phi1,
float lambda0,
float c,
int n)
Calculate earth circle on the sphere. |
static float[] |
earth_circle(float phi1,
float lambda0,
float c,
int n,
float[] ret_val)
Calculate earth circle in the sphere. |
static AziDist |
ellipsoidalAziDist(double a,
double finv,
double glat1,
double glon1,
double glat2,
double glon2,
AziDist ret_val)
Deprecated. this has been yanked until we have a more stable and documented algorithm |
static float[] |
great_circle(float phi1,
float lambda0,
float phi,
float lambda,
int n,
boolean include_last)
Calculate great circle between two points on the sphere. |
static float |
spherical_azimuth(float phi1,
float lambda0,
float phi,
float lambda)
Calculate spherical azimuth between two points. |
static LatLonPoint |
spherical_between(float phi1,
float lambda0,
float c,
float Az)
Calculate point at azimuth and distance from another point. |
static float[] |
spherical_between(float phi1,
float lambda0,
float c,
float Az,
int n)
Calculate point between two points. |
static float |
spherical_distance(float phi1,
float lambda0,
float phi,
float lambda)
Calculate spherical arc distance between two points. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final AziDist ellipsoidalAziDist(double a,
double finv,
double glat1,
double glon1,
double glat2,
double glon2,
AziDist ret_val)
a - Semi-major axis of ellipsoidfinv - flattening of the ellipsoid (WGS84 is 1/298.257)glat1 - Latitude of from stationglon1 - Longitude of from stationglat2 - Latitude of to stationglon2 - Longitude of to stationret_val - AziDist struct
public static final float spherical_distance(float phi1,
float lambda0,
float phi,
float lambda)
Computes arc distance `c' on the sphere. equation (5-3a). (0 <= c <= PI)
phi1 - latitude in radians of start pointlambda0 - longitude in radians of start pointphi - latitude in radians of end pointlambda - longitude in radians of end point
public static final float spherical_azimuth(float phi1,
float lambda0,
float phi,
float lambda)
Computes the azimuth `Az' east of north from phi1, lambda0 bearing toward phi and lambda. (5-4b). (-PI <= Az <= PI).
phi1 - latitude in radians of start pointlambda0 - longitude in radians of start pointphi - latitude in radians of end pointlambda - longitude in radians of end point
public static final LatLonPoint spherical_between(float phi1,
float lambda0,
float c,
float Az)
Returns a LatLonPoint at arc distance `c' in direction `Az' from start point.
phi1 - latitude in radians of start pointlambda0 - longitude in radians of start pointc - arc radius in radians (0 < c <= PI)Az - azimuth (direction) east of north (-PI <= Az <
PI)
public static final float[] spherical_between(float phi1,
float lambda0,
float c,
float Az,
int n)
Same as spherical_between() above except it calculates n equal segments along the length of c.
phi1 - latitude in radians of start pointlambda0 - longitude in radians of start pointc - arc radius in radians (0 < c <= PI)Az - azimuth (direction) east of north (-PI <= Az <
PI)n - number of points along great circle edge to calculate
public static final float[] great_circle(float phi1,
float lambda0,
float phi,
float lambda,
int n,
boolean include_last)
Folds all computation (distance, azimuth, points between) into one function for optimization. returns n or n+1 pairs of lat,lon on great circle between lat-lon pairs.
phi1 - latitude in radians of start pointlambda0 - longitude in radians of start pointphi - latitude in radians of end pointlambda - longitude in radians of end pointn - number of segmentsinclude_last - return n or n+1 segments
public static final float[] earth_circle(float phi1,
float lambda0,
float c,
float s,
float e,
int n)
Returns n float lat,lon pairs at arc distance c from point at phi1,lambda0.
phi1 - latitude in radians of center pointlambda0 - longitude in radians of center pointc - arc radius in radians (0 < c < PI)s - starting angle in radians. North up is zero.e - angular extent in radians, clockwise right from
starting angle.n - number of points along circle edge to calculate
public static final float[] earth_circle(float phi1,
float lambda0,
float c,
int n)
Returns n float lat,lon pairs at arc distance c from point at phi1,lambda0.
phi1 - latitude in radians of center pointlambda0 - longitude in radians of center pointc - arc radius in radians (0 < c < PI)n - number of points along circle edge to calculate
public static final float[] earth_circle(float phi1,
float lambda0,
float c,
int n,
float[] ret_val)
Returns n float lat,lon pairs at arc distance c from point at phi1,lambda0.
phi1 - latitude in radians of center pointlambda0 - longitude in radians of center pointc - arc radius in radians (0 < c < PI)n - number of points along circle edge to calculateret_val - float[] ret_val array of n*2 number of points
along circle edge to calculate
public static final float[] earth_circle(float phi1,
float lambda0,
float c,
float s,
float e,
int n,
float[] ret_val)
Returns n float lat,lon pairs at arc distance c from point at phi1,lambda0.
phi1 - latitude in radians of center point.lambda0 - longitude in radians of center point.c - arc radius in radians (0 < c < PI).s - starting angle in radians. North up is zero.e - angular extent in radians, clockwise right from
starting angle.n - number of points along circle edge to calculate.ret_val - float[] ret_val array of n*2 number of points
along circle edge to calculate.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||