public static Line2D.Double longestVectorWithSignalStrength(List<Measurement> measurements, int threshold) {
		int strongestPos = -1;
		HashSet<Integer> items = Generate.randomInts(threshold, measurements.size(), null);

		for(int i : items) {
			if(strongestPos < 0) {
				strongestPos = i;
				continue;
			}
			if(measurements.get(i).getSignalStrength() > measurements.get(strongestPos).getSignalStrength()) {
				strongestPos = i;
			}
		}
		System.out.println("funnet strongest");

		items = Generate.randomInts(threshold, measurements.size(), strongestPos);
		System.out.printf("strongestPos=%d, RSS=%d\n", strongestPos, measurements.get(strongestPos).getSignalStrength());
		for(int i : items) {
			System.out.println(i);
		}
		LinkedList<Integer> weakest = new LinkedList<Integer>();
		for(Integer i : items) {
			if(weakest.size() < 5) {
				weakest.add(i);
				continue;
			}
			for(int j = 0; j < weakest.size(); j++) {
				if(measurements.get(i).getSignalStrength() < measurements.get(weakest.get(j)).getSignalStrength()) {
					weakest.remove(j);
					weakest.add(j, i);
					break;
				}
			}
		}
		System.out.println("funnet de svakeste");
		double angleSum = 0.0;
		for(Integer i : weakest) {
			angleSum += Math.toDegrees(Geom.angle(new Line2D.Double(
					measurements.get(strongestPos).getCoordinates(), 
					measurements.get(i).getCoordinates())));
		}
		double longestVectorAngle = angleSum / weakest.size();
		double longestVectorLength = measurements.get(strongestPos).getCoordinates().distance(
				measurements.get(weakest.peekFirst()).getCoordinates());
		System.out.println("funnet lv");

		return Geom.toCartesian(longestVectorAngle, longestVectorLength, measurements.get(strongestPos).getCoordinates());
	}