Independently on the business case addressed, one of the main drawbacks of the railway use cases that need continuous Global Navigation Satellite Systems data is the lack of availability for the 100% of the time of the journey. Additionally, the integrity assessment of the position estimation given is also mandatory for safety critical applications. Thus, tunnels and multipath effects are one of the most challenging situations for the continuous positioning systems. In this context, an autonomous on-board Complementary Positioning System has been proposed to overcome the limitation of Global Navigation Satellite System based positioning systems. This paper proposes a positioning enhancement solution by means of fusing data from the satellite navigation system and inertial measurement units. That hybrid solution provides higher availability and accuracy to the positioning specially on known blocked scenarios, such as tunnels, or urban canyons, by means of a novel environment aware map aided software technique named Known Blocked Scenarios algorithm... This paper describes the Complementary Positioning System and the field test carried out in a challenging environment to validate the enhancement proposed by the authors, which demonstrate the benefits that this system has in known harsh environments for railways.