<p>The Skyfield docs don't show a way to import orbital elements directly, but it can <a href="https://rhodesmill.org/skyfield/api-iokit.html#skyfield.iokit.load_file" rel="nofollow noreferrer">read</a> any BSP format ephemeris you have.
If you <a href="https://ssd.jpl.nasa.gov/x/spk.html" rel="nofollow noreferrer">request</a> a HORIZONS-generated binary SPK file for the comet, that might be enough to do the job.</p>

CC BY-SA 4.0
2020-07-09T10:50:22.140Z
Oh that's great news! These are not exactly the same, but seem related: https://space.stackexchange.com/a/19263/12102 and https://space.stackexchange.com/q/28087/12102 and https://space.stackexchange.com/q/28338/12102
uhoh
CC BY-SA 4.0
2020-07-10T02:57:47.793Z
Skyfield's [changelog](https://rhodesmill.org/skyfield/installation.html) shows that [Kepler Orbits](https://rhodesmill.org/skyfield/kepler-orbits.html) have just been added! Maybe you can mention this in your answer and I can accept? One needs only to upgrade Skyfield to the latest version using `pip install skyfield --upgrade` and then run the demo with `row = comets.loc['C/2020 F3 (NEOWISE)']` and it works. Thanks!
uhoh
CC BY-SA 4.0
2020-07-12T13:28:56.693Z
@uhoh Since you've actually [done this](https://astronomy.stackexchange.com/a/36901), I don't mind if you write that answer.
Mike G
CC BY-SA 4.0
2020-07-12T13:43:56.457Z
okay thanks, It's still experimental and I haven't compared the output to Horizons yet, but I'll try to write it up tomorrow.
uhoh
CC BY-SA 4.0
2020-07-09T10:39:30.503Z
2020-07-09T10:39:30.503Z
Mike G
<p>I'd like to get <code>.altaz(next_several_weeks)</code> of this comet from <a href="https://rhodesmill.org/skyfield/" rel="nofollow noreferrer">Skyfield</a> and <code>.separation_from()</code> other planets.</p>
<p>It reads the JPL development ephemerides and can import star catalogs, but is there a way to add some orbital elements for a given comet or asteroid from some standard database and at least approximately propagate them to get an astrometric position and and all the other goodies Skyfield can provide from there?</p>
<p>If so, are these the best places to find the appropriate orbital elements for comet NEOWISE C/2020 F3?</p>
<hr />
<ul>
<li><p><a href="https://minorplanetcenter.net/mpec/K20/K20G05.html" rel="nofollow noreferrer">https://minorplanetcenter.net/mpec/K20/K20G05.html</a></p>
</li>
<li><p><a href="https://astronomy.stackexchange.com/a/29545/7982">this answer</a></p>
</li>
<li><p><a href="https://www.projectpluto.com/find_orb.htm" rel="nofollow noreferrer">find_orb</a> (from <a href="https://astronomy.stackexchange.com/a/35756/7982">this answer</a>)</p>
</li>
<li><p>From <a href="https://ssd.jpl.nasa.gov/horizons.cgi" rel="nofollow noreferrer">Horizons</a>:</p>
</li>
</ul>
<p><a href="https://i.sstatic.net/ea20U.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ea20U.png" alt="https://ssd.jpl.nasa.gov/horizons.cgi" /></a></p>
<pre><code>JPL/HORIZONS                 NEOWISE (C/2020 F3)           2020-Jul-09 02:25:23
Rec #:90004465 (+COV) Soln.date: 2020-Jun-16_22:44:15      # obs: 353 (70 days)
 
IAU76/J2000 helio. ecliptic osc. elements (au, days, deg., period=Julian yrs):
 
  EPOCH=  2458958.5 ! 2020-Apr-19.0000000 (TDB)    RMSW= n.a.
   EC= .9991762343449366   QR= .2946766901808353   TP= 2459034.1806295365
   OM= 61.00968684540688   W= 37.27670558969492    IN= 128.9375082086831
   A= 357.7190774701175    MA= 359.9889750746684   ADIST= 715.1434782500542
   PER= 6765.8344565066    N= .000145677           ANGMOM= .01320322
   DAN= .32818             DDN= 2.87461            L= 35.4449114
   B= 28.1060796           MOID= .362501           TP= 2020-Jul-03.6806295365
 
Comet physical (GM= km^3/s^2; RAD= km):
   GM= n.a.                RAD= n.a.
   M1=  10.9     M2=  14.9     k1=  17.25  k2=  5.      PHCOF=  .030
 
COMET comments 
1: soln ref.= JPL#10, data arc: 2020-03-27 to 2020-06-05
2: k1=17.25, k2=5., phase coef.=0.03;
</code></pre>
<p><a href="https://i.sstatic.net/2NEv6.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2NEv6m.jpg" alt="I can haz comets?" /></a></p>

<orbital-mechanics><comets><ephemeris><skyfield>
Can I calculate the apparent position of comet NEOWISE C/2020 F3 from a topographic position with Skyfield?
uhoh
# Can I calculate the apparent position of comet NEOWISE C/2020 F3 from a topographic position with Skyfield?

(Asked by: username_0 on 2020-07-09)

I'd like to get .altaz(next_several_weeks) of this comet from Skyfield and .separation_from() other planets.
It reads the JPL development ephemerides and can import star catalogs, but is there a way to add some orbital elements for a given comet or asteroid from some standard database and at least approximately propagate them to get an astrometric position and and all the other goodies Skyfield can provide from there?
If so, are these the best places to find the appropriate orbital elements for comet NEOWISE C/2020 F3?


https://minorplanetcenter.net/mpec/K20/K20G05.html

this answer

find_orb (from this answer)

From Horizons:



JPL/HORIZONS                 NEOWISE (C/2020 F3)           2020-Jul-09 02:25:23
Rec #:90004465 (+COV) Soln.date: 2020-Jun-16_22:44:15      # obs: 353 (70 days)
 
IAU76/J2000 helio. ecliptic osc. elements (au, days, deg., period=Julian yrs):
 
  EPOCH=  2458958.5 ! 2020-Apr-19.0000000 (TDB)    RMSW= n.a.
   EC= .9991762343449366   QR= .2946766901808353   TP= 2459034.1806295365
   OM= 61.00968684540688   W= 37.27670558969492    IN= 128.9375082086831
   A= 357.7190774701175    MA= 359.9889750746684   ADIST= 715.1434782500542
   PER= 6765.8344565066    N= .000145677           ANGMOM= .01320322
   DAN= .32818             DDN= 2.87461            L= 35.4449114
   B= 28.1060796           MOID= .362501           TP= 2020-Jul-03.6806295365
 
Comet physical (GM= km^3/s^2; RAD= km):
   GM= n.a.                RAD= n.a.
   M1=  10.9     M2=  14.9     k1=  17.25  k2=  5.      PHCOF=  .030
 
COMET comments 
1: soln ref.= JPL#10, data arc: 2020-03-27 to 2020-06-05
2: k1=17.25, k2=5., phase coef.=0.03;

**Tags:** orbital-mechanics, comets, ephemeris, skyfield


---

## 1 answers

### Answer by username_1 on 2020-07-09. Score: 1

The Skyfield docs don't show a way to import orbital elements directly, but it can [read](https://rhodesmill.org/skyfield/api-iokit.html#skyfield.iokit.load_file) any BSP format ephemeris you have.
If you [request](https://ssd.jpl.nasa.gov/x/spk.html) a HORIZONS-generated binary SPK file for the comet, that might be enough to do the job.

> **Comments:**
> **username_0**: Oh that's great news! These are not exactly the same, but seem related: https://space.stackexchange.com/a/19263/12102 and https://space.stackexchange.com/q/28087/12102 and https://space.stackexchange.com/q/28338/12102  
> **username_0**: Skyfield's [changelog](https://rhodesmill.org/skyfield/installation.html) shows that [Kepler Orbits](https://rhodesmill.org/skyfield/kepler-orbits.html) have just been added! Maybe you can mention this in your answer and I can accept? One needs only to upgrade Skyfield to the latest version using `pip install skyfield --upgrade` and then run the demo with `row = comets.loc['C/2020 F3 (NEOWISE)']` and it works. Thanks!  
> **username_1**: @username_0 Since you've actually [done this](https://astronomy.stackexchange.com/a/36901), I don't mind if you write that answer.  
> **username_0**: okay thanks, It's still experimental and I haven't compared the output to Horizons yet, but I'll try to write it up tomorrow.  

---

