public class MunitionExecution extends Execution
Execution.IdleHandler
Modifier and Type | Field and Description |
---|---|
MunitionControlParameters |
munControlParameters |
currentCommandElement, currentCommandIndex, drivers, dynamics, dynamicsArgs, environmentCustomer, executionKey, firstTime, interVehicleCommunicationsHandler, joystickEventHashMap, KILL_CMD, killRun, mission, MULTIPLELOOPSMISSION_CMD, PAUSE_CMD, REALTIME_CMD, RESUME_CMD, runtimeFlags, stateReportChannel, stateVector, strategicLevel, strategicThread, tacticalConnection, tacticalLevel, tacticalThread, vehicleShortName, virtualWorldConnection, workbenchCommunicator
Constructor and Description |
---|
MunitionExecution(String[] args)
Creates a new instance of Execution
|
Modifier and Type | Method and Description |
---|---|
protected void |
act()
computes and applies control settings
Use this hook into the inner loop to calculate apogee
|
protected Mission |
buildNewMission(boolean wantResultsOutput) |
protected void |
decide()
determines what appropriate action to complete current command
|
protected ControlParameters |
getControlParameters() |
protected long |
getEnvironmentalUpdatePeriodMs() |
protected long |
getPositionUpdatePeriod()
Override this one to show more dots on the screen because of the faster movement.
|
StateVector |
getState() |
protected long |
getStateReportUpdatePeriod()
Can change period here if desired
|
protected String |
getTabDelimitedFormattedStateFieldNames()
Add scalar velocity to default state
|
protected String |
getTabDelimitedStateValues()
Add scalar velocity to default state
|
int |
getVehicleType() |
protected void |
initializeEnvironmentUpdates()
Override environment setup
|
static void |
main(String[] args)
This is the entry point when Execution is done in a separate JVM.
|
protected void |
missionFinished()
Tell the 2D display to put up the results banner
|
protected void |
missionSimulationLoopHouseKeepingFinal(ControlParameters controlParameters)
cleanup and setup required at the end of each closed loop iteration
|
protected void |
missionSimulationLoopHouseKeepingInitial(ControlParameters controlParameters)
Setup required at the beginning of each iteration of the closed loop
|
void |
reset()
Resets all component objects and variables to start over.
|
static void |
runMunitions(String[] args)
The munition execution class handles things a bit differently from the
other Execution subclasses; it executes multiple threads, one after
the other.
|
protected void |
sense()
reads sensors or communicates with the virtual world to orient auv in the world
|
checkKill, checkMultipleLoopsMission, checkPauseResume, checkPauseSeparateJvm, checkRealtime, cleanUpFollowingMissionLoopCompletion, decideExternal, endPositionReports, endStateReports, getNextJoystickEvent, getTacticalConnection, getWorkbenchCommunicator, isOneThreadedJvmForAllMissions, isRunning, missionSimulationLoopsRunFullMission, notifyCommandComplete, receiveJoystickEvent, run, setAgendaLaunchXY, setVehicleCharacteristics, shouldUseSingleJvm, startEnvironmentalUpdates, startPositionReports, startStateReports, stopEnviroUpdates, useMetric, useRadians
public MunitionControlParameters munControlParameters
public MunitionExecution(String[] args)
args
- String[] command line argumentspublic void reset()
Execution
protected ControlParameters getControlParameters()
getControlParameters
in class Execution
protected Mission buildNewMission(boolean wantResultsOutput)
buildNewMission
in class Execution
wantResultsOutput
- protected void missionFinished()
missionFinished
in class Execution
public static void runMunitions(String[] args)
public static void main(String[] args)
args
- the command line argumentsprotected void sense()
protected void decide()
protected void act()
protected void missionSimulationLoopHouseKeepingInitial(ControlParameters controlParameters)
Execution
missionSimulationLoopHouseKeepingInitial
in class Execution
controlParameters
- control parametersprotected void missionSimulationLoopHouseKeepingFinal(ControlParameters controlParameters)
missionSimulationLoopHouseKeepingFinal
in class Execution
controlParameters
- protected long getPositionUpdatePeriod()
getPositionUpdatePeriod
in class Execution
protected long getStateReportUpdatePeriod()
getStateReportUpdatePeriod
in class Execution
protected String getTabDelimitedFormattedStateFieldNames()
getTabDelimitedFormattedStateFieldNames
in class Execution
protected String getTabDelimitedStateValues()
getTabDelimitedStateValues
in class Execution
protected void initializeEnvironmentUpdates()
initializeEnvironmentUpdates
in class Execution
protected long getEnvironmentalUpdatePeriodMs()
getEnvironmentalUpdatePeriodMs
in class Execution
public int getVehicleType()
getVehicleType
in class Execution
Dynamics.AGENDA
, Dynamics.UAV
, Dynamics.UGV
, Dynamics.USV
, Dynamics.UUV
, Dynamics.MUNITION
, Dynamics.ROV
public StateVector getState()