Page 1 of 1
Celstia server for remote control!!!
Posted: 27.11.2002, 09:46
by astroballu
HI ,
i've just finished the work on developing a "primitive server" for celestia. The server runs on PORT 5555 and the client can connect to This port and issue commands to Celestia.
The client has to send the scripts to the server and the server uses the celstia parsing engine to parse the scripts and act accordingly!!!!
Anyone interested to try out the server can mail me!!!
mailto://astroballu@yahoo.com
i've given the code fixes to chris!
Posted: 02.12.2002, 14:59
by astroballu
hi ,
i've given celestia server code to chris and hopefully you can get it from the sourceforge site after he goes through it . In any case any i can till then provide the code fixes by mail..
Thanks for all the support.
Astroballu
Great idea!
Posted: 10.12.2002, 22:55
by Axel
I've always dreamt of a way to remote control Celestia over a TCP/IP connection. E.g. when Chris demonstrates a given situation or a new feature.
Or a user shows his/her problem in real-time. Not to talk about the classroom.
Once again, nice idea.
How about an encyclopedia frontend (e.g. 9-planets) which would link to a celestia lokation? Endless possibilities
Thanks! Axel
Re: i've given the code fixes to chris!
Posted: 29.04.2003, 10:17
by Guest
astroballu wrote:hi ,
i've given celestia server code to chris and hopefully you can get it from the sourceforge site after he goes through it . In any case any i can till then provide the code fixes by mail..
Thanks for all the support.
Astroballu
Hi,
What's the status of this part of the project? I have a multimedia installation in June (at
http://www.york.ac.uk/depts/music/newconcerts/programme/detail/20030606.html ) which could make use of this feature. I'm doing a 3-d diffusion of Stockhausen's Tierkreis piece (yeah, yeah - I know, don't give me a hard time about it being being based on astrology not astronomy....this is art, not science ) using Celestia to project the sky through the year, as the multichannel sound plays back. I was thinking about using the internal sound stuff on Celestia (also from Astroballu) - but the FMOD site doesn't specifically talk about multichannel (I need at least 8) or indicate that it can replay in 24 bit mode...I don't want to downgrade to 16 bit sample widths so I am currently intending to run an external player in sync with Celestia. It would be easier if I could use a simple Tcl script to start a Snack (
http://www.speech.kth.se/snack/) based player and Celestia simultaneously via a tcp/ip layer.
Re: i've given the code fixes to chris!
Posted: 29.04.2003, 10:25
by DaveM
Anonymous wrote:astroballu wrote:hi ,
i've given celestia server code to chris and hopefully you can get it from the sourceforge site after he goes through it . In any case any i can till then provide the code fixes by mail..
Thanks for all the support.
Astroballu
Hi,
What's the status of this part of the project? I have a multimedia installation in June (at
http://www.york.ac.uk/depts/music/newconcerts/programme/detail/20030606.html ) which could make use of this feature. I'm doing a 3-d diffusion <snipped the rest>
Whoops - that wasn't a guest, that was me who posted this...too many Netscape windows open on my desktop - I selected the wrong (un-logged in) one to post the reply in. Sorry
Dave
Posted: 29.04.2003, 11:52
by selden
Celestia v1.3.0 almost doesn't need a special IPC mechanism any more. It has always had a command-line interface. This means you can start it with a command issued from another computer or task. V1.3 allows the contents of the command line to be passed to the running copy of Celestia rather than starting a new copy of the program.
Celestia recognizes the following command qualifiers under Windows:
--verbose (or -v) followed by " > filespec" to create a log file
--fullscreen (or -f)
--once (or -o) passes the qualifiers to the running copy of Celestia
--dir (or -d) followed by the default directory
-u followed by a Cel:// URL
The command
celestia--once -u followed by a Cel:// URL
almost does what you want.
What's missing is being able to tell the running copy of Celestia to execute a 'startup script'. While it'd be best if one could pass the file spec of the script to execute (or perhaps include an individual script command on the command line), simply being able to tell the running copy of Celestia to execute the standard startup script would be adequate. In principle, one could overwrite the existing startup script with a new one.
Hopefully this feature could be added as part of the Lua integration. I'm rashly assuming that a Lua script could be used as a startup script.
Oh, of course, here's a crude hack:
Start a second copy of Celestia --fullscreen
have the new copy's startup script position the viewpoint at the final location of the startup script used by the previous copy.
kill the previous copy
Of course, there'll be a pause before the new copy actually gets going. This may be predictable enough to take into account in your presentation.
(added somewhat later)
Another possibility would be to use Celestia's "Capture Movie" menu. Unfortunately, that limits the resolution and would have a fixed timing, not to mention using a lot of disk space.
I hope this helps a little.
Posted: 29.04.2003, 15:16
by DaveM
selden wrote:Celestia v1.3.0 almost doesn't need a special IPC mechanism any more. It has always had a command-line interface. This means you can start it with a command issued from another computer or task. V1.3 allows the contents of the command line to be passed to the running copy of Celestia rather than starting a new copy of the program.
The command
celestia--once -u followed by a Cel:// URL
almost does what you want.
<snipped out some>
I hope this helps a little.
This doesn't just help a little, it helps a lot. I've had a play with this and it does just what it says on the can! I can run a batch file with the command --once -u in followed by a
Cel://URL from a paused version then, to start things, run another batch file with a Cel:// URL from a running version starting at the same time as the paused one and, apart from the slight start-up delay, it just goes. Some questions:-
Is that delay caused by the deliberate 'wait 1000' statement in the code or is it a function of the setting up necessary?
Is it possible to put placeholders in a Cel:// URL so that it uses the current values rather than inserting 'new' ones where they are the same - and would this reduce the start-up delay - if it does then the Cel:// URL mechanism + the --once flag would be a way to remotely send commands to Celestia
Is there any way to get info out of Celestia on the fly - I am thinking of getting info about what time Celestia thinks it is out so that it can be compared with time info from the audio file player..
Anyway, my current thinking is to run the audiofile player on one machine, Celestia on another and control them both from a Tcl/Tk interface banging off a "command line" (rather than running batch files, tho' Tcl could also be used in that way, of course) via Tcl channels as and when necessary. Time info feedback from Celestia would be useful for this, but there shouldn't be too much of a problem even without that, as the piece will be quite short in itself, the total duration being achieved with looping, which means it will re-sync on each repeat as Tcl will send out the command line with the appropriate Cel:// URL in again on each repetition.
Thanks for the prompt reply
Regards
Dave
Posted: 29.04.2003, 18:47
by chris
selden wrote:The command
celestia--once -u followed by a Cel:// URL
almost does what you want.
What's missing is being able to tell the running copy of Celestia to execute a 'startup script'. While it'd be best if one could pass the file spec of the script to execute (or perhaps include an individual script command on the command line), simply being able to tell the running copy of Celestia to execute the standard startup script would be adequate. In principle, one could overwrite the existing startup script with a new one.
Hopefully this feature could be added as part of the Lua integration. I'm rashly assuming that a Lua script could be used as a startup script.
It's already possible in the development version to specify a Lua script to start from the command line. This is how the file association works. In fact, I
think that this checkin made it into the 1.3.0 release, so you might be able to specify a startup script with the -u command line option:
celestia -u dostuff.cel
I know for certain that you can launch a script from the command line in Celestia 1.3.0 for Linux/KDE.
The Lua scripting stuff is progressing rapidly . . . I can make a prerelease available soon, but it'll be a while longer before the script API stabilizes enough that you can count on writing programs that will be runnable in future Celestia versions.
--Chris
Posted: 29.04.2003, 19:55
by selden
Chris,
Indeed "-u script.cel" does work with 1.3.0
thanks!
Celstia server for remote control
Posted: 05.06.2003, 08:03
by PhillipT
Astro,
is your code still available? reason for the question is that i am interested in remote controlling celestia from a handheld over a wifi network and this seems a perfect solution.
PT
Posted: 05.06.2003, 10:43
by selden
PhilipT,
Don't forget that Celestia now accepts the names of script files on the command line and that command lines can be passed directly to the running copy of Celestia. No special "server" mods are needed to accomplish what you want to do.
E.g:
celestia -once -c dothis.cel
tells the running copy of celestia to execute the commands in dothis.cel
Posted: 05.06.2003, 15:17
by PhillipT
Hi Seldon.
thanks for the pointer. Perhaps I am missing something, when i tried this on the Windows 2000 machine I have Celestia installed on - it simply spawned a new instance of Celestia...
have yet to try it on the linux box....
PT
Posted: 05.06.2003, 15:59
by selden
Phillip,
"it works fine for me!"
It worked under NT when I was using that, and it works under XP.
It should work under 2K also.
Superficially it sounds like perhaps the association in the registry might be damaged or that you're running an older version of Celestia. My understanding is that this feature requires v1.3.0 or later. I think that v1.3.0pre6 or v1.3.1pre3 would be the best choice at this point because of the bumpmap problems in v1.3.0final. When you do the install, be sure that the .CEL (and .CELX if you install 1.3.1) association boxes are checked.
If you (re)install QuickTime (and maybe some other animation playback programs) after you install Celestia, that will break the .CEL association that's needed. Unfortunately, .CEL is also used to designate a type of video file format and QT will greedily insist on being its player.
I hope this helps a little.
Posted: 05.06.2003, 19:54
by PhillipT
Seldon,
thanks - it was an association problem. Have another program called Toon, which also uses the .cel file extension. Unfortunately it resets the association without telling you when you use it, (not particularly sporting of it).
The command line passing works a treat, now to wire it all up to the webserver so i can call up scripts from a web page on the handheld...
Thanks again, very much appreciated.
Phillip