Skip to content
Snippets Groups Projects
Commit 9c1d3954 authored by brutzman's avatar brutzman
Browse files

changes in course presentation

parent 3ddebee9
No related branches found
No related tags found
No related merge requests found
......@@ -196,6 +196,8 @@ public class ExampleSimulationProgram
/**
* User-modifiable method for defining and running a simulation.
* Support include DIS EntityStatePdu, FirePdu and CommentPdu all available for
* modification and sending in a simulation loop.
*/
public void runSimulation ()
{
......@@ -206,7 +208,7 @@ public class ExampleSimulationProgram
// model setup
EntityID entityID_1 = new EntityID();
entityID_1.setSiteID(1).setApplicationID(2).setEntityID(3);
entityID_1.setSiteID(1).setApplicationID(2).setEntityID(3); // made-up example ID
EntityStatePdu entityStatePdu = pduFactory.makeEntityStatePdu();
entityStatePdu.setEntityID(entityID_1);
......@@ -222,12 +224,20 @@ public class ExampleSimulationProgram
// ===============================
// your own simulation code here!
// compute a track, update an ESPDU
entityStatePdu.getEntityLocation().setX(entityStatePdu.getEntityLocation().getX() + 1.0);
// decide whether to fire, and then update the firePdu. Hmmm, you might want a target to shoort at!
// etc.
// your narrative code for CommentPdu here, set all to empty strings to avoid sending
narrativeMessage1 = "MV3500 ExampleSimulation";
narrativeMessage2 = "runSimulation loop " + loopCount;
narrativeMessage1 = "MV3500 ExampleSimulationProgram";
narrativeMessage2 = "runSimulation() loop " + loopCount;
narrativeMessage3 = ""; // intentionally blank for testing
// ===============================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment