Adding Non-Standard Bodies to SPICE using Horizons

In astrodynamics, when you need high-quality Ephemeris data for some celestial body, you generally turn to NASA’s NAIF’s (Navigation and Ancillary Information Facility) SPICE toolkit. Because the setup of SPICE with non-standard bodies is a one-off step and usually the first step in several of my projects, it’s something I only do a handful of times a year. Basically often enough that it’s important, but not often enough to remember the procedure, so this post is a note to future me to refer back to when I inevitably have to do this again.

Obtaining Spice .bsp Files Using HORIZONS

  1. Connect to HORIZIONS using the following telnet command
    1. telnet horizons.jpl.nasa.gov 6775

    2. In a Linux terminal, you should be good to go, but if you’re using command prompt or PowerShell you may need to install/activate telnet
  2. A prompt will appear.
    1. Here is it filled out for CERES
  3. Press “S” to save it as an SPK file
  4. You will need to enter and confirm an email address
  5. You’ll want to then enter in “Binary”, this produces a .bsp file
  6. Next enter in the start date in a YYYY-Mon-DY format
    1. Example “2020-Jan-01”
  7. Next enter in the end date in a YYYY-Mon-DY format
  8. If you need to add in more then one body to the SPK file, enter “YES”, otherwise “NO”
    1. If yes return to step 2
  9. If you choose “NO” you will get the following prompt
  10. Take the full path, put it in your browser, and hit Enter to download the dataset
    1. Note, if you do this and nothing happens you may need to enable support for FTP URLs. In Google Chrome you do this by entering “chrome://flags/” into your URL, hitting enter, and then finding the “Enable support for FTP URLs” setting, which you will need to switch from default to enabled

Want More Gereshes?

If you want to receive new Gereshes blog post directly to your email when they come out, you can sign up for that here!

Don’t want another email? That’s ok, Gereshes also has a twitter account and subreddit!