summaryrefslogtreecommitdiffstats
path: root/Parse/MapInverse.java
diff options
context:
space:
mode:
Diffstat (limited to 'Parse/MapInverse.java')
-rw-r--r--Parse/MapInverse.java115
1 files changed, 115 insertions, 0 deletions
diff --git a/Parse/MapInverse.java b/Parse/MapInverse.java
new file mode 100644
index 0000000..aa462e4
--- /dev/null
+++ b/Parse/MapInverse.java
@@ -0,0 +1,115 @@
+package Parse;
+
+import java.util.ArrayList;
+
+import DataStructure.GPScoordinate;
+import DataStructure.GSMMap;
+import DataStructure.SingleBTS;
+
+//do stuff without inverse Map. Just filter out the BTSs that might match
+
+public class MapInverse {
+ private ArrayList<iLut>[] receive;
+
+ public MapInverse(GSMMap map) {
+ // traverse every receive strength
+ // receive array (-47 ... -115) mit allen gefundenen Werten (68
+ // Elemente)
+ // coordinates ListBTS
+ // Funktion, um Verhältnisse zu prüfen (z.B. BTS877 zu 880, etc.)
+
+ // initialize receive
+
+ // SingleBTS[] mapcontent = map.getUniqueBTSlist();
+ // receive = new ArrayList[68];
+ for (int i = 0; i < receive.length; i++) {
+ receive[i] = new ArrayList<iLut>();
+ }
+
+ // traverse GSMmap, fill received
+
+ // ArrayList<Double> receive = new ArrayList<Double>();
+
+ // or maybe: have only two Objekts: one with Strength and one with
+ // Ratio. Ask Both and compare the result
+
+ }
+
+}
+
+/**
+ * Stores information about signalstrength and ratios and coordinates where this
+ * occured.
+ *
+ * @author richy
+ *
+ */
+class BtsLut implements iLut {
+ public int ARFCN;
+ double[] strength = new double[68];
+ ArrayList<GPScoordinate> DL = new ArrayList<GPScoordinate>();
+ ArrayList<GPScoordinate> UL = new ArrayList<GPScoordinate>();
+
+ /**
+ * Define for which ARFCN this GSMLut is for. It will then only take
+ * measurements for this specific ARFCN
+ *
+ * @param ARFCN
+ * Set ARFCN
+ */
+ public BtsLut(SingleBTS ARFCN) {
+ this.ARFCN = ARFCN.ARFCN;
+
+ // create dBm Array
+ for (int i = 0; i < 69; i++) {
+ strength[i] = -115 + i;
+ }
+ }
+
+ public BtsLut(int ARFCN) {
+ this(new SingleBTS(ARFCN, "arfcn set"));
+ }
+
+ public void addMR(SingleBTS MR, GPScoordinate gps) {
+ // do DL first
+ // int hit = Arrays.binarySearch(strength,
+ // (int) (Math.round(MR.getDldB())));
+ // hit is the index where this Coordinate should be added to
+
+ }
+
+ @Override
+ public GPScoordinate getCoord(SingleBTS measuremet) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
+
+class RatioLut extends BtsLut implements iLut {
+
+ public RatioLut(int ARFCN) {
+ super(ARFCN);
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public GPScoordinate getCoord(SingleBTS measuremet) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
+
+/**
+ * Stores information about signalstrength and ratios and coordinates where this
+ * occured. Null when no information is present
+ *
+ * @author richy
+ *
+ */
+
+interface iLut {
+ GPScoordinate getCoord(SingleBTS measuremet);
+
+}