script help - cannot display comet's orbit

All about writing scripts for Celestia in Lua and the .cel system
Topic author
bassrat
Posts: 16
Joined: 08.02.2004
With us: 20 years 9 months
Location: Iowa

script help - cannot display comet's orbit

Post #1by bassrat » 11.04.2004, 01:13

I tried to write a script to view the soon visible comet LINEAR C/2002 T7. It appears to place the comet in the right place at the right time, but I cannot view it's orbit like I can with the other comets. This is a non periodic hyperbolic orbit, is that why? Or have I got this all wrong?

(If I can get this working right, I would like to write one for the upcoming comet NEAT C/2001 Q4, also soon to be visible in our southern hemisphere sky.)

#C/2002 T7 (LINEAR)

# "name of object" "name of primary"
"2002 T7 LINEAR" "Sol"
{
Class "comet"
Texture "asteroid.jpg"
Mesh "asteroid.cms"
Radius 20.0 # arbitrary
RotationPeriod 11.34 # arbitrary

# non periodic hyperbolic
# taken from
# http://cfa-www.harvard.edu/iau/Ephemerides/Comets/
EllipticalOrbit # non-periodic hyperbolic
{
Period 41106.25 # calculated: (q/(e-1))^1.5 (hyperbolic)
PericenterDistance 0.614594 # q
Eccentricity 1.000516 # e
Inclination 160.5833 # Incl.
AscendingNode 94.8588 # Node
ArgOfPericenter 157.7368 # Peri.
MeanAnomaly 0.0 # position at T (unknown)
Epoch 2453120.5 # T
}

InfoURL "http://www.jpl.nasa.gov/comet/"
}



Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 1 month
Location: Germantown, Ohio - USA

Re: script help - cannot display comet's orbit

Post #2by Bob Hegwood » 11.04.2004, 05:05

bassrat wrote:It appears to place the comet in the right place at the right time, but I cannot view it's orbit like I can with the other comets. This is a non periodic hyperbolic orbit, is that why? Or have I got this all wrong?

bassrat,

I could be completely wrong here, but hear me out for a moment...

When I try to view the CURRENT orbits for comets like Halley and Borrelly, I can't view the orbits for these objects either. Unless I use the END key on my keyboard to back away from the comet for a long time.

Another interesting observation concerning the orbits of these comets: The red lines which represent the orbits don't align correctly with the comets themselves. If I back away enough to see the orbit lines, and then speed time up by a factor of a 100 thousand or so, I can also see that the orbits move away from and closer to, the comet selected. The orbital paths move up and down on my screen in a wild gyration that can be as much as 2 inches away (on my CRT) from the actual comet itself.

I'm using Celestia 1.3.2 Pre7 so I don't know if this occurs in all versions or not, but clearly, there is something wrong with the comet's orbital functions.

Finally, you may just wish to make sure that you have all of the appropriate boxes checked on your view options display. You DO know that you need to check the orbit box for comets as well as the box for orbits don't you?

Like I said, I really don't know what the hell I'm talking about here, but I thought I'd try to offer *some* kind of help. If the pre-defined orbits aren't working correctly, then there ain't no telling what needs to be done to correct your comet's orbit.:wink: Just trying to help, and I didn't see anything wrong with what you had listed above.

Let me ask you though... What do you mean by "script?" Are you trying
use a script to view the comet and its orbit? If so, where's the script?
Maybe there's something wrong there? Just a thought.

Good luck and take care, Bob
Bob Hegwood
Windows XP-SP2, 256Meg 1024x768 Resolution
Intel Celeron 1400 MHz CPU
Intel 82815 Graphics Controller
OpenGL Version: 1.1.2 - Build 4.13.01.3196
Celestia 1.4.0 Pre6 FT1

Topic author
bassrat
Posts: 16
Joined: 08.02.2004
With us: 20 years 9 months
Location: Iowa

viewing comet's orbit

Post #3by bassrat » 11.04.2004, 16:26

Bob, thanks for your response. Yes, I too have to back waaay off from the comet just to see the tail, let alone the orbit. The orbit display works for all the comets on my system, but not for this one. Yes, I have a check mark in the box for comets/orbit. And yes, my version has that same effect in that the orbit line and the comet itself do not line up and the orbit path will move up & down when I speed it up. I'm using Celestia 1.3.1.

BTW, where do I get version 1.3.2 Pre 7 ???

What do I mean by "script?" Hmm, maybe I am using the wrong term here. As you can see, I don't know what I'm talking about. LOL. But the "script" that I copy/pasted inside the quotes of my post is what I call "script", and that I inserted within my Celestia/data/solarsys.ssc file. I guess maybe it is then an SSC file?

I read another article on this comet just last night. It displayed where the comet currenty is located and I would have to say that my ssc file does seem to have placed it correctly. The only problem with it is that it's orbit will not display while the other comets on my system do.

Also, I wonder if there is anything I can do in any one of the Celestia files to make Celestia not go so close to an object when you select it with GO TO. I would like the default to stay a long ways away from comets instead of zooming in on a rock with a bright blue background sorrounding it. You know what I mean?

Thanks for your help.

Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 1 month
Location: Germantown, Ohio - USA

Post #4by Bob Hegwood » 11.04.2004, 16:59

Here ya go bassrat...

BTW, where do I get version 1.3.2 Pre 7 ???
http://shatters.net/forum/viewtopic.php?t=4664

What do I mean by "script?" Hmm, maybe I am using the wrong term here. As you can see, I don't know what I'm talking about. LOL. But the "script" that I copy/pasted inside the quotes of my post is what I call "script", and that I inserted within my Celestia/data/solarsys.ssc file. I guess maybe it is then an SSC file?
Yes indeed... This would be an SSC file. That leads me to my next question though. Where do you have it located? In extras? Or, have you installed the code into the solarsys.ssc file like the other comets?

Also, I wonder if there is anything I can do in any one of the Celestia files to make Celestia not go so close to an object when you select it with GO TO. I would like the default to stay a long ways away from comets instead of zooming in on a rock with a bright blue background sorrounding it. You know what I mean?

You can try to play around with the Field of View (or FOV) value in
your start.cel. This makes some difference in the way that the gotos
are handled. The ideal way to goto an object at the desired distance though, is with a simple script. In other words, you can use a command
like: goto {time 5.0 distance 4.0} to get where you'd like to go.

Sorry, that's about the best I can do. You'll probably need advice
from someone smarter than me to get this solved correctly. Just
thought I'd TRY to help. :wink:

By the way, I think you've answered your own question in the bugs
forum. Selden has mentioned that hyperbolic orbits are NOT displayed
even with 1.3.2 Pre7... Sorry.

Take care, Bob
Bob Hegwood

Windows XP-SP2, 256Meg 1024x768 Resolution

Intel Celeron 1400 MHz CPU

Intel 82815 Graphics Controller

OpenGL Version: 1.1.2 - Build 4.13.01.3196

Celestia 1.4.0 Pre6 FT1

Topic author
bassrat
Posts: 16
Joined: 08.02.2004
With us: 20 years 9 months
Location: Iowa

Post #5by bassrat » 11.04.2004, 23:19

Yes indeed... This would be an SSC file. That leads me to my next question though. Where do you have it located? In extras? Or, have you installed the code into the solarsys.ssc file like the other comets?]

Bob, I installed the code into the solarsys.ssc file like the other comets.

You can try to play around with the Field of View (or FOV) value in
your start.cel. This makes some difference in the way that the gotos
are handled. The ideal way to goto an object at the desired distance though, is with a simple script. In other words, you can use a command
like: goto {time 5.0 distance 4.0} to get where you'd like to go.

Thanks for the ideas. I will play around with those.

By the way, I think you've answered your own question in the bugs
forum. Selden has mentioned that hyperbolic orbits are NOT displayed
even with 1.3.2 Pre7... Sorry.


Thanks for your help and for your interest, Bob. Don says it has been put on the Bug Fix list.

Now I can move on and make an ssc file for the other new comet soon coming to ours skies, NEAT C/2001 Q4.

bassrat

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 22 years

Re: script help - cannot display comet's orbit

Post #6by granthutchison » 12.04.2004, 22:24

Bob:
Bob Hegwood wrote:Another interesting observation concerning the orbits of these comets: The red lines which represent the orbits don't align correctly with the comets themselves. If I back away enough to see the orbit lines, and then speed time up by a factor of a 100 thousand or so, I can also see that the orbits move away from and closer to, the comet selected. The orbital paths move up and down on my screen in a wild gyration that can be as much as 2 inches away (on my CRT) from the actual comet itself.

I think you're seeing the effect of Celestia plotting orbits as a series of line segments, instead of smooth curves - this is particularly noticeable near the Sun for objects with very elliptical orbits, like comets. In 1.3.2pre7 you can reduce the effect by opening celestia.cfg and increasing the number next to the variable OrbitPathSamplePoints - that'll put in more line segments and smooth the orbit. But this happens at the expense of processing time, so you should go carefully and perhaps just double the default value until you see what effect it has on your system.

Grant

Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 1 month
Location: Germantown, Ohio - USA

Post #7by Bob Hegwood » 12.04.2004, 23:31

Ah...

I appreciate the advice, Grant. At last, something I can
understand. :wink:

Thanks, Bob
Bob Hegwood

Windows XP-SP2, 256Meg 1024x768 Resolution

Intel Celeron 1400 MHz CPU

Intel 82815 Graphics Controller

OpenGL Version: 1.1.2 - Build 4.13.01.3196

Celestia 1.4.0 Pre6 FT1


Return to “Scripting”