Can Celestia generate a calendar?

General discussion about Celestia that doesn't fit into other forums.
Topic author
Fizzwiggle
Posts: 3
Joined: 06.11.2005
With us: 14 years 9 months

Can Celestia generate a calendar?

Post #1by Fizzwiggle » 06.11.2005, 03:58

Hi,

New to Celestra, and wanted to know if it was possible, perhaps though scripting, to have Celestia generate a calendar of local astrnomical events for any planet.

I am creating a fictional solar system, with the main habitable planet in orbit around a ringed gas giant, that orbits a distant star.

I would appreciate knowing if this was possible in Celestia, and some pointers to appropriate resources that would assist.

Many thanks.

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 14 years 11 months

Post #2by Malenfant » 06.11.2005, 04:03

What sort of events do you have in mind? An on-screen display saying something like "the satellite will next be eclipsed by its primary on [date]" might be manageable using a script, but I think (not 100% sure though) that Celestia currently lacks any capability to write to a separate text file.

Topic author
Fizzwiggle
Posts: 3
Joined: 06.11.2005
With us: 14 years 9 months

Post #3by Fizzwiggle » 06.11.2005, 04:09

Hi,

Well, events like sunrise/set, planet rise/set, moonrise/set, eclipses and the like, for a designated spot on a planetary surface would be what I'm looking for.

writing to a txt file would be needed, so that would be a problem if unsupported. I could always format the results with other programs, but just wondering if I could get the raw data from Celestia.

maxim
Posts: 1036
Joined: 13.11.2003
With us: 16 years 9 months
Location: N?rnberg, Germany

Post #4by maxim » 06.11.2005, 11:10

...but I think (not 100% sure though) that Celestia currently lacks any capability to write to a separate text file.


It definitely can.
You just have to use the io library which is part of Lua. For example use 'io.write' or 'file.write'.

And you shouldn't forget to set 'ScriptSystemAccessPolicy' to 'allow' in your 'celestia.cfg' configuration file.

maxim

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 14 years 11 months

Post #5by Malenfant » 06.11.2005, 17:06

maxim wrote:
...but I think (not 100% sure though) that Celestia currently lacks any capability to write to a separate text file.

It definitely can.
You just have to use the io library which is part of Lua. For example use 'io.write' or 'file.write'.

And you shouldn't forget to set 'ScriptSystemAccessPolicy' to 'allow' in your 'celestia.cfg' configuration file.


Cool! I'll have to check that out then :)

bdm
Posts: 461
Joined: 22.07.2005
With us: 15 years
Location: Australia

Post #6by bdm » 07.11.2005, 02:16

When doing this, it's important to remember that Celestia is not an accurate simulation. Perturbations from other worlds cause nodes to precess, orbits to change shape and size, and rotational poles to precess. Therefore Celestia cannot be used as an accurate simulation of eclipses. Celestia is only an approximation.

You can do better if you compute the periodicity with a calculator or spreadsheet and use Celestia to check the results. If you wish to calculate eclipses for a moon and planet, you will need the period of the planet and the period of the moon. Divide one by the other, and convert the result into a continuing fraction.

When you do this, you will find repeating periods similar to a Saros series that you can use to view a series of fictional eclipses. A good fractional approximation is a powerful tool for eclipse prediction.

Suppose you find that your fictional moon goes around its primary 7+13/15 times for each orbit of the primary around the sun. If year X produces an eclipse, then the orbits at year X + 1 will be offset by 2/15 from the eclipse prediction. This 2/15 offset may produce another eclipse, a partial or no eclipse. You may need a little experimentation to determine when the eclipses occur and what kind they are. Once you've made some careful "observations", you can then predict eclipses accurately.

For this kind of fictional work, I use a spreadsheet for computation and Celestia for checking. I've had good success with a spreadsheet producing a script in CEL format, and then running the script. This script prints out the computed time of conjunction and then pauses briefly so observations can be made.

When I do the fractional approximation, I sometimes find it more useful to sort by the fraction rather than by date. So for the 13/15 approximation given above, I would sort by 1/15, 2/15, 3/15 and so on.

An online continuing fraction calculator can be found here: Continued Fraction Calculator

cpotting
Posts: 164
Joined: 18.03.2004
Age: 58
With us: 16 years 4 months
Location: Victoria, BC Canada

Post #7by cpotting » 07.11.2005, 15:51

bdm wrote:When doing this, it's important to remember that Celestia is not an accurate simulation. Perturbations from other worlds cause nodes to precess, orbits to change shape and size, and rotational poles to precess. Therefore Celestia cannot be used as an accurate simulation of eclipses. Celestia is only an approximation.

I thought that the VSOP87 calculations were supposed to take all this into account and that Celestia would be suitable for predicting eclipses. It was my understanding that the biggest factors to inaccuracy would be the spherical modelling of the Earth used in Celestia and the lack of accurate orbit data for newly discovered / hard to observe bodies.

Am I wrong?

Fizzwiggle's request had given me an idea for my next celx scripting project. But if Celestia is not accurate enough for eclipses, etc, then an almanac script would not be of much use.
Clive Pottinger
Victoria, BC Canada

Avatar
selden
Developer
Posts: 10136
Joined: 04.09.2002
With us: 17 years 11 months
Location: NY, USA

Post #8by selden » 07.11.2005, 16:00

Clive,

Note that bdm is discussing eclipses in fictional systems.
Celestia uses Keplerian orbits for such bodies. Keplerian orbital parameters can't take into account the gravitational effects of multiple bodies, unlike the VSOP87 theory for planets in our solar system.
Selden

bdm
Posts: 461
Joined: 22.07.2005
With us: 15 years
Location: Australia

Post #9by bdm » 07.11.2005, 23:18

Selden was correct, I was discussing fictional systems.

If we could compute VSOP87 parameters for fictional systems, that would allow such systems to be more accurate.

Even with the VSOP87 parameters, Celestia is not accurate indefinitely far into the past or future. For example, the possible transit of Jupiter that will be seen from Saturn about 6000 years from now is not rendered accurately in Celestia.

(For some reason, VSOP87 makes me think of 18-year-old Cognac.)

Topic author
Fizzwiggle
Posts: 3
Joined: 06.11.2005
With us: 14 years 9 months

Post #10by Fizzwiggle » 08.11.2005, 00:21

THanks much for all the information and discussion.
An almanac script would be awesome, but I see I have some serious work to do to reaquainte myself with a calculator.

Thanks for the help, all.

cpotting
Posts: 164
Joined: 18.03.2004
Age: 58
With us: 16 years 4 months
Location: Victoria, BC Canada

Post #11by cpotting » 08.11.2005, 05:18

bdm wrote:(For some reason, VSOP87 makes me think of 18-year-old Cognac.)
That's because they can both leave you with a nasty headache if you try to take them in all at once.

Selden was correct, I was discussing fictional systems.

If we could compute VSOP87 parameters for fictional systems, that would allow such systems to be more accurate.
Ahh. But then again, as long as one is willing to limit oneself to a Keplerian universe (outside our special VSOP87 ("Courvoisierian?") Solar System), then Celestia's predicitions for eclipses would be accurate. If Jor El predicts Celestia will show an eclipse of Roa from Krypton, and it does, then isn't Celestia "accurate". After all, I would assume that anyone working on a fictional system would be working with Keplerian orbits - or is someone out there actually trying to apply VSOP87 to Tatooine and it's moons?

Even with the VSOP87 parameters, Celestia is not accurate indefinitely far into the past or future. For example, the possible transit of Jupiter that will be seen from Saturn about 6000 years from now is not rendered accurately in Celestia.
Yes, but then again, an almanc script would not be valid (or much use) for 6000 years from now (even a good Cognac can't pickle you long enough to make use of a almanc for 8005 A.D.)
Clive Pottinger
Victoria, BC Canada

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 14 years 11 months

Post #12by Malenfant » 08.11.2005, 06:29

What exactly is VSOP87 anyway?
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Avatar
selden
Developer
Posts: 10136
Joined: 04.09.2002
With us: 17 years 11 months
Location: NY, USA

Post #13by selden » 08.11.2005, 10:02

VSOP87 is a set of polynomials describing the orbits of the major planets. There are over 1000 terms in each series.

See
http://adsabs.harvard.edu/cgi-bin/nph-b ... 202..309B&
and
http://cdsweb.u-strasbg.fr/cgi-bin/Cat?VI/81

Ref:

Planetary theories in rectangular and spherical variables - VSOP 87 solutions
Authors:
Bretagnon, P.; Francou, G.
Affiliation:
AA(Bureau des Longitudes, Paris, France), AB(Bureau des Longitudes, Paris, France)
Journal:
Astronomy and Astrophysics (ISSN 0004-6361), vol. 202, no. 1-2, Aug. 1988, p. 309-315.
Selden

bdm
Posts: 461
Joined: 22.07.2005
With us: 15 years
Location: Australia

Post #14by bdm » 08.11.2005, 23:38

Selden was correct, I was discussing fictional systems.

If we could compute VSOP87 parameters for fictional systems, that would allow such systems to be more accurate.
Ahh. But then again, as long as one is willing to limit oneself to a Keplerian universe (outside our special VSOP87 ("Courvoisierian?") Solar System), then Celestia's predicitions for eclipses would be accurate. If Jor El predicts Celestia will show an eclipse of Roa from Krypton, and it does, then isn't Celestia "accurate".

A fair point.

However, as I stated before, Celestia isn't the best tool for predicting fictional eclipses. Celestia's best role is to verify the predictions made with another tool. I recommend the use of spreadsheets for prediction.

I also described the use of continuing fractions for prediction. I want to correct this because there is a better way. Using decimal values can allow more accurate predictions to be made. If there are no precession terms, then it's possible to use the remainders directly.

If
Y = the period of the planet's orbit around its star
M = the period of the moon's orbit around the planet
A = the number of times the moon orbits the planet for each orbit of the planet around its star
N = the position of the moon in its orbit
t = time in years

A = Y/M
N = t * A - floor (t * A)

N will be a number in the range [0, 1).

N is the important number here. It describes the position of the moon (or planet) when it reaches the eclipse node. You will find a range of values where the moon can be in its orbit for the maximum number of eclipses will occur. One of four things will happen:
* The moon could have an orbit of sufficiently low inclination that eclipses occur at every conjunction.
* The moon could orbit the planet quickly enough or its orbit is of sufficiently low inclination for one or more eclipses to occur when the planet reaches the clipse node. This happens with most moons in the solar system, with multiple eclipses at each nodal passage.
* The moon could be an intermediate case where eclipses occur at each nodal passage but not always total ones. The Earth's moon is such an intermediate case.
* The moon could orbit slowly enough, or the moons orbit could be sufficiently tilted such that an eclipse of any kind is not guaranteed to happen at each node. No known cases exist in the solar system.

I don't know how to figure out when the planet reaches the eclipse node, so I can't take the calculation further.

There's also another useful value that could be calculated, which gives the average number of eclipses at each nodal passage.

What can be done is to compute the nodal term N and then view the resulting conjunctions.

cpotting
Posts: 164
Joined: 18.03.2004
Age: 58
With us: 16 years 4 months
Location: Victoria, BC Canada

Post #15by cpotting » 09.11.2005, 04:53

bdm wrote:* The moon could orbit slowly enough, or the moons orbit could be sufficiently tilted such that an eclipse of any kind is not guaranteed to happen at each node. No known cases exist in the solar system.
Wouldn't the moons such as Neptune's Proteus, or all the moons of Uranus fit this description? It seems so: they are all sufficiently tilted that their passage through the eclipse node would only coincide with the appropriate alignment at two points in the planet's orbit - when the Sun lies on the moon's orbital plane.

bdm wrote:However, as I stated before, Celestia isn't the best tool for predicting fictional eclipses. Celestia's best role is to verify the predictions made with another tool. I recommend the use of spreadsheets for prediction.

I seem to be missing your meaning here. Do you mean that Celestia does not provide the mathematical precision required to predict eclipses? Or do you mean that since Celestia does not account for gravitational influences in fictional systems that it will model eclipses that may not occur if the system were real, and not model others that would occur?

Ahhh...or, perhaps you are referring to Celestia's Eclispe Finder tool? If this is what you were referring to, then I can understand your earlier comments.
Clive Pottinger
Victoria, BC Canada

bdm
Posts: 461
Joined: 22.07.2005
With us: 15 years
Location: Australia

Post #16by bdm » 10.11.2005, 03:24

cpotting wrote:
bdm wrote:* The moon could orbit slowly enough, or the moons orbit could be sufficiently tilted such that an eclipse of any kind is not guaranteed to happen at each node. No known cases exist in the solar system.
Wouldn't the moons such as Neptune's Proteus, or all the moons of Uranus fit this description? It seems so: they are all sufficiently tilted that their passage through the eclipse node would only coincide with the appropriate alignment at two points in the planet's orbit - when the Sun lies on the moon's orbital plane.
Ah ... I forgot about those distant moons of the giants. I guess some of them would fall in this category.

cpotting wrote:
bdm wrote:However, as I stated before, Celestia isn't the best tool for predicting fictional eclipses. Celestia's best role is to verify the predictions made with another tool. I recommend the use of spreadsheets for prediction.
I seem to be missing your meaning here. Do you mean that Celestia does not provide the mathematical precision required to predict eclipses? Or do you mean that since Celestia does not account for gravitational influences in fictional systems that it will model eclipses that may not occur if the system were real, and not model others that would occur?

Ahhh...or, perhaps you are referring to Celestia's Eclispe Finder tool? If this is what you were referring to, then I can understand your earlier comments.

I am unfamiliar with the capabilities of Eclipse Finder and CELX scripting, so the following may be incorrect.

I thought Eclipse Finder only works with real bodies in the solar system. If that's the case, then Celestia lacks the ability to predict fictional eclipses.

In any case, if Celestia was needed to make custom predictions that are not eclipse-related, then it may also lack this capability. An example would be a fictional calendar that begins when the sun crosses the equator. Celestia can be used to make these observations, but the necessary predictions and scripting may need to be made by an external application. I have done this successfully with a spreadsheet.

Avatar
selden
Developer
Posts: 10136
Joined: 04.09.2002
With us: 17 years 11 months
Location: NY, USA

Post #17by selden » 10.11.2005, 09:55

Unfortunately, Celestia's eclipse finder, in the Windows implementation at least, only works for specific planets that are selected from a menu. It isn't generic.
Selden

maxim
Posts: 1036
Joined: 13.11.2003
With us: 16 years 9 months
Location: N?rnberg, Germany

Post #18by maxim » 10.11.2005, 10:34

Lua, the underlying language of CELX, is a programming language as ordinary as others. It doesn't matter if you code your calendar calculations in C, Perl, a Spreadsheet or Lua. And using keplerian orbits reduces the calculations to almost simple trigonometry in the end. Remember that Celestia only shows what was calculated before - it's a visualization application. It doesn't support you with your calculations - that's simple math.

So if you are only interested in the dates, you may happily use a spreadsheet or a perl script. If you plan to inject the results into Celestia, it may be neat to directly use Lua instead. And if you'd like to force Celestia to go to the desired time and observers position instantly, Lua is your choice.

maxim

Startyger
Posts: 39
Joined: 05.05.2002
With us: 18 years 3 months
Location: Hillside, New Jersey

um... but where are the textures

Post #19by Startyger » 27.06.2007, 22:12

isn't that t he real question.... sorry.. away for a looooooooooooooooong time. Rao would be in a distant galaxy... and tha's not allowed in Celestia... yet... right? not even.. for... one star...? and .. one planet? but, Apokolips would look great in celestia too... :wink:
"then He smiled at me...pa-rump-a-pum-pum..... me and my drum"

Avatar
selden
Developer
Posts: 10136
Joined: 04.09.2002
With us: 17 years 11 months
Location: NY, USA

Post #20by selden » 27.06.2007, 23:00

Startyger,

Celestia cannot properly display stars that are defined in STC files to be more than about 16KLY away from the Sun.

Celestia won't generate fatal errors for those distant stars, but strange things will happen.

You can define your planetary system around a nearby star, though. if you really want, you could even replace Celstia's entire star database with one which simulates your remote galaxy. It just wouldn't be very remote :)
Selden


Return to “Celestia Users”

Who is online