Skip to content
Snippets Groups Projects
Commit 69d30e6a authored by Brutzman, Don's avatar Brutzman, Don
Browse files

tweaks

parent 5aa22b86
No related branches found
No related tags found
No related merge requests found
...@@ -176,8 +176,8 @@ public class ExampleTrackInterpolation extends ExampleSimulationProgram ...@@ -176,8 +176,8 @@ public class ExampleTrackInterpolation extends ExampleSimulationProgram
.createRawWaypoints(); .createRawWaypoints();
System.out.println("pduTrack_1 getEspduCount()=" + pduTrack_1.getEspduCount()); System.out.println("pduTrack_1 getEspduCount()=" + pduTrack_1.getEspduCount());
System.out.println("pduTrack_1 duration = " + pduTrack_1.getTrackDurationSeconds() + " seconds = " + System.out.println("pduTrack_1 duration = " + pduTrack_1.getTotalDurationSeconds() + " seconds = " +
pduTrack_1.getTrackDurationTicks() + " ticks"); pduTrack_1.getTotalDurationTicks() + " ticks");
System.out.println(pduTrack_1.createX3dTimeSensorString()); System.out.println(pduTrack_1.createX3dTimeSensorString());
System.out.println(pduTrack_1.createX3dPositionInterpolatorString()); System.out.println(pduTrack_1.createX3dPositionInterpolatorString());
......
...@@ -13,7 +13,7 @@ run-single: ...@@ -13,7 +13,7 @@ run-single:
[DisThreadedNetworkInterface] createThreads() sendingThread.isAlive()=true [DisThreadedNetworkInterface] createThreads() sendingThread.isAlive()=true
Network confirmation: address=239.1.2.3 port=3000 Network confirmation: address=239.1.2.3 port=3000
Beginning pdu save to directory ./pduLog Beginning pdu save to directory ./pduLog
Recorder log file open: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog132.dislog Recorder log file open: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog165.dislog
[DisThreadedNetworkInterface] using network interface Intel(R) Wi-Fi 6E AX210 160MHz [DisThreadedNetworkInterface] using network interface Intel(R) Wi-Fi 6E AX210 160MHz
[DisThreadedNetworkInterface] datagramSocket.joinGroup address=239.1.2.3 port=3000 isConnected()=false createDatagramSocket() complete. [DisThreadedNetworkInterface] datagramSocket.joinGroup address=239.1.2.3 port=3000 isConnected()=false createDatagramSocket() complete.
[DisThreadedNetworkInterface] createThreads() receiveThread.isAlive()=true [DisThreadedNetworkInterface] createThreads() receiveThread.isAlive()=true
...@@ -60,18 +60,20 @@ Recorder log file open: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\ ...@@ -60,18 +60,20 @@ Recorder log file open: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\
38 Entity location=( 2.0, 0.0, 0.0) WEST 38 Entity location=( 2.0, 0.0, 0.0) WEST
39 Entity location=( 1.0, 0.0, 0.0) WEST 39 Entity location=( 1.0, 0.0, 0.0) WEST
40 Entity location=( 0.0, 0.0, 0.0) WEST 40 Entity location=( 0.0, 0.0, 0.0) WEST
41 Entity location=(-1.0, 0.0, 0.0) WEST
[OpenDis7Examples.ExampleTrackInterpolation] loop termination condition met, simulationComplete=true [OpenDis7Examples.ExampleTrackInterpolation] loop termination condition met, simulationComplete=true
[OpenDis7Examples.ExampleTrackInterpolation] all PDUs successfully sent for this loop, pduList.size()=41 [OpenDis7Examples.ExampleTrackInterpolation] all PDUs successfully sent for this loop (pduSentList.size()=42 total)
pduTrack_1 getEspduCount()=41 [OpenDis7Examples.ExampleTrackInterpolation] pduTrack_1 initialLocation=Vector3Double x:0.0 y:0.0 z:0.0, latestLocation=Vector3Double x:-1.0 y:0.0 z:0.0
pduTrack_1 duration = 41.0 seconds = -1 ticks pduTrack_1 getEspduCount()=42
<TimeSensor DEF='testing123Clock' cycleInterval='41.0' loop='true'/> pduTrack_1 duration = 42.0 seconds = 0 ticks
<PositionInterpolator DEF='testing123Positions' key='0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0' keyValue='0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0,0.0 0.0 0.0'/> <TimeSensor DEF='testing123Clock' cycleInterval='42.0' loop='true'/>
*** setKillSentinelAndInterrupts() killed=true sendingThread.isInterrupted()=false receiveThread.isInterrupted()=true <PositionInterpolator DEF='testing123Positions' key='0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0' keyValue='0.0 0.0 0.0,0.0 1.0 0.0,0.0 2.0 0.0,0.0 3.0 0.0,0.0 4.0 0.0,0.0 5.0 0.0,0.0 6.0 0.0,0.0 7.0 0.0,0.0 8.0 0.0,0.0 9.0 0.0,0.0 10.0 0.0,1.0 10.0 0.0,2.0 10.0 0.0,3.0 10.0 0.0,4.0 10.0 0.0,5.0 10.0 0.0,6.0 10.0 0.0,7.0 10.0 0.0,8.0 10.0 0.0,9.0 10.0 0.0,10.0 10.0 0.0,10.0 9.0 0.0,10.0 8.0 0.0,10.0 7.0 0.0,10.0 6.0 0.0,10.0 5.0 0.0,10.0 4.0 0.0,10.0 3.0 0.0,10.0 2.0 0.0,10.0 1.0 0.0,10.0 0.0 0.0,9.0 0.0 0.0,8.0 0.0 0.0,7.0 0.0 0.0,6.0 0.0 0.0,5.0 0.0 0.0,4.0 0.0 0.0,3.0 0.0 0.0,2.0 0.0 0.0,1.0 0.0 0.0,0.0 0.0 0.0,-1.0 0.0 0.0'/>
*** setKillSentinelAndInterrupts() killed=true sendingThread.isInterrupted()=true receiveThread.isInterrupted()=true
[DisThreadedNetworkInterface PduRecorder] close(): pdus2send.size()=0 baos.size()=0 dos.size()=0 [DisThreadedNetworkInterface PduRecorder] close(): pdus2send.size()=0 baos.size()=0 dos.size()=0
*** killThread() status: sendingThread.isAlive()=false sendingThread.isInterrupted()=true *** killThread() status: sendingThread.isAlive()=false sendingThread.isInterrupted()=true
*** killThread() status: receiveThread.isAlive()=false receiveThread.isInterrupted()=true *** killThread() status: receiveThread.isAlive()=false receiveThread.isInterrupted()=true
*** Thread close status: sendingThread.isAlive()=false receiveThread.isAlive()=false *** Thread close status: sendingThread.isAlive()=false receiveThread.isAlive()=false
PduRecorder.selfTest() stop() closing recorder log file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog132.dislog PduRecorder.stop() closing recorder log file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog165.dislog
[OpenDis7Examples.ExampleTrackInterpolation] complete. [OpenDis7Examples.ExampleTrackInterpolation] complete.
BUILD SUCCESSFUL (total time: 11 seconds) BUILD SUCCESSFUL (total time: 12 seconds)
...@@ -159,6 +159,10 @@ public class PduTrack ...@@ -159,6 +159,10 @@ public class PduTrack
deepCopyEspdu.setMarking (((EntityStatePdu)newPdu).getMarking()); deepCopyEspdu.setMarking (((EntityStatePdu)newPdu).getMarking());
deepCopyEspdu.setEntityLocation (((EntityStatePdu)newPdu).getEntityLocation()); deepCopyEspdu.setEntityLocation (((EntityStatePdu)newPdu).getEntityLocation());
deepCopyEspdu.setEntityOrientation(((EntityStatePdu)newPdu).getEntityOrientation()); deepCopyEspdu.setEntityOrientation(((EntityStatePdu)newPdu).getEntityOrientation());
// TODO apparently not working
// EntityStatePdu deepCopyEspdu = ((EntityStatePdu)newPdu).copy();
pduList.add(deepCopyEspdu); pduList.add(deepCopyEspdu);
if (initialLocation == null) if (initialLocation == null)
...@@ -279,7 +283,7 @@ public class PduTrack ...@@ -279,7 +283,7 @@ public class PduTrack
* Compute track duration in timestamp ticks * Compute track duration in timestamp ticks
* @return duration in timestamp ticks between initial and final ESPDU timestamps in waypointList * @return duration in timestamp ticks between initial and final ESPDU timestamps in waypointList
*/ */
public int getTrackDurationTicks() public int getTotalDurationTicks()
{ {
int initialTime = -1; int initialTime = -1;
int finalTime = -1; int finalTime = -1;
...@@ -311,18 +315,18 @@ public class PduTrack ...@@ -311,18 +315,18 @@ public class PduTrack
* Compute track duration in seconds * Compute track duration in seconds
* @return duration in seconds between initial and final ESPDU timestamps in waypointList * @return duration in seconds between initial and final ESPDU timestamps in waypointList
*/ */
public float getTrackDurationSeconds() public float getTotalDurationSeconds()
{ {
if (defaultWaypointInterval > 0) if (defaultWaypointInterval > 0)
{ {
return getEspduCount() * defaultWaypointInterval; return getEspduCount() * defaultWaypointInterval;
} }
else if (getTrackDurationTicks() < 0) else if (getTotalDurationTicks() < 0)
durationSeconds = getTrackDurationTicks() * 1.0f; // TODO convert durationSeconds = getTotalDurationTicks() * 1.0f; // TODO convert
return durationSeconds; return durationSeconds;
} }
/** /**
* Create waypoints and angles using all PDU points * Create waypoints and angles using all ESPDU points, with no linear regression or array reduction.
* @return same object to permit progressive setters * @return same object to permit progressive setters
*/ */
public PduTrack createRawWaypoints() public PduTrack createRawWaypoints()
...@@ -363,7 +367,7 @@ public class PduTrack ...@@ -363,7 +367,7 @@ public class PduTrack
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("<TimeSensor"); sb.append("<TimeSensor");
sb.append(" DEF='").append(getX3dTimeSensorDEF()).append("'"); sb.append(" DEF='").append(getX3dTimeSensorDEF()).append("'");
sb.append(" cycleInterval='").append(String.valueOf(getTrackDurationSeconds())).append("'"); sb.append(" cycleInterval='").append(String.valueOf(getTotalDurationSeconds())).append("'");
sb.append(" loop='true'"); sb.append(" loop='true'");
sb.append("/>"); sb.append("/>");
...@@ -457,7 +461,7 @@ public class PduTrack ...@@ -457,7 +461,7 @@ public class PduTrack
System.out.println(TRACE_PREFIX + "getEspduCount()=" + pduTrack.getEspduCount()); System.out.println(TRACE_PREFIX + "getEspduCount()=" + pduTrack.getEspduCount());
System.out.println(TRACE_PREFIX + "getDefaultWaypointInterval()=" + pduTrack.getDefaultWaypointInterval()); System.out.println(TRACE_PREFIX + "getDefaultWaypointInterval()=" + pduTrack.getDefaultWaypointInterval());
System.out.println(TRACE_PREFIX + "getTrackDurationSeconds()=" + pduTrack.getTrackDurationSeconds()); System.out.println(TRACE_PREFIX + "getTotalDurationSeconds()=" + pduTrack.getTotalDurationSeconds());
System.out.println(TRACE_PREFIX + "selfTest() complete."); System.out.println(TRACE_PREFIX + "selfTest() complete.");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment