Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NetworkedGraphicsMV3500
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Savage
NetworkedGraphicsMV3500
Commits
9c1d3954
Commit
9c1d3954
authored
4 years ago
by
brutzman
Browse files
Options
Downloads
Patches
Plain Diff
changes in course presentation
parent
3ddebee9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/src/OpenDis7Examples/ExampleSimulationProgram.java
+13
-3
13 additions, 3 deletions
examples/src/OpenDis7Examples/ExampleSimulationProgram.java
with
13 additions
and
3 deletions
examples/src/OpenDis7Examples/ExampleSimulationProgram.java
+
13
−
3
View file @
9c1d3954
...
...
@@ -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 ExampleSimulation
Program
"
;
narrativeMessage2
=
"runSimulation
()
loop "
+
loopCount
;
narrativeMessage3
=
""
;
// intentionally blank for testing
// ===============================
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment