This paper presents the development of a PNS (Pedestrian Navigation System), which utilizes accelerometer, gyroscope and magnetometer data to enable accurate positioning. Therefore, the sensor basics as well as the mathematics regarding reference frames and coordinate transformations are introduced initially. Particular focus is given to quaternions, since they provide a performance-effective means to execute rotations. In great detail the two distinct approaches for a PNS are introduced, i.e. INS (inertial navigation systems) and PDR (pedestrian dead reckoning). For each, a comparison of state-of-the-art techniques is presented. Special attention is paid to orientation estimation and stance phase detection. Our system combines the most promising techniques and describes improvements, whose usefulness becomes obvious in our experiments. We have applied our PNS in five different test scenarios. For the most complex rectangular-shaped use case, we achieve on average error of 1.66% with regard to the total travelled distance, which is superior to other recent PNS utilizing comparable sensors.