From 0f726bbaf4371e749d53e12b94619f4fc165e78f Mon Sep 17 00:00:00 2001 From: YaFedImYaEatIm Date: Mon, 19 Sep 2016 08:26:46 +1200 Subject: [PATCH] Added new Sample file and change some parameters in FlightPathParser --- res/Samples/EGLL-CYBB.csv | 34 +++++++++++++++++++ .../group9/Controller/FlightPathParser.java | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 res/Samples/EGLL-CYBB.csv diff --git a/res/Samples/EGLL-CYBB.csv b/res/Samples/EGLL-CYBB.csv new file mode 100644 index 0000000..a0b087f --- /dev/null +++ b/res/Samples/EGLL-CYBB.csv @@ -0,0 +1,34 @@ +APT,EGLL,0,51.47122,-0.46098 +VOR,TNT,34000,53.05389,-1.67000 +VOR,POL,34000,53.74389,-2.10333 +FIX,RIBEL,34000,54.01611,-2.28972 +FIX,SHAPP,34000,54.50000,-2.62722 +FIX,MARGO,34000,54.70750,-2.77472 +VOR,TLA,34000,55.49917,-3.35278 +FIX,NEVIS,34000,56.69528,-4.54472 +VOR,STN,34000,58.20694,-6.18306 +FIX,BILLY,34000,60.01972,-8.56889 +FIX,BARKU,34000,60.60500,-9.41000 +FIX,RATSU,34000,61.00000,-10.00000 +LATLON,620N01000W,35000,62.00000,-10.00000 +FIX,LINDA,35000,62.62167,-10.00000 +FIX,ROSTI,34000,63.40639,-14.11222 +VOR,ING,34000,63.80306,-16.63806 +FIX,MIKLA,34000,63.84833,-17.57417 +FIX,SKARD,34000,63.94278,-20.20500 +FIX,METIL,34000,63.97194,-21.52611 +VOR,KEF,34000,63.98681,-22.61450 +FIX,GIMLI,34000,64.64000,-26.97833 +NDB,DA,34000,65.57056,-37.20694 +LATLON,6700N04000W,34000,67.00000,-40.00000 +LATLON,6800N04500W,34000,68.00000,-45.00000 +LATLON,6900N05000W,34000,69.00000,-50.00000 +NDB,JV,34000,69.24142,-51.07237 +LATLON,7000N05500W,34000,70.00000,-55.00000 +LATLON,7000N06000W,34000,70.00000,-60.00000 +FIX,ADSAM,34000,69.92111,-63.22000 +FIX,N6930,34000,69.50000,-70.00000 +FIX,N6880,34000,68.50000,-80.00000 +NDB,US,34000,68.76722,-81.25639 +NDB,YBB,2600,68.53500,-89.78778 +APT,CYBB,0,68.53444,-89.80806 \ No newline at end of file diff --git a/src/main/java/seng202/group9/Controller/FlightPathParser.java b/src/main/java/seng202/group9/Controller/FlightPathParser.java index 84b7c9f..3c94198 100644 --- a/src/main/java/seng202/group9/Controller/FlightPathParser.java +++ b/src/main/java/seng202/group9/Controller/FlightPathParser.java @@ -108,7 +108,7 @@ public class FlightPathParser extends Parser { continue; } //cehck sizes of [][] eg {3,0} will check if length == 3 or == 0. if -1 the size is ignored - int partSizes[][] = {{3}, {-1}, {-1}, {-1}, {-1}}; + int partSizes[][] = {{3,6}, {-1}, {-1}, {-1}, {-1}}; for (int i = 0; i < partSizes.length; i ++){ boolean passable = false; for (int j = 0; j < partSizes[i].length; j++){