Actually (please someone correct me if I’m wrong) it is not possibile to define an URL with multiview. So it is not possibile to click over an Hyperlink in an HTML document and open Celestia with 3-4 (or even more) different views.
I was asking me if should be very difficult to implement a different kind of celestia URL. Instead of a url in semi-binary format
Code: Select all
cel://Follow/Sol:Mercury/2003-08-01T13:15:51.15898?x=AMBAWebCUuPkDA&y=Cpuhlugs9C4e&z=VQr63TfoNIgc&ow=0.863894&ox=0.258879&oy=-0.420347&oz=-0.099883&select=HD%2075318&fov=45.000000&ts=0.000000&rf=40375&lm=1244162
a simple reference to a CEL script.
Using URL CEL script commands should be somewhat easy to operate with Celestia URLs.
The HTML code should be something like this:
Code: Select all
<a href="cel://http://www.myweb.com/myfolder/myURLScript.cel">CEL-URL example</a>
The script file called in the url is saved in a web site. To allow this mechanism Celestia should have some kind of internet browsing capabilities, so this is the source of my implementation dubts.
Some new script commands should be required like:
Code: Select all
SelectPane {ID n} #n=number
SplitHorizontal {ID n Size p} #p = percentage of the higher resulting pane
SplitVertical {ID n Size p} #p = percentage of the left resulting pane
CallScript {name "na"} #na = name
SetPath {name "na"} #na = name
SwitchPane {p1 n1 p2 n2} #p1,P2 = Pane IDs
Obviously the current URL capture mechanism is very very handy. It is not suitable that Users creates a script from scratch to configure all the things. Instead Celestia should create a script with all the current view settings, included.
So instead of an URL in Semi-Binary format, a plain text script file should be generated and prompted for saving by Celestia. Something like the Don’s standard startup CEL Script plus a Gotolonglat and a Time script commands.
So the final script called by "<a href=cel://" should be something like this
Code: Select all
#set the subscripts folder
SetPath {name "http://www.myweb.com/myfolder/URL1"}
#call the sub script for initial settings
CallScript {name "../generalscripts/InitialSettings.cel"}
#Split the main view. The higher resuting pane conserves its ID (1) pane and har the 30% of the initial pane height.
#make other splits
SplitHorizontal {ID 1 Size 0.33}
Splitvertical {ID 1 Size 0,67}
SplitVertical {ID 1 Size 0.5
SplitHorizontal {ID 2 Size 0,67}
SplitHorizontal {ID 2 Size 0,5}
# The current result should be
#+-------------+------------+-----------+
#|1 |4 |2 |
#| | | |
#| | | |
#| | | |
#+-------------+------------+-----------+
#|3 |6 |
#| | |
#| | |
#| | |
#| |-----------|
#| |5 |
#| | |
#| | |
#| | |
#+--------------------------------------+
#reorder panes
Switchpane { p1 3 p2 1}
Switchpane { p1 3 p2 2}
Switchpane { p1 4 p2 3}
Switchpane { p1 6 p2 5}
# The final result should be
#+-------------+------------+-----------+
#|2 |3 |4 |
#| | | |
#| | | |
#| | | |
#+-------------+------------+-----------+
#|1 |5 |
#| | |
#| | |
#| | |
#| |-----------|
#| |6 |
#| | |
#| | |
#| | |
#+--------------------------------------+
#Call sub scripts to set the views in the various panes.
CallScript {name "pane1.cel"}
CallScript {name "pane2.cel"}
CallScript {name "pane3.cel"}
CallScript {name "pane4.cel"}
CallScript {name "pane5.cel"}
CallScript {name "pane6.cel"}
#set active pane
SelectPane {ID 1}
For instalnce one of the sub scripts captured directly by Celstia should be:
Code: Select all
#pane 1
#initial settings and preferences
select {object "Mars" }
time { jd 2452862.89542 }
gotolonglat { time 5 distance 4 longitude -122 latitude 47 }
#set final preferences
...
#etc
I think that porting the URL cel scripts in celx Lua script format should be surely easy.
What do you think?
Is it practically feasible?
Bye - Paolo