Code for friendly portal calculation

This is the initial attempt at generating friendly portal data