Need guru help with Postcode distance search class

Hi Guys!

I need help with a Postcode distance search class. The class is already built but it doesn’t always return the desired results. Has anyone here had experiece in working with complex formulas to calculate distance from one postcode to another (i.e. cm6 to ig7). Also, we need to return the results nearest first.

Thanks in advance guys.