In environments where GNSS is unavailable or not useful for positioning, the use of low cost MEMS-based inertial sensors has paved a way to a more cost effective solution. Of particular interest is a foot mounted pedestrian navigation system, where zero velocity updates (ZUPT) are used with the standard strapdown navigation algorithm in a Kalman filter to restrict the error growth of the low cost inertial sensors. However heading drift still remains despite using ZUPT measurements since the heading error is unobservable. External sensors such as magnetometers are normally used to mitigate this problem, but the reliability of such an approach is questionable because of the existence of magnetic disturbances that are often very difficult to predict. Hence there is a need to eliminate the heading drift problem for such a low cost system without relying on external sensors to give a possible stand-alone low cost inertial navigation system. In this paper, a novel and effective algorithm for generating heading measurements from basic knowledge of the orientation of the building in which the pedestrian is walking is proposed to overcome this problem. The effectiveness of this approach is demonstrated through three field trials using only a forward Kalman filter that can work in real-time without any external sensors. This resulted in position accuracy better than 5 m during a 40 minutes walk, about 0·1% in position error of the total distance. Due to its simplistic algorithm, this simple yet very effective solution is appealing for a promising future autonomous low cost inertial navigation system.