Package tethys.localization
Class LocalizationBuilder
java.lang.Object
tethys.localization.LocalizationBuilder
Class to build a single localisation document during export. 
 Works hand in had with the global LocalisationHandler and also with 
 the LocalizationCreator that should be part of each localisation algorithm.
 
To understand the difference, this contains most of the required functionality but by having the interface on specific algorithms, it's easy for them to override that on a localiser specific basis. algorithm was used.
- Author:
 - dg50
 
- 
Constructor Summary
ConstructorsConstructorDescriptionLocalizationBuilder(TethysControl tethysControl, PDeployment deployment, nilus.Detections detectionsDocument, PamDataBlock dataBlock, StreamExportParams exportParams)  - 
Method Summary
Modifier and TypeMethodDescriptionnilus.LocalizationTypeaddLocalization(PamDataUnit dataUnit) addUserDefined(nilus.LocalizationType.Parameters parameters, String parameterName, String parameterValue) booleanvoidcloseDocument(long endTime) doubleconstrainRadianAngle(double radians) Get angle in degrees constrained to 0-360nilus.LocalizationTypecreateBearingLoc(PamDataUnit dataUnit) nilus.LocalizationTypecreateCartesianLoc(PamDataUnit dataUnit) nilus.LocalizationTypecreateCylindricalLoc(PamDataUnit dataUnit) nilus.LocalizationTypecreatePerpRange(PamDataUnit dataUnit) nilus.LocalizationTypecreatePolarLoc(PamDataUnit dataUnit) nilus.LocalizationTypecreateRangeLoc(PamDataUnit dataUnit) nilus.LocalizationTypecreateSphericalLoc(PamDataUnit dataUnit) nilus.LocalizationTypecreateStandardLocalization(PamDataUnit dataUnit) nilus.LocalizationTypecreateWGS84Loc(PamDataUnit dataUnit) nilus.Localizenilus.Localize.Effort.CoordinateReferenceSystem.ReferenceFramegetDefaultReferenceFrame(CoordinateName coordinateName, LocalizationSubTypes subType) Get a default reference frame for the header of a localization document.nilus.Detectionsnilus.LocalizationType.ParametersgetParameters(nilus.LocalizationType localization) Convenience method to get the Parameters object for a localisation and to automatically create it if it doesn't exist.nilus.LocalizationTypemakeBaseLoc(PamDataUnit dataUnit) booleansortStandardCoordinates(PamDataBlock dataBlock) nilus.LocalizestartLocalisationDocument(PDeployment deployment, nilus.Detections detectionsDocument, PamDataBlock dataBlock, StreamExportParams exportParams) doubletoSlantAngle(double radians) Convert a vertical angle from radians to degrees and round. 
- 
Constructor Details
- 
LocalizationBuilder
public LocalizationBuilder(TethysControl tethysControl, PDeployment deployment, nilus.Detections detectionsDocument, PamDataBlock dataBlock, StreamExportParams exportParams)  
 - 
 - 
Method Details
- 
startLocalisationDocument
public nilus.Localize startLocalisationDocument(PDeployment deployment, nilus.Detections detectionsDocument, PamDataBlock dataBlock, StreamExportParams exportParams)  - 
getDefaultReferenceFrame
public nilus.Localize.Effort.CoordinateReferenceSystem.ReferenceFrame getDefaultReferenceFrame(CoordinateName coordinateName, LocalizationSubTypes subType) Get a default reference frame for the header of a localization document. This is very dependent on the localization subtype. Also on whether the array is fixed or moving. It it's fixed, then we also need to add the instrument lat long.- Parameters:
 coordinateName-subType-- Returns:
 
 - 
sortStandardCoordinates
 - 
addLocalization
 - 
createStandardLocalization
 - 
makeBaseLoc
 - 
constrainRadianAngle
public double constrainRadianAngle(double radians) Get angle in degrees constrained to 0-360- Parameters:
 radians-- Returns:
 
 - 
toSlantAngle
public double toSlantAngle(double radians) Convert a vertical angle from radians to degrees and round.- Parameters:
 radians-- Returns:
 
 - 
createWGS84Loc
 - 
getParameters
public nilus.LocalizationType.Parameters getParameters(nilus.LocalizationType localization) Convenience method to get the Parameters object for a localisation and to automatically create it if it doesn't exist.- Parameters:
 localization-- Returns:
 
 - 
addUserDefined
 - 
createSphericalLoc
 - 
createRangeLoc
 - 
createBearingLoc
 - 
createPolarLoc
 - 
createPerpRange
 - 
createCylindricalLoc
 - 
createCartesianLoc
 - 
getDeployment
- Returns:
 - the deployment
 
 - 
getDetectionsDocument
public nilus.Detections getDetectionsDocument()- Returns:
 - the detectionsDocument
 
 - 
getDataBlock
- Returns:
 - the dataBlock
 
 - 
getExportParams
- Returns:
 - the exportParams
 
 - 
getTethysControl
- Returns:
 - the tethysControl
 
 - 
getLocalisationHandler
- Returns:
 - the localisationHandler
 
 - 
getLocalisationAlgorithm
- Returns:
 - the localisationAlgorithm
 
 - 
getCurrentDocument
public nilus.Localize getCurrentDocument()- Returns:
 - the currentDocument
 
 - 
closeDocument
public void closeDocument(long endTime)  - 
checkDocument
public boolean checkDocument() 
 -