public class SonarModelOutputParser extends DefaultHandler
Contact: Don Brutzman (web.nps.navy.mil/~brutzman) brutzman@nps.navy.mil
DepthBlade,
BullsEyePlot,
IsoSurfaceBlockPlot,
CoverageArea,
LineOfBearingPlot,
RadialBlade,
SLOBChart,
SignalExcessPoint,
SignalExcessZone,
StackScene3D| Constructor and Description |
|---|
SonarModelOutputParser(String[] files)
Creates a new instance of SonarModelOutputParser
|
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] buf,
int offset,
int len)
Writes pending text (characters inside elements) to the writer.
|
double |
convertToSignalExcess(double ratio)
Converts sound pressure ratio to signal excess
|
void |
endDocument()
Flushes debugging output.
|
void |
endElement(String namespaceURI,
String sName,
String qName)
Receives notification of the end of an element.
|
void |
generateAllSonarPlots()
Generates all sonar plots.
|
String |
generateBullsEyePlot(double depth)
Generates BullsEyePlot instance.
|
String |
generateFullFieldPlot(double bearing)
Generates full field plot.
|
String |
generateIsoSurfaceExample()
This method generates an IsoSurface example scene.
|
String |
generateIsoSurfacePlot()
Generates isosurface plot.
|
void |
generateSLOBChart(double bearing,
double depth,
int counter)
Generates single line of bearing plot.
|
String |
generateStackScenePlot()
This method generates stack scene.
|
String |
generateVRMLBullPlot(double depth)
Generates Xj3D-friendly version.
|
LinkedList[] |
getBlades()
Returns generated LinkedList.
|
int |
getRadialIndex(double bearing)
Generates radial indices - assumes radials are in order.
|
String |
getVRMLSLOBChart(double bearing,
double depth,
int counter)
Temporary class generates Xj3D-friendly version single line of bearing plot
|
LinkedList[] |
parseDocuments(String[] files)
Parses properly formatted files passed in and
return array of Lists (RadialBlades and DepthBlades).
|
void |
processData()
Processs the data to set 'true' to parsing done boolean variable.
|
void |
setEnvironmentalData(EnvironmentalData data)
Sets environmental data.
|
void |
startDocument()
Generates output header.
|
void |
startElement(String namespaceURI,
String sName,
String qName,
Attributes attrs)
Receives notification of the start of an element.
|
String[] |
trimToMaxEntrySize(String[] files)
To keep visualization managable, number of BullsEye plots are limited to
amount specified in MAX_ENTRY_SIZE.
|
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warningpublic SonarModelOutputParser(String[] files)
files - The array of filenames (sonar model output) to be parsed.public void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class DefaultHandlerSAXException - The error of warning message.public void endDocument()
throws SAXException
endDocument in interface ContentHandlerendDocument in class DefaultHandlerSAXException - The I/O error of warning message.public void startElement(String namespaceURI, String sName, String qName, Attributes attrs) throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandlernamespaceURI - The Namespace URI, or the empty string.sName - The local name (without prefix)qName - The qualified name (with prefix), or the empty string.attrs - The attributes attached to the element.SAXException - Any SAX exception, possibly wrapping another exception.public void endElement(String namespaceURI, String sName, String qName) throws SAXException
endElement in interface ContentHandlerendElement in class DefaultHandlernamespaceURI - The Namespace URI, or the empty stringsName - The local name (without prefix), or the empty stringqName - The qualified name (with prefix), or the empty string.SAXException - Any SAX exception, possibly wrapping another exception.public void characters(char[] buf,
int offset,
int len)
throws SAXException
characters in interface ContentHandlercharacters in class DefaultHandlerbuf - The characters.offset - The start position in the character array.len - The number of characters to use from the character array.SAXException - Any SAX exception, possibly wrapping another exception.public void processData()
public LinkedList[] parseDocuments(String[] files)
files - The array of filenames (sonar model output) to be parsed.public double convertToSignalExcess(double ratio)
ratio - The ratio of the sound pressure.public void setEnvironmentalData(EnvironmentalData data)
data - EnvironmentalData object includes bathymetric data, ssp, and wind.public void generateAllSonarPlots()
public String generateBullsEyePlot(double depth)
depth - The depths (in KM).public String generateStackScenePlot()
public String generateIsoSurfaceExample()
public String generateIsoSurfacePlot()
public void generateSLOBChart(double bearing,
double depth,
int counter)
bearing - The bearing of closest radial blade.depth - The depths (in KM).counter - The counter to determine number of image to be created.public String generateFullFieldPlot(double bearing)
bearing - The bearing of closest radial blade.public String[] trimToMaxEntrySize(String[] files)
files - The array of filenames (sonar model output) to be parsed.public int getRadialIndex(double bearing)
bearing - The bearing of closest radial blade.public LinkedList[] getBlades()
public String generateVRMLBullPlot(double depth)
depth - The depths (in KM).public String getVRMLSLOBChart(double bearing, double depth, int counter)
bearing - The bearing of closest radial blade.depth - The depths (in KM).counter - The counter to determine number of image to be created.