# derivation of navigation equation and specific force

I want to process accelerometer and gyroscope data. To correctly track my position I have to account for the Earth's rotation and gravity. I want to know the position in my rotating Earth frame but the data is relative to an inertial frame i.

Since the Earth is rotating, I have this equation for the velocity:

$$\dot{x}_i = \dot{x}_r + \omega \times x_r$$

I derive this equation to get the acceleration:

\begin{aligned} \ddot{x}_i &= \ddot{x}_r + \omega \times \dot{x}_r + \dot{\omega} \times x_r + \omega \times (\dot{x}_r + \omega \times x_r)\\ \ddot{x}_i &= \ddot{x}_r + 2\omega \times \dot{x}_r + \dot{\omega} \times x_r + \omega \times (\omega \times x_r) \end{aligned}

For a constant rotation I get the following result as my relative acceleration:

$$\ddot{x}_r = \ddot{x}_i - 2\omega \times \dot{x}_r - \omega \times (\omega \times x_r)$$

The $\ddot{x}_i$ represents the measured acceleration + gravity. I think.

However I have looked up a few papers on the navigation equation. What I pieced together was this derivation, starting from the same velocity equation:

$$\dot{x}_i = \dot{x}_r + \omega \times x_r$$

they take this derivative:

$$\frac{d\dot{x}_i}{dt} = \frac{d\dot{x}_r}{dt} + \frac{d(\omega \times x_r)}{dt}$$

or with a constant acceleration:

$$\frac{d\dot{x}_i}{dt} = \frac{d\dot{x}_r}{dt} + \omega \times \frac{dx_r}{dt}$$

which turns into:

$$\frac{d\dot{x}_i}{dt} = \frac{d\dot{x}_r}{dt} + \omega \times (\dot{x}_r + \omega \times x_r)$$

This expression is rewritten to:

\begin{aligned} \ddot{x}_i &= \ddot{x}_r + \omega \times \dot{x}_r + \omega \times ( \omega \times x_r)\\ \ddot{x}_r &= \ddot{x}_i - \omega \times \dot{x}_r - \omega \times ( \omega \times x_r) \end{aligned}

With $\ddot{x}_i$ equal to the measured specific force + gravity.

Between what I derive and what I find in the papers there is a factor 2 difference in the term $\omega \times \dot{x}_r$.

Yes, there is a difference in the total and partial derivative of the $\dot{x}_r$ vector. But the force as measured by a MEMS-accelerometer and gyroscope can only correspond to one of either solutions.

Which subtlety am I missing/forgetting here?