Introduction: Aging and age-associated disorders such as Parkinson's disease (PD) are often associated with turning difficulties, which can lead to falls and fractures. Valid assessment of turning and turning deficits specifically in non-standardized environments may foster specific treatment and prevention of consequences. Methods: Relative orientation, obtained from 3D-accelerometer and 3D-gyroscope data of a sensor worn at the lower back, was used to develop an algorithm for turning detection and qualitative analysis in PD patients and controls in non-standardized environments. The algorithm was validated with a total of 2,304 turns >= 90 degrees extracted from an independent dataset of 20 PD patients during medication ON-and OFF-conditions and 13 older adults. Video observation by two independent clinical observers served as gold standard. Results: In PD patients under medication OFF, the algorithm detected turns with a sensitivity of 0.92, a specificity of 0.89, and an accuracy of 0.92. During medication ON, values were 0.92, 0.78, and 0.83. In older adults, the algorithm reached validation values of 0.94, 0.89, and 0.92. Turning magnitude (difference, 0.06 degrees; SEM, 0.14 degrees) and duration (difference, 0.004 s; SEM, 0.005 s) yielded high correlation values with gold standard. Overall accuracy for direction of turning was 0.995. Intra class correlation of the clinical observers was 0.92. Conclusion: This wearable sensor-and relative orientation-based algorithm yields very high agreement with clinical observation for the detection and evaluation of >= 90 degrees turns under non-standardized conditions in PD patients and older adults. It can be suggested for the assessment of turning in daily life.