Integrity Risk Minimisation in RAIM Part 1: Optimal Detector Design. (6th January 2016)