How to use cel://?

Description: All about writing scripts for Celestia in Lua and the .cel system


selden
Avatar
selden
Posts: 10117
With us: 15 years 2 months
Location: NY, USA

#2by selden » 27.10.2017, 10:22

I'm not sure what you mean by the word "use".

Most often one includes a Cel:// URL in the text of a Web page file (one with a file type of .htm or .html). One then invokes a Web browser to read that Web page. That browser passes the Cel:// URL to Celestia for interpretation. This allows one, for example, to create an instructional file which tells the reader about astronomical objects and invokes Celestia to display them.

Cel:// URLs don't necessarily have to be used in Web pages. They can be included in any type of text file which can be used to access URLs. For example, in a PDF or Word document.

In more detail:

A URL (Uniform Resource Locator) usually consists of several parts
protocol://hostname:port/path-and-file-name
where "protocol" specifies the I/O protocol to be used when accessing the specified file on the specified computer. The contents of a Cel URL don't actually point to a computer or file, though.

In the case of Cel:// URLs, the protocol text string "Cel" tells the URL interpreter (usually a Web browser) to invoke whatever program is associated with the protocol "Cel". That program is responsible for interpreting the text of the URL and doing something appropriate with it.

Celestia's Windows installer associates the program Celestia with the "Cel" protocol. The Web browser which is reading the text of the URL invokes Celestia and passes to Celestia the text of the URL string. Celestia is then responsible for interpreting the information provided in the Cel:// URL and doing something appropriate.

FWIW, some of the I/O protocols recognized by Web browsers include http, https, ftp, telnet and others.

Here's an example of the contents of a Web page which includes your Cel: url:

Code: Select all

<html>
<head>
<title> URL Example </title>
</head>
<body>


<ul>
<li>
<a href="
cel://SyncOrbit/Sol:Jupiter:Io/2013-04-09T09:11:50.75716?x=NCr9592wdP///////////w&y=Fl7K2pIa&z=0e5sFK5DEw&ow=0.720462&ox=0.00940205&oy=0.69338&oz=-0.00832007&select=Sol:Jupiter:Io&fov=17.9577&ts=1&ltd=0&p=0&rf=57239&lm=0&tsrc=0&ver=3
">
View Io and its shadow on Jupiter.
</a>
</li>
</ul>
</body>
</html>
Selden

SkyStars
Topic author
SkyStars
Topic author
Posts: 5
With us: 3 months 13 days

#3by SkyStars » 27.10.2017, 13:19

There are a lot of parameters inside the url, I do not know what it means. Sorry, my English is not very good. : :smile:

selden
Avatar
selden
Posts: 10117
With us: 15 years 2 months
Location: NY, USA

#4by selden » 28.10.2017, 02:00

Selden


Return to “Scripting”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest