Page 1 of 1

Earth Moon barycentre

Posted: 18.04.2010, 07:34
by lidocorc
Celestia is able to show Pluto and Charon orbiting around their barycentre. For educational purposes I would like to show the same for Earth and Moon (even if their barycentre lies inside the body of Earth.) Can this be done?

lidocorc

Re: Earth Moon barycentre

Posted: 18.04.2010, 09:41
by Chuft-Captain
Yes.

Re: Earth Moon barycentre

Posted: 18.04.2010, 13:02
by lidocorc
The answer is encouraging. So i dare to ask: How can this be done?

Re: Earth Moon barycentre

Posted: 18.04.2010, 14:13
by Hungry4info
Just look at the solarsys.ssc file where Pluto-Charon is declared, you can use that as a template.

Re: Earth Moon barycentre

Posted: 18.04.2010, 15:42
by Chuft-Captain
Hungry4info wrote:Just look at the solarsys.ssc file
I had assumed the OP already had done so... :)

You'll also of course need the masses if you wish to model this with any sort of accuracy: http://en.wikipedia.org/wiki/List_of_Solar_System_objects_by_size

Re: Earth Moon barycentre

Posted: 19.04.2010, 13:55
by Chuft-Captain
FWIW,

Here's a quick first attempt at this which I just threw together now.
(It doesn't work properly yet...perhaps due to incorrect OrbitFrame definitions ... or perhaps it's not possible to override the original CustomOrbits with a Modify statement...)

Anyway, as I need to go to bed now, I thought I'd put it up here anyway, and maybe someone else can get it working properly for you while I sleep! :wink:

cc_EarthMoon.zip
(Unzip to the extras folder.)

Re: Earth Moon barycentre

Posted: 19.04.2010, 16:14
by lidocorc
Thank you, Chuft-Captain, for your file "Earthmoon.ssc". I'm sorry, but I'm not the one to get your modification working porperly, because I'm not familiar with Celestia's syntax. I hope there are others who will find out what is still to be changed in Earthmoon.ssc.

lidocorc

Re: Earth Moon barycentre

Posted: 19.04.2010, 18:19
by VikingTechJPL
Greetings, Chuft-Captain and lidocorc,

Chuft,
For demonstration purposes, the only things your ssc needed were a closing } (curly bracket) and the addition of a 180? Mean Longitude. The latter is because Earth and the Moon are on opposite sides of their barycenter. I've revised your ssc file and attached it.

lidocorc,
All you need to do is unzip the ssc file and copy it into CELESTIA 1.6.0's extras folder. Then restart CELESTIA and you're ready to go.

After you've done the above, here are a few cel:url's you can run to see the effects immediately. The motion of Earth around the barycenter is evident even when we zoom out enough to see both Earth and Moon. Very cool indeed, Chuft!

Earth-Moon Barycenter Demo (Showing Earth and Moon from side)
cel://Follow/Sol:Earth-Moon/2010-03-05T00:35:15.85262?x=AClce8+jxRc&y=EOZVPdTdJf///////////w&z=gOlMxQjxU/L//////////w&ow=0.500664&ox=-0.00806286&oy=-0.865502&oz=0.0132773&select=Sol:Earth-Moon&fov=34.5394&ts=1e+006&ltd=0&p=0&rf=105875&lm=32772&tsrc=0&ver=3

Earth-Moon Barycenter Demo (Showing Earth and Moon from above)
cel://Follow/Sol:Earth-Moon/2010-02-06T06:47:46.20984?x=gOkJcELQ7Qg&y=ADNYhQTMXR8&z=APTb2uAdM/T//////////w&ow=0.331475&ox=0.27136&oy=-0.772326&oz=-0.469043&select=Sol:Earth-Moon&fov=34.5394&ts=1e+006&ltd=0&p=0&rf=105875&lm=32772&tsrc=0&ver=3

Earth-Moon Barycenter Demo (from side and closer to Earth)
cel://Follow/Sol:Earth-Moon/2010-06-08T09:09:49.17210?x=ABaOQMA8ARw&y=wJx8p6hlo/z//////////w&z=AIKJMHPK0ev//////////w&ow=0.453526&ox=0.00706285&oy=-0.889319&oz=0.058099&select=Sol:Earth-Moon&fov=1.52125&ts=500000&ltd=0&p=0&rf=105875&lm=32772&tsrc=0&ver=3


A few considerations:
This particular ssc should be used only for demonstration purposes because it simplifies the Moon's highly irregular orbit to a great degree. The Moon's perigee (average about 363,400 km) and apogee (average about 405,400 km) actually change quite a bit even over relatively short periods (several months), so the barycenter's depth below Earth's surface varies more than that rendered when using a strictly elliptical orbit. In addition, the plane and direction of the axes of the lunar orbit are constantly changing. The inclination of its average plane relative to the Ecliptic varies between about 4.95° and 5.33°, and the orbital axis rotates around the Earth once every 8.9 years. Moreover, the lunar orbit’s ecliptic line of nodes—the line connecting the points where the Moon’s orbit crosses the Ecliptic—rotates westward or backwards (regresses) once every 18.6 years!

Therefore, when you want CELESTIA to accurately show the Moon's position again, just rename the file to something like
EarthMoon rev 01.sscDEMO
and restart CELESTIA. This keeps the file in your extras folder for future demonstration, but makes it unreadable by CELESTIA until you're ready to use it again.

But anytime you want to demonstrate the motions around the barycenter, just rename the file to
EarthMoon rev 01.ssc
and restart CELESTIA.

This gives you the best of both worlds.

If you ever need to show the motions of the Earth-Moon barycenter with continuing accuracy over time, you can use the JPL Ephemerides. http://en.wikibooks.org/wiki/Celestia/JPL_Ephemerides

But if you just need to demonstrate Earth's and the Moon's motions around the barycenter, CC's ssc does a great job.

Enjoy!

Gary

Re: Earth Moon barycentre

Posted: 19.04.2010, 18:53
by VikingTechJPL
A Little Better Accuracy for the Phases:

Here's the demonstration ssc as above, but with the Mean Longitudes of Earth and the Moon adjusted to make the phases more in line with what would be seen on a particular date.

EDIT:
Because the cel:url's in the previous post just work with the EarthMoon rev 01.ssc, here are similar ones that work with revision 2 as attached to this post:

Earth-Moon Barycenter Demo (Showing Earth and Moon from side)
cel://Follow/Sol:Earth-Moon/2010-04-28T09:35:17.56377?x=ANabTE0fZB4&y=YPBGwHBfYAI&z=gLeH4UX58vb//////////w&ow=0.595186&ox=-0.0161813&oy=-0.801281&oz=-0.058653&select=Sol:Earth-Moon&fov=34.5394&ts=500000&ltd=0&p=0&rf=105875&lm=40964&tsrc=0&ver=3

Earth-Moon Barycenter Demo (Showing Earth and Moon from above)
cel://Follow/Sol:Earth-Moon/2010-04-28T05:31:31.54606?x=ECVvadbzDv///////////w&y=AFYWTbpS1yQ&z=gDrt9yeM4/j//////////w&ow=0.354997&ox=0.44626&oy=-0.628954&oz=-0.528437&select=Sol:Earth-Moon&fov=34.5049&ts=500000&ltd=0&p=0&rf=105875&lm=40964&tsrc=0&ver=3

Earth-Moon Barycenter Demo (from side and closer to Earth)
cel://Follow/Sol:Earth-Moon/2010-04-27T15:32:47.75549?x=EHbA0DcoZAE&y=ruDcPORC3////////////w&z=YBfSYL76bP///////////w&ow=0.550052&ox=0.0522235&oy=-0.829078&oz=0.0857058&select=Sol:Earth-Moon&fov=34.5049&ts=500000&ltd=0&p=0&rf=105875&lm=40964&tsrc=0&ver=3

Don't forget to delete revision 01 when you add revision 02 to your extras folder.

Enjoy.

Re: Earth Moon barycentre

Posted: 20.04.2010, 09:42
by Chuft-Captain
VikingTech,

Thanks for your revisions. I was too tired to spot the missing curly brace last night which was preventing it from working so I was pleasantly surprised to see someone had actually finished it off for me.

Regarding enabling/disabling SSC's, these days for this circumstance I prefer to create an alternately configured version of Celestia using a custom config file, which avoids having to constantly enable/disable SSC files by renaming them.

For example for lidocorc's purposes, I would do something like the following...

    1. create a new folder (outside of Celestia's extras path) eg. C:\DEMOS
    2. Put EarthMoon.ssc in this folder.
    3. make a copy of celestia.cfg in this folder also.
    3. edit this version of celestia.cfg changing the line:
    ExtrasDirectories [ "extras-standard" "extras" ]
    to:
    ExtrasDirectories [ "extras-standard" "extras" "C://DEMOS" ]
    4. Make a copy of the usual Celestia Shortcut and rename it to say... CelestiaDEMO.
    5. Edit the properties of that shortcut and change the target to:
    C:\WINDOWS\SYSTEM32\cmd.exe /c ""celestia.exe" --conf C:\DEMOS\celestia.cfg"
    (careful with the quotes)

Now to run the DEMO version with the barycenter you just use the CelestiaDEMO shortcut instead of the usual shortcut (no need to rename SSC's any more).

The standard Celestia shortcut will not load EarthMoon.ssc because it doesn't reside in the standard extras folder.

CC

Re: Earth Moon barycentre

Posted: 20.04.2010, 14:32
by VikingTechJPL
CC,

Your very welcome. Hopefully an Earth-Moon barycenter as accurate as CELESTIA's lunar orbit will become a standard "object" in a future release.

Thanks for including the info on your alternate-directory method of running "temporarily-available" ssc's. I'm eager to try it.

"Barycenters Rock!"

-Gary

Re: Earth Moon barycentre

Posted: 20.04.2010, 15:51
by Chuft-Captain
Here's a version using the JPL Ephemeride (unxp1800.406).

I haven't tested this for accuracy, but feel free to examine/test it for errors yourself... but you'll have to download and install the unxp1800.406 ephemeride yourself. :)

EarthMoon JPL.zip

Re: Earth Moon barycentre

Posted: 20.04.2010, 19:45
by lidocorc
Modifications in "EarthMoon rev02.ssc" are exactly what I need. Thank you for this work!

lidocorc

Re: Earth Moon barycentre

Posted: 09.05.2010, 02:55
by VikingTechJPL
CC and lidocorc,

In case you or anyone you know still uses earlier Celestia versions (as I often do), here's another "barycenter demo" ssc file, this one working with versions 1.4.1 through 1.6.0. Though limited, it does an adequate job in a short demonstration video I'm making. Enjoy.

Code: Select all

#  DEMO EARTH-MOON BARYCENTER
#  by: Gary M. Winter
#
#  Can be used with CELESTIA 1.4.1 thru 1.6.0
#
#  This is a rough approximation of the Earth-Moon Barycenter
#  for demonstration purposes only.  Referenced to J2000, it
#  is therefore most "visually accurate" for year 2000 and years
#  at +/- 18-year intervals, losing accuracy as the interval from
#  2000 increases.  Earth's center should be above the
#  barycenter when the Moon's center is below and vice-versa,
#  but in this simplified demo the farther you are from the
#  +/- 18-year intervals, the more Earth and Moon diverge
#  from being "one-above and the-other-below".
#


"E-M Bary" "Sol/Earth"
{
   Class "invisible"
   Radius 0.0000000001
   EllipticalOrbit
   {
      Period      27.32166088  # sidereal month   
      SemiMajorAxis     4687.841463   # 1/82 of average Earth-Moon distance
      Eccentricity      0
      Inclination         -23.4392911        #J2000 obliquity per Meeus
      AscendingNode     180
      ArgOfPericenter   0
      MeanAnomaly       49
   }
   RotationPeriod      655.7198611   # hrs (27.32166088 days)
   Obliquity 23.4392911
}