Page 1 of 2

Adding a comet

Posted: 09.11.2003, 14:08
by Kostko
I would like to add a comet to Celestia. It is C/1748 H1 and I have the following data for it:

Code: Select all

C/1748 H1
T 1748 Apr. 29.309 TT                   Maraldi, Mem. Acad. Paris 1748, 232

q   0.84067              (2000.0)            P               Q
                   Peri.   17.828       -0.547236       +0.106836
                   Node   236.381       -0.836441       -0.105337
e   1.0            Incl.   94.535       -0.029983       +0.988681
From 20 observations 1748 May 10-June 30.


but i don't know how to add it :P

Posted: 10.11.2003, 13:53
by Kostko
so nobody knows ? :(

Posted: 10.11.2003, 15:05
by selden
The problem is doing the right thing for parabolic orbits.
If you're willing to "fake it" with an eccentricity of 0.9999, you might take a look at the (incomplete) Web page http://www.lns.cornell.edu/~seb/celestia/transforming_ephemeris.html

Does this help?

Posted: 10.11.2003, 15:46
by Kostko
well, by faking (e = 0.9999) i have generated the folowing file:

Code: Select all

"C/1748 H1 Hallerstein" "Sol"
{
        Class "comet"
        Texture "asteroid.jpg"
        Mesh "asteroid.cms"
        Radius 20

        EllipticalOrbit
        {
                Period 770793.998
                PericenterDistance 0.84067
                Eccentricity 0.9999
                Inclination 94.535
                AscendingNode 236.381
                ArgOfPericenter 17.828
                MeanAnomaly 0.0
                Epoch 2359622.8
        }
}


is this correct ? because now if i select the "Celestian browser" the comet is in the list but if i right-click it i get an empty popup menu ??? :roll:

Posted: 10.11.2003, 16:48
by granthutchison
It seems to work fine for me - I just pick the comet out of the Solar System Browser and go to it.
The plotted orbit is horrible (too extreme for Celestia's usual line segments) but the comet itself behaves nicely.

Grant

Posted: 10.11.2003, 16:55
by selden
"It works fine for me."

I did a cut-and-paste of your orbital element code into a file named
COMET.SSC and was able to use the solar system browser to goto it. The right-click mouse menu has all of the usual items listed:

Code: Select all

C/1748 H1 Hallerstein
___________________________
GoTo
Follow
SyncOrbit
Info
Mark


"Info" doesn't work because nineplanets.org doesn't have a Web page for this comet. The other menu items work for me, though.

Posted: 10.11.2003, 19:16
by Kostko
well, i have the 1.3.0 version with Qt/KDE interface emerged via gentoo portage... and i don't see anything in the popup menu -- might this be a bug ? :P

Posted: 10.11.2003, 19:26
by Kostko
oh, i can see the menus if i right click the sun and select Planets -> C/1748 H1 Hallerstein :)

Posted: 10.11.2003, 19:31
by selden
That's why it's best to say what operating system and version you are using.
I'm using Windows XP Pro, sp1. Its user interface is very different from the Linux user interface.

Posted: 10.11.2003, 19:36
by Kostko
the only thing that still bothers me is the comet's orbit (as granthutchison mentioned before) - it looks really wierd :P is it any better in the 1.3.1 version ?

Posted: 10.11.2003, 20:08
by granthutchison
Kostko wrote:the only thing that still bothers me is the comet's orbit (as granthutchison mentioned before) - it looks really wierd :P is it any better in the 1.3.1 version ?
No, I'm using 1.3.1pre11. The line segments Celestia constructs the orbit from seem to be based on the distance travelled in some fraction of the orbital period, since the aphelion end is well drawn, whereas the perihelion is horrible.

Grant

Posted: 11.11.2003, 16:25
by Kostko
granthutchison wrote:No, I'm using 1.3.1pre11. The line segments Celestia constructs the orbit from seem to be based on the distance travelled in some fraction of the orbital period, since the aphelion end is well drawn, whereas the perihelion is horrible.

Grant


will this be fixed in the future versions of Celestia? also, there could be support for parabolic orbits... :roll:

Posted: 11.11.2003, 21:05
by JackHiggins
Just a thought- but wouldn't you be better off with an xyz file for hyper/parabolic orbits? Since it's only passing through the Solar system once you don't need the actual orbit data...? That's what i'd do if I wanted orbit data for that type of object anyways...

Posted: 11.11.2003, 21:45
by granthutchison
JackHiggins wrote:Just a thought- but wouldn't you be better off with an xyz file for hyper/parabolic orbits?
Seems a hell of a lot of work to derive an xyz that isn't particularly informative to look at, when you could make a simple orbit definition.
The hyperbolic approximation for the above comet (which I prefer because it doesn't create a closed orbit) is:

Code: Select all

"C/1748 H1 Hallerstein" "Sol"
{
        Class "comet"
        Texture "asteroid.jpg"
        Mesh "asteroid.cms"
        Radius 20

        EllipticalOrbit
        {
                Period 770793998               # [q/(e-1)]^1.5
                PericenterDistance 0.84067
                Eccentricity 1.000001
                Inclination 94.535
                AscendingNode 236.381
                ArgOfPericenter 17.828
                MeanAnomaly 0.0
                Epoch 2359622.8
        }
}
Isn't that more compact, informative, and easier to derive from the original parameters?

Admittedly, the concept of a "Period" for a hyperbolic orbit is distinctly dodgy - what you have to substitute is the inverse of the mean motion. It would make more sense if Celestia accepted a MeanMotion parameter as an alternative to the Period (just as it accepts a PericenterDistance instead of a SemiMajorAxis). This would also solve the problem with parabolic orbits - you can't enter an infinite Period, but you could set MeanMotion equal to zero.

Grant

Posted: 11.11.2003, 22:16
by selden
Grant,

So how does one actually determine the "Mean Motion" for a hyperbolic orbit?

I haven't been able to find any definitions which make any sense for a hyperbola. i.e. they assume a closed orbit.

Posted: 11.11.2003, 22:32
by granthutchison
selden wrote:So how does one actually determine the "Mean Motion" for a hyperbolic orbit?
The calculation is symmetrical with the mean motion for an ellipse, which (as you know) goes:

n = sqrt(G[M+m]/a^3) ... elliptical mean motion

where n is in radians per second if the other constants and parameters are in SI units. The semimajor axis for a hyperbola is a negative quantity, however, since it's calculated from the same equation as for an ellipse:

a = q/(1-e)

So for a hyperbola another minus sign intrudes to protect us from the horrors of the square root of a negative number:

n = sqrt(-G[M+m]/a^3) ... hyperbolic mean motion


Here is a nice brief reference document on the topic.

Grant

Posted: 11.11.2003, 22:57
by selden

Posted: 11.11.2003, 23:37
by granthutchison
Do you think it's worth mentioning (on your page) that n is in radians for the equations given? Since Celestia works in degrees, this might cause confusion if not explained.

Grant

Posted: 12.11.2003, 00:14
by JackHiggins
granthutchinson wrote:Seems a hell of a lot of work to derive an xyz that isn't particularly informative to look at,
I could go into Horizons Telnet, set up the xyz, ftp download it, convert it to celestia format & upload it to my site in 15 minutes, if I needed to!

Isn't that more compact, informative, and easier to derive from the original parameters?

I suppose it is yeah really- but I guess it's just that I myself prefer xyz's rather than ssc's for this type of thing... :) I'm more interested in what the trajectory "looks like" rather than the elements you know? Obviously if it's an asteroid or moon i'd use an ssc though.

Posted: 12.11.2003, 00:23
by granthutchison
JackHiggins wrote:I could go into Horizons Telnet, set up the xyz, ftp download it, convert it to celestia format & upload it to my site in 15 minutes, if I needed to!
Still seems like a hell of a lot of work ... I can copy the elements straight into an ssc in under two minutes. Leaves me time to boil a kettle and have my feet up with a cuppa while you're still surging around the place. :wink:

Grant