2005-04-19 19:53:18 +00:00
|
|
|
{
|
2008-08-03 15:44:57 +00:00
|
|
|
GLOBAL =
|
2008-03-15 15:09:18 +00:00
|
|
|
{
|
2008-08-03 15:44:57 +00:00
|
|
|
ENTER = ("setSpeedTo: 0.0", requestDockingCoordinates, "setStateTo: AWAIT_COORDS");
|
|
|
|
UPDATE = ("pauseAI: 2");
|
|
|
|
};
|
|
|
|
"AWAIT_COORDS" =
|
2008-03-15 15:09:18 +00:00
|
|
|
{
|
2008-08-03 15:44:57 +00:00
|
|
|
"APPROACH" = ("setStateTo: APPROACH");
|
|
|
|
"APPROACH_COORDINATES" = ("setStateTo: GO_TO_COORDS");
|
|
|
|
"BACK_OFF" = ("setStateTo: RETREAT");
|
|
|
|
"HOLD_POSITION" = ("setStateTo: STATIONKEEPING");
|
|
|
|
"DOCKING_ABORTED" = ("setStateTo: ABORT");
|
|
|
|
"TRY_AGAIN_LATER" = ("pauseAI: 30.0", "setStateTo: ABORT");
|
|
|
|
"COLLISION" = ("setStateTo: ABORT");
|
|
|
|
"RESTART_DOCKING" = ("setStateTo: GLOBAL");
|
|
|
|
DOCKED = ("setStateTo: EXIT_SYSTEM");
|
|
|
|
UPDATE = ("pauseAI: 2");
|
|
|
|
};
|
|
|
|
STATIONKEEPING =
|
2008-03-15 15:09:18 +00:00
|
|
|
{
|
2008-08-03 15:44:57 +00:00
|
|
|
ENTER = (performIdle, "setSpeedTo: 0.0", "pauseAI: 10.0");
|
2008-09-26 20:10:24 +00:00
|
|
|
ATTACKED = (abortDocking, broadcastDistressMessage, setTargetToPrimaryAggressor, "setAITo: interceptAI.plist");
|
|
|
|
RESTARTED = (performIdle, "setStateTo: GLOBAL");
|
2008-08-03 15:44:57 +00:00
|
|
|
UPDATE = (requestDockingCoordinates, "setStateTo: AWAIT_COORDS");
|
|
|
|
};
|
|
|
|
APPROACH =
|
2008-03-15 15:09:18 +00:00
|
|
|
{
|
2008-08-03 15:44:57 +00:00
|
|
|
ENTER = (recallDockingInstructions, "setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
|
|
|
|
"DESIRED_RANGE_ACHIEVED" = (requestDockingCoordinates, "setStateTo: AWAIT_COORDS");
|
|
|
|
"DOCKING_ABORTED" = ("setStateTo: ABORT");
|
|
|
|
"COLLISION" = ("setStateTo: ABORT");
|
|
|
|
"RESTART_DOCKING" = ("setStateTo: GLOBAL");
|
|
|
|
};
|
|
|
|
RETREAT =
|
2008-03-15 15:09:18 +00:00
|
|
|
{
|
2008-08-03 15:44:57 +00:00
|
|
|
ENTER = (recallDockingInstructions, "setSpeedTo: 0.0", setDestinationToDockingAbort, performFaceDestination);
|
|
|
|
"FACING_DESTINATION" = ("setSpeedFactorTo: 1.0", "setDesiredRangeTo: 500.0", performFlyToRangeFromDestination);
|
|
|
|
"DESIRED_RANGE_ACHIEVED" = ("setSpeedTo: 0.0", requestDockingCoordinates, "setStateTo: AWAIT_COORDS");
|
|
|
|
"DOCKING_ABORTED" = ("setStateTo: ABORT");
|
|
|
|
"COLLISION" = ("setStateTo: ABORT");
|
|
|
|
"RESTART_DOCKING" = ("setStateTo: GLOBAL");
|
|
|
|
};
|
|
|
|
"GO_TO_COORDS" =
|
2008-03-15 15:09:18 +00:00
|
|
|
{
|
2008-08-03 15:44:57 +00:00
|
|
|
ENTER = (performFaceDestination);
|
|
|
|
FRUSTRATED = ("setSpeedTo: 0.0", performFaceDestination);
|
|
|
|
"FACING_DESTINATION" = (recallDockingInstructions, performFlyToRangeFromDestination);
|
|
|
|
"DESIRED_RANGE_ACHIEVED" = (requestDockingCoordinates, "setStateTo: AWAIT_COORDS");
|
|
|
|
"DOCKING_ABORTED" = ("setStateTo: ABORT");
|
|
|
|
"COLLISION" = ("setStateTo: ABORT");
|
|
|
|
"RESTART_DOCKING" = ("setStateTo: GLOBAL");
|
|
|
|
DOCKED = ("setStateTo: EXIT_SYSTEM");
|
|
|
|
};
|
|
|
|
ABORT =
|
2008-09-26 20:10:24 +00:00
|
|
|
{
|
2008-08-03 15:44:57 +00:00
|
|
|
ENTER = (abortDocking, "setSpeedTo: 0.0", setDestinationToDockingAbort, "setDesiredRangeTo: 500.0", performFaceDestination);
|
|
|
|
"FACING_DESTINATION" = ("setSpeedFactorTo: 1.0", "setDesiredRangeTo: 500.0", performFlyToRangeFromDestination);
|
|
|
|
"RESTART_DOCKING" = ("setStateTo: GLOBAL");
|
|
|
|
"REACHED_SAFETY" = (performIdle, "setStateTo: GLOBAL");
|
|
|
|
"DESIRED_RANGE_ACHIEVED" = (performIdle, "setStateTo: GLOBAL");
|
2008-08-25 11:14:53 +00:00
|
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setAITo: interceptAI.plist");
|
2008-09-26 20:10:24 +00:00
|
|
|
RESTARTED = (performIdle, "setStateTo: GLOBAL");
|
2008-08-03 15:44:57 +00:00
|
|
|
};
|
|
|
|
"EXIT_SYSTEM" =
|
2008-03-15 15:09:18 +00:00
|
|
|
{
|
2009-01-12 19:47:11 +00:00
|
|
|
ENTER = (exitAI);
|
2008-03-15 15:09:18 +00:00
|
|
|
};
|
|
|
|
}
|