Class DetectionGroupLocaliser2<T extends SuperDetection>
java.lang.Object
Localiser.detectionGroupLocaliser.DetectionGroupLocaliser2<T>
- Type Parameters:
T- - the type of PamDataUnit
- All Implemented Interfaces:
LocaliserModel<T>
public class DetectionGroupLocaliser2<T extends SuperDetection>
extends Object
implements LocaliserModel<T>
Localiser which deals with detections in which one or more groups of
detections are being localised.
This localiser will usually be used with target motion localisation, however could also be used for situation with multiple unsynced systems. e.g. DIFAR buoys
This is a generic localiser which can implement multiple localisation algorithms. There are two main variables to set. What type of data to use for the localisation from the AbstractLoclaisation class e.g. time delays or bearings and the type of localisation algortihm to use.
This localiser will usually be used with target motion localisation, however could also be used for situation with multiple unsynced systems. e.g. DIFAR buoys
This is a generic localiser which can implement multiple localisation algorithms. There are two main variables to set. What type of data to use for the localisation from the AbstractLoclaisation class e.g. time delays or bearings and the type of localisation algortihm to use.
Information of time delays, bearings, locations of hydrophones etc. is generated by a GroupLocInfo class. This can be subclassed and the getGroupLocInfo(T PamDetection) overridden to generate data more suited to different types of system. The default GroupLocInfo class is designed mainly for target motion localisation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFlag to use whatever the abstract localiser has.static final intFlag to use the bearings to localise.static final intFlag to use time delays localise. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a default group localiser.DetectionGroupLocaliser2(String name, MinimisationAlgorithm locAlgorithm, int dataType, int nDim) Constructor for a group localiser. -
Method Summary
Modifier and TypeMethodDescriptionGet the settings pane for the localiser.getGroupLocInfo(T PamDetection, DetectionGroupOptions detectionGroupOptions) Get the group detection info for a PamDataUnit.The type of localisation information the localiser can accept.intintGet the locType.getMinimsationFunc(GroupLocInfo groupInfo, int locType) Create a minimisation function.getName()Get the name which describes the localiser.booleanTrue if the model has parameters to set.localiseMin(GroupLocInfo groupInfo, MinimisationFunction[] minFunctuion, MinimisationAlgorithm locAlgorithm) Use an algorithm to solve the minimisation functionvoidnotifyModelProgress(double progress) This should be called whenever the localiser has finished processing and, if the localisation process is long, then updates progress.runModel(T pamDataUnit, DetectionGroupOptions detectionGroupOptions, boolean addLoc) Run the localisation model.voidsetLocalisationAlgorithm(MinimisationAlgorithm minAlgorithm) Set the algorithm used to solve the loclaisation problemvoidsetLocDim(int nDim) voidsetLocType(int locType) Set the locType.
-
Field Details
-
AUTOMATIC
public static final int AUTOMATICFlag to use whatever the abstract localiser has. Will try with bearings first then will try with time delays.- See Also:
-
BEARINGS_GROUP
public static final int BEARINGS_GROUPFlag to use the bearings to localise.- See Also:
-
TIMEDELAY_GROUP
public static final int TIMEDELAY_GROUPFlag to use time delays localise.- See Also:
-
-
Constructor Details
-
DetectionGroupLocaliser2
Creates a default group localiser. Solves for two dimensions using the Simplex localisation method. Will by default set up the localisation problem with bearings rather than time delays. -
DetectionGroupLocaliser2
public DetectionGroupLocaliser2(String name, MinimisationAlgorithm locAlgorithm, int dataType, int nDim) Constructor for a group localiser.- Parameters:
name- - the name of the localiser. Will appear on dialogs, in the database etc.locAlgorithm- - the type of localisation algorithm to use e.g. Least Squares, Simplex etc.dataType- - the type of data to use for localisation, generally bearings or use raw time delays.nDim- - the number of dimensions to solve for. Either 2 or 3.
-
-
Method Details
-
getName
Description copied from interface:LocaliserModelGet the name which describes the localiser.- Specified by:
getNamein interfaceLocaliserModel<T extends SuperDetection>- Returns:
- the name of the localiser.
-
getToolTipText
- Specified by:
getToolTipTextin interfaceLocaliserModel<T extends SuperDetection>
-
getLocContents
Description copied from interface:LocaliserModelThe type of localisation information the localiser can accept. e.g. bearings, time delays etc. The types are defined in the AbstractLocalisation class.- Specified by:
getLocContentsin interfaceLocaliserModel<T extends SuperDetection>- Returns:
- integer bitmap of the type of localisation information the localiser can use.
-
getAlgorithmSettingsPane
Description copied from interface:LocaliserModelGet the settings pane for the localiser. Allows users to change localiser settings.- Specified by:
getAlgorithmSettingsPanein interfaceLocaliserModel<T extends SuperDetection>- Returns:
- the settings pane for the localiser.
-
runModel
public GroupLocalisation runModel(T pamDataUnit, DetectionGroupOptions detectionGroupOptions, boolean addLoc) Description copied from interface:LocaliserModelRun the localisation model. Once completed the results are added to the AbstractLoclaisation class of the input PamDataUnit. Note that algorithms may run on a separate thread. Once processing has finished the notifyModelFinished function is called with a progress of 1;.- Specified by:
runModelin interfaceLocaliserModel<T extends SuperDetection>- Parameters:
pamDataUnit- the pamDataUnit. This can be a super unit if multiple detections are required.addLoc- automatically add the localisation result to the data unit, replacing it's current localisation info.
-
localiseMin
public ArrayList<GroupLocResult> localiseMin(GroupLocInfo groupInfo, MinimisationFunction[] minFunctuion, MinimisationAlgorithm locAlgorithm) Use an algorithm to solve the minimisation function- Parameters:
minFunctuion- - the minimisation functions to solve for that particular localisation.- Returns:
-
getMinimsationFunc
Create a minimisation function. Sets up the problem.- Parameters:
groupInfo- - the GroupLocInfo class which organises localisation information for group localisations.locType- - integer flag for the type of localisation information to use/- Returns:
- an array of problems to solve. Will contain multiple minimisation functions if potential ambiguities exist.
-
getLocType
public int getLocType()Get the locType. This is the type of information which is used in the loclaisation e.g. bearings, time delays.- Returns:
- an integer flag of the locType
-
setLocType
public void setLocType(int locType) Set the locType. This is the type of information which is used in the localisation e.g. bearings, time delays.- Parameters:
an- integer flag of the locType e.g. BEARINGS_GROUP, TIMEDELAY_GROUP;
-
setLocDim
public void setLocDim(int nDim) -
getLocDim
public int getLocDim() -
getGroupLocInfo
Get the group detection info for a PamDataUnit. This is used to calculate information from a group of detections- Parameters:
detectionGroupOptions-- Returns:
- the groupDetectionIndo
-
notifyModelProgress
public void notifyModelProgress(double progress) Description copied from interface:LocaliserModelThis should be called whenever the localiser has finished processing and, if the localisation process is long, then updates progress.- Specified by:
notifyModelProgressin interfaceLocaliserModel<T extends SuperDetection>
-
hasParams
public boolean hasParams()Description copied from interface:LocaliserModelTrue if the model has parameters to set. If has the localiser has a settings pane it will have parameters. This generally puts an extra button onto a display panel.- Specified by:
hasParamsin interfaceLocaliserModel<T extends SuperDetection>
-
setLocalisationAlgorithm
Set the algorithm used to solve the loclaisation problem- Parameters:
minAlgorithm- the loclisation algorithm.
-