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 other functions it's going to find in the datablock and whatever localisation
algorithm was used.
- Author:
- dg50
-
Constructor Summary
ConstructorDescriptionLocalizationBuilder
(TethysControl tethysControl, PDeployment deployment, nilus.Detections detectionsDocument, PamDataBlock dataBlock, StreamExportParams exportParams) -
Method Summary
Modifier and TypeMethodDescriptionnilus.LocalizationType
addLocalization
(PamDataUnit dataUnit) addUserDefined
(nilus.LocalizationType.Parameters parameters, String parameterName, String parameterValue) boolean
void
closeDocument
(long endTime) double
constrainRadianAngle
(double radians) Get angle in degrees constrained to 0-360nilus.LocalizationType
createBearingLoc
(PamDataUnit dataUnit) nilus.LocalizationType
createCartesianLoc
(PamDataUnit dataUnit) nilus.LocalizationType
createCylindricalLoc
(PamDataUnit dataUnit) nilus.LocalizationType
createPerpRange
(PamDataUnit dataUnit) nilus.LocalizationType
createPolarLoc
(PamDataUnit dataUnit) nilus.LocalizationType
createRangeLoc
(PamDataUnit dataUnit) nilus.LocalizationType
createSphericalLoc
(PamDataUnit dataUnit) nilus.LocalizationType
createStandardLocalization
(PamDataUnit dataUnit) nilus.LocalizationType
createWGS84Loc
(PamDataUnit dataUnit) nilus.Localize
nilus.Localize.Effort.CoordinateReferenceSystem.ReferenceFrame
getDefaultReferenceFrame
(CoordinateName coordinateName, LocalizationSubTypes subType) Get a default reference frame for the header of a localization document.nilus.Detections
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.nilus.LocalizationType
makeBaseLoc
(PamDataUnit dataUnit) boolean
sortStandardCoordinates
(PamDataBlock dataBlock) nilus.Localize
startLocalisationDocument
(PDeployment deployment, nilus.Detections detectionsDocument, PamDataBlock dataBlock, StreamExportParams exportParams) double
toSlantAngle
(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()
-