1. A computer-implemented method performed by one or more processors of a mobile device, comprising: receiving sensor measurements from a sensor onboard the mobile device; determining if the device is stationary based on the sensor measurements; if the device is stationary, calculating one or more model parameters for a current temperature from the sensor measurements; and estimating an attitude of the device using the one or more model parameters, where the estimating includes estimating temperature and measurement bias independently.