The absolute orientation of a phone is of importance in a variety of applications, e.g., navigation, augmented reality, photography, etc. Phone sensors, e.g., gyroscope, etc. can determine relative changes in orientation, but absolute orientation is generally poorly known or unknown. Absolute orientation is not factory-set, and if it is set, requires periodic recalibration. This disclosure provides techniques to determine absolute orientation of a phone by imaging celestial bodies, e.g., sun, moon, etc. Once the absolute orientation is determined, phone sensors measure relative changes in orientation and thereby keep track of absolute orientation