|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnsidc.spheres.Sphere
Sphere class - provides services and information relating to a sphere.
This is the base object of the spheres package. It defines the working sphere and several ustility functions the rest of the package uses.
This class assumes a spherical earth.
| Field Summary | |
double |
radius
radius of the working Shpere We use a sphere of radius 10.0 so the numbers are reasonable. |
protected double |
Re_km
Radius of the earth in km. |
| Constructor Summary | |
Sphere()
Sets the radius. |
|
| Method Summary | |
double |
degrees(double rad)
Convert radians to decimal degrees. |
double |
degrees(float rad)
Convert radians to decimal degrees. |
double |
getRadius()
Get the radius of the sphere. |
double |
normalize(double lon)
Set longitude to (-180, 180) |
float |
normalize(float lon)
Set longitude to (-180, 180) |
double |
radians(double deg)
Convert decimal degrees to radians. |
double |
radians(float deg)
Convert decimal degrees to radians. |
int |
scalarTripleProductTest(Point given_point,
Point start_point,
Point end_point)
Determine where a point is in relation to a line |
void |
setRadius(double given_radius)
Set the radius of the sphere. |
protected void |
systemLog(java.lang.String msg)
Log diagnostic messages |
protected void |
systemLog(java.lang.String msg,
int level)
Log diagnostic messages |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public double radius
protected final double Re_km
| Constructor Detail |
public Sphere()
| Method Detail |
public double getRadius()
public void setRadius(double given_radius)
public float normalize(float lon)
lon - Longitude in decimal degrees.public double normalize(double lon)
lon - Longitude in decimal degrees.public double radians(float deg)
deg - Spherical coordinate in decimal degrees.public double radians(double deg)
deg - Spherical coordinate in decimal degrees.public double degrees(float rad)
public double degrees(double rad)
protected void systemLog(java.lang.String msg,
int level)
msg - Message to log.level - Debug sensitivity.protected void systemLog(java.lang.String msg)
msg - Message to log.
public int scalarTripleProductTest(Point given_point,
Point start_point,
Point end_point)
take the scalar triple product to see if a point is to the left or right of the line joining two other points.
given_point - Point of interest.
start_point Start of line.
end_point End of line.SphericalPolygon
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||