1. A computer-implemented method for estimating an attitude of a device, the method comprising: obtaining, by one or more computing devices, an initial candidate attitude; determining, by the one or more computing devices, a plurality of expected double differenced carrier phase values based on the initial candidate attitude; inputting, by the one or more computing devices, the plurality of expected double differenced carrier phase values into a cost function, wherein the cost function respectively compares the plurality of expected double differenced carrier phase values to a plurality of measured double differenced carrier phase values; minimizing, by the one or more computing devices, the cost function; and selecting, by the one or more computing devices, a final candidate attitude associated with the minimized cost function as the attitude of the device.