public class SampleEnvironmentPlanner extends GoalPlanner
GoalPlanner.PartnerList, GoalPlanner.PartnerRecord
Modifier and Type | Field and Description |
---|---|
static int |
CONTINUE_SAMPLE |
static int |
REPORT_AND_SAMPLE |
static int |
TRACK_AND_SAMPLE |
static int |
TRANSIT_AND_ALERT |
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 |
---|
SampleEnvironmentPlanner(int vehicleID,
StateVector state,
VehicleCharacteristics chars,
AgendaGoalElementType goal,
int srchPlannerType)
Creates a new instance of SampleEnvironmentPlanner
|
SampleEnvironmentPlanner(int vehicleID,
StateVector state,
VehicleCharacteristics chars,
AgendaGoalElementType goal,
List<AreaElementType> avoidAreas,
double startX,
double startY,
int srchPlannerType)
Creates a new instance of SampleEnvironmentPlanner
|
SampleEnvironmentPlanner(int vehicleID,
StateVector state,
VehicleCharacteristics chars,
AgendaGoalElementType goal,
List<AreaElementType> avoidAreas,
int srchPlannerType)
Creates a new instance of SampleEnvironmentPlanner
|
SampleEnvironmentPlanner(int vehicleID,
VehicleCharacteristics chars,
AgendaGoalElementType goal,
int srchPlannerType)
Creates a new instance of SampleEnvironmentPlanner
|
SampleEnvironmentPlanner(int vehicleID,
VehicleCharacteristics chars,
AgendaGoalElementType goal,
List<AreaElementType> avoidAreas,
double startX,
double startY,
int srchPlannerType)
Creates a new instance of SampleEnvironmentPlanner
|
SampleEnvironmentPlanner(int vehicleID,
VehicleCharacteristics chars,
AgendaGoalElementType goal,
List<AreaElementType> avoidAreas,
int srchPlannerType)
Creates a new instance of SampleEnvironmentPlanner
|
Modifier and Type | Method and Description |
---|---|
List<JAXBElement<?>> |
generateAvclScriptElementList(int vehicleType,
double gpsInterval)
Generates a set of AVCL commands corresponding to the transit to the operating area
and the goal accomplishment itself
|
List<JAXBElement<?>> |
generateAvclScriptElementList(List<JAXBElement<?>> planElementList,
int vehicleType,
double gpsInterval)
Generates a set of AVCL commands corresponding to the transit to the operating area
and the goal accomplishment 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
|
void |
setContaminantDetected()
Sets the contaminant detected flag
|
protected void |
setParameters()
Sets the goal parameters specific to searches based on a AVCL decontaminate goal
|
void |
setPatternComplete()
Sets the pattern complete flag
|
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 |
vehicleInitialize(VehicleCharacteristics chars)
Initializes the control parameters of the sample pattern (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, setStartPosition, setStartPosition, setTeamMemberOnStation, setUnattainable, setWorldModel
public static final int TRANSIT_AND_ALERT
public static final int TRACK_AND_SAMPLE
public static final int CONTINUE_SAMPLE
public static final int REPORT_AND_SAMPLE
public SampleEnvironmentPlanner(int vehicleID, VehicleCharacteristics chars, AgendaGoalElementType goal, int srchPlannerType)
vehicleID
- chars
- 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 SampleEnvironmentPlanner(int vehicleID, VehicleCharacteristics chars, AgendaGoalElementType goal, List<AreaElementType> avoidAreas, int srchPlannerType)
vehicleID
- chars
- 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 SampleEnvironmentPlanner(int vehicleID, VehicleCharacteristics chars, AgendaGoalElementType goal, List<AreaElementType> avoidAreas, double startX, double startY, int srchPlannerType)
vehicleID
- chars
- 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 SampleEnvironmentPlanner(int vehicleID, StateVector state, VehicleCharacteristics chars, AgendaGoalElementType goal, int srchPlannerType)
vehicleID
- state
- StateVector object of the vehicle for which the planner is to be utilizedchars
- 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 SampleEnvironmentPlanner(int vehicleID, StateVector state, VehicleCharacteristics chars, AgendaGoalElementType goal, List<AreaElementType> avoidAreas, int srchPlannerType)
vehicleID
- state
- StateVector object of the vehicle for which the planner is to be utilizedchars
- 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 SampleEnvironmentPlanner(int vehicleID, StateVector state, VehicleCharacteristics chars, AgendaGoalElementType goal, List<AreaElementType> avoidAreas, double startX, double startY, int srchPlannerType)
vehicleID
- state
- StateVector object of the vehicle for which the planner is to be utilizedchars
- 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 GoalPlanner
protected void setParameters()
setParameters
in class GoalPlanner
public void vehicleInitialize(VehicleCharacteristics chars)
vehicleInitialize
in class GoalPlanner
chars
- vehicle characteristics to be utilized for the searchpublic void setContaminantDetected()
public void setPatternComplete()
public int setState()
setState
in class GoalPlanner
public void planScript(double startX, double startY)
planScript
in class GoalPlanner
startX
- 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 GoalPlanner
public List<JAXBElement<?>> generateAvclScriptElementList(List<JAXBElement<?>> planElementList, int vehicleType, double gpsInterval)
planElementList
- ArrayList containing an existing plan to which the generated one will be appendedvehicleType
- enumeration for the type of vehicle (AUV, UAV, etc.)gpsInterval
- distance the vehicle can travel between GPS fixes (only relevant for UUVs)public List<JAXBElement<?>> generateAvclScriptElementList(int vehicleType, double gpsInterval)
generateAvclScriptElementList
in class GoalPlanner
vehicleType
- 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 GoalPlanner
protected void sendRequiredComms()
sendRequiredComms
in class GoalPlanner
public static void main(String[] args)
args
-