A system comprising: - a sensor configured to attach to an anatomy (104, 506) of a patient positioned in a known orientation with respect to gravity, and comprising an optical sensor to generate optical measurements and an inclinometer to generate inclination measurements; - a target configured to provide positional information to the optical sensor, the optical sensor generating the optical measurements using the positional information in up to six degrees of freedom; - a device attached to the target, the device having a shape defining at least one axis (204, 206, 208), wherein the at least one axis is in a known positional relationship with the target; and - an intra-operative computing unit in communication with the sensor, the intra-operative computing unit configured to: - measure a direction of the at least one axis using the optical measurements of the target from the sensor and the known positional relationship between the target and the device; the sensor being attached to the anatomy of the patient positioned in the known orientation with respect to gravity and the at least one axis being in a known positional relationship with the target and the device being aligned with the anatomy while measuring the direction of the at least one axis; - measure a direction of gravity based on the inclination measurements; and - construct a registration coordinate frame of the anatomy to register the anatomy of the patient to the sensor during surgery to provide surgical navigation, the registration coordinate frame of the anatomy being based on the direction of gravity, the direction of the at least one axis and the known orientation of the patient with respect to gravity. - a sensor configured to attach to an anatomy (104, 506) of a patient positioned in a known orientation with respect to gravity, and comprising an optical sensor to generate optical measurements and an inclinometer to generate inclination measurements; - a target configured to provide positional information to the optical sensor, the optical sensor generating the optical measurements using the positional information in up to six degrees of freedom; - a device attached to the target, the device having a shape defining at least one axis (204, 206, 208), wherein the at least one axis is in a known positional relationship with the target; and - an intra-operative computing unit in communication with the sensor, the intra-operative computing unit configured to: - measure a direction of the at least one axis using the optical measurements of the target from the sensor and the known positional relationship between the target and the device; the sensor being attached to the anatomy of the patient positioned in the known orientation with respect to gravity and the at least one axis being in a known positional relationship with the target and the device being aligned with the anatomy while measuring the direction of the at least one axis; - measure a direction of gravity based on the inclination measurements; and - construct a registration coordinate frame of the anatomy to register the anatomy of the patient to the sensor during surgery to provide surgical navigation, the registration coordinate frame of the anatomy being based on the direction of gravity, the direction of the at least one axis and the known orientation of the patient with respect to gravity. - measure a direction of the at least one axis using the optical measurements of the target from the sensor and the known positional relationship between the target and the device; the sensor being attached to the anatomy of the patient positioned in the known orientation with respect to gravity and the at least one axis being in a known positional relationship with the target and the device being aligned with the anatomy while measuring the direction of the at least one axis; - measure a direction of gravity based on the inclination measurements; and - construct a registration coordinate frame of the anatomy to register the anatomy of the patient to the sensor during surgery to provide surgical navigation, the registration coordinate frame