Celestia goes straight to hell (3Megaparsecs away)

Report bugs, bug fixes and workarounds here.
Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 19 years 1 month

Celestia goes straight to hell (3Megaparsecs away)

Post #1by Chuft-Captain » 31.03.2009, 08:37

Hi guys,

I think I've seen a similar bug posted before, but I can't track it down, so I'll log this here. (You'll need my Lagrange Points addon to be able to replicate the bug. or alternatively, just use the code snippet below from the addon, which should be enough to replicate the problem)

THE PROCEDURE:
1. In ENTER menu, select Moon-L2
2. Goto Moon-L2
3. ENTER Menu, select Moon
4. C (center the moon)
5. shift-: (lock to the moon)

THE PROBLEM:
On trying to LOCK, celestia goes to hell. (Which seems to be a place oscillating between 1 and 4 Megaparsecs away.
It is not possible to recover and return to Sol...Celestia must be shut down.

ANALYSIS:
This definitely seems to have something to do with reference frames. For example, selecting the Moon and locking with earth does not cause the problem.
I would have thought that a badly constructed / inconsistent reference frame might cause this (and I think that was the conclusion of the other thread), however, I don't believe that there's anything wrong with my current reference frame code.

Note: I've also experienced this bug with other addons (which also use reference frames) so this seems to confirm my suspicions that Celestia has a problem locking with other objects when reference frames are involved.

I've tried all manner of things to try and isolate the problem to my SSC code, but nothing works, so I suspect there's a bug somewhere in the C++ code. Hopefully with this information and my SSC code, someone can debug it.

Any comments appreciated.
CC

CODE FOR THE Earth-Moon LAGRANGE POINTS -- needed to replicate the bug (or alternatively, download and install the lagrange point addon itself).

Code: Select all

ReferencePoint   "Moon-L1" "Sol/Earth/Moon"
{
   OrbitFrame
   {
      TwoVector
      {
         Center   "Sol/Earth/Moon"
         Primary
         {
            Axis "x"
            RelativePosition { Target "Sol/Earth" }
         }
         Secondary
         {
            Axis "y"
            RelativeVelocity { Target "Sol/Earth" }
         }
      }
   }

   FixedPosition [ 61272.261 0.0 0 ]
}
   
ReferencePoint   "Moon-L2" "Sol/Earth/Moon"
{
   OrbitFrame
   {
      TwoVector
      {
         Center   "Sol/Earth/Moon"
         Primary
         {
            Axis "x"
            RelativePosition { Target "Sol/Earth" }
         }
         Secondary
         {
            Axis "y"
            RelativeVelocity { Target "Sol/Earth" }
         }
      }
   }

   FixedPosition [ -61272.261 0.0 0 ]

   BodyFrame
   {
      BodyFixed
      {
          Center "Sol/Earth/Moon"
      }
   }

}
   
ReferencePoint   "Moon-L3" "Sol/Earth/Moon"
{
   OrbitFrame
   {
      TwoVector
      {
         Center   "Sol/Earth/Moon"
         Primary
         {
            Axis "x"
            RelativePosition { Target "Sol/Earth" }
         }
         Secondary
         {
            Axis "y"
            RelativeVelocity { Target "Sol/Earth" }
         }
      }
   }

   FixedPosition [ 770745.965 0.0 0 ]
}
   
ReferencePoint   "Moon-L4" "Sol/Earth/Moon"
{
   OrbitFrame
   {
      TwoVector
      {
         Center   "Sol/Earth/Moon"
         Primary
         {
            Axis "x"
            RelativePosition { Target "Sol/Earth" }
         }
         Secondary
         {
            Axis "y"
            RelativeVelocity { Target "Sol/Earth" }
         }
      }
   }

   FixedPosition [ 187529.685 -332900.165 0 ]
}
   
ReferencePoint   "Moon-L5" "Sol/Earth/Moon"
{
   OrbitFrame
   {
      TwoVector
      {
         Center   "Sol/Earth/Moon"
         Primary
         {
            Axis "x"
            RelativePosition { Target "Sol/Earth" }
         }
         Secondary
         {
            Axis "y"
            RelativeVelocity { Target "Sol/Earth" }
         }
      }
   }

   FixedPosition [ 187529.685 332900.165 0 ]
}
Last edited by Chuft-Captain on 02.04.2009, 16:58, edited 5 times in total.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

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

Re: Celestia goes straight to hell (3Megaparsecs away)

Post #2by chris » 31.03.2009, 15:39

Chuft-Captain wrote:Hi guys,

I think I've seen a similar bug posted before, but I can't track it down, so I'll log this here. (You'll need my Lagrange Points addon to be able to replicate the bug. or alternatively, just use the code snippet below from the addon, which should be enough to replicate the problem)

THE PROCEDURE:
1. In ENTER menu, select Moon-L2
2. Goto Moon-L2
3. ENTER Menu, select Moon
4. C (center the moon)
5. shift-: (lock to the moon)

THE PROBLEM:
On trying to LOCK, celestia goes to hell. (Which seems to be a place oscillating between 1 and 4 Megaparsecs away.
It is not possible to recover and return to Sol...Celestia must be shut down.

ANALYSIS:
This definitely seems to have something to do with reference frames. For example, selecting the Moon and locking with earth does not cause the problem.
I would have thought that a badly constructed / inconsistent reference frame might cause this (and I think that was the conclusion of the other thread), however, I don't believe that there's anything wrong with my current reference frame code.

The problem is that using phase lock for the Moon and Moon L2 point sets up an undefined reference frame for the observer. The phase lock reference frame is determined by two objects: the reference object (in this case Moon-L2) and the target object (Moon). The primary vector of the reference frame points from the reference to the target. The secondary vector points in the direction of the velocity of the target relative to the reference, and that's the problem: it's zero. So, the problem is not with the reference frame as defined in the ssc file, but the reference frame that Celestia sets up when you phase lock two objects that are stationary with respect to each other. Celestia should prevent crazy things from happening in this situation. The fact that it doesn't is a bug.

--Chris

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

Re: Celestia goes straight to hell (3Megaparsecs away)

Post #3by chris » 31.03.2009, 15:44

Thinking about this some more... The velocity vectors point in the same direction, but should have different magnitudes. I'll have to think some more about why this would cause a problem.

--Chris

mwjohnston
Posts: 6
Joined: 12.02.2010
With us: 14 years 11 months

Re: Celestia goes straight to hell (3Megaparsecs away)

Post #4by mwjohnston » 18.02.2010, 18:41

Any update on this issue?
Thanks


Return to “Bugs”