The terrain-aided navigation problem is a highly nonlinear estimation problem with application to aircraft navigation and missile guidance. In this work the Bayesian approach is used to estimate the aircraft position. With a quantization of the state space an implementable algorithm is found. Problems with low excitation, rough terrain and parallel position hypothesis are handled in a reliable way. The algorithm is evaluated using simulations on real terrain databases.