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
53be76d0
Commit
53be76d0
authored
3 years ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
adjusted reportPdu() format
parent
d6b24d1a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/src/OpenDis7Examples/PduTrack.java
+10
-10
10 additions, 10 deletions
examples/src/OpenDis7Examples/PduTrack.java
examples/src/OpenDis7Examples/PduTrackLog.txt
+51
-51
51 additions, 51 deletions
examples/src/OpenDis7Examples/PduTrackLog.txt
with
61 additions
and
61 deletions
examples/src/OpenDis7Examples/PduTrack.java
+
10
−
10
View file @
53be76d0
...
...
@@ -38,12 +38,12 @@ package OpenDis7Examples;
import
edu.nps.moves.dis7.entities.swe.platform.surface._001Poseidon
;
import
edu.nps.moves.dis7.enumerations.DisPduType
;
import
edu.nps.moves.dis7.enumerations.ForceID
;
import
edu.nps.moves.dis7.pdus.DisTime
;
import
edu.nps.moves.dis7.pdus.EntityID
;
import
edu.nps.moves.dis7.pdus.EntityStatePdu
;
import
edu.nps.moves.dis7.pdus.EulerAngles
;
import
edu.nps.moves.dis7.pdus.Pdu
;
import
edu.nps.moves.dis7.pdus.Vector3Double
;
import
edu.nps.moves.dis7.utilities.DisTime
;
import
edu.nps.moves.dis7.utilities.PduFactory
;
import
java.io.ByteArrayOutputStream
;
import
java.io.DataOutputStream
;
...
...
@@ -85,7 +85,7 @@ public class PduTrack
private
boolean
addLineBreaksWithinKeyValues
=
false
;
protected
PduFactory
pduFactory
=
new
PduFactory
();
PduFactory
.
TimestampStyle
timestampStyle
=
PduFactory
.
TimestampStyle
.
IEEE_ABSOLUTE
;
DisTime
.
TimestampStyle
timestampStyle
=
DisTime
.
TimestampStyle
.
IEEE_ABSOLUTE
;
protected
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
protected
DataOutputStream
dataOutputStream
=
new
DataOutputStream
(
byteArrayOutputStream
);
private
String
TRACE_PREFIX
=
"["
+
(
PduTrack
.
class
.
getSimpleName
())
+
"] "
;
...
...
@@ -102,10 +102,10 @@ public class PduTrack
* Set timestampStyle used by PduFactory
* @param newTimestampStyle new value to set
*/
public
PduTrack
(
PduFactory
.
TimestampStyle
newTimestampStyle
)
public
PduTrack
(
DisTime
.
TimestampStyle
newTimestampStyle
)
{
timestampStyle
=
newTimestampStyle
;
pduFactory
.
setTimestampStyle
(
newTimestampStyle
);
DisTime
.
setTimestampStyle
(
newTimestampStyle
);
}
/**
...
...
@@ -131,7 +131,7 @@ public class PduTrack
* Get timestampStyle used by PduFactory
* @return current timestampStyle
*/
public
PduFactory
.
TimestampStyle
getTimestampStyle
()
public
DisTime
.
TimestampStyle
getTimestampStyle
()
{
return
timestampStyle
;
}
...
...
@@ -140,10 +140,10 @@ public class PduTrack
* @param newTimestampStyle the timestampStyle to set
* @return same object to permit progressive setters
*/
public
PduTrack
setTimestampStyle
(
PduFactory
.
TimestampStyle
newTimestampStyle
)
public
PduTrack
setTimestampStyle
(
DisTime
.
TimestampStyle
newTimestampStyle
)
{
this
.
timestampStyle
=
newTimestampStyle
;
pduFactory
.
setTimestampStyle
(
newTimestampStyle
);
DisTime
.
setTimestampStyle
(
newTimestampStyle
);
return
this
;
}
...
...
@@ -827,13 +827,13 @@ public class PduTrack
public
PduTrack
reportPdu
(
EntityStatePdu
anEspdu
)
{
System
.
out
.
println
(
String
.
format
(
"%08d"
,
anEspdu
.
getTimestamp
())
+
" "
+
DisTime
.
convertToString
(
anEspdu
.
getTimestamp
())
+
", "
+
String
.
format
(
"%s"
,
anEspdu
.
getMarkingString
().
trim
())
+
", "
+
DisTime
.
convertToString
(
anEspdu
.
getTimestamp
())
+
" ("
+
String
.
format
(
"%08d"
,
anEspdu
.
getTimestamp
())
+
"), "
+
"EntityID=("
+
anEspdu
.
getEntityID
().
getSiteID
()
+
", "
+
anEspdu
.
getEntityID
().
getApplicationID
()
+
", "
+
anEspdu
.
getEntityID
().
getEntityID
()
+
") "
+
anEspdu
.
getEntityID
().
getEntityID
()
+
")
,
"
+
"location=("
+
String
.
format
(
"%4.1f"
,
anEspdu
.
getEntityLocation
().
getX
())
+
", "
+
String
.
format
(
"%4.1f"
,
anEspdu
.
getEntityLocation
().
getY
())
+
", "
+
...
...
This diff is collapsed.
Click to expand it.
examples/src/OpenDis7Examples/PduTrackLog.txt
+
51
−
51
View file @
53be76d0
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