I would like to be able to send commands from another program to Celestia so I can use it as a reference guide for some notes I take on different planets.
An ideal application of it would be able to select and goto a planet by an external trigger with some sort of GUI and then interact with objects as well, having a click on an object pull up a webpage or a document associated with it.
Is anything like this possible?
Any help is appreciated,
Signed,
Steven Barjek
steve@barjek.com
Request: Sending commands to Celestia from an external prog.
Steven,
Celestia has several different ways to display notes you write, but as part of static menu items. They can't be added dynamically at runtime in quite the way you'd like.
You could add them to the file guide.cel in Celestia's root directory, for example. Its descriptions are shown in the Navigation menu item "Tour Guide".
A somewhat more dynamic technique would be to use the new InfoURL option. You can write Web pages and add an InfoURL descriptor to the appropriate entries in solarsys.ssc (or to whatever .ssc you create). The InfoURL links are invoked from the popup menu that appears when you right-click on an object visible in Celestia's display. By default the menu item Info goes to a couple of different Web sites. (This option requires 1.2.5 or later.) Adding all the explicit InfoURL commands would be a pain, but the contents of the referenced pages could be changed at any time.
[added later] A third option would be to use Celestia's scripting option and use its Print command to display your notes on the screen. They'd be more awkward to invoke, since you'd have to specify the appropriate script using the File menu. The print command only displays the specified text string, it can't reference another file.
Unfortunately, remote scripting would require someone to write the code to incorporate an inter-process communications module that would invoke the various scriping command routines. Preferably it'd use sockets so Celestia could be controlled from other networked systems, or one system could control multiple Celestia displays simultaneously. That, plus a program that sends a command string while retrieving tthe results of the previous command, would make so many other things possible.
It's rather frustrating. Operating systems like AmigaDOS and BeOS include IPC in their basic design and come with utilities that make it look so easy. If such a thing could be incorporated in Celestia, it'd substantially reduce the amount of (so far unwritten) scripting support built into Celestia, since conditionals and looping (for example) could be provided by whatever scripting language one likes. Even perl
So as it currently stands, the direct answer is no.![Sad :(](./images/smilies/icon_sad.gif)
Celestia has several different ways to display notes you write, but as part of static menu items. They can't be added dynamically at runtime in quite the way you'd like.
You could add them to the file guide.cel in Celestia's root directory, for example. Its descriptions are shown in the Navigation menu item "Tour Guide".
A somewhat more dynamic technique would be to use the new InfoURL option. You can write Web pages and add an InfoURL descriptor to the appropriate entries in solarsys.ssc (or to whatever .ssc you create). The InfoURL links are invoked from the popup menu that appears when you right-click on an object visible in Celestia's display. By default the menu item Info goes to a couple of different Web sites. (This option requires 1.2.5 or later.) Adding all the explicit InfoURL commands would be a pain, but the contents of the referenced pages could be changed at any time.
[added later] A third option would be to use Celestia's scripting option and use its Print command to display your notes on the screen. They'd be more awkward to invoke, since you'd have to specify the appropriate script using the File menu. The print command only displays the specified text string, it can't reference another file.
Unfortunately, remote scripting would require someone to write the code to incorporate an inter-process communications module that would invoke the various scriping command routines. Preferably it'd use sockets so Celestia could be controlled from other networked systems, or one system could control multiple Celestia displays simultaneously. That, plus a program that sends a command string while retrieving tthe results of the previous command, would make so many other things possible.
It's rather frustrating. Operating systems like AmigaDOS and BeOS include IPC in their basic design and come with utilities that make it look so easy. If such a thing could be incorporated in Celestia, it'd substantially reduce the amount of (so far unwritten) scripting support built into Celestia, since conditionals and looping (for example) could be provided by whatever scripting language one likes. Even perl
![Wink ;)](./images/smilies/icon_wink.gif)
So as it currently stands, the direct answer is no.
![Sad :(](./images/smilies/icon_sad.gif)
Selden
-
- Developer
- Posts: 944
- Joined: 18.07.2002
- With us: 22 years 7 months
- Location: Lyon (France)
selden wrote:Unfortunately, remote scripting would require someone to write the code to incorporate an inter-process communications module that would invoke the various scriping command routines. Preferably it'd use sockets so Celestia could be controlled from other networked systems, or one system could control multiple Celestia displays simultaneously. That, plus a program that sends a command string while retrieving tthe results of the previous command, would make so many other things possible.
It's rather frustrating. Operating systems like AmigaDOS and BeOS include IPC in their basic design and come with utilities that make it look so easy. If such a thing could be incorporated in Celestia, it'd substantially reduce the amount of (so far unwritten) scripting support built into Celestia, since conditionals and looping (for example) could be provided by whatever scripting language one likes. Even perl ;)
On the KDE version you can already go to a specific location using urls from Konqueror or the shell. For a more advanced control I could quite easily add a DCOP interface that would provide that kind of IPC/RPC mecanism. I was actually planning on doing it but haven't found the time to do it yet. With that you could control Celestia from the shell, perl, python... or even through XML/RPC from a remote host (not sure that's useful though). Adding RMB menu items could be done with DCOP too.
On Windows I think that COM provides that kind of facility, but I don't know how difficult it is to implement.
Thanks for the input!
For the time being I can try and use the existing functions to see if I can get my idea out in some form. My ideal application would be to have a program manage menus and database access. Hopefully I would be able to make a tree where I can add new notes and records on the GUI, and have Celestia goto the planet or moon I am adding notes to.
I love Celestia as is so far, and appreciate your efforts! Thanks for investigating this as well.
I love Celestia as is so far, and appreciate your efforts! Thanks for investigating this as well.
Need interaction afterall...
Once the new version with a working InfoURL function is out, I think I can use it for the time being without interaction... Yet, I will need it at some future point.
use TCL
The need for this capability also crossed my mind a while ago. I recommended using TCL (http://www.tcl.tk) as the IPC and scripting language for Celestia. TCL is a free cross-platform scripting language and IPC that is designed from the start to be embedded into other applications for remote control and access.
I planned to take a shot at wrapping the current Celestia scripting calls in TCL (that way you get both), but I haven't had the time. Based on previous work I've done with TCL, I really think this would be a fairly simple thing to do. The internals of the Celestia scripting engine could probably be modified (perhaps with the use of templates) to create the TCL command wrappers automagically. Thus, preventing a maintenance headache.
Once Celestia can be controlled by another app., a whole wealth of possibilities emerge.
I planned to take a shot at wrapping the current Celestia scripting calls in TCL (that way you get both), but I haven't had the time. Based on previous work I've done with TCL, I really think this would be a fairly simple thing to do. The internals of the Celestia scripting engine could probably be modified (perhaps with the use of templates) to create the TCL command wrappers automagically. Thus, preventing a maintenance headache.
Once Celestia can be controlled by another app., a whole wealth of possibilities emerge.
is InfoURL invoked as: InfoURL "http://www.myurl.com" ??
And where is it placed in the ssc file??
Like:
"earth" "sol"
{
InfoURL "blah"
nm I see it now under Charon
InfoURL "http://www.nineplanets.org/pluto.html#Charon"
And where is it placed in the ssc file??
Like:
"earth" "sol"
{
InfoURL "blah"
nm I see it now under Charon
![Razz :P](./images/smilies/icon_razz.gif)
InfoURL "http://www.nineplanets.org/pluto.html#Charon"
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!
Applications...
A couple of applications that could use Celestia with this feature:
An interactive webpage (my intention) that makes calls to some external program that then sends commands to Celestia to goto a location that is referenced in the webpage. That way, since InfoURL can call a page it can work both ways (having a page that calls up something in Celestia).
A database of notes that can use Celestia to view a location specified in the database.
Other applications could write out temporary Celestia scripts, and then have Celestia execute these scripts. Or bypass the temporary file all together and have the program send commands directly to Celestia for use with interactive demos.
Having Celestia able to take commands could open up Celestia to be widely used in many ways such as irguy has said.
An interactive webpage (my intention) that makes calls to some external program that then sends commands to Celestia to goto a location that is referenced in the webpage. That way, since InfoURL can call a page it can work both ways (having a page that calls up something in Celestia).
A database of notes that can use Celestia to view a location specified in the database.
Other applications could write out temporary Celestia scripts, and then have Celestia execute these scripts. Or bypass the temporary file all together and have the program send commands directly to Celestia for use with interactive demos.
Having Celestia able to take commands could open up Celestia to be widely used in many ways such as irguy has said.
Controlling Celestia from an external program
I, too, would like to be able to send commands to Celestia from an external program, but what I want to do is a little more than simply referencing a location from an external link.
I'd like to be able to have an external program place and move multiple objects such as spacecraft and continutally update their positions and orientations based on information from the external program.
Why? Well, people have created fictional solar systems within Celestia before, but entire fictional universes have been created for online text-based multi-user roleplaying games called MUSHes. These games often provide the ability to navigate a virtual spacecraft through the virtual universe.
Problem is, it's all text-based.
Several MUSH client (such as MUSHclient, for windows) programs have the ability to control other programs through scripting. It would be interesting if Celestia allowed itself to be controlled by such a program, allowing players to see the movements of in-game planets, stars, and vessels rendered graphically rather than as lists of coordinates and bearings.
I'd like to be able to have an external program place and move multiple objects such as spacecraft and continutally update their positions and orientations based on information from the external program.
Why? Well, people have created fictional solar systems within Celestia before, but entire fictional universes have been created for online text-based multi-user roleplaying games called MUSHes. These games often provide the ability to navigate a virtual spacecraft through the virtual universe.
Problem is, it's all text-based.
Several MUSH client (such as MUSHclient, for windows) programs have the ability to control other programs through scripting. It would be interesting if Celestia allowed itself to be controlled by such a program, allowing players to see the movements of in-game planets, stars, and vessels rendered graphically rather than as lists of coordinates and bearings.
-
- Posts: 6
- Joined: 11.11.2002
- With us: 22 years 3 months
I've developed a celestia server which takes in commands .
hi i've recently developed a server for Celstia which accepts client connection on some specified PORT (i used 5555). The client passes the commands in the form of the scripts (the usual cel scripts) and then the server runs the scripts and the changes are ON the CELESTIA SCREEN...
Hope this is going to help someone trying to remote control Celstia.....
There are a lot of possibilities as the client can be ay thing which could send in scripts to the server....
The development i've done works well on WINDOWS as i have no access to any other systems.. .I feel porting to any other platform should not be much of a problem.....
Anyone needs the EXE and code fixes can mail me!!!
mailto://astroballu@yahoo.com
Hope this is going to help someone trying to remote control Celstia.....
There are a lot of possibilities as the client can be ay thing which could send in scripts to the server....
The development i've done works well on WINDOWS as i have no access to any other systems.. .I feel porting to any other platform should not be much of a problem.....
Anyone needs the EXE and code fixes can mail me!!!
mailto://astroballu@yahoo.com
All praise to thee Astroballu!
Astroballu,
Thanks indeed! This seems perfect for what I wanted to use it for.
Forgot to mention in my email, but yes indeed send all you have to Chris please.
Thanks again.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Thanks indeed! This seems perfect for what I wanted to use it for.
![Smile :)](./images/smilies/icon_smile.gif)
Forgot to mention in my email, but yes indeed send all you have to Chris please.
Thanks again.
![Smile :)](./images/smilies/icon_smile.gif)
![Very Happy :D](./images/smilies/icon_biggrin.gif)