Receiver Autonomous Integrity Monitoring (RAIM) is a method, used by an aircraft's receiver, for detecting and isolating faulty satellites of the Global Navigation Satellite System (GNSS). In order for a receiver to be able to detect and isolate a faulty satellite using a RAIM algorithm, a couple of conditions must be met: a minimum number of satellites, and an adequate satellite geometry. Due to the highly predictable orbits of the GPS satellites, a RAIM availability prediction can be done easily. A number of RAIM methods exist; however, none of them takes into account the precise terrain masking of the satellites for the specific location. They consider a uniform fixed mask angle over the whole horizon. This paper will introduce the variable mask RAIM algorithm in order to show to what extent the terrain can affect the RAIM availability and how much it differs from the conventional algorithms.