public Location toLocation() {

		// Create positive yaw and calculate terminal angle
		double yaw = Math.atan(Math.abs(x/z));
		if (x < 0 && z > 0)
			yaw = Math.PI - yaw;
		else if (x < 0 && z < 0)
			yaw = Math.PI + yaw;
		else if (x > 0 && z < 0)
			yaw = 2 * Math.PI - yaw;

		double h = Math.sqrt(Math.pow(x, 2) + Math.pow(z, 2));

		// Positive pitch for looking up, negative for looking down.
		double pitch = Math.atan(Math.abs(y/h));
		if (y < 0)
			pitch = -pitch;

		return new Location(origin.getX(), origin.getY(), origin.getZ(), yaw, pitch);
	}