summaryrefslogtreecommitdiffstats
path: root/DoGsmMap.java
blob: dad59fbae2050d9dea0fc22f5841a36cc1e7fbc0 (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
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.sql.SQLException;

import DataStructure.GSMMap;
import DataStructure.GoogleOut;
import DataStructure.Interpolator;
import Parse.NMEAParse;
import Parse.sqlreader;

public class DoGsmMap {

	/**
	 * @param args
	 * @throws SQLException
	 * @throws ClassNotFoundException
	 * @throws IOException
	 */
	public static void main(String[] args) throws ClassNotFoundException,
			SQLException, IOException {

		// richy
		NMEAParse nmeaR = new NMEAParse("Messungen/richy.log");
		long IMSI = 262026003662195l;
		sqlreader sqlR = new sqlreader(nmeaR, IMSI, 2000);
		sqlR.merge(new sqlreader(new NMEAParse("Messungen/richy2.log"), IMSI,
				2000));
		// sqlR.merge(new sqlreader(new NMEAParse("Messungen/richy3.log"), IMSI,
		// 2000));
		sqlR.merge(new sqlreader(new NMEAParse("Messungen/richy4.log"), IMSI,
				2000));
		sqlR.merge(new sqlreader(new NMEAParse("Messungen/richy5.log"), IMSI,
				2000));

		// intermezzo
		GSMMap bla = new GSMMap(new sqlreader(new NMEAParse(
				"Messungen/richy5.log"), IMSI, 3000), 0.00008);
		bla.average();
		bla.removeOutlier();
		GoogleOut blaout = new GoogleOut(bla, "richy-gestern.kml");
		blaout.write();

		GSMMap map_richy = new GSMMap(sqlR, 0.00004);
		map_richy.average();
		map_richy.removeOutlier();
		GoogleOut out = new GoogleOut(map_richy, "richy.kml");
		out.write();

		// kerstin
		NMEAParse nmeaK = new NMEAParse("Messungen/kerstin.log");
		// long IMSIK = 262230000000004l;
		long IMSIK = 262032733192317l;
		sqlreader sqlK = new sqlreader(nmeaK, IMSIK, 2000);
		GSMMap map_kerstin = new GSMMap(sqlK, 0.00004);
		map_kerstin.average();
		map_kerstin.removeOutlier();
		GoogleOut outK = new GoogleOut(map_kerstin, "kerstin.kml");
		outK.write();

		// merge. Ab hier gesammt
		sqlR.merge(sqlK);
		GSMMap richyUndKerstin = new GSMMap(sqlR, 0.00004);
		richyUndKerstin.average();
		richyUndKerstin.removeOutlier();
		GoogleOut richyUndKerstinOut = new GoogleOut(richyUndKerstin,
				"RichyUndKerstin.kml");
		richyUndKerstinOut.write();
		Interpolator RuKI = new Interpolator(sqlR, 0.00008);
		// Interpolator RuKI = new Interpolator(sqlR, 0.00032);
		RuKI.average();
		RuKI.removeOutlier();
		RuKI.interpolateVR();
		GoogleOut interpolationOut = new GoogleOut(RuKI,
				"parallel-strictDB.kml");
		interpolationOut.write();
		// gsmmap speichern
		FileOutputStream fos = new FileOutputStream(
				"D:/parallel-strictdB-BER.obj");
		ObjectOutputStream oos = new ObjectOutputStream(fos);
		System.gc();
		oos.writeObject(RuKI);
		System.out.println("gespeichert");

	}

}