Spacecraft in eclipse

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
mjoubert
Posts: 58
Joined: 02.04.2007
With us: 17 years 7 months

Spacecraft in eclipse

Post #1by mjoubert » 11.04.2007, 15:01

Hi all,

Another thing to verify.

If I use

Code: Select all

"MySpacecraft" "Sol/Earth"
MySpacecraft will be sensitive to earth shadow (dark when behind earth).

But if I use

Code: Select all

"MySpacecraft" "Sol/Earth/SomethingAroundEarth"
MySpacecraft will stay bright, even if it is behind earth.

Is it the expected behaviour? Or there is an inheritance issue?


Mathieu (spacebel)

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #2by chris » 16.04.2007, 18:10

Celestia only checks for eclipses across one level of the hierarchy. This is a fairly easy thing to fix, however--I can have it working by the end of the week.

--Chris

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #3by Cham » 16.04.2007, 23:46

Yes, I've experienced that bug many times too. Annoying.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

julesstoop
Posts: 408
Joined: 27.03.2002
With us: 22 years 7 months
Location: Leiden, The Netherlands

Post #4by julesstoop » 17.04.2007, 00:02

Well, this doesn't seem to be a bug, rather a lack of feature :)
Lapinism matters!
http://settuno.com/

Topic author
mjoubert
Posts: 58
Joined: 02.04.2007
With us: 17 years 7 months

Post #5by mjoubert » 17.04.2007, 13:36

Thanks Chris,

I'll check that in a couple of weeks.

Mathieu (spacebel)

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #6by chris » 17.04.2007, 16:50

I checked in a fix just now. This is not a complete solution, but it does handle the case where the parent of the parent object is casting a shadow. The code traverses up the hierarchy all the way to the root, so it will work no matter how deep the object is. What is still not handled are objects that are neither siblings nor ancestors, i.e. cousins and aunts/uncles (to carry the family analogy too far . . .) I've created a bug in the SourceForge tracker for this problem and will address it in the future.

--Chris

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #7by Cham » 17.04.2007, 17:55

Chris,

what do you mean by cousins/aunts/uncles etc ? (or is this supposed to be a joke ?) :?

With the new code correction, what should happen if a body is orbiting a moon located in the shadow of its planet, and the body has a large orbit (so it gets in the light) ? Or if the moon is on the light side while the body orbiting it is in the planet's shadow (case of a large orbit) ? Well, of course, this shouldn't be a problem for most spacecraft addons, but we never know... :?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #8by chris » 17.04.2007, 19:17

Cham wrote:Chris,

what do you mean by cousins/aunts/uncles etc ? (or is this supposed to be a joke ?) :?

With the new code correction, what should happen if a body is orbiting a moon located in the shadow of its planet, and the body has a large orbit (so it gets in the light) ? Or if the moon is on the light side while the body orbiting it is in the planet's shadow (case of a large orbit) ? Well, of course, this shouldn't be a problem for most spacecraft addons, but we never know... :?


Both of the cases that you mentioned will work as expected. What I meant by the talk of cousins can be best illustrated with an example object hierarchy. Suppose you have a satellite in orbit around Earth's moon. Prior to my change, the only object that could cast a shadow on the satellite was the Moon. The new code enables the Earth to also cast a shadow on the satellite.

Now, imagine the Earth had a second moon. This moon would not cast a shadow on the satellite. While this situation is somewhat unusual, it's still within the realm of possibility, e.g. Io casting a shadow on a Europa orbiter. Basically, I need to change the eclipse code to operate independently of the object hierarchy. This is a bigger change than I wanted to make right now, so I'm putting off the complete fix until post-1.5.0.

--Chris

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #9by Cham » 17.04.2007, 20:14

Thanks Chris, this is all very clear now.

The second case (second moon casting a shadow on the first moon's orbiter) is also an interesting situation, but I agree that this could be added later (post 1.5.0).
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Return to “Development”