Your comments

Ok, thanks, I got the formula. What I don't understand is why would you insert Average and Minimal constants, this induces me in error.
What I get is a fake visibility as long as you multiply my real position in SERP by .5 or .1, something which lowers my positioning.. Still don't get the role of the two constants, but this can be me.

The two constants would only make sense for you, as ranking tool, telling me - say - what is the competition for a specific keyword (Like Google's Keyword planner), not asking me to assign a weight because all I want is to find out the highest potential (maximal weight in your case) of every keyword, including the secondary ones (and then I may adjust them).

Also, I want to draw the attention on Pi variable, namely that it currently represents the arithmetical average position of keywords, when it should represent the weighted average, this would be the right formula in my opinion.