selective labelling

General discussion about Celestia that doesn't fit into other forums.
Topic author
surket
Posts: 15
Joined: 25.01.2011
With us: 13 years 9 months

selective labelling

Post #1by surket » 10.02.2011, 12:51

Hi everyone,

I want to write a script that creates a view in which the earth and the moon are visible and labeled and also the moon's orbit around the earth is shown. But I do not want to see any other orbits or labels at all -- something like the following:

c e l ://Follow/Sol:Earth/2011-02-11T16:57:41.87415?x=AKknXYYNARE&y=ACb9ForuURI&z=AJLCIRc5vuz//////////w&ow=0.38999&ox=0.295101&oy=-0.847389&oz=-0.206776&fov=30&ts=1&ltd=0&p=0&rf=6067&lm=6&tsrc=0&ver=3

(this was done interactively using the menu options)
I am sure the answer is buried in the above code, but I cannot make any sense of it. For example what is "ts" or "ltd" and so on? where can I find the definitions used in Cel-URL-links?

Many thanks,

Ben

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 16 years 2 months
Location: Paris France

Re: selective labelling

Post #2by jogad » 10.02.2011, 16:30

The simplest script (celx script foc celestia 1.6.1 or above) is :

celestia:seturl("cel://Follow/Sol:Earth/2011-02-11T16:57:41.87415?x=AKknXYYNARE&y=ACb9ForuURI&z=AJLCIRc5vuz//////////w&ow=0.38999&ox=0.295101&oy=-0.847389&oz=-0.206776&fov=30&ts=1&ltd=0&p=0&rf=6067&lm=6&tsrc=0&ver=3")

That's it!

I have colored in red the separation between the parameters.

Your cel:url means

follow earth
Instead of Follow you may find SyncOrbit, Chase, PhaseLock or Freeflight

time is 16h 57mn 41.87415s TDB (which is slighty different from UTC)

x=AKknXYYNARE&y=ACb9ForuURI&z=AJLCIRc5vuz//////////w
is the observer's position (x,y,z) in space in the current reference frame

ow=0.429893&ox=0.319956&oy=-0.786188&oz=-0.307779
is the observer's orientation (ow, ox, oy, oz)

Then you can have other option like
track= object name
select= object name
fov = Field of View in degrees
ts = time scale
ltd = light time delay (0=off, 1=on)
p = paused (0=off, 1=on)
rf = render flags
lm = label flags
tsrc = I don't know !!! who knows ???
ver=3 = for celestia 1.6 and above (at this time)

The rf number is made by the sum of this individual flags
1 = stars
2 = planets
4 = galaxies
8 = constellation lines
6 = clouds
32 = orbits
64 = celestial grid
128 = night lights
256 = atmospheres
512 = smooth lines for orbits
1024 = eclipes shadows
2048 = light travel ???
4096 = ring shadows
8192 = constellation boundaries
16384 = auto magnitude
32768 = comet tails
65536 = marks
131072 = partial trajectories (not implemented yet)
262144 = nebulae
524288 = open clusters
1048576 = globulars
2097152 = cloud shadows
4194304 = galactic grid
8388608 = ecliptic grid
16777216 = horizontal grid
33554432 = ecliptic

The lm number is made by the sum of this flags that indicates the labels that are shown.
1 = stars
2 = planets
4 = moons
8 = constellations
16 = galaxies
32 = asteroids
64 = vessels
128 = localities
256 = comets
512 = nebulae
1024 open clusters
2048 = local names for constellations
4096 = dwarf planets
8192 = minor moons
16384 = globulars

Topic author
surket
Posts: 15
Joined: 25.01.2011
With us: 13 years 9 months

Re: selective labelling

Post #3by surket » 10.02.2011, 17:17

Thanks jogad, this is a fantastically comprehensive reply. It will take me a while to digest it.
In the meantime, I put a cel-URL in a script file (test.cel) as follows but it doesn't work. Here is the test file:

{
seturl {url "

Code: Select all

cel://SyncOrbit/Sol:Earth:Moon/0010-11-08T10:47:17.42917?x=jEWu+liTAQ&y=Vrn46uGHCw&z=E+sokb58/P///////////w&ow=-0.666955&ox=-0.152903&oy=-0.723332&oz=0.0926398&fov=31.4737&ts=1000&ltd=0&p=0&rf=1939&lm=0&tsrc=0&ver=3


"
}
}

My current version is 1.6.0 (running on Mac)

Thanks you for your help,

Ben

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 16 years 2 months
Location: Paris France

Re: selective labelling

Post #4by jogad » 10.02.2011, 17:55

Your cel:url string must be strictly enclosed with the qotes. No space nor line feed after the first quote. Same thing at the end of the string.

Code: Select all

{
seturl{ url
"cel://SyncOrbit/Sol:Earth:Moon/0010-11-08T10:47:17.42917?x=jEWu+liTAQ&y=Vrn46uGHCw&z=E+sokb58/P///////////w&ow=-0.666955&ox=-0.152903&oy=-0.723332&oz=0.0926398&fov=31.4737&ts=1000&ltd=0&p=0&rf=1939&lm=0&tsrc=0&ver=3"
}
}

Topic author
surket
Posts: 15
Joined: 25.01.2011
With us: 13 years 9 months

Re: selective labelling

Post #5by surket » 10.02.2011, 18:30

You are absolutely right. It worked after that correction. Thanks.

Reference my original question, is it not possible to turn the labels or orbits on and off selectively? I want so see all the planets going round the sun but only some of them to have labels or orbits shown.

Ben


Return to “Celestia Users”