Frame related question.

General discussion about Celestia that doesn't fit into other forums.
Topic author
ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Frame related question.

Post #21by ElChristou » 18.07.2008, 13:03

H?h?... wonderful, I must quit this community right now due to the shame!
I thought I tried that yesterday night but indeed I had to be reeaally tired...

MANY TX Selden! (I love you) :lol:
Image

Topic author
ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Frame related question.

Post #22by ElChristou » 18.07.2008, 16:40

ElChristou wrote:H?h?... wonderful, I must quit this community right now due to the shame!
I thought I tried that yesterday night but indeed I had to be reeaally tired...

MANY TX Selden! (I love you) :lol:

H?h?... I knew I have tested this... and after some more test (at the time of my above post I've been fooled by the moment in Celestia in which effectively the model was in correct position) it's not the result I wanted.

SO, Selden, Chris (and others if they want to try), you can download HERE (6.1Mo) a zip with:

- The CSM/LM in Moon orbit (called Apollo 11 CSM+LM)
- The CSM alone (called Apollo11 CSM)
- The CSM/AS rendez-vous (called Apollo11 CSM+LM)

If you look at the CSM alone, it's exactly the behavior I want. The model is slightly pointing at the ground, look at it's vectors, one is pointing at the moon, one in the orbit, all fine. Note that this is the result of and Orientation [ 130 1 0 0 ] tag.

Now the two others are what I could do without obtaining the result of the CSM alone. The UniformRotation tag work well, but the whole system (models and vectors) change. Conclusion the system rotate (normal) but don't point anymore constantly to the ground.

A beer to the person who can bring the behavior of the CSM alone to the system CSM+LEM!
Image

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

Re: Frame related question.

Post #23by selden » 18.07.2008, 18:07

1. The BodyFrame isn't moving. Its Z axis still points always down toward the Moon. I think you are being confused by the nomenclature used in Celestia's Reference Vectors menu, which needs to be changed, I think.

"Show Body Axes" shows the axes of the object itself, after the UniformRotation block has been applied. Its arrows are bright.

"Show Frame Axes" shows the axes of the BodyFrame of the object. Its arrows are slightly fainter.

See the picture below.

2. By using the Orientation directive you are introducing a second reference frame, one which uses that particular model's internal coordinate system.

To do the same thing for multiple objects, you also have to introduce a second reference frame, but using Celestia's frames.

Code: Select all

"Apollo 11 CSM+AS Orbit" "Sol/Earth/Moon"
{
   Class      "spacecraft"
   Mesh      "invisible.cmod"
   Radius      0.015
   MeshCenter   [ 495 0 7000 ]

#   Beginning   2440419.182548958 # 1969 Jul 16 16:18:13
#       Ending      2440425.111111111 # 1969 Jul 22 14:40:00

   EllipticalOrbit
   {
   Period      0.0873
   SemiMajorAxis   1935
   Eccentricity   0.00095
   Inclination   5
   }

   UniformRotation
   {
       Period      20
   }

   Albedo      0.05
}

Modify "Apollo 11 CSM+AS Orbit" "Sol/Earth/Moon"
{
   BodyFrame
   {
      TwoVector
      {
         Center "Sol/Earth/Moon/Apollo 11 CSM+AS Orbit"
         Primary
         {
            Axis "z"
            RelativePosition
            {
            Observer "Sol/Earth/Moon/Apollo 11 CSM+AS Orbit"
            Target "Sol/Earth/Moon"
            }
         }
         Secondary
         {
            Axis "y"
            RelativeVelocity
            {
            Observer "Sol/Earth/Moon/Apollo 11 CSM+AS Orbit"
            Target "Sol/Earth/Moon"
            }
         }
      }
   }
}



"Apollo 11 CSM+AS" "Sol/Earth/Moon"
{
   Class      "spacecraft"
   Mesh      "ap1.cmod"
   Radius      0.015
   MeshCenter   [ 495 0 7000 ]

#   Beginning   2440419.182548958 # 1969 Jul 16 16:18:13
#       Ending      2440425.111111111 # 1969 Jul 22 14:40:00


   OrbitFrame { BodyFixed { Center  "Sol/Earth/Moon/Apollo 11 CSM+AS Orbit"}}
   FixedPosition [ 0 0 0 ]

   BodyFrame { BodyFixed { Center  "Sol/Earth/Moon/Apollo 11 CSM+AS Orbit"}}
   FixedRotation   {  Inclination   250   }

   Albedo      0.05
}

The Inclination angle needs to be adjusted since the coordinate system is different,
Selden

Topic author
ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Frame related question.

Post #24by ElChristou » 18.07.2008, 18:32

Indeed!
It was a bit more complicated than I thought...

Many many Tx Selden. If you have any bud next to you, just open it right now! :wink:

Last question: what class could hide completely from the GUI the frame Apollo 11 CSM+AS Orbit?
Image

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

Re: Frame related question.

Post #25by selden » 18.07.2008, 21:05

Class "invisible"
Is probably the thing to use. I don't think there's anything that'll make it disappear entirely. Personally I prefer to use an invisible model since there are subtle differences when Class "invisible" is used.

I don't think that defining it as a ReferencePoint will do the right thing: ReferencePoints don't have any orientation (rotation) associated with them.
Selden

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

Re: Frame related question.

Post #26by chris » 18.07.2008, 21:11

selden wrote:Class "invisible"
Is probably the thing to use. I don't think there's anything that'll make it disappear entirely. Personally I prefer to use an invisible model since there are subtle differences when Class "invisible" is used.

What are these differences? If there's a problem with invisible objects, I'd like to do something about it. Using invisible cmods will work, but it's a hack that I'd rather not force add-on creators to use.

--Chris

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

Re: Frame related question.

Post #27by chris » 18.07.2008, 21:34

Christophe,

I'm confused by something: why are you using a UniformRotation with a period of 20 hours? Should the CSM really be rotating in its frame? If not, you can get by without the Apollo 11 CMS+AS Orbit object in Selden's file and use a FixedRotation. I think that this is probably the right approach: otherwise you end up with a rather strange axis of rotation for the CSM.

--Chris

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

Re: Frame related question.

Post #28by selden » 18.07.2008, 22:36

chris wrote:
selden wrote:Class "invisible"
Is probably the thing to use. I don't think there's anything that'll make it disappear entirely. Personally I prefer to use an invisible model since there are subtle differences when Class "invisible" is used.

What are these differences? If there's a problem with invisible objects, I'd like to do something about it. Using invisible cmods will work, but it's a hack that I'd rather not force add-on creators to use.

--Chris

Sorry: I've forgotten. At one point I went through and changed all of the Class "invisible" objects used for my Hale Telesope project to Class "component" with invisible cmods, but now I really can't remember why. I'll change them back and see if I can reconstruct whatever problems I was having.

*sigh*
Selden

Topic author
ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Frame related question.

Post #29by ElChristou » 19.07.2008, 07:24

chris wrote:I'm confused by something: why are you using a UniformRotation with a period of 20 hours? Should the CSM really be rotating in its frame? If not, you can get by without the Apollo 11 CMS+AS Orbit object in Selden's file and use a FixedRotation. I think that this is probably the right approach: otherwise you end up with a rather strange axis of rotation for the CSM.

Well, having in mind that those are prerelease and all position are fictitious, just like my LibertyBell or Vostok I'd like a slow rotation on the principal axis to have all sides of the model illuminated (this to take shots in different position from different angle etc...)
Now if you have another (simplest) solution, please show us! (because even understanding Selden solution, I'm still really unsure and to be frank a bit bored after testing hours of modifs starting Celestia again and again... :? )
Image

Topic author
ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Frame related question.

Post #30by ElChristou » 19.07.2008, 07:26

Concerning the invisible class, do I dream or the entry still appear in the search console?
Image

Topic author
ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Frame related question.

Post #31by ElChristou » 19.07.2008, 16:46

ElChristou wrote:Concerning the invisible class, do I dream or the entry still appear in the search console?

And what if we had a "frame" class for this kind of exercises? (of course the entry should not appear all in the GUI)
Image

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

Re: Frame related question.

Post #32by selden » 19.07.2008, 18:16

There was a discussion a while ago about adding a construct in v1.6 (perhaps a Class) which would hide an object's name. Unfortunately, it did not get implemented, although several others did get implemented in v1.6 -- Clickable, for example.
Selden

Topic author
ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Frame related question.

Post #33by ElChristou » 19.07.2008, 18:50

Chris? Is this still an eventuality? (perso I think it would be nice...)
Image

Topic author
ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Frame related question.

Post #34by ElChristou » 20.07.2008, 06:40

ElChristou wrote:Chris? Is this still an eventuality? (perso I think it would be nice...)

bump
Image

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

Re: Frame related question.

Post #35by selden » 22.07.2008, 00:51

chris wrote:
selden wrote:Class "invisible"
Is probably the thing to use. I don't think there's anything that'll make it disappear entirely. Personally I prefer to use an invisible model since there are subtle differences when Class "invisible" is used.

What are these differences? If there's a problem with invisible objects, I'd like to do something about it. Using invisible cmods will work, but it's a hack that I'd rather not force add-on creators to use.

--Chris

I finally remembered.

Going to an object which is Class "invisible" sometimes works differently from Going to an object which has an invisible Mesh.

Going to an object which is Class "invisible" sometimes stops long before you're anywhere near it. You have to type G multiple times to get close.

Going to an object which has an invisible Mesh always takes you immediately to a nearby position.

(I had to qualify my descriptions with "sometimes" because right now it seems to be doing the same thing for my test case. But I *know* it acted differently before!)
Selden


Return to “Celestia Users”