public class LOSGenerator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
INVISIBLE |
static java.util.logging.Logger |
logger |
protected int |
MAYBEVISIBLE |
protected int |
VISIBLE |
Constructor and Description |
---|
LOSGenerator()
Not the preferred way to create one of these.
|
LOSGenerator(DTEDFrameCache cache) |
Modifier and Type | Method and Description |
---|---|
static double |
calculateLOSSlope(int startTotalHeight,
int endTotalHeight,
double arc_dist)
Calculate the slope of a line between two points across a spherical model
of the earth.
|
double |
calculateLOSSlope(LatLonPoint startLLP,
int startTotalHeight,
LatLonPoint endLLP,
int endObjHeight)
CalculateLOSslope figures out the slope from one point to another.
|
DTEDFrameCache |
getDtedCache() |
boolean |
isLOS(LatLonPoint startLLP,
int startObjHeight,
boolean addStartElevation,
LatLonPoint endLLP,
int endObjHeight,
int numPoints)
Check to see if two points are within line of sight of each other, taking
into account their elevations above Mean Sea Level as retrieved by a DTED
database, and any other addition height of each object.
|
void |
setDtedCache(DTEDFrameCache cache) |
protected int INVISIBLE
protected int VISIBLE
protected int MAYBEVISIBLE
public static java.util.logging.Logger logger
public LOSGenerator()
public LOSGenerator(DTEDFrameCache cache)
public void setDtedCache(DTEDFrameCache cache)
public DTEDFrameCache getDtedCache()
public boolean isLOS(LatLonPoint startLLP, int startObjHeight, boolean addStartElevation, LatLonPoint endLLP, int endObjHeight, int numPoints)
startLLP
- location of point 1.startObjHeight
- the elevation of point 1 above the surface, in
meters. The surface elevation of the point will be looked up and
added to this value.addStartElevation
- true if startObjHeight also needs DTED lookup
added to it.endLLP
- location of point 2.endObjHeight
- the elevation of point 2 above the surface, in
meters. The surface elevation of the point will be looked up and
added to this value.numPoints
- number of sample points to check between the two end
points. Can be dependent on the Projection of the current map, and
based on the number of pixels between the projected points. Could
also be based on the number of elevation posts between the two
points in the DTED database.public double calculateLOSSlope(LatLonPoint startLLP, int startTotalHeight, LatLonPoint endLLP, int endObjHeight)
startLLP
- the coordinates of point 1.startTotalHeight
- the total height of point 1, from the Mean Sea
Level - so it's the elevation of the point plus altitude above the
surface, in meters.endLLP
- the coordinates of point 2.endObjHeight
- the elevation of point 2 above the surface, in
meters. The surface elevation of the point will be looked up and
added to this value.public static double calculateLOSSlope(int startTotalHeight, int endTotalHeight, double arc_dist)
startTotalHeight
- total height of one point, in meters. Should
represent elevation of point which is the surface elevation above
MSL, and the height above the surface.endTotalHeight
- total height of one the other point, in meters.
Should represent elevation of point which is the surface elevation
above MSL, and the height above the surface.arc_dist
- the surface angle, in radians, across the spherical model
of the earth that separates the two points.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details