let's say you have

O (0,0) <-- starting point on X,Y coordinate system, and let's say you have

A (1,1)

B (-1,-1) points

Now IF we check the midpoint for these 2 points it's clearly startPoint(0,0) because it's on the center of it.

But if i understand you correctly - you have A(1,1,5) and B(-1,1,10) where the 3rd number is "weight", meaning that higher value is better, lower is worse - > then we clearly see that B has 2x better value.

Meaning that our spot that we are looking for is going to be startPoint(-0.25,-0,25) (correct me someone if i'm wrong) - > so you pick up that formula and extend it for N points and there you go.

an idea just popped out - sum up all the weights then divide with number of points, then calculate the weighted value - (avg * weight) and you should get their "real" values. should be easier to work with that. also i think you should have weights only > 0, for ease of computation. <0 could cause problems.