Using DE441 ephemerides

Have a question about using Celestia? Check here first for FAQs and helpful advice.
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Avatar
Topic author
Autumn Fish
Posts: 9
Joined: 11.07.2023
With us: 10 months 18 days

Using DE441 ephemerides

Post #1by Autumn Fish » 11.07.2023, 04:57

Hi everyone! I know I'm new here, but I've been trying to do something with Celestia for a while now and I've kind of reached the end of what I can figure out on my own.

I am running Celestia Version 1.6.3 (5) on macOS Ventura 13.4.1 (22F82) on a 2023-model MacBook Pro with the Apple M2 Pro.

I am in the process of writing a novel that takes place at the Earth–Sun L4 point in the 5500s or so. A key point to certain things in the story—both in the narrative itself but also in the backstory—are based on particular astronomical events, particularly planetary conjunctions.

To this end, I am wanting to be able to see what the sky would look like from the Earth–Sun L4 point in the year 5500 or so, particularly for planetary positions. I recognize that at a certain point, we have limited powers of prediction, but I would like to be reasonably accurate. I do not care about rotation data or image textures or anything like that; I just want to know where the planets are relative to each other and the "fixed stars" (modulo proper motion, but I'm okay with handwaving that a little) from the perspective of someone at the Earth-Sun L4 point.

However, in using Celestia for this, I have discovered that after the year 4000, the position of Earth drifts rapidly relative to the fixed stars year-over-year for the same date. This can be easily demonstrated by opening Celestia, moving the camera to have a "top-down" view of the solar system, selecting the Sun, and hitting F to follow it; and then using time-skip functionality, look at Earth's position on March 21 year-over-year. From 2023 to 4000, the Earth year-over-year slowly drifts clockwise from around 195° (on the ecliptic grid) to 175°—but from 4000 onward, every four years it makes a significant jump counterclockwise, appearing to get back to 195° by 4124 or so. The initial slow drift passes my vibe check based on the precession of the axes; but the drift from 4000 onward seems problematic.

On the Discord, it was suggested that this was because Celestia uses VSOP 87 internally—however, Stellarium also uses VSOP87 and does not appear to also have this drift. (I cannot use Stellarium for this task because of the aforementioned "this is all at L4" requirement).

It was then suggested that it might be possible to change Celestia away from VSOP87 to using the DE441 ephemerides, which theoretically go all the way to the 17000s or so, which is well beyond what I would need for my purposes.

Someone on the Discord helpfully linked me to this thread: viewtopic.php?f=2&t=23176 which I have been trying to follow (at least, the parts I care about), but using de441.bsp instead of de440.bsp (which I assume is DE440, and is more limited).

To this end, I downloaded de441.bsp from ftp://ssd.jpl.nasa.gov//pub/eph/planets/bsp/de441.bsp

When I run it through brief I get the following output:

Code: Select all

> brief -c de441.bsp

BRIEF -- Version 4.1.0, September 17, 2021 -- Toolkit Version N0067


Summary for: de441.bsp

Bodies: MERCURY BARYCENTER (1) w.r.t. SOLAR SYSTEM BARYCENTER (0)
        VENUS BARYCENTER (2) w.r.t. SOLAR SYSTEM BARYCENTER (0)
        EARTH BARYCENTER (3) w.r.t. SOLAR SYSTEM BARYCENTER (0)
        MARS BARYCENTER (4) w.r.t. SOLAR SYSTEM BARYCENTER (0)
        JUPITER BARYCENTER (5) w.r.t. SOLAR SYSTEM BARYCENTER (0)
        SATURN BARYCENTER (6) w.r.t. SOLAR SYSTEM BARYCENTER (0)
        URANUS BARYCENTER (7) w.r.t. SOLAR SYSTEM BARYCENTER (0)
        NEPTUNE BARYCENTER (8) w.r.t. SOLAR SYSTEM BARYCENTER (0)
        PLUTO BARYCENTER (9) w.r.t. SOLAR SYSTEM BARYCENTER (0)
        SUN (10) w.r.t. SOLAR SYSTEM BARYCENTER (0)
        MERCURY (199) w.r.t. MERCURY BARYCENTER (1)
        VENUS (299) w.r.t. VENUS BARYCENTER (2)
        MOON (301) w.r.t. EARTH BARYCENTER (3)
        EARTH (399) w.r.t. EARTH BARYCENTER (3)
        Start of Interval (ET)              End of Interval (ET)
        -----------------------------       -----------------------------
        13201 B.C. MAY 06 00:00:00.000      17191 MAR 15 00:00:00.000


This appears to be in order.

I then wrote a file, SolarSystem.SPICE.ssc, which looks like this:

Code: Select all

 ReferencePoint "Mercury_bary" "Sol"
  {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"

  OrbitFrame     { EclipticJ2000 { Center "SSB"}}
  Visible        true
  Clickable      true
 
  SpiceOrbit
  {
    Kernel       "de441.bsp"
    Target       "1"
    Origin       "1"
    Period        0.25
    BoundingRadius 1e10
    }
   }
 
  ReferencePoint "Venus_bary" "Sol"
    {
    Beginning      "-13201 05 06 00:00:00.000"
    Ending         "17191 03 15 00:00:00.000"
     
      OrbitFrame     { EclipticJ2000 { Center "SSB"}}
      Visible        true
      Clickable      true
     
      SpiceOrbit
      {
        Kernel       "de441.bsp"
        Target       "2"
        Origin       "2"
        Period        1
        BoundingRadius 1e10
      }
    }
   
    ReferencePoint "Earth_bary" "Sol"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"
     
      OrbitFrame     { EclipticJ2000 { Center "SSB"}}
      Visible        true
      Clickable      true
         
      SpiceOrbit
      {
        Kernel       "de441.bsp"
        Target       "3"
        Origin       "3"
        Period        1
        BoundingRadius 1e10
      }     
    }
       
    ReferencePoint "Mars_bary" "Sol"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"
     
      OrbitFrame     { EclipticJ2000 { Center "SSB"}}
      Visible        true
      Clickable      true
      SpiceOrbit
      {
        Kernel       "de441.bsp"
        Target       "4"
        Origin       "4"
        Period        2
        BoundingRadius 1e10
      }
    }
       
    ReferencePoint "Jupiter_bary" "Sol"
    {   
      Beginning      "1549 12 31 00:00:00.000"
      Ending         "2650 01 25 00:00:00.000"
     
      OrbitFrame { EclipticJ2000 { Center "SSB"}}
      Visible true
      Clickable true
     
      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "5"
        Origin "5"
        Period  12
        BoundingRadius 1e10
      }     
    }
 
 ReferencePoint "Saturn_bary" "Sol"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"

      OrbitFrame { EclipticJ2000 { Center "SSB"}}
      Visible true
      Clickable true

      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "6"
        Origin "6"
        Period  12
        BoundingRadius 1e10
      }
    }

 ReferencePoint "Uranus_bary" "Sol"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"

      OrbitFrame { EclipticJ2000 { Center "SSB"}}
      Visible true
      Clickable true

      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "7"
        Origin "7"
        Period  12
        BoundingRadius 1e10
      }
    }

 ReferencePoint "Neptune_bary" "Sol"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"

      OrbitFrame { EclipticJ2000 { Center "SSB"}}
      Visible true
      Clickable true

      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "8"
        Origin "8"
        Period  12
        BoundingRadius 1e10
      }
    }


I then opened the Celestia application package and inserted them as follows:

Code: Select all

/Applications/Celestia.app/Contents/Resources/CelestiaResources/extras/SpiceSolarSystem/data/Solarsystem.SPICE.ssc
/Applications/Celestia.app/Contents/Resources/CelestiaResources/extras/SpiceSolarSystem/data/de441.bsp


I have other things in that extras directory already that I believe are being read, and the relevant line from my celestia.cfg is:

Code: Select all

ExtrasDirectories  [ "extras-standard" "extras" ]


However, when I run Celestia again, I continue to see the orbital drift for Earth.

To this end, I would like to know: is this the proper path for having Celestia use different ephemerides than VSOP87 provides—notably, DE441—in order to get a more accurate prediction of where Earth and the other planets will be in the 5500s?

(Keeping in mind again that yes, I know it has fairly large error bars, but if a different data set slash algorithm has smaller error bars and lead to more sensical options, I would like to use that instead)

Assuming the answer to that question is yes, are there any obvious steps I am missing in getting this set up in my installation of Celestia? Furthermore, are there any steps I can take in terms of debugging—for example, log files—to confirm that Celestia is properly picking up my new SSC file and attendant BSP data, and if there are any errors it's encountering along the way that might be causing it to revert to VSOP87 or whatever it's doing under the hood?

Thank you!

onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 5 years 8 months

Post #2by onetwothree » 11.07.2023, 08:26

1) Open console (press ~) and check if your file is loaded correctly.
2) It doesn't look that your file changes Earth orbit. You have default definition for Earth and the new one for Earth_bary.

Avatar
John Van Vliet
Posts: 2940
Joined: 28.08.2002
With us: 21 years 9 months

Post #3by John Van Vliet » 11.07.2023, 12:28

Solarsystem.SPICE.ssc
dose not go in the data folder , it goes in "SpiceSolarSystem"

only the spice kernels go in " data"

you also need to make sure that the Apple version of Celestia is built with spice enabled

i do not use apple so i do not know if it is or not

Avatar
Topic author
Autumn Fish
Posts: 9
Joined: 11.07.2023
With us: 10 months 18 days

Post #4by Autumn Fish » 11.07.2023, 13:04

1) Open console (press ~) and check if your file is loaded correctly.

It looks like the console only keeps the last 10 messages or so, and by the time I can hit ~ to open it the first half of mine is things like:

Code: Select all

- Failed loading Sol2Box
- Failed loading Sol3Box
- Failed loading Sol4Box


etc.

Is there a way to view console history, and/or make it longer?

2) It doesn't look that your file changes Earth orbit. You have default definition for Earth and the new one for Earth_bary.

Okay. How do I do that? I have updated the file with:

Code: Select all

        ReferencePoint "Earth" "Earth_bary"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"
     
      OrbitFrame     { EclipticJ2000 { Center "SSB"}}
      Visible        true
      Clickable      true
         
      SpiceOrbit
      {
        Kernel       "de441.bsp"
        Target       "3"
        Origin       "399"
        Period        1
        BoundingRadius 1e10
      }     
    }



I have also moved SolarSystem.SPICE.ssc into the data folder, so it now looks like:

Code: Select all

SpiceSolarSystem/
├── Solarsystem.SPICE.ssc
└── data
    └── de441.bsp


I am still seeing the drift.

you also need to make sure that the Apple version of Celestia is built with spice enabled

How do I do this?

Avatar
gironde M
Posts: 823
Joined: 16.12.2016
Age: 71
With us: 7 years 5 months
Location: Montigny-Les-Metz, France

Post #5by gironde » 11.07.2023, 15:57

It looks like the console only keeps the last 10 messages or so, and by the time I can hit ~ to open it the first half of mine is things like:

edit 'celestia.cfg' and in last line modify
LogSize 10
(LogSize 20000)

Added after 1 minute 35 seconds:
in
OrbitFrame { EclipticJ2000 { Center "SSB"}}
what is "SSB" ?

Avatar
Topic author
Autumn Fish
Posts: 9
Joined: 11.07.2023
With us: 10 months 18 days

Post #6by Autumn Fish » 11.07.2023, 17:41

I made changes to /Applications/Celestia.app/Contents/Resources/CelestiaResources/celestia.cfg

I changed the line from

Code: Select all

# LogSize 1000


(so commented out, so it should have just used the default of 200?)

to

Code: Select all

LogSize 20000


To no avail. I find it weird because the comment says the default log size is 200, but I was clearly only getting 10 lines. I also changed it to 2, and it didn't have an impact. VS Code can't find any other files in the Contents folder that include "LogSize", so I don't know why it's not having an impact.

What is "SSB"?

I don't rightly know; I'm not particularly familiar with SSC syntax. That was just copied over the other ReferencePoint objects. Should that be changed to something else? If so, what?

Avatar
SevenSpheres
Moderator
Posts: 822
Joined: 08.10.2019
With us: 4 years 7 months

Post #7by SevenSpheres » 11.07.2023, 17:48

gironde wrote:in
OrbitFrame { EclipticJ2000 { Center "SSB"}}
what is "SSB" ?

Solar System Barycenter.
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED

Avatar
Topic author
Autumn Fish
Posts: 9
Joined: 11.07.2023
With us: 10 months 18 days

Post #8by Autumn Fish » 11.07.2023, 20:33

Ah, it would seem that with the console open, if I hit Enter, I can then use arrow keys to navigate it. I did not realize that!

Anyways, now, scrolling through, it does look like it's loading the SPK file extras/SpiceSolarSystem/data/de441.bsp

It then gives me the error:

Code: Select all

Error in .ssc file (line 170): parent body 'Earth_bary' of 'Earth' not found.


Line 170 is the line after my `ReferencePoint "Earth" "Earth_bary"` block closes, so it's possible something dealing with that?

However, earlier in the file, I do have `ReferencePoint "Earth_bary" "Sol"` so I'm not sure why it's not able to refer back to that? Or should I have Earth refer back to Sol instead of Earth_bary?

Furthermore it loads extra/lua_universal_tools_v5/Adds/Geomagnetic_Field/Geomagnetic_Field.ssc and I get this error as well:

Code: Select all

Error in .ssc file (line 19): warning duplicate definition of Sol/Earth


Could this be giving me trouble as well? Would just taking away the geomagnetic field (which I don't care about) by removing that SSC possibly ameliorate this somehow?

Avatar
John Van Vliet
Posts: 2940
Joined: 28.08.2002
With us: 21 years 9 months

Post #9by John Van Vliet » 12.07.2023, 02:29

Error in .ssc file (line 170): parent body 'Earth_bary' of 'Earth' not found.

odd error for the Earth , you did edit my ssc file to use the 441 kernel?

de441 has the earth orbit

i take it you are using the ssc file i put in that tutorial

for mercury ,venus, and earth the 441 bsp file should work

now Mars and jupiter, and saturn and the rest you will need a different set of kernels

Avatar
Topic author
Autumn Fish
Posts: 9
Joined: 11.07.2023
With us: 10 months 18 days

Post #10by Autumn Fish » 12.07.2023, 03:35

you did edit my ssc file to use the 441 kernel?

To the best of my knowledge, yes, plus the additional thing for Earth relative to Earth barycenter per onetwothree's comment. Here is the full text of the SSC file as it currently stands:

Code: Select all

 ReferencePoint "Mercury_bary" "Sol"
  {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"

  OrbitFrame     { EclipticJ2000 { Center "SSB"}}
  Visible        true
  Clickable      true
 
  SpiceOrbit
  {
    Kernel       "de441.bsp"
    Target       "1"
    Origin       "1"
    Period        0.25
    BoundingRadius 1e10
    }
   }
 
  ReferencePoint "Venus_bary" "Sol"
    {
    Beginning      "-13201 05 06 00:00:00.000"
    Ending         "17191 03 15 00:00:00.000"
     
      OrbitFrame     { EclipticJ2000 { Center "SSB"}}
      Visible        true
      Clickable      true
     
      SpiceOrbit
      {
        Kernel       "de441.bsp"
        Target       "2"
        Origin       "2"
        Period        1
        BoundingRadius 1e10
      }
    }
   
    ReferencePoint "Earth_bary" "Sol"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"
     
      OrbitFrame     { EclipticJ2000 { Center "SSB"}}
      Visible        true
      Clickable      true
         
      SpiceOrbit
      {
        Kernel       "de441.bsp"
        Target       "3"
        Origin       "3"
        Period        1
        BoundingRadius 1e10
      }     
    }
       
    ReferencePoint "Mars_bary" "Sol"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"
     
      OrbitFrame     { EclipticJ2000 { Center "SSB"}}
      Visible        true
      Clickable      true
      SpiceOrbit
      {
        Kernel       "de441.bsp"
        Target       "4"
        Origin       "4"
        Period        2
        BoundingRadius 1e10
      }
    }
       
    ReferencePoint "Jupiter_bary" "Sol"
    {   
      Beginning      "1549 12 31 00:00:00.000"
      Ending         "2650 01 25 00:00:00.000"
     
      OrbitFrame { EclipticJ2000 { Center "SSB"}}
      Visible true
      Clickable true
     
      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "5"
        Origin "5"
        Period  12
        BoundingRadius 1e10
      }     
    }
 
 ReferencePoint "Saturn_bary" "Sol"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"

      OrbitFrame { EclipticJ2000 { Center "SSB"}}
      Visible true
      Clickable true

      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "6"
        Origin "6"
        Period  12
        BoundingRadius 1e10
      }
    }

 ReferencePoint "Uranus_bary" "Sol"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"

      OrbitFrame { EclipticJ2000 { Center "SSB"}}
      Visible true
      Clickable true

      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "7"
        Origin "7"
        Period  12
        BoundingRadius 1e10
      }
    }

 ReferencePoint "Neptune_bary" "Sol"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"

      OrbitFrame { EclipticJ2000 { Center "SSB"}}
      Visible true
      Clickable true

      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "8"
        Origin "8"
        Period  12
        BoundingRadius 1e10
      }
    }

        ReferencePoint "Earth" "Earth_bary"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"
     
      OrbitFrame     { EclipticJ2000 { Center "SSB"}}
      Visible        true
      Clickable      true
         
      SpiceOrbit
      {
        Kernel       "de441.bsp"
        Target       "3"
        Origin       "399"
        Period        1
        BoundingRadius 1e10
      }     
    }


The error is occurring on the line after that last curly bracket (which is empty)

It's possible I got something wrong within there, but I'm not familiar enough with the SSC format to easily root it out.

now Mars and jupiter, and saturn and the rest you will need a different set of kernels

For sure. Once I get the Earth acting like I want it to, I was going to head in that direction—though I don't care at all about their moons. I just need their orbits. (Since as noted, this is all "what the sky looks like [to an unaided eye] from L4")

Avatar
SevenSpheres
Moderator
Posts: 822
Joined: 08.10.2019
With us: 4 years 7 months

Post #11by SevenSpheres » 12.07.2023, 14:15

Autumn Fish wrote:ReferencePoint "Earth" "Earth_bary"

Earth_bary orbits the Sun, so for Celestia to find it this needs to be:

ReferencePoint "Earth" "Sol/Earth_bary"

but that's still not modifying Earth, just adding a reference point called "Earth". Looking at the SPICE tutorial, I see that this post has code to actually replace the inner planets.
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED

Avatar
Topic author
Autumn Fish
Posts: 9
Joined: 11.07.2023
With us: 10 months 18 days

Post #12by Autumn Fish » 12.07.2023, 16:58

Ah, I didn't realize that SSC also had things for replacing Earth; for some reason, I thought just setting the barycenter's orbit would do the job.

So, I did that—modifying Earth—and it's now kind of screwed up. Here is the relevant part of the SSC:

Code: Select all

##
## EARTH
##

ReferencePoint "Earth_bary" "Sol"
{
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"
     
  OrbitFrame     { EclipticJ2000 { Center "SSB" } }
  Visible        true
  Clickable      true
         
  SpiceOrbit
  {
    Kernel       "de441.bsp"
    Target       "3"
    Origin       "3"
    Period        1
    BoundingRadius 1e10
  }     
}

Modify "Earth" "Sol"
{
  Timeline
  [
    # Before SPICE
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }
      Ending   "1600 01 01 00:00:00.000"
      CustomOrbit "vsop87-earth"
      CustomRotation "iau-earth"
    }
    # SPICE
    {
      OrbitFrame { EclipticJ2000 { Center "Sol/Earth_bary" } }
      BodyFrame { EclipticJ2000 { Center "Sol" } }
      Ending    "2500 01 01 00:00:00.000"  # less 2 month for orbit
      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "399"
        Origin "3"
        Period 1
        BoundingRadius 1e10
      }     
      SpiceRotation
      {
        Kernel       
        [
          "pck00010.tpc"
          "naif0012.tls"
          "earth_fixed.tf"
        ]
        Frame                 "EARTH_FIXED"
      }     
    }   
    # After Spice
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }     
      CustomOrbit "vsop87-earth"
      CustomRotation "iau-earth"
    }   
  ]       
}


I have taken out the ReferencePoint "Earth" because presumably I don't need that? I also shifted from Replace to Modify per other comments in that thread. (Not doing so gave me Earth as a featureless sphere, because I don't have the textures)

My dates are very limited here (1500–2500) so that I can more easily debug what's going on. Going outside those dates appears to do the right thing, and even within those dates it appears to do the right thing relative to Earth_bary. However!

It seems like Earth_bary is set up incorrectly, as it wants to just sit at the Solar System Barycenter as near as I can tell. Is it possible I did something wrong in setting up that barycenter? (This may be because I don't understand what "target" and "origin" reference, necessarily, so it's possible I have the wrong values there). The same thing happens when I switch to de440.bsp, just to check.

Also a thought: what I'm replacing is "Earth" "Sol", but for this I want to move "Earth" to be around "Earth_bary", so is it possible that something is messed up there, as well?

Avatar
Topic author
Autumn Fish
Posts: 9
Joined: 11.07.2023
With us: 10 months 18 days

Post #13by Autumn Fish » 15.07.2023, 00:54

AHA! After several hours of fiddling and hacking and trying different things, I think I have found the problem.

In my SSC defining all the things, I had Origin wrong; it should be the other number on the brief line, not the same as target. So for instance I had Earth with an Origin of "3" and it should be "0" while the Target should remain "3".

That seems to have finally fixed my problem and given me what I need. It's a little more finicky in terms of doing stuff with the L4 point, but I can work within that, and it's probably a function of "still not super proficient with this software".

Earth's orbit currently does not always render correctly (it sometimes only shows a portion of it), but since for my purposes I want orbits turned off anyways, that's fine with me.

Next step is getting all the rest of the planets updated, and then making the barycenters aren't visible/clickable, since they're just noise for me right now.

Thank you all for your help!

Avatar
John Van Vliet
Posts: 2940
Joined: 28.08.2002
With us: 21 years 9 months

Post #14by John Van Vliet » 15.07.2023, 01:38

Code: Select all

ReferencePoint "Earth_bary" "Sol"
    {
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"
     
      OrbitFrame     { EclipticJ2000 { Center "SSB"}}
      Visible        true
      Clickable      true
         
      SpiceOrbit
      {
        Kernel       "de441.bsp"
        Target       "3"
        Origin       "3"
        Period        1
        BoundingRadius 1e10
      }     
    }


you have an error in the barycenter code

" Origin "3" "
-- needs to be ---
" Origin "0" "

Avatar
Topic author
Autumn Fish
Posts: 9
Joined: 11.07.2023
With us: 10 months 18 days

Post #15by Autumn Fish » 15.07.2023, 02:07

For future reference/help for someone else coming through here later who might want to do similar, this is my SSC file:

Code: Select all

##
## MERCURY
##

ReferencePoint "Mercury_bary" "Sol"
{
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"

  OrbitFrame     { EclipticJ2000 { Center "SSB" } }
  Visible        true
  Clickable      false
 
  SpiceOrbit
  {
    Kernel       "de441.bsp"
    Target       "1"
    Origin       "0"
    Period        0.25
    BoundingRadius 1e10
  }
}

Modify "Mercury" "Sol"
{
  Timeline
  [
    # Before SPICE
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }
      Ending "-13201 07 06 00:00:00.000"
      CustomOrbit "vsop87-mercury"
      CustomRotation "iau-mercury"
    }
    # SPICE
    {
      OrbitFrame { EclipticJ2000 { Center "Sol/Mercury_bary" } }
      BodyFrame { EclipticJ2000 { Center "Sol" } }
      Ending    "17191 01 15 00:00:00.000"
      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "199"
        Origin "1"
        Period 0.2441
        BoundingRadius 1e10
      }     
      SpiceRotation
      {
        Kernel       
        [
          "pck00010.tpc"
          "naif0012.tls"
        ]
        Frame "IAU_MERCURY"
      }     
    }   
    # After Spice
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }     
      CustomOrbit "vsop87-mercury"
      CustomRotation "iau-mercury"
    }   
  ]       
}

##
## VENUS
##

ReferencePoint "Venus_bary" "Sol"
{
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"
 
  OrbitFrame     { EclipticJ2000 { Center "SSB" } }
  Visible        true
  Clickable      false
   
  SpiceOrbit
  {
    Kernel       "de441.bsp"
    Target       "2"
    Origin       "0"
    Period        0.615
    BoundingRadius 1e10
  }
}

Modify "Venus" "Sol"
{
  Timeline
  [
    # Before SPICE
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }
      Ending "-13201 07 06 00:00:00.000"
      CustomOrbit "vsop87-venus"
      CustomRotation "iau-venus"
    }
    # SPICE
    {
      OrbitFrame { EclipticJ2000 { Center "Sol/Venus_bary" } }
      BodyFrame { EclipticJ2000 { Center "Sol" } }
      Ending    "17191 01 15 00:00:00.000"
      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "299"
        Origin "2"
        Period 0.615
        BoundingRadius 1e10
      }     
      SpiceRotation
      {
        Kernel       
        [
          "pck00010.tpc"
          "naif0012.tls"
        ]
        Frame "IAU_VENUS"
      }     
    }   
    # After Spice
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }     
      CustomOrbit "vsop87-venus"
      CustomRotation "iau-venus"
    }   
  ]       
}

##
## EARTH
##


ReferencePoint "Earth_bary" "Sol"
{
  Beginning      "-13201 05 06 00:00:00.000"
  Ending         "17191 03 15 00:00:00.000"
     
  OrbitFrame     { EclipticJ2000 { Center "SSB" } }
  Visible        true
  Clickable      false
         
  SpiceOrbit
  {
    Kernel       "de441.bsp"
    Target       "3"
    Origin       "0"
    Period        1
    BoundingRadius 1e10
  }     
}

Modify "Earth" "Sol"
{
  Timeline
  [
    # Before SPICE
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }
      Ending "-13201 07 06 00:00:00.000"
      CustomOrbit "vsop87-earth"
      CustomRotation "iau-earth"
    }
    # SPICE
    {
      OrbitFrame { EclipticJ2000 { Center "Sol/Earth_bary" } }
      BodyFrame { EclipticJ2000 { Center "Sol" } }
      Ending    "17191 01 15 00:00:00.000"
      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "399"
        Origin "3"
        Period 1
        BoundingRadius 1e10
      }     
      SpiceRotation
      {
        Kernel       
        [
          "pck00010.tpc"
          "naif0012.tls"
          "earth_fixed.tf"
        ]
        Frame "EARTH_FIXED"
      }     
    }   
    # After Spice
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }     
      CustomOrbit "vsop87-earth"
      CustomRotation "iau-earth"
    }   
  ]       
}
     
##
## MARS
##
       
Modify "Mars" "Sol"
{
  Timeline
  [
    # Before SPICE
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }
      Ending "-13201 07 06 00:00:00.000"
      CustomOrbit "vsop87-mars"
      CustomRotation "iau-mars"
    }
    # SPICE
    {
      BodyFrame { EclipticJ2000 { Center "Sol" } }
      Ending    "17191 01 15 00:00:00.000"
      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "4"
        Origin "0"
        Period 1.88
        BoundingRadius 1e10
      }     
      SpiceRotation
      {
        Kernel       
        [
          "pck00010.tpc"
          "naif0012.tls"
        ]
        Frame "IAU_MARS"
      }     
    }   
    # After Spice
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }     
      CustomOrbit "vsop87-mars"
      CustomRotation "iau-mars"
    }   
  ]       
}

##
## JUPITER
##

Modify "Jupiter" "Sol"
{
  Timeline
  [
    # Before SPICE
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }
      Ending "-13201 07 06 00:00:00.000"
      CustomOrbit "vsop87-jupiter"
      CustomRotation "iau-jupiter"
    }
    # SPICE
    {
      BodyFrame { EclipticJ2000 { Center "Sol" } }
      Ending    "17191 01 15 00:00:00.000"
      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "5"
        Origin "0"
        Period 11.8618
        BoundingRadius 1e10
      }     
      SpiceRotation
      {
        Kernel       
        [
          "pck00010.tpc"
          "naif0012.tls"
        ]
        Frame "IAU_JUPITER"
      }     
    }   
    # After Spice
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }     
      CustomOrbit "vsop87-jupiter"
      CustomRotation "iau-jupiter"
    }   
  ]       
}

##
## SATURN
##

Modify "Saturn" "Sol"
{
  Timeline
  [
    # Before SPICE
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }
      Ending "-13201 07 06 00:00:00.000"
      CustomOrbit "vsop87-saturn"
      CustomRotation "iau-saturn"
    }
    # SPICE
    {
      BodyFrame { EclipticJ2000 { Center "Sol" } }
      Ending    "17191 01 15 00:00:00.000"
      SpiceOrbit
      {
        Kernel "de441.bsp"
        Target "6"
        Origin "0"
        Period 29.4571
        BoundingRadius 1e10
      }     
      SpiceRotation
      {
        Kernel       
        [
          "pck00010.tpc"
          "naif0012.tls"
        ]
        Frame "IAU_SATURN"
      }     
    }   
    # After Spice
    {
      BodyFrame { EquatorJ2000 { Center "Sol" } }     
      CustomOrbit "vsop87-saturn"
      CustomRotation "iau-saturn"
    }   
  ]       
}


Some notes:

1. I only went out through Saturn, because that's all I need. Uranus, Neptune, and Pluto are invisible to the naked eye from the Earth-Sun L4 location, so I don't care if I have less-accurate position predictions for them.

2. Because the other suggested files (for Mars, Jupiter, and Saturn) don't actually provide data up through the years I need them to, I defaulted to simply using their barycenters instead. I may at some point actually do the same to Mercury and Venus, and possibly even to Earth, just for simplicity. I recognize that this is off by some amount, but since I am dealing with naked-eye observers and we're dealing with an imprecision over the millennia anyways, I do not think the difference will be enough to matter for my purposes.

3. You will notice I don't really care about rotation. This is because of my particular needs.

4. Goodness gracious I would love an extension to add SSC syntax highlighting and manipulation to VS Code.

Avatar
gironde M
Posts: 823
Joined: 16.12.2016
Age: 71
With us: 7 years 5 months
Location: Montigny-Les-Metz, France

Post #16by gironde » 15.07.2023, 08:08

you should avoid using the "_" character in object names. I think it is misinterpreted.

Added after 6 minutes 38 seconds:
OrbitFrame { EclipticJ2000 { Center "SSB"}}
SSB = Solar System Barycenter

This name as an object must be defined in a file.

Avatar
SevenSpheres
Moderator
Posts: 822
Joined: 08.10.2019
With us: 4 years 7 months

Post #17by SevenSpheres » 15.07.2023, 14:12

gironde wrote:OrbitFrame { EclipticJ2000 { Center "SSB"}}
SSB = Solar System Barycenter

This name as an object must be defined in a file.

nearstars.stc, line 41

Code: Select all

Barycenter "Solar System Barycenter:SSB"
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED

Avatar
Topic author
Autumn Fish
Posts: 9
Joined: 11.07.2023
With us: 10 months 18 days

Post #18by Autumn Fish » 15.07.2023, 14:21

gironde wrote:you should avoid using the "_" character in object names. I think it is misinterpreted.

Am I allowed to use spaces instead, then? Or should it just be CamelCase? That is, would it be better to say "Mars Barycenter" or "MarsBarycenter"?

Though for that I was mostly just going based off of that other tutorial, and it seems to have worked at this point.

Avatar
John Van Vliet
Posts: 2940
Joined: 28.08.2002
With us: 21 years 9 months

Post #19by John Van Vliet » 15.07.2023, 21:23

Apple is a BSD ( Berkley Software Distribution) type of operation system and as such is in the UNIX family

a " _" underscore is just fine

now Blank Spaces can cause problems sometimes


Return to “Help Central”