From 17f0980110e4b77d22c30176fb41b9543063fc5d Mon Sep 17 00:00:00 2001 From: brutzman <brutzman@nps.edu> Date: Sat, 22 Jan 2022 17:23:04 -0800 Subject: [PATCH] refactored DisTime utilities package in open-dis7-java library --- .../homework4/Brennenstuhl/BrennenstuhlEspduSender.java | 3 +-- .../homework4/Schutt/SchuttESPDUSender.java | 3 +-- .../homework4/Yurkovich/Yurk_EspduSender.java | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/assignments/src/MV3500Cohort2019JulySeptember/homework4/Brennenstuhl/BrennenstuhlEspduSender.java b/assignments/src/MV3500Cohort2019JulySeptember/homework4/Brennenstuhl/BrennenstuhlEspduSender.java index 3003f9e819..7a54eeae1e 100644 --- a/assignments/src/MV3500Cohort2019JulySeptember/homework4/Brennenstuhl/BrennenstuhlEspduSender.java +++ b/assignments/src/MV3500Cohort2019JulySeptember/homework4/Brennenstuhl/BrennenstuhlEspduSender.java @@ -65,7 +65,6 @@ public class BrennenstuhlEspduSender int port = DEFAULT_MULTICAST_PORT; MulticastSocket socket = null; // must be initialized to avoid later error, even if null; EntityStatePdu espdu = new EntityStatePdu(); - DisTime disTime = new DisTime(); // ICBM coordinates for my office double latitude = 36.595517; @@ -200,7 +199,7 @@ public class BrennenstuhlEspduSender // update the timestamp on ALL packets sent. // An alterative approach: actually follow the standard. It's a crazy concept, // but it might just work. - int timestamp = disTime.getDisAbsoluteTimestamp(); + int timestamp = DisTime.getCurrentDisAbsoluteTimestamp(); espdu.setTimestamp(timestamp); // Set the position of the entity in the world. DIS uses a cartesian diff --git a/assignments/src/MV3500Cohort2019JulySeptember/homework4/Schutt/SchuttESPDUSender.java b/assignments/src/MV3500Cohort2019JulySeptember/homework4/Schutt/SchuttESPDUSender.java index a3f961e58c..77195121af 100644 --- a/assignments/src/MV3500Cohort2019JulySeptember/homework4/Schutt/SchuttESPDUSender.java +++ b/assignments/src/MV3500Cohort2019JulySeptember/homework4/Schutt/SchuttESPDUSender.java @@ -70,7 +70,6 @@ public class SchuttESPDUSender { int port = DEFAULT_MULTICAST_PORT; MulticastSocket socket = null; // must be initialized to avoid later error, even if null; EntityStatePdu espdu = new EntityStatePdu(); - DisTime disTime = new DisTime(); // Entity Location double latitude = 36.595517; @@ -194,7 +193,7 @@ public class SchuttESPDUSender { // update the timestamp on ALL packets sent. // An alterative approach: actually follow the standard. It's a crazy concept, // but it might just work. - int timestamp = disTime.getDisAbsoluteTimestamp(); + int timestamp = DisTime.getCurrentDisAbsoluteTimestamp(); espdu.setTimestamp(timestamp); // Set the position of the entity in the world. DIS uses a cartesian diff --git a/assignments/src/MV3500Cohort2019JulySeptember/homework4/Yurkovich/Yurk_EspduSender.java b/assignments/src/MV3500Cohort2019JulySeptember/homework4/Yurkovich/Yurk_EspduSender.java index 81cf7ccaf0..8455dffd87 100644 --- a/assignments/src/MV3500Cohort2019JulySeptember/homework4/Yurkovich/Yurk_EspduSender.java +++ b/assignments/src/MV3500Cohort2019JulySeptember/homework4/Yurkovich/Yurk_EspduSender.java @@ -61,7 +61,6 @@ public class Yurk_EspduSender int port = DEFAULT_MULTICAST_PORT; MulticastSocket socket = null; // must be initialized to avoid later error, even if null; EntityStatePdu espdu = new EntityStatePdu(); - DisTime disTime = new DisTime(); // ICBM coordinates for my office double latitude = 36.595517; @@ -196,7 +195,7 @@ public class Yurk_EspduSender // update the timestamp on ALL packets sent. // An alterative approach: actually follow the standard. It's a crazy concept, // but it might just work. - int timestamp = disTime.getDisAbsoluteTimestamp(); + int timestamp = DisTime.getCurrentDisAbsoluteTimestamp(); espdu.setTimestamp(timestamp); // Set the position of the entity in the world. DIS uses a cartesian -- GitLab