From c463af898f507f9138c5af452a2828ec8c654080 Mon Sep 17 00:00:00 2001
From: brutzman <brutzman@nps.edu>
Date: Wed, 4 Sep 2024 12:27:45 -0700
Subject: [PATCH] entity 3, a potential third-party observer

---
 .../src/OpenDis7Examples/ExampleSimulationProgram.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/examples/src/OpenDis7Examples/ExampleSimulationProgram.java b/examples/src/OpenDis7Examples/ExampleSimulationProgram.java
index 3ff2409f5b..cef5eb891d 100644
--- a/examples/src/OpenDis7Examples/ExampleSimulationProgram.java
+++ b/examples/src/OpenDis7Examples/ExampleSimulationProgram.java
@@ -53,6 +53,9 @@ public class ExampleSimulationProgram
     protected EntityID           entityID_1          = new EntityID();
     /** EntityID settings for entity 2 */
     protected EntityID           entityID_2          = new EntityID();
+    /** EntityID settings for entity 3, a potential third-party observer and after-action reporter */
+    protected EntityID           entityID_3          = new EntityID();
+    
     /** ESPDU for entity 1 */
     protected EntityStatePdu     entityStatePdu_1;
     /** ESPDU for entity 2 */
@@ -161,9 +164,9 @@ public class ExampleSimulationProgram
         munitionDescriptor1 = new MunitionDescriptor();
         
         // can a third party report their independent (non-entity) status of a detonation? yes...
+        // if this is a third-party report, then that third party will need an independent EntityID
         detonationPdu_1a    = pduFactory.makeDetonationPdu();
-        // if this is a third-party report, then that third party will need an EntityID
-        detonationPdu_1a.setSourceEntityID(entityID_1);
+        detonationPdu_1a.setSourceEntityID(entityID_3);
         
         // Your model setup: define participants.  who's who in this zoo?
         // Assuming you keep track of entity objects...  here is some support for for Entity 1.
-- 
GitLab