The present invention is related to detecting location of a navigation device using sensor data analysis, where the sensor is coupled to the navigation device. A hierarchical algorithm is used for making a series of decisions regarding the location of the navigation device, with each decision corresponding to a class among a plurality of classes related to the possible motion modes and/or precise location of the device, including the location of the device with respect to a person's body. By accurately identifying the device location, the hierarchical algorithm facilitates in providing relevant contextual information, thereby enhancing situational awareness.