Skip to content
Snippets Groups Projects
Commit 35aba020 authored by Brian's avatar Brian
Browse files

No commit message

No commit message
parent caacaa86
No related branches found
No related tags found
No related merge requests found
1,1,66,1,225,1,1,1,2,36.595517,-121.877000
1,1,65,1,225,1,1,1,2,36.595701,-121.876903
1,1,11,1,225,1,1,1,2,36.595600,-121.876800
1,1,12,1,225,1,1,1,4,36.595602,-121.876802
1,1,13,1,225,1,1,1,5,36.595598,-121.876800
1,1,14,1,225,1,1,1,2,36.595596,-121.876802
1,1,21,1,225,1,1,1,2,36.595000,-121.876900
1,1,22,1,225,1,1,1,4,36.595002,-121.876902
1,1,23,1,225,1,1,1,5,36.594998,-121.876900
1,1,24,1,225,1,1,1,2,36.594996,-121.876902
1,1,31,1,225,1,1,1,2,36.595700,-121.876900
1,1,32,1,225,1,1,1,4,36.595702,-121.876902
1,1,33,1,225,1,1,1,5,36.595698,-121.876900
1,1,34,1,225,1,1,1,2,36.595696,-121.876902
1,1,07,1,225,1,6,1,1,36.595600,-121.877010
1,1,04,1,225,1,7,12,1,36.595601,-121.877012
1,1,77,1,225,1,3,14,0,36.595599,-121.877011
#exerciseID,#siteID,#entityID,#entityKind,#Country,#Domain,#Category,#Subcategory,#special,#lat,#long
1,1,66,1,225,1,1,1,2,36.5955,-121.875
1,1,65,1,225,1,1,1,2,36.588,-121.882
1,1,11,1,225,1,1,1,2,36.596,-121.877
1,1,12,1,225,1,1,1,4,36.597,-121.878
1,1,13,1,225,1,1,1,5,36.594,-121.878
1,1,14,1,225,1,1,1,2,36.595,-121.877
1,1,21,1,225,1,1,1,2,36.603,-121.88
1,1,22,1,225,1,1,1,4,36.604,-121.881
1,1,23,1,225,1,1,1,5,36.601,-121.881
1,1,24,1,225,1,1,1,2,36.602,-121.88
1,1,31,1,225,1,1,1,2,36.588,-121.88
1,1,32,1,225,1,1,1,4,36.589,-121.881
1,1,33,1,225,1,1,1,5,36.586,-121.881
1,1,34,1,225,1,1,1,2,36.587,-121.88
1,1,7,1,225,1,6,1,1,36.5956,-121.87701
1,1,4,1,225,1,7,12,1,36.596,-121.878
1,1,77,1,225,1,3,14,,36.595,-121.879
......@@ -171,11 +171,19 @@ public static void main(String args[]) throws FileNotFoundException
for (int idx =0; idx<10; idx++){
scanner = new Scanner(inputFile); //this scanner reads from the .csv file identified by fileName
//this next line is only necesary if the .csv has a header row. this has the
//scanner read the line and gets ready for the parsing in the while loop.
//if the .csv does not have a header, comment out this line or you will miss the first entity.
scanner.nextLine();
//this section reads through the .csv and parses it to send out as an espdu.
while(scanner.hasNextLine()) {
String line = scanner.nextLine();
//System.out.println(line);
String[] splits;
splits = line.split(",");
if (splits[0].startsWith("#")) continue;
//this section parse each line into the component necessary to build a DIS ESPDU;
int kind = Integer.parseInt(splits[3]);
int country = Integer.parseInt(splits[4]);
......@@ -189,7 +197,7 @@ public static void main(String args[]) throws FileNotFoundException
float entityLon = Float.parseFloat(splits[10]);
//System.out.println(entityLon);
//Thi section provides the ESPDU its entity specific information
//This section provides the ESPDU its entity specific information
entityID.setEntity(bumperNumber);
EntityType entityType = espdu.getEntityType();
entityType.setEntityKind((short) kind); // Platform (vs lifeform, munition, sensor, etc.)
......
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