Navigate above orbits

All about writing scripts for Celestia in Lua and the .cel system
Topic author
ajtribick
Developer
Posts: 1805
Joined: 11.08.2003
With us: 17 years 1 month
Location: Switzerland

Navigate above orbits

Post #1by ajtribick » 31.08.2006, 19:08

Is it possible to have a script which, if a planet is selected, will position the observer on the line through the star perpendicular to the plane of the orbit, looking "down" on the orbit so the planet appears to revolve anticlockwise, and sufficiently far away that the orbit is visible (if this isn't possible, then leave the star selected for easy use of scroll-wheel to move out as necessary)?

Avatar
selden
Developer
Posts: 10136
Joined: 04.09.2002
With us: 18 years
Location: NY, USA

Post #2by selden » 02.09.2006, 13:57

Yes.

Do you mean for a specific planet, or for any planet?

For a specific planet, you can just use a Cel url, of course.

For a list of specific planets, a script could select among a list of URLs.

For an arbitrary planet, it could either prompt the user for the name of the planet, or it could use the currently selected object.

It's not quite what you asked for, but here's a trivial Cel script to goto a location above the north pole of the currently selected object:

Code: Select all

{
orbitflags { set "planet|moon" }
renderflags { set "orbits|markers" }
gotolonglat { time 3 distance 10000 longitude 0 latitude 90 }
}
Selden

hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 18 years 7 months
Location: Seattle, WA USA

Re: Navigate above orbits

Post #3by hank » 02.09.2006, 15:41

chaos syndrome wrote:Is it possible to have a script which, if a planet is selected, will position the observer on the line through the star perpendicular to the plane of the orbit, looking "down" on the orbit so the planet appears to revolve anticlockwise, and sufficiently far away that the orbit is visible (if this isn't possible, then leave the star selected for easy use of scroll-wheel to move out as necessary)?

Yes, you could do that with a CELX script.

- Hank

Siriusmystery
Posts: 17
Joined: 25.09.2006
With us: 13 years 11 months
Location: Munich / Germany

orbital course around an object-lets say earth

Post #4by Siriusmystery » 27.09.2006, 21:24

Hello, selden,

thank you and all Celestia stuff first of all for that fantastic open source software and the many provided documentations as those about CEL scripting. I am also not a studied programmer but just going to write my first program script what is a good chance also to learn about that in general.

I think "chaos syndrome" wants the same as myself:
I want to write a journey through the sun system beginning with the earth, than moon, sun , Venus etc. using several add-.ons
So- the first question I have and what I could not find jet in the script advises, is:

If I want to let the program select one of the add-ons in the "extra" folder- in that case one of the earth maps (of course I will have to test several ones to find that one that fits my needs) , so:
Which filename have i to write as an argument to the command into my script??
select { object " ?" }. Is it the filename of the folder as unzipped as the add-on, f E.:
select {object " earth 3d"} or have I to take the name of the SSC- file included in the folders directory, what is:
select { object "solarsys_earth200x.ssc"}?

Then also my second question is:

If that add-on shows the entire earth ( 3 d model, not jet tested) than it could be possible to move from a selected height all around it (orbit), perharps - if the model has enough resolution to land on it,(go to...) and make the same backward to the orbital position {lat 0.0 long 0.0}- that is directly above the equator on the Greenwich Meridian)and move on to the next planet (moon) using ever the best or most useful provided add-ons. for that purpose

The CEL scripting docu contains the command " "orbit" but does not explain what it exactly does.

Before to circle around the equator of any planet, also the position of the viewer ( as in an imaginary vehicle) has to turn 90 degrees inside the" x y z" axis relative to the South- North axis of the planet first But that is described in the CEL scripting docu.

Maybe you can answer these two questions.

Just on idea: Celestia would be perfect at any time to write a kind of space flight simulator on it. Some expert can design an space vehicle that also can display some Celestia features on interior monitors such as star maps, distances , names of stars and other parameters. However I think that I cant do it, for sure not with my act?al state of scripting knowledge. But Celestia can make Millions with such a game and can reward all its authors.. MS flight simulator would be -compared to Celestia just scrap!

Thank you!
Germany
Anyway we are never satisfied. and we always search for more? Note: When visiting my homepage you will will probably need Internet Explorer that reads its cfm code

Avatar
selden
Developer
Posts: 10136
Joined: 04.09.2002
With us: 18 years
Location: NY, USA

Re: orbital course around an object-lets say earth

Post #5by selden » 27.09.2006, 23:24

Siriusmystery wrote:Hello, selden,

thank you and all Celestia stuff first of all for that fantastic open source software and the many provided documentations as those about CEL scripting. I am also not a studied programmer but just going to write my first program script what is a good chance also to learn about that in general.
I am not a scripting expert. I know just enough to make it do what is needed for some of my Addons. Others know much more about scripting than I know.

I think "chaos syndrome" wants the same as myself:
I want to write a journey through the sun system beginning with the earth, than moon, sun , Venus etc. using several add-.ons
There are several solar system tour scripts already. There even is a Web page that can help you create a tour script.

Please take a look at this posting for an example of both:
http://www.celestiaproject.net/forum/viewtopic.php?t=3713

So- the first question I have and what I could not find jet in the script advises, is:

If I want to let the program select one of the add-ons in the "extra" folder- in that case one of the earth maps (of course I will have to test several ones to find that one that fits my needs) , so:
Which filename have i to write as an argument to the command into my script??[
select { object " ?" }. Is it the filename of the folder as unzipped as the add-on, f E.:
select {object " earth 3d"} or have I to take the name of the SSC- file included in the folders directory, what is:
select { object "solarsys_earth200x.ssc"}?
Neither one. The select statement requires the name of the object defined inside the .SSC file.

If the SSC file says

Code: Select all

"mymoon" "Sol/Venus" {...}
then "mymoon" must be used in the select statement.

Then also my second question is:

If that add-on shows the entire earth ( 3 d model, not jet tested) than it could be possible to move from a selected height all around it (orbit), perharps - if the model has enough resolution to land on it,(go to...) and make the same backward to the orbital position {lat 0.0 long 0.0}- that is directly above the equator on the Greenwich Meridian)and move on to the next planet (moon) using ever the best or most useful provided add-ons. for that purpose

The CEL scripting docu contains the command " "orbit" but does not explain what it exactly does.
I have never used the orbit command. I would suggest you try it out and see what it does.

Before to circle around the equator of any planet, also the position of the viewer ( as in an imaginary vehicle) has to turn 90 degrees inside the" x y z" axis relative to the South- North axis of the planet first But that is described in the CEL scripting docu.

Maybe you can answer these two questions.
Sorry, I'm only sure of the first one. Someone else will have to help you with the second one.
Just on idea: Celestia would be perfect at any time to write a kind of space flight simulator on it. Some expert can design an space vehicle that also can display some Celestia features on interior monitors such as star maps, distances , names of stars and other parameters.
A freeware space flight simulator already exists. Orbiter, by Martin Schweiger, is an excellent program for that purpose. See http://www.medphys.ucl.ac.uk/~martins/orbit/orbit.html

Celestia is a visualization program, which is not the same.
However I think that I cant do it, for sure not with my act???al state of scripting knowledge. But Celestia can make Millions with such a game and can reward all its authors.. MS flight simulator would be -compared to Celestia just scrap!

Celestia is open-source freeware. Its authors have no intention to use it to make money.
Selden

Siriusmystery
Posts: 17
Joined: 25.09.2006
With us: 13 years 11 months
Location: Munich / Germany

reply

Post #6by Siriusmystery » 27.09.2006, 23:50

Thanks for the many answers.
Sorry
:oops: I did not mind about to make money ( I find it good that it cost nothing for nobody... was just because on some celestia related sites , someone asked for a donation.
Okay- I dont want to mess up the topic here.


I dont know why , but with the first script I made anything wrong. I will find it out. I think before another objects starts the first one must be cancelled (?) I have to find it out by myself The authors of that might think that is so easy but it requires some pre knowledge about...However no beginning is easy But Im gonna make it!!

I added to the original star.cel file the orbitalpart of the demo.cel file and it worked. Ijust want to replace the earth object.
So just one more time back to my main question:

If I want to use another object than the default one, someone wrote, i have to takethe name of the SSC file ( i suggest without the ending ssc.:

The name of the whole css file is:
solarsys_earth200x.ssc

Sorry I also tried to find any file Earth/Sol that is writtenat the beginning of the start.cel file in the default folders, but there isnt on with that name

Could you just repeat or say clearly,which part of the file name I should take?
select {object "solarsys_earth200x"} ???

Sorry I have to ask again.
Thanks!
:) 8O 8)
Anyway we are never satisfied. and we always search for more? Note: When visiting my homepage you will will probably need Internet Explorer that reads its cfm code

Avatar
selden
Developer
Posts: 10136
Joined: 04.09.2002
With us: 18 years
Location: NY, USA

Post #7by selden » 28.09.2006, 00:00

Sirius,

Celestia always looks at all of the SSC catalog files. You do *not* have to specify any catalog file name in a script.

Each SSC catalog defines at least one object. Some define many objects.

Select chooses one of those objects. It does not choose a file.

Sometimes the name of an object is the same as the name of the ssc file or the same as the Zip file that the ssc file comes in, but not always.

If you haven't already, I suggest you read the Web page http://www.lepp.cornell.edu/~seb/celest ... intro.html

It explains how Addons should look. The very first example uses Select to go to an object that is defined in an STC catalog. It doesn't use a script, but the Select that you use from a keyboard works the same way: you provide it with the name of an object which has been defined in a catalog file.
Selden

Siriusmystery
Posts: 17
Joined: 25.09.2006
With us: 13 years 11 months
Location: Munich / Germany

Dear selden

Post #8by Siriusmystery » 28.09.2006, 00:59

Ithank you for spending your time with me. Here in Germany its now 2.A.M. But I have not to work tomorrow.
Last edited by Siriusmystery on 09.10.2006, 01:20, edited 2 times in total.
Anyway we are never satisfied. and we always search for more? Note: When visiting my homepage you will will probably need Internet Explorer that reads its cfm code

Starshipwright
Posts: 78
Joined: 08.08.2006
With us: 14 years 1 month

Post #9by Starshipwright » 28.09.2006, 03:03

You may want to take a look at the Celestia Explorer script at the Celestia Motherlode. It adds some space flight simulation functions to Celestia.

Some versions of Celesta (Celesta-ED for example) have an ability to overlay an image onto the screen. One of the overlays that has been created is the front window of a shuttle. This makes it look as if you are looking out at the screen from inside a shuttle.

Siriusmystery
Posts: 17
Joined: 25.09.2006
With us: 13 years 11 months
Location: Munich / Germany

Starshipwright- ( brother wright?)addon- space simulator

Post #10by Siriusmystery » 28.09.2006, 13:16

Dear poineer,
thanks, I have the most addons for experiments but just a few I have tried jet. The program but rather the add ons are rather new for me. I had the older version, where I just could see planets and stars.
But any spacecraft makes just the view smaller.
I must excuse again, as I said, with such a space simulator Celestia could earn Millions and cover their costs, as I couldnt afford that either. Somone asked for donations ( all that servers etc cost much money for sure) and I just could make some labels on my homepage....
Yesterday I could almost finsih the ground version for my palenetary exploration, by copying parts of demo.cel and replacing the filenames and parameters.
haha Copying was always the best... No... its was necessary in evolution and all kind of learning and makes many things easier.
Works well, including orbital flights around all moons. But I want to make some adjustments thenI will post it- if Sedlen has nothing against.
I just need to find a command for to let the camera/ viewer turn 90 degrees (y axis on top?)along the equator of the planets.
With moons of Saturn I get a program failure and it might become difficult whenI want to change to the star level ( new textures...)
Anyway we are never satisfied. and we always search for more? Note: When visiting my homepage you will will probably need Internet Explorer that reads its cfm code

Avatar
selden
Developer
Posts: 10136
Joined: 04.09.2002
With us: 18 years
Location: NY, USA

Re: Starshipwright- ( brother wright?)addon- space simulator

Post #11by selden » 28.09.2006, 13:21

Siriusmystery wrote: But I want to make some adjustments thenI will post it- if Sedlen has nothing against.


Anything related to Celestia is very welcome.
Selden

Siriusmystery
Posts: 17
Joined: 25.09.2006
With us: 13 years 11 months
Location: Munich / Germany

Post #12by Siriusmystery » 28.09.2006, 13:51

add: :roll:
I could add the Iapetus orbital tour. I write German " Japetus" ( greece brother of Kronos) insttad, Then the program made a start failure.

think the problem the program has to load the addon Saturn moons are, that it acts on too simple names like "Japetus". If it would read more particular filenames, lets say like "iapetus4kalbjpg", then noone would have to alter the solarsys.ssc file, what seems to me, due to my programer knowledge rather risky.
I dont find notepad on my pC I will have to use Celestias utility to edit ssc files. but no before making a RAR file form the original solarsys.ssc file.
Isnt easy... Same as with HTML code- one false character and you have a program failure...
However I will report again If I havegot it.
Does come "Starshipwright" from the "brothers Wright?"
:lol: Good luck!
Anyway we are never satisfied. and we always search for more? Note: When visiting my homepage you will will probably need Internet Explorer that reads its cfm code

Siriusmystery
Posts: 17
Joined: 25.09.2006
With us: 13 years 11 months
Location: Munich / Germany

Post #13by Siriusmystery » 28.09.2006, 13:59

Selden:
Anything related to Celestia is very welcome.

That with the orbital tours is Woow!

I just need to turn the camera to the y axis on top ( what is on our ccordinates the horizontal line , while the planet still moves the same direction, also on the y axis ( horizontal), That is what I call "space odyssee" resp Stanley Kubricks genious filmmaking tricks to give the viewer the feeling what 4 dimensions are.
Anyway we are never satisfied. and we always search for more? Note: When visiting my homepage you will will probably need Internet Explorer that reads its cfm code

Siriusmystery
Posts: 17
Joined: 25.09.2006
With us: 13 years 11 months
Location: Munich / Germany

observer view

Post #14by Siriusmystery » 07.10.2006, 19:33

Hello, again,

I have now reviewed all kinds of scripts I could find on Celestias site and all kinds of documentations.
Lua script commands seem not to work in a CEL script.
Last edited by Siriusmystery on 09.10.2006, 01:21, edited 1 time in total.
Anyway we are never satisfied. and we always search for more? Note: When visiting my homepage you will will probably need Internet Explorer that reads its cfm code

ANDREA
Posts: 1527
Joined: 01.06.2002
With us: 18 years 3 months
Location: Rome, ITALY

Post #15by ANDREA » 08.10.2006, 00:00

[quote="selden"]

Code: Select all

{
orbitflags { set "planet|moon" }
renderflags { set "orbits|markers" }
gotolonglat { time 3 distance 10000 longitude 0 latitude 90 }
}
quote]

Selden, I've never seen before the orbitflags cel script command, so I searched in the documentation files, but I didn't find it. :cry:
Is this a new command to be added to Don Goyette's CEL Scripting Guide- version 1.0g?
If yes, is there any more? 8O
If yes, I surely missed the relevant topic, can you please give me the address?
Thank you.
Bye

Andrea :D
Core 2 Quad Q6600 G0 3.8 GHz- 8 GB DDR2
DELL 2709W 1920x1200- WIN 7 64 bit- ASUS P5K-E-
8800 GTX 768MB- 6xSATA II, total 7.5 TB-260.89- Celestia 1.6.1
Celestia1.4.1_patch3- Vincent's LUA Edu Tools 1.2

Avatar
selden
Developer
Posts: 10136
Joined: 04.09.2002
With us: 18 years
Location: NY, USA

Post #16by selden » 08.10.2006, 01:45

Andrea,

I don't know when orbitflags was defined.
Most of the flags are listed on my "cryptic notes" page at
http://www.lepp.cornell.edu/~seb/celest ... notes.html

Several settings have been added since Don wrote the CEL documentation.
Selden

ANDREA
Posts: 1527
Joined: 01.06.2002
With us: 18 years 3 months
Location: Rome, ITALY

Post #17by ANDREA » 08.10.2006, 09:06

selden wrote:Andrea, I don't know when orbitflags was defined.
Most of the flags are listed on my "cryptic notes" page at
http://www.lepp.cornell.edu/~seb/celest ... notes.html
Several settings have been added since Don wrote the CEL documentation.

Thanks a lot, Selden, found and checked it.
Anyhow I would like that such a kind of (very appreciated) changes would be more manifest, not only in the forum, but too in the related docs, giving more information on the matter.
Don, do you have intention to upgrade your CEL Scripting Guide- version 1.0g?
Please! 8)
Thanks a lot.
Bye

Andrea :D
Core 2 Quad Q6600 G0 3.8 GHz- 8 GB DDR2
DELL 2709W 1920x1200- WIN 7 64 bit- ASUS P5K-E-
8800 GTX 768MB- 6xSATA II, total 7.5 TB-260.89- Celestia 1.6.1
Celestia1.4.1_patch3- Vincent's LUA Edu Tools 1.2

ANDREA
Posts: 1527
Joined: 01.06.2002
With us: 18 years 3 months
Location: Rome, ITALY

Post #18by ANDREA » 08.10.2006, 09:53

After a quick check I found these three additions from Don Goyette's CEL Scripting Guide- version 1.0g:
?⤠orbitflags
?⤠renderpath
?⤠setambientlight

The last one was previously included in the "set" command, but the other two are true new entries.
IMHO the possibility to change renderpath by cel scrip command is very important, at least up to 1.4.1 release (if I understand correctly, in 1.5.0 release the OGL2 path is a must), to show things that render better with a path different from the start one.
Using my scripts I had the need, many times, to change it during the show, to make more evident some characteristics.
So, welcome, renderpath, and the same for orbitflags! :wink:
Many thanks to the developers for these improvements to cel script functions.
Bye

Andrea :D
Core 2 Quad Q6600 G0 3.8 GHz- 8 GB DDR2
DELL 2709W 1920x1200- WIN 7 64 bit- ASUS P5K-E-
8800 GTX 768MB- 6xSATA II, total 7.5 TB-260.89- Celestia 1.6.1
Celestia1.4.1_patch3- Vincent's LUA Edu Tools 1.2

Avatar
selden
Developer
Posts: 10136
Joined: 04.09.2002
With us: 18 years
Location: NY, USA

Post #19by selden » 08.10.2006, 13:15

Andre,

The older renderpaths will continue to work, since many people do not have the new graphics cards that are needed to support the v2.0 render path.

p.s. You'll have to contact Don directly. I don't think he visits the Celestia forum any more.
Selden

ANDREA
Posts: 1527
Joined: 01.06.2002
With us: 18 years 3 months
Location: Rome, ITALY

Post #20by ANDREA » 08.10.2006, 13:48

selden wrote:Andre, The older renderpaths will continue to work, since many people do not have the new graphics cards that are needed to support the v2.0 render path. p.s. You'll have to contact Don directly. I don't think he visits the Celestia forum any more.

Thank you Selden.
Regarding Don, I'll contact him by email.
Bye

Andrea :D
Core 2 Quad Q6600 G0 3.8 GHz- 8 GB DDR2
DELL 2709W 1920x1200- WIN 7 64 bit- ASUS P5K-E-
8800 GTX 768MB- 6xSATA II, total 7.5 TB-260.89- Celestia 1.6.1
Celestia1.4.1_patch3- Vincent's LUA Edu Tools 1.2


Return to “Scripting”

Who is online