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
- Connect to HORIZIONS using the following telnet command
-
telnet horizons.jpl.nasa.gov 6775
- 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
-
- A prompt will appear.
- Here is it filled out for CERES
- Here is it filled out for CERES
- Press “S” to save it as an SPK file
- You will need to enter and confirm an email address
- You’ll want to then enter in “Binary”, this produces a .bsp file
- Next enter in the start date in a YYYY-Mon-DY format
- Example “2020-Jan-01”
- Next enter in the end date in a YYYY-Mon-DY format
- If you need to add in more then one body to the SPK file, enter “YES”, otherwise “NO”
- If yes return to step 2
- If you choose “NO” you will get the following prompt
- Take the full path, put it in your browser, and hit Enter to download the dataset
- 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!