public class SearchPlanner extends GoalPlanner
GoalPlanner.PartnerList, GoalPlanner.PartnerRecord| Modifier and Type | Field and Description | 
|---|---|
| static int | CONTINUE_SEARCHContinue search pattern | 
| static int | EXECUTE_SEARCHConduct search once established in operating area | 
| static int | QUIT_SEARCHSole target located, search complete (no reporting required) | 
| static int | REPORT_AND_CONTINUETarget located (report required), search to continue | 
| static int | REPORT_AND_QUITSole target located (report required) | 
| static int | TRANSIT_AND_ALERTTransiting to area to wait until directed to begin search | 
alert, ATTACK_GOAL, avoidAreaSet, currentState, DECISION_CURRENT, DECISION_ONFAILURE, DECISION_ONSUCCESS, DECONTAMINATE_GOAL, DEMOLISH_GOAL, duration, firstGoal, GOAL_FAIL, GOAL_IN_PROGRESS, GOAL_SUCCEED, goalAttainable, goalVertical, goalVerticalMode, ILLUMINATE_GOAL, interVehicleCommunicationsHandler, JAM_GOAL, MARK_GOAL, MONITOR_TRANSMISSION_GOAL, onStation, operatingArea, PATROL_GOAL, planComputed, ready, RENDEZVOUS_GOAL, reportEnd, reportingInterval, reportPeriodic, reportStart, reportStatusChange, REPOSITION_GOAL, SAMPLE_ENVIRONMENT_GOAL, SEARCH_GOAL, searchPlannerType, startTime, stateChanged, STATUS_DESC_LAST_ENDED, STATUS_EXECUTION_BEGIN, STATUS_EXECUTION_FAIL, STATUS_EXECUTION_SUCCEED, STATUS_STATUS_COMPLETE, STATUS_SYSTEM_MISSION, stopTime, teamPartnerList, timeOut, vehicleCharacteristics, vehicleID, worldModel| Constructor and Description | 
|---|
| SearchPlanner(int vehicleID,
             StateVector state,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             int srchPlannerType)Creates a new instance of SearchPlanner | 
| SearchPlanner(int vehicleID,
             StateVector state,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             List<AreaElementType> avoidAreas,
             double startX,
             double startY,
             int srchPlannerType)Creates a new instance of SearchPlanner | 
| SearchPlanner(int vehicleID,
             StateVector state,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             List<AreaElementType> avoidAreas,
             int srchPlannerType)Creates a new instance of SearchPlanner | 
| SearchPlanner(int vehicleID,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             int searchPlannerType)Creates a new instance of SearchPlanner | 
| SearchPlanner(int vehicleID,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             List<AreaElementType> avoidAreas,
             double startX,
             double startY,
             int srchPlannerType)Creates a new instance of SearchPlanner | 
| SearchPlanner(int vehicleID,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             List<AreaElementType> avoidAreas,
             int srchPlannerType)Creates a new instance of SearchPlanner | 
| Modifier and Type | Method and Description | 
|---|---|
| static double | computePD(double S,
         double T)Compute the single-search probability of detection for a given sweep width and track spacing
 The method uses the formula PD = 1 / (1 + 0.25 * (1 / C)) where C is the coverage factor | 
| List<JAXBElement<?>> | generateAvclScriptElementList(int vehicleType,
                             double gpsInterval)Generates a set of AVCL Waypoints corresponding to the transit to the search area
 and the search pattern itself | 
| List<JAXBElement<?>> | generateAvclScriptElementList(List<JAXBElement<?>> plan,
                             int vehicleType,
                             double gpsInterval)Generates a set of AVCL Waypoints corresponding to the transit to the search area
 and the search pattern itself | 
| int | goalExecutionStatus()Determines the current status of goal execution (in progress, succeed, or fail | 
| static void | main(String[] args)Main method for testing purposes only | 
| void | planScript()Utilizes all available information to generate a script to accomplish the applicable goal | 
| void | planScript(double startX,
          double startY)Utilizes all available information to generate a script to accomplish the applicable goal | 
| void | reset()Resets the planner so that it can be restarted from scratch | 
| protected void | sendRequiredComms()Sends any required inter-vehicle communications based on the current goal status | 
| protected void | setParameters()Sets the goal parameters specific to searches based on a AVCL search goal | 
| void | setPatternComplete()Sets the pattern complete flag | 
| void | setRequiredPD(double value)Sets the required single-search probability of detection of the search | 
| void | setStartPosition(double[] xy)Sets the vehicle position prior to commencing the search | 
| void | setStartPosition(double x,
                double y)Sets the vehicle position prior to commencing the search | 
| int | setState()Uses the current world state to set the state of a finite state machine that will
 determine how the plan is generated (e.g. search pattern, report and continue, etc.) | 
| void | setTargetFound()Sets the target found flag | 
| double | setTrackSpacing()Computes and sets the track spacing to achieve the desired 1-search probability of detection
 The method uses the formula PD = 1 / (1 + 0.25 * (1 / C)) where C is the coverage factor | 
| void | vehicleInitialize(VehicleCharacteristics vehicleCharacteristics)Initializes the control parameters of the search (sweep width, required pd, etc.) | 
assignVehicle, getAvoidAreas, getBestPosition, getCurrentTime, getDuration, getGoal, getPlannerType, getStartTime, getStopTime, getTimingType, getVehicleType, goalType, hasStateChanged, inOperatingArea, localExecutionLevel, makeLoiterCmd, makeMetaCmd, makePositionCmd, makeWaitCmd, makeWaitUntilTimeCmd, matchedWaypoints, planAvailable, planRouteElementList, recalculateGpsFixes, resetStateChanged, resetTiming, run, setAvoidAreas, setCommunicator, setFirst, setOffStation, setOnStation, setOperatingArea, setTeamMemberOnStation, setUnattainable, setWorldModelpublic static final int TRANSIT_AND_ALERT
public static final int EXECUTE_SEARCH
public static final int CONTINUE_SEARCH
public static final int QUIT_SEARCH
public static final int REPORT_AND_CONTINUE
public static final int REPORT_AND_QUIT
public SearchPlanner(int vehicleID,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             int searchPlannerType)
vehicleID - vehicleCharacteristics - characteristics that define what goals the vehicle is capable of accomplishinggoal - AVCL (JAXB) object that defines the goal the planner is intended to accomplishsearchPlannerType - enumeration for the type of search pattern that is to be generated 
                        if required (normally SearchPatternPlanner.DEFAULT except for testing)public SearchPlanner(int vehicleID,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             List<AreaElementType> avoidAreas,
             int srchPlannerType)
vehicleID - vehicleCharacteristics - characteristics that define what goals the vehicle is capable of accomplishinggoal - AVCL (JAXB) object that defines the goal the planner is intended to accomplishavoidAreas - list of AVCL objects defining avoid areas effecting transit to and from op areasrchPlannerType - enumeration for the type of search pattern that is to be generated 
                        if required (normally SearchPatternPlanner.DEFAULT except for testing)public SearchPlanner(int vehicleID,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             List<AreaElementType> avoidAreas,
             double startX,
             double startY,
             int srchPlannerType)
vehicleID - vehicleCharacteristics - characteristics that define what goals the vehicle is capable of accomplishinggoal - AVCL (JAXB) object that defines the goal the planner is intended to accomplishavoidAreas - list of AVCL objects defining avoid areas effecting transit to and from op areastartX - the x coordinate of the vehicle starting positionstartY - the y coordinate of the vehicle starting positionsrchPlannerType - enumeration for the type of search pattern that is to be generated 
                        if required (normally SearchPatternPlanner.DEFAULT except for testing)public SearchPlanner(int vehicleID,
             StateVector state,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             int srchPlannerType)
vehicleID - state - vehicleCharacteristics - characteristics that define what goals the vehicle is capable of accomplishinggoal - AVCL (JAXB) object that defines the goal the planner is intended to accomplishsrchPlannerType - enumeration for the type of search pattern that is to be generated 
                        if required (normally SearchPatternPlanner.DEFAULT except for testing)public SearchPlanner(int vehicleID,
             StateVector state,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             List<AreaElementType> avoidAreas,
             int srchPlannerType)
vehicleID - state - vehicleCharacteristics - characteristics that define what goals the vehicle is capable of accomplishinggoal - AVCL (JAXB) object that defines the goal the planner is intended to accomplishavoidAreas - list of AVCL objects defining avoid areas effecting transit to and from op areasrchPlannerType - enumeration for the type of search pattern that is to be generated 
                        if required (normally SearchPatternPlanner.DEFAULT except for testing)public SearchPlanner(int vehicleID,
             StateVector state,
             VehicleCharacteristics vehicleCharacteristics,
             AgendaGoalElementType goal,
             List<AreaElementType> avoidAreas,
             double startX,
             double startY,
             int srchPlannerType)
vehicleID - state - vehicleCharacteristics - characteristics that define what goals the vehicle is capable of accomplishinggoal - AVCL (JAXB) object that defines the goal the planner is intended to accomplishavoidAreas - list of AVCL objects defining avoid areas effecting transit to and from op areastartX - the x coordinate of the vehicle starting positionstartY - the y coordinate of the vehicle starting positionsrchPlannerType - enumeration for the type of search pattern that is to be generated 
                        if required (normally SearchPatternPlanner.DEFAULT except for testing)public void reset()
reset in class GoalPlannerprotected void setParameters()
setParameters in class GoalPlannerpublic void vehicleInitialize(VehicleCharacteristics vehicleCharacteristics)
vehicleInitialize in class GoalPlannervehicleCharacteristics - vehicle characteristics to be utilized for the searchpublic void setTargetFound()
public void setPatternComplete()
public void setRequiredPD(double value)
value - new required probability of detectionpublic double setTrackSpacing()
public static double computePD(double S,
               double T)
S - sweep width of the search as defined by NWP 3-22.5 (the SAR TACAID)T - track spacing of the searchpublic void setStartPosition(double x,
                    double y)
setStartPosition in class GoalPlannerx - X coordinate of the vehicle positiony - Y coordinate of the vehicle positionpublic void setStartPosition(double[] xy)
setStartPosition in class GoalPlannerxy - double[2] containing the (x, y) coordinates of the vehicle positionpublic void planScript(double startX,
              double startY)
planScript in class GoalPlannerstartX - X coordinate of the vehicle when starting work towards goal accomplishmentstartY - Y coordinate of the vehicle when starting work towards goal accomplishmentpublic void planScript()
planScript in class GoalPlannerpublic int setState()
setState in class GoalPlannerpublic List<JAXBElement<?>> generateAvclScriptElementList(List<JAXBElement<?>> plan, int vehicleType, double gpsInterval)
plan - ArrayList containing an existing plan to which the generated one will be appendedvehicleType - enumeration for the type of vehicle (AUV, UAV, etc.)gpsInterval - number of waypoints between GPS fixes (only relevant for UUVs)public List<JAXBElement<?>> generateAvclScriptElementList(int vehicleType, double gpsInterval)
generateAvclScriptElementList in class GoalPlannervehicleType - enumeration for the type of vehicle (AUV, UAV, etc.)gpsInterval - distance the vehicle can travel between GPS fixes (only relevant for UUVs)public int goalExecutionStatus()
goalExecutionStatus in class GoalPlannerprotected void sendRequiredComms()
sendRequiredComms in class GoalPlannerpublic static void main(String[] args)
args -