public class Targets extends Object
As acoustic waves traverse the ocean environment, they can impinge on objects. The bottom and suface are boundary constraints on the extent of the water column, and as such they are handled in special classes by themselves. All other objects in the water column can be considered detection targets. When sonar hits an underwater target, energy is scattered back from the target in a mainly isotropic manner. This scattered energy is what returns to the sending sonar, revealing the presence and location of the target.
In this simulation, the distance between targets and sonar is determined by means of a vector algebra calculation. Specifically, the plane containing the front of the wave front is compared to the distance of the target away from the plane. When this easily computed distance changes sign, there is a possibility that the sonar pulse has intersected the object. Higher-resolution checks are then performed to verify whether or not a detection event has occurred. This two-step process keeps the calculations computationally tractable. Detection results are made available to the calling method as the return value.
This class also provides a method for randomly generating sample targets. It is the logical place to add code to receive position information from external sources, for example using the network via the Distributed Interactive Simulation (DIS) protocol.
Contact: Don Brutzman (web.nps.navy.mil/~brutzman) brutzman@nps.navy.mil
30 Jan 98 | Timothy M. Holliday | New |
17 Mar 98 | Timothy M. Holliday | Added HTML comment convention |
13 May 98 | Timothy M. Holliday | Added constructor for placing a minefield and a new statistic method. |
9 Oct 98 | Don Brutzman | Javadoc updates for jdk1.2b4 |
25 April 99 | Don Brutzman | Javadoc updates for jdk1.2.1 |
Bottom
,
Surface
Constructor and Description |
---|
Targets(Surface s,
Bottom b,
double maximumX,
double minimumX,
double maximumZ,
double minimumZ,
int numberMines)
Constructor for the tartgets class.
|
Targets(Surface s,
Bottom b,
int numberMines,
int numberSubs)
The first two arguments determine the Surface
and Bottom types, while the last two arguments indicate how many mines
and submarines are added to the target data base.
|
Modifier and Type | Method and Description |
---|---|
double |
getCollisionArea()
Returns the cross sectional area of the object that was detected.
|
String |
getVRML()
Returns a VRML string representing the targets in the ocean.
|
String |
getVRMLTargets()
Returns a VRML string representing the targets in the ocean.
|
boolean |
isCollision(Ray ray1,
Ray ray2,
Ray ray3,
Ray ray4)
Returns a boolean indicating whether or not a detection as occurred.
|
void |
printMineStatistics()
This method prints the mine number, position, estimated position and
number of detects on each mine in the data base.
|
void |
resetTargets()
Resets the parameters that speed up target collision detection.
|
public Targets(Surface s, Bottom b, int numberMines, int numberSubs)
s
- Surface object.b
- Bottom object.numberMines
- The number of mines.numberSubs
- The number of subs.public Targets(Surface s, Bottom b, double maximumX, double minimumX, double maximumZ, double minimumZ, int numberMines)
s
- Surface object.b
- Bottom object.maximumX
- The max x-direction boundaries for a minefield.minimumX
- The min x-direction boundaries for a minefield.maximumZ
- The max z-direction boundaries for a minefield.minimumZ
- The max z-direction boundaries for a minefield.numberMines
- The number of mines. (max is 100.)public void resetTargets()
public String getVRMLTargets()
public boolean isCollision(Ray ray1, Ray ray2, Ray ray3, Ray ray4)
ray1
- Ray object.ray2
- Ray objectray3
- Ray objectray4
- Ray objectpublic double getCollisionArea()
public void printMineStatistics()
public String getVRML()