summaryrefslogtreecommitdiffstats
path: root/Parse/MapInverse.java
blob: aa462e4455f71571f929b38fd1248824d60f8762 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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);

}