In military operations, soldiers need location and terrain information regarding the operational field to lead to successful military tasks. The global positioning system (GPS) is a common method for localization, but GPS signals are unreliable and even susceptible to deception. In addition, GPS-based localization provides location information that lacks important terrain features such as cliffs, stairs, or obstacles. In this paper, we present a pedestrian tracking system that automatically detects terrain features and constructs a terrain map for a mountain. Our goal is to track a user's location and to provide an accurate terrain map for military operations without relying on the existing infrastructure. The scheme estimates a terrain feature using an inertial smartphone sensor and uses group information to improve the robustness of the map construction. A prototype is implemented in a smartphone to evaluate its performance on a mountain. Despite the inherent tracking errors caused by noisy sensors, the proposed system successfully constructed a terrain map.