Orientation doesn't work within timeline

Report bugs, bug fixes and workarounds here.
Topic author
Tomasz M. Bladyniec
Posts: 16
Joined: 05.01.2004
Age: 42
With us: 20 years 10 months
Location: Warsaw, Poland
Contact:

Orientation doesn't work within timeline

Post #1by Tomasz M. Bladyniec » 02.07.2008, 11:31

Hello, I just figured out that "Orientation" function in SSC doesn't work while inside "Timeline" function. Here's the code:

Code: Select all

"Venus Express 1"   "Sol/Venus"
   {
      Class      "spacecraft"
      Mesh      "Venus Express.cmod"
      Radius      0.004
      Timeline   [
            {
               EllipticalOrbit
                  {
                  Period         1
                  SemiMajorAxis      39627
                  Inclination      90
                  Eccentricity      0.8296
                  LongOfPericenter   -80
                  MeanAnomaly      190
                       }
               Orientation   [90 -1 0 0]
               RotationOffset   290
            }
            ]
   }

"Venus Express 2"   "Sol/Venus"
   {
      Class      "spacecraft"
      Mesh      "Venus Express.cmod"
      Radius      0.004
      Timeline   [
            {
               EllipticalOrbit
                  {
                  Period         1
                  SemiMajorAxis      39627
                  Inclination      90
                  Eccentricity      0.8296
                  LongOfPericenter   -80
                  MeanAnomaly      190
                       }
               RotationOffset   290
            }
            ]
               Orientation   [90 -1 0 0]
   }


The only difference between these two is that orientation is inside or outisde the timeline function. In result, models are tilted about 90 degrees o each other. Is it a bug, or it was planned? How to fix it?
I use 1.6.0 r.4367, on Windows Vista. No modifications.
SAVE AS MANY AS YOU CAN

symaski62
Posts: 610
Joined: 01.05.2004
Age: 41
With us: 20 years 6 months
Location: france, divion

Re: Orientation doesn't work within timeline

Post #2by symaski62 » 02.07.2008, 15:03

ou? SSC ERROR

:mrgreen: no bug

selden
windows 10 directX 12 version
celestia 1.7.0 64 bits
with a general handicap of 80% and it makes much d' efforts for the community and s' expimer, thank you d' to be understanding.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Orientation doesn't work within timeline

Post #3by selden » 02.07.2008, 18:09

I think it's a bug in Timeline.

I suspect Chris forgot to take Orientation into consideration when adding Timeline support. I think Orientation should be specified inside the Timeline block.

However, I also think the Orientation directive is obsolete and should be deprecated. If you look in the WikiBook, you'll find that Orientation is not documented on the SSC page.

If you're going to use a new feature like Timeline,
you also should use BodyFrame and one of the Rotation blocks (FixedRotation, UniformRotation, PrecessingRotation, ScriptedRotation or SampledOrientation), . Their operations are well defined in this situation.

I did a quick test, with and without a Timeline. Orientation with no Timeline produces the same result as having Orientation specified outside the Timeline block. See below.
Selden

Topic author
Tomasz M. Bladyniec
Posts: 16
Joined: 05.01.2004
Age: 42
With us: 20 years 10 months
Location: Warsaw, Poland
Contact:

Re: Orientation doesn't work within timeline

Post #4by Tomasz M. Bladyniec » 02.07.2008, 20:39

Yes, I know about it, thank you. However, I still don't know how to change orientation into new reference system. I would like to re-write old add-on into new code and I'm concerned that I can't do it exactly. Anyone has an idea how to do it?
Besides, it looks like rotation of Venus Express isn't proper in this ssc anyway. Its antenna should be always pointed on Earth, right?
SAVE AS MANY AS YOU CAN

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

Re: Orientation doesn't work within timeline

Post #5by chris » 02.07.2008, 21:12

selden wrote:I think it's a bug in Timeline.

I suspect Chris forgot to take Orientation into consideration when adding Timeline support. I think Orientation should be specified inside the Timeline block.

However, I also think the Orientation directive is obsolete and should be deprecated. If you look in the WikiBook, you'll find that Orientation is not documented on the SSC page.

If you're going to use a new feature like Timeline,
you also should use BodyFrame and one of the Rotation blocks (FixedRotation, UniformRotation, PrecessingRotation, ScriptedRotation or SampledOrientation), . Their operations are well defined in this situation.

I did a quick test, with and without a Timeline. Orientation with no Timeline produces the same result as having Orientation specified outside the Timeline block. See below.

There's no bug, but some explanation of how Orientation works is in order.

Orientation is distinct from an object's rotation model. The rotation model is defined by one of the following:
FixedRotation
UniformRotation
SampledOrientation
CustomRotation
ScriptedRotation

(Properties such as RotationOffset can also be used to specify a rotation model. However, this is an old way of specifying the rotation model left over from the days when the Celestia only supported constant rotation about a fixed axis. Now that there are multiple ways to define the rotation model, UniformRotation should be used instead.)

Orientation is applied to the model before the rotation model. It is typically used to transform an mesh into a different coordinate system. Unlike the rotation model, Orientation does not affect the body fixed frame of an object.

Orientation should appear outside of the timeline, just like other mesh transformation properties such as radius. I think that you want something like this:

Code: Select all

"Venus Express"   "Sol/Venus"
{
    Class      "spacecraft"
    Mesh      "Venus Express.cmod"
    Radius      0.004
    Orientation   [90 -1 0 0]
    Timeline   [
    # Phase 1
    {
        EllipticalOrbit
        {
            Period         1
            SemiMajorAxis      39627
            Inclination      90
            Eccentricity      0.8296
            LongOfPericenter   -80
            MeanAnomaly      190
        }
       
        UniformRotation
        {       
            MeridianAngle   290
        }
    }
    ] # end Timeline
}


--Chris

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Orientation doesn't work within timeline

Post #6by selden » 02.07.2008, 22:35

Chris,

Thanks for the clarification!

I've added it to the SSC page of the WikiBook.
Selden

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: Orientation doesn't work within timeline

Post #7by BobHegwood » 02.07.2008, 23:05

Selden and Chris,

Thanks to you both for the English explanation here. Even I can understand it now (I think!) :wink:
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN


Return to “Bugs”