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
c2f67806
Commit
c2f67806
authored
5 years ago
by
brutzman
Browse files
Options
Downloads
Patches
Plain Diff
improved output, debugging
parent
8cc8629d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/src/OpenDis7Examples/EspduReceiver.java
+6
-7
6 additions, 7 deletions
examples/src/OpenDis7Examples/EspduReceiver.java
examples/src/OpenDis7Examples/EspduTerminalLog.txt
+91
-54
91 additions, 54 deletions
examples/src/OpenDis7Examples/EspduTerminalLog.txt
with
97 additions
and
61 deletions
examples/src/OpenDis7Examples/EspduReceiver.java
+
6
−
7
View file @
c2f67806
...
...
@@ -52,24 +52,23 @@ public class EspduReceiver
socket
.
receive
(
packet
);
List
<
Pdu
>
pduBundle
=
pduFactory
.
getPdusFromBundle
(
packet
.
getData
());
System
.
out
.
println
(
"Bundle size is "
+
pduBundle
.
size
())
;
if
(
pduBundle
.
size
()
>
1
)
System
.
out
.
println
(
"Bundle size is "
+
pduBundle
.
size
());
Iterator
iterator
=
pduBundle
.
iterator
();
while
(
iterator
.
hasNext
())
{
Pdu
aPdu
=
(
Pdu
)
iterator
.
next
();
System
.
out
.
print
(
"got PDU
of type
:
"
+
aPdu
.
getClass
().
getName
());
System
.
out
.
print
ln
(
"received PDU "
+
aPdu
.
getPduType
().
getValue
()
+
" "
+
aPdu
.
getPduType
().
name
()
+
"
of type "
+
aPdu
.
getClass
().
getName
());
if
(
aPdu
instanceof
EntityStatePdu
)
{
EntityID
eid
=
((
EntityStatePdu
)
aPdu
).
getEntityID
();
Vector3Double
position
=
((
EntityStatePdu
)
aPdu
).
getEntityLocation
();
System
.
out
.
print
(
"
E
ID
:
["
+
eid
.
getSiteID
()+
", "
+
eid
.
getApplicationID
()+
", "
+
eid
.
getEntityID
()+
"] "
);
System
.
out
.
print
(
" Location in DIS coordinates: ["
+
position
.
getX
()
+
", "
+
position
.
getY
()
+
", "
+
position
.
getZ
()
+
"]"
);
System
.
out
.
print
ln
(
"
ID
triplet:
["
+
eid
.
getSiteID
()+
", "
+
eid
.
getApplicationID
()+
", "
+
eid
.
getEntityID
()+
"] "
);
System
.
out
.
print
ln
(
"
Location in DIS coordinates: ["
+
position
.
getX
()
+
", "
+
position
.
getY
()
+
", "
+
position
.
getZ
()
+
"]"
);
}
System
.
out
.
println
();
}
// end trop through PDU bundle
}
// end iterator loop through PDU bundle
}
// end while
}
// End try
catch
(
IOException
e
)
...
...
This diff is collapsed.
Click to expand it.
examples/src/OpenDis7Examples/EspduTerminalLog.txt
+
91
−
54
View file @
c2f67806
...
...
@@ -2,92 +2,129 @@ Invocation instructions:
1. run/debug EspduReceiver.java (since sender does not block, be ready to listen)
2. run/debug EspduSender.java
TODO troubleshooting note:
debugging reveals that "PDU not implemented. Type = OTHER" appears to be
caused by OpenDIS7 library reading trailing zeros in a datagram following
initial PDU parsing.
Program responses:
===================================================
run:
DisExamples.EspduSender started... send 5 ESPDUs, initial index=0
DisExamplesOpenDis7.EspduSender started... send 5 ESPDUs, initial index=0
Sending 5 ESPDU packets to /239.1.2.3
-121.87693999999999
lat, lon:36.595517, -121.87693999999999
DIS coord:-2707488.3677768684, -4353666.73524437
9
, 3781450.3202754413
DIS coord:-2707488.3677768684, -4353666.73524437
8
, 3781450.3202754413
Sending broadcast datagram packet to /127.255.255.255
Sending broadcast datagram packet to /172.20.83.255
Sending broadcast datagram packet to /172.20.220.105
Sending broadcast datagram packet to /10.0.0.255
Espdu #0 EID=[1,1,2]
DIS coordinates location=[-2707488.3677768684,-4353666.73524437
9
,3781450.3202754413]
DIS coordinates location=[-2707488.3677768684,-4353666.73524437
8
,3781450.3202754413]
-121.877
lat, lon:36.595517, -121.877
DIS coord:-2707492.9269245286, -4353663.899966802, 3781450.3202754413
Sending broadcast datagram packet to /127.255.255.255
Sending broadcast datagram packet to /172.20.83.255
Sending broadcast datagram packet to /172.20.220.105
Sending broadcast datagram packet to /10.0.0.255
Espdu #1 EID=[1,1,2]
DIS coordinates location=[-2707492.9269245286,-4353663.899966802,3781450.3202754413]
-121.87693999999999
lat, lon:36.595517, -121.87693999999999
DIS coord:-2707488.3677768684, -4353666.73524437
9
, 3781450.3202754413
DIS coord:-2707488.3677768684, -4353666.73524437
8
, 3781450.3202754413
Sending broadcast datagram packet to /127.255.255.255
Sending broadcast datagram packet to /172.20.83.255
Sending broadcast datagram packet to /172.20.220.105
Sending broadcast datagram packet to /10.0.0.255
Espdu #2 EID=[1,1,2]
DIS coordinates location=[-2707488.3677768684,-4353666.73524437
9
,3781450.3202754413]
DIS coordinates location=[-2707488.3677768684,-4353666.73524437
8
,3781450.3202754413]
-121.877
lat, lon:36.595517, -121.877
DIS coord:-2707492.9269245286, -4353663.899966802, 3781450.3202754413
Sending broadcast datagram packet to /127.255.255.255
Sending broadcast datagram packet to /172.20.83.255
Sending broadcast datagram packet to /172.20.220.105
Sending broadcast datagram packet to /10.0.0.255
Espdu #3 EID=[1,1,2]
DIS coordinates location=[-2707492.9269245286,-4353663.899966802,3781450.3202754413]
-121.87693999999999
lat, lon:36.595517, -121.87693999999999
DIS coord:-2707488.3677768684, -4353666.73524437
9
, 3781450.3202754413
DIS coord:-2707488.3677768684, -4353666.73524437
8
, 3781450.3202754413
Sending broadcast datagram packet to /127.255.255.255
Sending broadcast datagram packet to /172.20.83.255
Sending broadcast datagram packet to /172.20.220.105
Sending broadcast datagram packet to /10.0.0.255
Espdu #4 EID=[1,1,2]
DIS coordinates location=[-2707488.3677768684,-4353666.73524437
9
,3781450.3202754413]
BUILD SUCCESSFUL (total time:
5
seconds)
DIS coordinates location=[-2707488.3677768684,-4353666.73524437
8
,3781450.3202754413]
BUILD SUCCESSFUL (total time:
8
seconds)
===================================================
run:
DisExamples.EspduReceiver started...
Bundle size is 1
got PDU of type: edu.nps.moves.dis.EntityStatePdu EID:[1, 1, 2] Location in DIS coordinates: [-2707488.3677768684, -4353666.735244379, 3781450.3202754413]
Bundle size is 1
got PDU of type: edu.nps.moves.dis.FirePdu
Bundle size is 1
got PDU of type: edu.nps.moves.dis.EntityStatePdu EID:[1, 1, 2] Location in DIS coordinates: [-2707488.3677768684, -4353666.735244379, 3781450.3202754413]
Bundle size is 1
got PDU of type: edu.nps.moves.dis.FirePdu
Bundle size is 1
got PDU of type: edu.nps.moves.dis.EntityStatePdu EID:[1, 1, 2] Location in DIS coordinates: [-2707492.9269245286, -4353663.899966802, 3781450.3202754413]
Bundle size is 1
got PDU of type: edu.nps.moves.dis.FirePdu
Bundle size is 1
got PDU of type: edu.nps.moves.dis.EntityStatePdu EID:[1, 1, 2] Location in DIS coordinates: [-2707492.9269245286, -4353663.899966802, 3781450.3202754413]
Bundle size is 1
got PDU of type: edu.nps.moves.dis.FirePdu
Bundle size is 1
got PDU of type: edu.nps.moves.dis.EntityStatePdu EID:[1, 1, 2] Location in DIS coordinates: [-2707488.3677768684, -4353666.735244379, 3781450.3202754413]
Bundle size is 1
got PDU of type: edu.nps.moves.dis.FirePdu
Bundle size is 1
got PDU of type: edu.nps.moves.dis.EntityStatePdu EID:[1, 1, 2] Location in DIS coordinates: [-2707488.3677768684, -4353666.735244379, 3781450.3202754413]
Bundle size is 1
got PDU of type: edu.nps.moves.dis.FirePdu
Bundle size is 1
got PDU of type: edu.nps.moves.dis.EntityStatePdu EID:[1, 1, 2] Location in DIS coordinates: [-2707492.9269245286, -4353663.899966802, 3781450.3202754413]
Bundle size is 1
got PDU of type: edu.nps.moves.dis.FirePdu
Bundle size is 1
got PDU of type: edu.nps.moves.dis.EntityStatePdu EID:[1, 1, 2] Location in DIS coordinates: [-2707492.9269245286, -4353663.899966802, 3781450.3202754413]
Bundle size is 1
got PDU of type: edu.nps.moves.dis.FirePdu
Bundle size is 1
got PDU of type: edu.nps.moves.dis.EntityStatePdu EID:[1, 1, 2] Location in DIS coordinates: [-2707488.3677768684, -4353666.735244379, 3781450.3202754413]
Bundle size is 1
got PDU of type: edu.nps.moves.dis.FirePdu
Bundle size is 1
got PDU of type: edu.nps.moves.dis.EntityStatePdu EID:[1, 1, 2] Location in DIS coordinates: [-2707488.3677768684, -4353666.735244379, 3781450.3202754413]
Bundle size is 1
got PDU of type: edu.nps.moves.dis.FirePdu
DisExamplesOpenDis7.EspduReceiver started...
PDU not implemented. Type = OTHER
received PDU 1 ENTITY_STATE of type edu.nps.moves.dis7.EntityStatePdu
ID triplet: [1, 1, 2]
Location in DIS coordinates: [-2707488.3677768684, -4353666.735244378, 3781450.3202754413]
PDU not implemented. Type = OTHER
received PDU 2 FIRE of type edu.nps.moves.dis7.FirePdu
PDU not implemented. Type = OTHER
received PDU 1 ENTITY_STATE of type edu.nps.moves.dis7.EntityStatePdu
ID triplet: [1, 1, 2]
Location in DIS coordinates: [-2707488.3677768684, -4353666.735244378, 3781450.3202754413]
PDU not implemented. Type = OTHER
received PDU 2 FIRE of type edu.nps.moves.dis7.FirePdu
PDU not implemented. Type = OTHER
received PDU 1 ENTITY_STATE of type edu.nps.moves.dis7.EntityStatePdu
ID triplet: [1, 1, 2]
Location in DIS coordinates: [-2707492.9269245286, -4353663.899966802, 3781450.3202754413]
PDU not implemented. Type = OTHER
received PDU 2 FIRE of type edu.nps.moves.dis7.FirePdu
PDU not implemented. Type = OTHER
received PDU 1 ENTITY_STATE of type edu.nps.moves.dis7.EntityStatePdu
ID triplet: [1, 1, 2]
Location in DIS coordinates: [-2707492.9269245286, -4353663.899966802, 3781450.3202754413]
PDU not implemented. Type = OTHER
received PDU 2 FIRE of type edu.nps.moves.dis7.FirePdu
PDU not implemented. Type = OTHER
received PDU 1 ENTITY_STATE of type edu.nps.moves.dis7.EntityStatePdu
ID triplet: [1, 1, 2]
Location in DIS coordinates: [-2707488.3677768684, -4353666.735244378, 3781450.3202754413]
PDU not implemented. Type = OTHER
received PDU 2 FIRE of type edu.nps.moves.dis7.FirePdu
PDU not implemented. Type = OTHER
received PDU 1 ENTITY_STATE of type edu.nps.moves.dis7.EntityStatePdu
ID triplet: [1, 1, 2]
Location in DIS coordinates: [-2707488.3677768684, -4353666.735244378, 3781450.3202754413]
PDU not implemented. Type = OTHER
received PDU 2 FIRE of type edu.nps.moves.dis7.FirePdu
PDU not implemented. Type = OTHER
received PDU 1 ENTITY_STATE of type edu.nps.moves.dis7.EntityStatePdu
ID triplet: [1, 1, 2]
Location in DIS coordinates: [-2707492.9269245286, -4353663.899966802, 3781450.3202754413]
PDU not implemented. Type = OTHER
received PDU 2 FIRE of type edu.nps.moves.dis7.FirePdu
PDU not implemented. Type = OTHER
received PDU 1 ENTITY_STATE of type edu.nps.moves.dis7.EntityStatePdu
ID triplet: [1, 1, 2]
Location in DIS coordinates: [-2707492.9269245286, -4353663.899966802, 3781450.3202754413]
PDU not implemented. Type = OTHER
received PDU 2 FIRE of type edu.nps.moves.dis7.FirePdu
PDU not implemented. Type = OTHER
===================================================
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