Celurls decoding and parameters change

All about writing scripts for Celestia in Lua and the .cel system
Topic author
ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Celurls decoding and parameters change

Post #1by ANDREA » 06.01.2007, 19:03

I don't remember if this has already been discussed, so in this case I beg your pardon (I found something related to this in the post (2003)
http://www.shatters.net/forum/viewtopic.php?t=3800&highlight=seturl+command
but it doesn't solve my problems. :cry:
I would like to know what are the single parameters that we find in a seturl cel script command.
Let me make an example: the following one shows the Earth rising from the Moon lighted limb, while staying in orbit around the Moon (as Apollo astronauts have seen during Apollo flights):

cel://Follow/Earth/2519-09-08T11:21:52.50832?x=7tpJtizMpH/MDA&y=nkojQA6QWAE&z=bpR32NLxP+IF&ow=0.318819&ox=-0.490562&oy=0.787903&oz=0.192125&select=Earth&fov=5.981928&ts=-100.000000&ltd=0&rf=6931&lm=49152

Obviously I can see there the date/time settings
19-09-08T11:21:52. and that we are following Earth

Follow/Earth/25 (yes, but what are the last two digits=25?)
I can see the FOV, but all the other numbers/letters?

My question is due to the info given by Chris Laurel in his Cel_Script_Guide_v1-0g.doc, regarding the seturl command:

"When you use the seturl command, all of the saved settings stored in the Cell://URL are transferred to the user's currently running copy of Celestia."
I would like the contrary.
If I insert in a script a celurl taken fron somewhere else, so not created in my script, I would like to "smooth" the celurl settings as possible, according to the ones already given in my script. :wink:
Just to make an example: if in my script I have
setvisibilitylimit { magnitude 6.8 }
and the celurl gives too many and bright stars on the screen, I need to change the url magnitude settings to reduce them as given in my script setvisibilitylimit command.
And obviously the same thing for any other parameter available in celurl.
Is it possible to have the celurls decoding? 8O
Thanks a lot.
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Re: Celurls decoding and parameters change

Post #2by Christophe » 06.01.2007, 19:52

ANDREA wrote:Obviously I can see there the date/time settings
19-09-08T11:21:52. and that we are following Earth

Follow/Earth/25 (yes, but what are the last two digits=25?)
I can see the FOV, but all the other numbers/letters?


The url format is:
cel://<Mode>/<Primary body>[/<Secondary body>]/<Date>?<variables>

The date follows the ISO 8601 standard : 2519-09-08T11:21:52.

The variables are:
- x, y, z: Absolute (universal) coordinates in 64bit precision encoded in base 64.
- ow, ox, oy, oz: orientation quaternion
- select: selected body
- fov: field of view
- ts: time scale
- ltd: Light Time Delay (boolean)
- rf: render flag
- lm: label mode

As you can see, the url doesn't alter the visibility limit. It may, however enable or disable the automag feature (part of the render flag). And by altering the FOV it may also change the rendering of stars.

You may safely remove variables from the url, the user's current settings will be preserved.
Christophe

Topic author
ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Re: Celurls decoding and parameters change

Post #3by ANDREA » 06.01.2007, 21:54

Christophe wrote: The url format is:
cel://<Mode>/<Primary body>[/<Secondary body>]/<Date>?<variables>.......
As you can see, the url doesn't alter the visibility limit. It may, however enable or disable the automag feature (part of the render flag). And by altering the FOV it may also change the rendering of stars.
You may safely remove variables from the url, the user's current settings will be preserved.

Wow Christophe, a very quick and exhaustive reply!
Thanks a lot, you solved my problem.
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Topic author
ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #4by ANDREA » 06.01.2007, 23:06

Christophe, in my example I have

rf=6931&lm=49152
- rf: render flag
- lm: label mode

Can you please explain the relationship among these numbers and the
render flag and label mode settings? 8O ?
Thanks a lot.
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #5by Christophe » 06.01.2007, 23:38

Cf render.h for the list of label and render flags.

6931=b 1 1011 0001 0011=
ShowStars | ShowPlanets | ShowCloudMaps | ShowAtmospheres | ShowSmoothLines | ShowStarsAsPoints | ShowRingShadows

49152=b 1100 0000 0000 0000=
OpenClusterLabels | I18nConstellationLabels
Christophe

Topic author
ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #6by ANDREA » 06.01.2007, 23:44

Christophe wrote:Cf render.h for the list of label and render flags.....

Thanks a lot once again, Christophe. :wink:
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

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

Post #7by symaski62 » 07.01.2007, 00:21

Code: Select all

   22 Barycenter "Solar System Barycenter:SSB"
   23 {
   24    RA 0
   25    Dec 0
   26    Distance 0
   27 }
   28
   29 0 "Sol:Sun"
   30 {
   31    OrbitBarycenter "Solar System Barycenter"
   32    CustomOrbit "vsop87-sun"
   33
   34    SpectralType "G2V"
   35    AbsMag 4.83
   36
   37    RotationPeriod      609.12  # 25.38 days
   38    Obliquity             7.25  # correct orientation relative to ecliptic
   39    EquatorAscendingNode 75.77  #
   40    RotationOffset       23.00  # standard meridian
   41 }


?©h cel:url :wink:
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.

Topic author
ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #8by ANDREA » 07.01.2007, 00:45

symaski62 wrote:

Code: Select all

   22 Barycenter "Solar System Barycenter:SSB"
   23 {
   24    RA 0
   25    Dec 0
   26    Distance 0
   27 }
   28
   29 0 "Sol:Sun"
   30 {
   31    OrbitBarycenter "Solar System Barycenter"
   32    CustomOrbit "vsop87-sun"
   33
   34    SpectralType "G2V"
   35    AbsMag 4.83
   36
   37    RotationPeriod      609.12  # 25.38 days
   38    Obliquity             7.25  # correct orientation relative to ecliptic
   39    EquatorAscendingNode 75.77  #
   40    RotationOffset       23.00  # standard meridian
   41 }

?©h cel:url :wink:


Symaski62, nice, but did you mistake the topic?
Or, as usual, you express something in a way that none except you can understand?
Just once, please, show me (us!) that you are able to write a full text line, and in a way that be intelligible for normal people like me (and probably many other, IMHO).
Thank you.

Andrea 8O
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Corben Dallas
Posts: 4
Joined: 15.04.2006
With us: 18 years 7 months
Location: Area21, Westerwald, Germany

Post #9by Corben Dallas » 10.01.2008, 09:17

Hi everybody,

the universal coordinates x, y, z seem to have different origins in Celestia 1.4 and 1.5. E.g. a cel:// like this

cel://SyncOrbit/Sol:Earth/1880-01-01T02 ... f=919&lm=0

which should take me near earth works fine in 1.4 while in 1.5.0pre4 it beams me to a position some 206.28 au from earth.

Has anybody a tip how to convert these old coordinates into new values i.e. constants to translate the origins?

BTW: how can I easily convert base64 encoding into something human readable?

Thanks for now
Kai.

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 8 months

Post #10by Adirondack » 10.01.2008, 11:54

Corben Dallas wrote:the universal coordinates x, y, z seem to have different origins in Celestia 1.4 and 1.5.

Yes. -> See http://shatters.net/forum/viewtopic.php?t=11852

Adirondack
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)
The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)

Corben Dallas
Posts: 4
Joined: 15.04.2006
With us: 18 years 7 months
Location: Area21, Westerwald, Germany

Post #11by Corben Dallas » 10.01.2008, 13:21

Thanks, Adirondack.

Bye, Kai.

Topic author
ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #12by ANDREA » 10.01.2008, 14:00

Well, given the known incompatibility between Celestia 1.4 and Celestia 1.5 celurls, is there any possibility to convert automatically the old celurls to the new configuration, with no more the Sun as reference, but its orbit barycenter?
I'm absolutely ignorant on the matter, so beg your pardon if I'm saying nonsenses :oops: , but I think that avoiding to prepare once again all those old celurls could be a very interesting target, IMHO. :wink:
Is it possible?
Thanks a lot

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO


Return to “Scripting”