<p>I have two ephemerides for <a href="https://en.wikipedia.org/wiki/Orbital_elements" rel="nofollow noreferrer">orbital elements</a>—that is, each contains $a$ (semi-major axis), $e$ (ecc.), $i$ (incl.), $\Omega$ (long. asc. node), $\omega$ (arg. of peri.), $\tau$ (time of peri.), $T$ (period), and a timestamp $t$.</p>

<p>I want to compute a new ephemeris at a point somewhere between these two ephemerides.  For example, the timestamp ($t$) of the new ephemeris can be calculated by a linear interpolation of the start ($t_0$) and end ($t_1$) ephemerides' times as:$$
    t = \text{lerp}(t_0,t_1, x) = t_0 \cdot (1-x) + t_1 \cdot x
$$</p>

<p>Unfortunately, I can't seem to get an interpolation for the other parameters that doesn't have discontinuities in it.  <strong>My question: how <em>should</em> I be interpolating ephemerides?  Maybe I need to do this through some intermediate parameters, like $\varpi$, $\lambda$, or $\nu$?</strong></p>

<hr>

<blockquote>
  <p><sub><sup>For example, if I take $\tau$ from the first ephemeris and lerp everything else, I get a strong discontinuity when mean anomaly is calculated (as $M:=n (t-\tau)=(2 \pi/T) (t - \tau)$).  I suspect this is because the mean anomaly calculation is only valid at the ephemeris, and as e.g. $T$ changes due to interpolation, $M$ changes erroneously.</sup></sub></p>
  
  <p><sub><sup><a href="https://pastebin.com/q934rL9K" rel="nofollow noreferrer">Here</a> is an example for Mercury.  The first three ephemerides come from NASA HORIZONS and are correct.  Interpolating the first two ephemerides produces $M=328^\circ$.  However, two seconds later, the interpolation (which is now interpolating from the last two ephemerides) produces $M=294^\circ$.</sup></sub></p>
</blockquote>

CC BY-SA 3.0
2017-07-02T20:39:45.410Z
@barrycarter The ephemerides are two points from [HORIZONS](https://ssd.jpl.nasa.gov/horizons.cgi), about 1 month apart, for various objects. Interpolating $a$, $e$, $i$, and $T$ (with $\Omega$, $\omega$, and $\tau$ from one endpoint) seems to give workable motion, but results in a small discontinuity at the other endpoint. When I also interpolate (modular-aware) $\Omega$ and $\omega$, I get weird (and large) discontinuities in mean anomaly $M$. What should I look at or what would you like to see?
geometrian
CC BY-SA 3.0
2017-07-03T02:14:38.460Z
@barrycarter I've fixed a few things and added an example for Mercury.
geometrian
<orbital-elements><ephemeris><mathematics>
How Can I Interpolate Ephemerides?
geometrian
# How Can I Interpolate Ephemerides?

(Asked by: username_0 on 2017-07-02)

I have two ephemerides for [orbital elements](https://en.wikipedia.org/wiki/Orbital_elements)—that is, each contains $a$ (semi-major axis), $e$ (ecc.), $i$ (incl.), $\Omega$ (long. asc. node), $\omega$ (arg. of peri.), $\tau$ (time of peri.), $T$ (period), and a timestamp $t$.

I want to compute a new ephemeris at a point somewhere between these two ephemerides. For example, the timestamp ($t$) of the new ephemeris can be calculated by a linear interpolation of the start ($t\_0$) and end ($t\_1$) ephemerides' times as:$$
t = \text{lerp}(t\_0,t\_1, x) = t\_0 \cdot (1-x) + t\_1 \cdot x
$$

Unfortunately, I can't seem to get an interpolation for the other parameters that doesn't have discontinuities in it. **My question: how *should* I be interpolating ephemerides? Maybe I need to do this through some intermediate parameters, like $\varpi$, $\lambda$, or $\nu$?**

---

> For example, if I take $\tau$ from the first ephemeris and lerp everything else, I get a strong discontinuity when mean anomaly is calculated (as $M:=n (t-\tau)=(2 \pi/T) (t - \tau)$). I suspect this is because the mean anomaly calculation is only valid at the ephemeris, and as e.g. $T$ changes due to interpolation, $M$ changes erroneously.
>
> [Here](https://pastebin.com/q934rL9K) is an example for Mercury. The first three ephemerides come from NASA HORIZONS and are correct. Interpolating the first two ephemerides produces $M=328^\circ$. However, two seconds later, the interpolation (which is now interpolating from the last two ephemerides) produces $M=294^\circ$.

**Tags:** orbital-elements, ephemeris, mathematics

> **Comments:**
> **username_0**: @barrycarter The ephemerides are two points from [HORIZONS](https://ssd.jpl.nasa.gov/horizons.cgi), about 1 month apart, for various objects. Interpolating $a$, $e$, $i$, and $T$ (with $\Omega$, $\omega$, and $\tau$ from one endpoint) seems to give workable motion, but results in a small discontinuity at the other endpoint. When I also interpolate (modular-aware) $\Omega$ and $\omega$, I get weird (and large) discontinuities in mean anomaly $M$. What should I look at or what would you like to see?  
> **username_0**: @barrycarter I've fixed a few things and added an example for Mercury.  

---

## 0 answers

