nsidc.spheres
Class GreatCircleArc

java.lang.Object
  extended bynsidc.spheres.Sphere
      extended bynsidc.spheres.GreatCircle
          extended bynsidc.spheres.GreatCircleArc

public class GreatCircleArc
extends GreatCircle

GreatCircleArc class - provides services and information relating to a great circle arc.

A great circle arc is a piece of a great circle. The sides of spherical polygons are great circle arcs so we need this class to compare spherical polygons to other areas on the sphere.

This class assumes a spherical earth.

See Also:
Sphere, SphericalPolygon, GreatCircle

Field Summary
 double arc_length_deg
          Length of the arc in degrees.
 double arc_length_rad
          Length of the arc in radians.
 boolean crosses_pole
          Boolean to track if the arc crosses a pole or not.
 LatRange lat_range
          Latitude range of the arc.
 LonRange lon_range
          Longitude range of the arc.
 
Fields inherited from class nsidc.spheres.GreatCircle
a, arc_point, b, c, const_term, inflection_point, intersect_point, is_meridian, lin_term, m, n, p, q, sqr_term, tmp_z
 
Fields inherited from class nsidc.spheres.Sphere
radius, Re_km
 
Constructor Summary
GreatCircleArc(double[] given_lat, double[] given_lon)
          Sets the endpoints and initializes the arc.
GreatCircleArc(double given_lat0, double given_lon0, double given_lat1, double given_lon1)
          Sets the endpoints and initializes the arc.
GreatCircleArc(Point start, Point end)
          Sets the endpoints and initializes the arc.
 
Method Summary
 Point center()
          Find the center of the arc
 Point[] densify(double distance_rad)
          Densify the arc
protected  void init()
          initializes the arc.
 boolean intersectsArc(GreatCircleArc other)
          Determine if this arc intersects another.
 boolean intersectsLatSeg(double seg_lat, double min_lon, double max_lon)
          Determine if this arc intersects a segment of a parallel.
 boolean intersectsSCArc(SmallCircleArc small_circle_arc)
          Determine if this arc intersects a small circle arc.
protected  void systemLog(java.lang.String msg, int level)
          Log diagnostic messages
 
Methods inherited from class nsidc.spheres.GreatCircle
intersectsGreatCircle, intersectsLatitude, intersectsSmallCircle, toString
 
Methods inherited from class nsidc.spheres.Sphere
degrees, degrees, getRadius, normalize, normalize, radians, radians, scalarTripleProductTest, setRadius, systemLog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

crosses_pole

public boolean crosses_pole
Boolean to track if the arc crosses a pole or not.


lon_range

public LonRange lon_range
Longitude range of the arc.


lat_range

public LatRange lat_range
Latitude range of the arc.


arc_length_rad

public double arc_length_rad
Length of the arc in radians.


arc_length_deg

public double arc_length_deg
Length of the arc in degrees.

Constructor Detail

GreatCircleArc

public GreatCircleArc(double given_lat0,
                      double given_lon0,
                      double given_lat1,
                      double given_lon1)
Sets the endpoints and initializes the arc.


GreatCircleArc

public GreatCircleArc(double[] given_lat,
                      double[] given_lon)
Sets the endpoints and initializes the arc.


GreatCircleArc

public GreatCircleArc(Point start,
                      Point end)
Sets the endpoints and initializes the arc.

Method Detail

init

protected void init()
initializes the arc.

Overrides:
init in class GreatCircle

intersectsArc

public boolean intersectsArc(GreatCircleArc other)
Determine if this arc intersects another.

The basic strategy is to convert everything to cartesian 3-space first because the math is easier. All the action takes place in cartesian space. Then we convert back to spherical and see what's what.

Returns:
true if the two arcs intersect.
false if the two arcs do not instersect.
See Also:
Scene

intersectsLatSeg

public boolean intersectsLatSeg(double seg_lat,
                                double min_lon,
                                double max_lon)
Determine if this arc intersects a segment of a parallel.

The basic strategy is to convert everything to cartesian 3-space first because the math is easier. All the action takes place in cartesian space. Then we convert back to spherical and see what's what.

Parameters:
seg_lat - The latitude of the segment.
min_lon - The minimun longitude of the segment.
max_lon - The maximum longitude of the segment.
Returns:
true if the two arcs intersect.
false if the two arcs do not instersect.
See Also:
LatLonBoundingBox

intersectsSCArc

public boolean intersectsSCArc(SmallCircleArc small_circle_arc)
Determine if this arc intersects a small circle arc.

The basic strategy is to convert everything to cartesian 3-space first because the math is easier. All the action takes place in cartesian space. Then we convert back to spherical and see what's what. This method is not actually implemented yet and always returns false.

Parameters:
small_circle_arc - The small circle arc of interest.
Returns:
true if the two arcs intersect.
false if the two arcs do not instersect.
See Also:
SmallCircle, SmallCircleArc, Scene

center

public Point center()
Find the center of the arc

Equations taken from the Aviation Formulary by Ed Williams.

Returns:
Point center_point The point at the center of the Arc.

densify

public Point[] densify(double distance_rad)
Densify the arc

Equations taken from the Aviation Formulary by Ed Williams.

Parameters:
distance_rad - The maximum distance in radians between points in the densified arc.
Returns:
Point[] dense_point A denser point set defining the same arc.

systemLog

protected void systemLog(java.lang.String msg,
                         int level)
Description copied from class: Sphere
Log diagnostic messages

Overrides:
systemLog in class GreatCircle