public double calcWindow(boolean printWindow){
		if(points.size() == 0) return 0;
		
		WindowChart wc = new WindowChart("Window");
		
		double x1 = this.lowBound[0];
		double x2 = this.upperBound[0];
		double y1 = this.lowBound[1];
		double y2 = this.upperBound[1];

		int iterations = 0;
		double totalWeight = 0.0;
		int recurseIterations = 0;
		for(double x = x1; x <= x2; x = x + this.xgridGranularity){
			for(double y = y1; y <= y2; y = y + this.ygridGranularity){
				double distFromPoint;
				double tileWeight = 0.0;
				double[] currPoint = new double[2];
				double contribution;
				List<Double> nearby = new ArrayList<Double>();
				for(int i = 0; i < this.points.size(); i++){
					iterations++;
					currPoint[0] = x;
					currPoint[1] = y;
					distFromPoint = GPSLib.getDistanceBetween(this.points.get(i).getCoords(),currPoint);
					contribution = (-Init.CoverageWindow.SPACE_WEIGHT / Init.CoverageWindow.SPACE_RADIUS) * distFromPoint + Init.CoverageWindow.SPACE_WEIGHT;
					
					if(contribution > Init.CoverageWindow.SPACE_TRIM){
						contribution /= 100; //convert to probability so getAggProb function can work properly
						nearby.add(contribution * this.points.get(i).getTimeRelevance(
																			Init.CoverageWindow.CURRENT_TIMESTAMP,
																			Init.CoverageWindow.REFERENCE_TIMESTAMP,
																			Init.CoverageWindow.TEMPORAL_DECAY));
					}
				}
				double[] aggResults = new double[2];
				aggResults[0] = 0;
				aggResults[1] = 0;
				List<Double> empty = new ArrayList<Double>();
				this.trimNearby(nearby);
				this.getAggProbability(aggResults,empty,nearby);
				recurseIterations += aggResults[1];
				if(aggResults[0] > 0)
					tileWeight = aggResults[0] * 100;
				else
					tileWeight = 0.0;
				
				if(printWindow){ wc.addData(currPoint,new double[]{tileWeight}); }
				if(tileWeight > 100){
					Init.DebugPrint("size of nearby: " + nearby.size(), 1);
					Init.DebugPrint("non-opt print overflow of space weight: greater probabilty than possible", 1);
					Init.DebugPrint("tileWeight: " + tileWeight, 1);
				}
				totalWeight += tileWeight;

			}
		}
		if(printWindow){ wc.plot(); }		
		double maxWeight = ((x1 - x2) / xgridGranularity) * ((y1 - y2) / ygridGranularity) * Init.CoverageWindow.SPACE_WEIGHT;
		double windowProb = totalWeight / maxWeight * 100;
		Init.DebugPrint("maxWeight: " + maxWeight,3);
		Init.DebugPrint("totalWeight: " + totalWeight,3);
		Init.DebugPrint("#iterations: " + iterations,3);
		Init.DebugPrint("#recurse iterations: " + recurseIterations,3);
		Init.DebugPrint("Window Prob: " + windowProb,3);
		return windowProb;
	}