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

report number of packets being sent

parent b670513e
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ public class EspduSender {
*/
public static void main(String args[])
{
System.out.println("DisExamples.EspduSender started...");
System.out.println("DisExamples.EspduSender started... send " + NUMBER_TO_SEND + " ESPDUs, initial index=0");
/**
* an entity state pdu
*/
......@@ -159,8 +159,9 @@ public class EspduSender {
try
{
System.out.println("Sending " + NUMBER_TO_SEND + " ESPDU packets to " + destinationIp.toString());
for (int idx = 0; idx < NUMBER_TO_SEND; idx++) {
// DIS time is a pain in the ass. DIS time units are 2^31-1 units per
for (int index = 0; index < NUMBER_TO_SEND; index++) {
// DIS time is a pain in the uh, neck. DIS time units are 2^31-1 units per
// hour, and time is set to DIS time units from the top of the hour.
// This means that if you start sending just before the top of the hour
// the time units can roll over to zero as you are sending. The receivers
......@@ -200,7 +201,7 @@ public class EspduSender {
// The x and y values will change, but the z value should not.
//lon = lon + (double)((double)idx / 100000.0);
//System.out.println("lla=" + lat + "," + lon + ", 0.0");
double direction = Math.pow((double) (-1.0), (double) (idx));
double direction = Math.pow((double) (-1.0), (double) (index));
lon = lon + (direction * 0.00006);
System.out.println(lon);
......@@ -253,7 +254,7 @@ public class EspduSender {
location = espdu.getEntityLocation();
System.out.println("Espdu #" + idx + " EID=[" + entityID.getSite() + "," + entityID.getApplication() + "," + entityID.getEntity() + "]");
System.out.println("Espdu #" + index + " EID=[" + entityID.getSite() + "," + entityID.getApplication() + "," + entityID.getEntity() + "]");
System.out.println(" DIS coordinates location=[" + location.getX() + "," + location.getY() + "," + location.getZ() + "]");
double c[] = {location.getX(), location.getY(), location.getZ()};
double lla[] = CoordinateConversions.xyzToLatLonDegrees(c);
......
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